ajout du camion #87

* changements des objectifs, donnent juste des graines, sprite moins gros et objectifs plus nombreux
* changement de la probabilité de mutation
* refactor du code terrain et planet
This commit is contained in:
2025-10-12 19:59:53 +02:00
parent ef392595de
commit d90d4c5df6
52 changed files with 627 additions and 346 deletions

View File

@@ -10,7 +10,7 @@ func get_seeds_production(l : int = level) -> int:
func product(player : Player):
for i in range(get_seeds_production()):
player.planet.drop_item(
player.terrain.drop_item(
Seed.new(GameInfo.game_data.unlocked_plant_types.pick_random()),
global_position,
100

View File

@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="65.888519mm"
height="56.356422mm"
viewBox="0 0 65.888519 56.356422"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="recharge_station.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="mm"
inkscape:zoom="1.5821549"
inkscape:cx="45.82358"
inkscape:cy="147.89955"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-72.05574,-18.228039)">
<rect
style="fill:#d1d1d1;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="rect1"
width="16.054054"
height="35.392433"
x="96.972969"
y="18.228039"
rx="5"
ry="5" />
<ellipse
style="fill:#ffffff;stroke-width:0.264583;stroke-linecap:square"
id="path1"
cx="105"
cy="60.537163"
rx="32.94426"
ry="14.047297" />
<ellipse
style="fill:#d1d1d1;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="ellipse1"
cx="105"
cy="60.537163"
rx="16.221287"
ry="6.9166899" />
<circle
style="fill:#ffffff;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="path2"
cx="105"
cy="26.171452"
r="5.685811" />
<g
id="g3"
transform="translate(0.20904541)">
<circle
style="fill:#d1d1d1;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="circle2"
cx="102.61697"
cy="26.171452"
r="1.5050678" />
<circle
style="fill:#d1d1d1;fill-opacity:1;stroke-width:0.264583;stroke-linecap:square"
id="circle3"
cx="106.96494"
cy="26.171452"
r="1.5050678" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -1,37 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c82ljr3in67am"
path="res://.godot/imported/recharge_station.svg-b4dbe96f287bff2995b6160acd3f32ff.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/machines/recharge_station/assets/sprites/recharge_station.svg"
dest_files=["res://.godot/imported/recharge_station.svg-b4dbe96f287bff2995b6160acd3f32ff.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -1,29 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://d324mlmgls4fs"]
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/machines/recharge_station/scripts/recharge_station.gd" id="1_2ffjo"]
[ext_resource type="Texture2D" uid="uid://c82ljr3in67am" path="res://entities/interactables/machines/recharge_station/assets/sprites/recharge_station.svg" id="2_58ax0"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_3xua0"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
radius = 15.0
height = 72.0
[node name="RechargeStation" type="Area2D"]
script = ExtResource("1_2ffjo")
metadata/_custom_type_script = "uid://dyprcd68fjstf"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(1, -1)
rotation = -1.5708
shape = SubResource("CapsuleShape2D_bjhct")
[node name="RechargeStation" type="Sprite2D" parent="."]
self_modulate = Color(0.729412, 0.588235, 0.105882, 1)
position = Vector2(0, -17)
scale = Vector2(0.3, 0.3)
texture = ExtResource("2_58ax0")
[node name="Bolt" type="Sprite2D" parent="."]
position = Vector2(0, -40)
scale = Vector2(0.375, 0.375)
texture = ExtResource("3_3xua0")

View File

@@ -1,22 +0,0 @@
extends Machine
class_name RechargeStation
var planet : Planet # mis à jour par la classe Planet
func interact(_p: Player) -> bool:
planet.pass_day()
return true
func interact_text():
return "Recharge"
func pointer_text():
return "Recharge Station"
func inspector_info() -> Inspector.Info:
return Inspector.Info.new(
pointer_text(),
"You can recharge your robot here. When recharging, time will pass and plants may grow."
)