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

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dlrj7tyi5wfh8"
path="res://.godot/imported/truck_ladder.png-00d93dc49c0cc6457febb75d7b82dec4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/truck/assets/sprites/truck_ladder.png"
dest_files=["res://.godot/imported/truck_ladder.png-00d93dc49c0cc6457febb75d7b82dec4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

View File

@@ -0,0 +1,22 @@
extends Interactable
class_name TruckLadder
@export var truck_interior : TruckInterior
@export var planet_camera : Camera
func _ready():
truck_interior.player_exited.connect(_on_truck_interior_player_exited)
func interact(p : Player):
truck_interior.add_entity(p)
p.global_position = truck_interior.spawn_position.global_position
truck_interior.camera.make_current()
planet_camera.following = null
return true
func _on_truck_interior_player_exited(p):
planet.add_entity(p)
p.global_position = global_position
planet_camera.make_current()
planet_camera.following = p

View File

@@ -0,0 +1 @@
uid://buimaomxu01wj

View File

@@ -0,0 +1,33 @@
[gd_scene load_steps=6 format=3 uid="uid://cg1visg52i21a"]
[ext_resource type="Script" uid="uid://buimaomxu01wj" path="res://entities/interactables/truck/ladder/scripts/truck_ladder.gd" id="1_26qdk"]
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/truck/assets/sprites/truck_ladder.png" id="2_xila4"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://common/icons/logout.svg" id="3_214ms"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_hslnw"]
radius = 26.0
height = 112.0
[sub_resource type="AtlasTexture" id="AtlasTexture_gmirm"]
atlas = ExtResource("2_xila4")
region = Rect2(205, 157, 87, 208)
[node name="TruckLadder" type="Area2D"]
script = ExtResource("1_26qdk")
default_interact_text = "Enter Truck"
default_info_title = "Truck Entrance"
default_info_desc = "A good old ladder."
metadata/_custom_type_script = "uid://dyprcd68fjstf"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.25, -28)
shape = SubResource("CapsuleShape2D_hslnw")
[node name="TruckLadder" type="Sprite2D" parent="."]
position = Vector2(-1.25, -30)
scale = Vector2(0.5, 0.5)
texture = SubResource("AtlasTexture_gmirm")
[node name="Bolt" type="Sprite2D" parent="."]
position = Vector2(0.75, -29.000004)
texture = ExtResource("3_214ms")

View File

@@ -0,0 +1,23 @@
extends Interactable
class_name TruckRecharge
func interact(_p: Player) -> bool:
if planet == null:
return false
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."
)

View File

@@ -0,0 +1 @@
uid://bsrn3gd2a532q

View File

@@ -0,0 +1,30 @@
[gd_scene load_steps=6 format=3 uid="uid://d324mlmgls4fs"]
[ext_resource type="Script" uid="uid://bsrn3gd2a532q" path="res://entities/interactables/truck/recharge/scripts/recharge_station.gd" id="1_ipgcv"]
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/truck/assets/sprites/truck_ladder.png" id="2_87dtp"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="3_jcfmm"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
radius = 26.0
height = 106.0
[sub_resource type="AtlasTexture" id="AtlasTexture_ot7vv"]
atlas = ExtResource("2_87dtp")
region = Rect2(64, 161, 101, 205)
[node name="TruckRecharge" type="Area2D"]
script = ExtResource("1_ipgcv")
metadata/_custom_type_script = "uid://dyprcd68fjstf"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(1, -14)
shape = SubResource("CapsuleShape2D_bjhct")
[node name="RechargeStation" type="Sprite2D" parent="."]
position = Vector2(0, -17)
scale = Vector2(0.5, 0.5)
texture = SubResource("AtlasTexture_ot7vv")
[node name="Bolt" type="Sprite2D" parent="."]
position = Vector2(0, -15)
texture = ExtResource("3_jcfmm")