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
@@ -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
|
||||
|
||||
@@ -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 |
@@ -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")
|
||||
@@ -1,17 +1,24 @@
|
||||
extends InspectableEntity
|
||||
class_name Interactable
|
||||
|
||||
signal interacted(p: Player)
|
||||
|
||||
@export var default_interact_text = ""
|
||||
|
||||
var available : bool = true
|
||||
|
||||
func interact_text() -> String:
|
||||
return default_interact_text
|
||||
|
||||
func can_interact(_p : Player) -> bool:
|
||||
return available
|
||||
|
||||
func interaction_cost(_p : Player) -> int:
|
||||
return 0
|
||||
|
||||
func interact(_p : Player) -> bool:
|
||||
printerr("Interact function called on abstract Interactable class")
|
||||
return false
|
||||
func interact(_p : Player) -> bool:
|
||||
interacted.emit(_p)
|
||||
return true
|
||||
|
||||
func generate_collision(area_width : float) -> CollisionShape2D:
|
||||
var collision = CollisionShape2D.new()
|
||||
|
||||
BIN
entities/interactables/truck/assets/sprites/truck_ladder.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@@ -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
|
||||
22
entities/interactables/truck/ladder/scripts/truck_ladder.gd
Normal 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
|
||||
@@ -0,0 +1 @@
|
||||
uid://buimaomxu01wj
|
||||
33
entities/interactables/truck/ladder/truck_ladder.tscn
Normal 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")
|
||||
@@ -1,10 +1,11 @@
|
||||
extends Machine
|
||||
class_name RechargeStation
|
||||
|
||||
var planet : Planet # mis à jour par la classe Planet
|
||||
extends Interactable
|
||||
class_name TruckRecharge
|
||||
|
||||
func interact(_p: Player) -> bool:
|
||||
|
||||
if planet == null:
|
||||
return false
|
||||
|
||||
planet.pass_day()
|
||||
|
||||
return true
|
||||
@@ -19,4 +20,4 @@ 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."
|
||||
)
|
||||
)
|
||||
30
entities/interactables/truck/recharge/truck_recharge.tscn
Normal 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")
|
||||
BIN
entities/objectives/assets/sprites/herbe.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
@@ -2,22 +2,24 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c82ljr3in67am"
|
||||
path="res://.godot/imported/recharge_station.svg-b4dbe96f287bff2995b6160acd3f32ff.ctex"
|
||||
uid="uid://4iukrxpg34y4"
|
||||
path="res://.godot/imported/herbe.png-0b71f9ccc1e3943af9b0f3a135d3651b.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"]
|
||||
source_file="res://entities/objectives/assets/sprites/herbe.png"
|
||||
dest_files=["res://.godot/imported/herbe.png-0b71f9ccc1e3943af9b0f3a135d3651b.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
|
||||
@@ -25,6 +27,10 @@ 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
|
||||
@@ -32,6 +38,3 @@ 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
|
||||
BIN
entities/objectives/assets/sprites/herbe3.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
40
entities/objectives/assets/sprites/herbe3.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bsetwgt5tqv7v"
|
||||
path="res://.godot/imported/herbe3.png-a47f3310ca32019ca3d036e811d21212.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/objectives/assets/sprites/herbe3.png"
|
||||
dest_files=["res://.godot/imported/herbe3.png-a47f3310ca32019ca3d036e811d21212.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
|
||||
BIN
entities/objectives/assets/sprites/herbe4.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
40
entities/objectives/assets/sprites/herbe4.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://k4v52q6eejv"
|
||||
path="res://.godot/imported/herbe4.png-c674d45256bbf00e0fd646fd55e2e33b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/objectives/assets/sprites/herbe4.png"
|
||||
dest_files=["res://.godot/imported/herbe4.png-c674d45256bbf00e0fd646fd55e2e33b.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
|
||||
BIN
entities/objectives/assets/sprites/herbe8_glow.png
Normal file
|
After Width: | Height: | Size: 117 KiB |
40
entities/objectives/assets/sprites/herbe8_glow.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ckb8w7hsfevvt"
|
||||
path="res://.godot/imported/herbe8_glow.png-c4d058e6fea519767afa64e839e5f87f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/objectives/assets/sprites/herbe8_glow.png"
|
||||
dest_files=["res://.godot/imported/herbe8_glow.png-c4d058e6fea519767afa64e839e5f87f.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
|
||||
BIN
entities/objectives/assets/sprites/plante_morte.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
40
entities/objectives/assets/sprites/plante_morte.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bxb13hfnhxpvv"
|
||||
path="res://.godot/imported/plante_morte.png-308d7033b9ec4bc89434e061a168e35b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/objectives/assets/sprites/plante_morte.png"
|
||||
dest_files=["res://.godot/imported/plante_morte.png-308d7033b9ec4bc89434e061a168e35b.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
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://djl2le58ckgdx"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://djl2le58ckgdx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://j8fpi8rd8eyy" path="res://entities/objectives/scripts/objective.gd" id="1_3hqw5"]
|
||||
[ext_resource type="Texture2D" uid="uid://dbednu7eygtrf" path="res://entities/objectives/assets/sprites/arbre_mort.png" id="2_3hqw5"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4pv2o7crchc0" path="res://entities/objectives/assets/sprites/little_plant.png" id="3_dulsb"]
|
||||
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="4_6uhem"]
|
||||
[ext_resource type="Texture2D" uid="uid://bo3o2qf3i20ke" path="res://common/icons/scuba-diving-tank.svg" id="5_6uhem"]
|
||||
[ext_resource type="Texture2D" uid="uid://4iukrxpg34y4" path="res://entities/objectives/assets/sprites/herbe.png" id="2_047qm"]
|
||||
[ext_resource type="Texture2D" uid="uid://bxb13hfnhxpvv" path="res://entities/objectives/assets/sprites/plante_morte.png" id="3_bvagy"]
|
||||
[ext_resource type="Texture2D" uid="uid://k4v52q6eejv" path="res://entities/objectives/assets/sprites/herbe4.png" id="4_lrlky"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckb8w7hsfevvt" path="res://entities/objectives/assets/sprites/herbe8_glow.png" id="5_6uhem"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_v08i5"]
|
||||
length = 0.001
|
||||
@@ -18,7 +18,7 @@ tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(0.443137, 0.443137, 0.443137, 1)]
|
||||
"values": [Color(0.627451, 0.85490197, 0.8980392, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
@@ -83,26 +83,26 @@ tracks/5/keys = {
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("LittlePlant3:scale")
|
||||
tracks/6/path = NodePath("ArbreMort:scale")
|
||||
tracks/6/interp = 1
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.094358, 0.094358)]
|
||||
"values": [Vector2(0.162791, 0.162791)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("ArbreMort:scale")
|
||||
tracks/7/path = NodePath("LittlePlant3:scale")
|
||||
tracks/7/interp = 1
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.162791, 0.162791)]
|
||||
"values": [Vector2(0.094358, 0.094358)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_6uhem"]
|
||||
@@ -117,7 +117,7 @@ tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.266667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0.443137, 0.443137, 0.443137, 1), Color(1, 1, 1, 1)]
|
||||
"values": [Color(0.62835556, 0.85348916, 0.8974243, 1), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
@@ -141,7 +141,7 @@ tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.433333, 0.6),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0.094358, 0.094358)]
|
||||
"values": [Vector2(0, 0), Vector2(0.044, 0.044)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
@@ -165,7 +165,7 @@ tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0.6, 0.8),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0.094358, 0.094358)]
|
||||
"values": [Vector2(0, 0), Vector2(0.044, 0.044)]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
@@ -182,27 +182,27 @@ tracks/5/keys = {
|
||||
tracks/6/type = "value"
|
||||
tracks/6/imported = false
|
||||
tracks/6/enabled = true
|
||||
tracks/6/path = NodePath("LittlePlant3:scale")
|
||||
tracks/6/path = NodePath("ArbreMort:scale")
|
||||
tracks/6/interp = 2
|
||||
tracks/6/loop_wrap = true
|
||||
tracks/6/keys = {
|
||||
"times": PackedFloat32Array(0.4, 0.533333),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0.094358, 0.094358)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("ArbreMort:scale")
|
||||
tracks/7/interp = 2
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1, 0.266667, 0.4),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0.162791, 0.162791), Vector2(0.183, 0.093), Vector2(0.123, 0.178), Vector2(0.162791, 0.162791)]
|
||||
}
|
||||
tracks/7/type = "value"
|
||||
tracks/7/imported = false
|
||||
tracks/7/enabled = true
|
||||
tracks/7/path = NodePath("LittlePlant3:scale")
|
||||
tracks/7/interp = 2
|
||||
tracks/7/loop_wrap = true
|
||||
tracks/7/keys = {
|
||||
"times": PackedFloat32Array(0.4, 0.533333),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0), Vector2(0.054, 0.054)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_047qm"]
|
||||
_data = {
|
||||
@@ -211,12 +211,8 @@ _data = {
|
||||
}
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bvagy"]
|
||||
radius = 24.0
|
||||
height = 160.0
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_v08i5"]
|
||||
font = ExtResource("4_6uhem")
|
||||
font_size = 18
|
||||
radius = 15.0
|
||||
height = 68.0
|
||||
|
||||
[node name="Objective" type="Area2D"]
|
||||
script = ExtResource("1_3hqw5")
|
||||
@@ -229,53 +225,31 @@ libraries = {
|
||||
}
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -20)
|
||||
position = Vector2(-1, -16)
|
||||
rotation = 1.5708
|
||||
shape = SubResource("CapsuleShape2D_bvagy")
|
||||
|
||||
[node name="ArbreMort" type="Sprite2D" parent="."]
|
||||
modulate = Color(0.443137, 0.443137, 0.443137, 1)
|
||||
position = Vector2(5, 4)
|
||||
scale = Vector2(0.162791, 0.162791)
|
||||
texture = ExtResource("2_3hqw5")
|
||||
centered = false
|
||||
offset = Vector2(-627.055, -607.11)
|
||||
|
||||
[node name="LittlePlant" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(-22, -46)
|
||||
position = Vector2(-15, -25)
|
||||
scale = Vector2(0.094358, 0.094358)
|
||||
texture = ExtResource("3_dulsb")
|
||||
texture = ExtResource("2_047qm")
|
||||
|
||||
[node name="ArbreMort" type="Sprite2D" parent="."]
|
||||
modulate = Color(0.627451, 0.85490197, 0.8980392, 1)
|
||||
position = Vector2(0, -17)
|
||||
scale = Vector2(0.162791, 0.162791)
|
||||
texture = ExtResource("3_bvagy")
|
||||
offset = Vector2(0, -85.55)
|
||||
|
||||
[node name="LittlePlant2" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(39, -25)
|
||||
position = Vector2(21, -22)
|
||||
scale = Vector2(0.094358, 0.094358)
|
||||
texture = ExtResource("3_dulsb")
|
||||
texture = ExtResource("4_lrlky")
|
||||
|
||||
[node name="LittlePlant3" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(-49, -14)
|
||||
position = Vector2(0, -15.000002)
|
||||
scale = Vector2(0.094358, 0.094358)
|
||||
texture = ExtResource("3_dulsb")
|
||||
|
||||
[node name="RewardInfo" type="HBoxContainer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
offset_left = -67.0
|
||||
offset_top = -34.0
|
||||
offset_right = 51.0
|
||||
offset_bottom = -15.0
|
||||
theme_override_constants/separation = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="RewardText" type="Label" parent="RewardInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "bla"
|
||||
label_settings = SubResource("LabelSettings_v08i5")
|
||||
|
||||
[node name="RewardIcon" type="TextureRect" parent="RewardInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
texture = ExtResource("5_6uhem")
|
||||
expand_mode = 2
|
||||
|
||||
@@ -5,14 +5,7 @@ const RANDOM_MAX_OBJECTIVE_INTERVAL = 1.
|
||||
const DECONTAMINATION_ICON = preload("res://common/icons/skull.svg")
|
||||
|
||||
var completed : bool = false
|
||||
var planet : Planet
|
||||
@export var reward : ObjectiveReward = null :
|
||||
set(r):
|
||||
reward = r
|
||||
update_reward_info(r)
|
||||
|
||||
func _ready():
|
||||
update_reward_info(reward)
|
||||
@export var reward : ObjectiveReward = null
|
||||
|
||||
func pointer_text():
|
||||
return "Contamination Objective"
|
||||
@@ -20,7 +13,7 @@ func pointer_text():
|
||||
func inspector_info() -> Inspector.Info:
|
||||
var info : Inspector.Info = Inspector.Info.new(
|
||||
pointer_text(),
|
||||
"This dead log can hide a treasure of life."
|
||||
"This dead branch can hide a treasure of life."
|
||||
)
|
||||
|
||||
info.framed_infos.append(
|
||||
@@ -40,9 +33,3 @@ func _end_pass_day():
|
||||
%AnimationPlayer.play("activate")
|
||||
%RewardInfo.visible = false
|
||||
completed = true
|
||||
|
||||
func update_reward_info(r : ObjectiveReward):
|
||||
if r:
|
||||
%RewardText.text = r.get_text()
|
||||
%RewardIcon.texture = r.get_icon()
|
||||
%RewardInfo.visible = r != null
|
||||
|
||||
@@ -7,7 +7,8 @@ func _init(_day_limit_increase : int):
|
||||
day_limit_increase = _day_limit_increase
|
||||
|
||||
func reward(objective : Objective):
|
||||
objective.planet.day_limit += day_limit_increase
|
||||
if objective.planet:
|
||||
objective.planet.day_limit += day_limit_increase
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/hourglass-empty.svg")
|
||||
|
||||
@@ -18,7 +18,7 @@ func get_description() -> String:
|
||||
return "Loot the following item: " + item.name + "."
|
||||
|
||||
func reward(objective : Objective):
|
||||
objective.planet.drop_item(
|
||||
objective.terrain.drop_item(
|
||||
item,
|
||||
objective.global_position,
|
||||
REWARD_ITEM_RANDOM_DISPLACEMENT_FACTOR
|
||||
|
||||
@@ -19,7 +19,7 @@ func get_description() -> String:
|
||||
|
||||
func reward(objective : Objective):
|
||||
for i in range(seeds_number):
|
||||
objective.planet.drop_item(
|
||||
objective.terrain.drop_item(
|
||||
Seed.new(GameInfo.game_data.unlocked_plant_types.pick_random()),
|
||||
objective.global_position,
|
||||
REWARD_SEED_RANDOM_DISPLACEMENT_FACTOR
|
||||
|
||||
@@ -7,7 +7,7 @@ func _init(_recharge_amount : int = 1):
|
||||
recharge_amount = _recharge_amount
|
||||
|
||||
func reward(objective : Objective):
|
||||
objective.planet.player.recharge(recharge_amount)
|
||||
objective.terrain.player.recharge(recharge_amount)
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/bolt.svg")
|
||||
|
||||
@@ -7,7 +7,7 @@ func _init(_upgrade_amount : int = 1):
|
||||
upgrade_amount = _upgrade_amount
|
||||
|
||||
func reward(objective : Objective):
|
||||
objective.planet.player.upgrade_max_energy(upgrade_amount)
|
||||
objective.terrain.player.upgrade_max_energy(upgrade_amount)
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/bolt.svg")
|
||||
|
||||
@@ -7,7 +7,7 @@ func _init(_upgrade_amount : int = 1):
|
||||
upgrade_amount = _upgrade_amount
|
||||
|
||||
func reward(objective : Objective):
|
||||
objective.planet.player.upgrade_inventory_size(upgrade_amount)
|
||||
objective.terrain.player.upgrade_inventory_size(upgrade_amount)
|
||||
|
||||
func get_icon() -> Texture:
|
||||
return preload("res://common/icons/backpack.svg")
|
||||
|
||||
@@ -16,7 +16,6 @@ const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.t
|
||||
enum State {PLANTED, GROWING, MATURE}
|
||||
|
||||
@export var plant_type: PlantType
|
||||
var planet: Planet # mis à jour par la classe Planet
|
||||
|
||||
var state: State = State.PLANTED: set = change_state
|
||||
@export var day: int = 0 : set = set_day
|
||||
|
||||
@@ -8,7 +8,9 @@ const DEFAULT_INVENTORY_SIZE = 2
|
||||
signal player_updated(player: Player)
|
||||
signal upgraded
|
||||
|
||||
var planet : Planet # mis à jour par la classe Planet
|
||||
var terrain : Terrain
|
||||
var planet : Planet :
|
||||
get(): return terrain if terrain is Planet else null
|
||||
@export var speed = 350
|
||||
|
||||
var max_energy : int = 3
|
||||
@@ -136,7 +138,7 @@ func pick_item(item : Item) -> Item:
|
||||
func drop_item():
|
||||
var item_to_drop = inventory.pop_item()
|
||||
if item_to_drop:
|
||||
planet.drop_item(item_to_drop, global_position)
|
||||
terrain.drop_item(item_to_drop, global_position)
|
||||
play_sfx("drop")
|
||||
|
||||
func delete_item(item: Item):
|
||||
|
||||
@@ -3,6 +3,13 @@ class_name InspectableEntity
|
||||
|
||||
const MODULATE_INSPECTED_COLOR = Color.GRAY
|
||||
|
||||
var terrain : Terrain
|
||||
var planet : Planet :
|
||||
get(): return terrain if terrain is Planet else null
|
||||
|
||||
@export var default_info_title = ""
|
||||
@export var default_info_desc = ""
|
||||
|
||||
@onready var default_modulate : Color = modulate
|
||||
@onready var inspectable_signals_setuped : bool = setup_inspectable_signals()
|
||||
|
||||
@@ -21,11 +28,12 @@ func _on_mouse_excited():
|
||||
Pointer.stop_inspect(self)
|
||||
|
||||
func pointer_text():
|
||||
return ""
|
||||
return default_info_title
|
||||
|
||||
func inspector_info() -> Inspector.Info:
|
||||
return Inspector.Info.new(
|
||||
pointer_text()
|
||||
pointer_text(),
|
||||
default_info_desc
|
||||
)
|
||||
|
||||
func _notification(what):
|
||||
|
||||
@@ -7,13 +7,10 @@ const LOOTED_ITEM_RANDOM_RANGE = 50
|
||||
const SPRITE_SCENE : PackedScene = preload("res://entities/underground_loot/underground_loot_sprite.tscn")
|
||||
|
||||
@export var loot : Array[Item]
|
||||
var planet : Planet # mis à jour par la classe Planet
|
||||
|
||||
@onready var sprite_object: Node2D = generate_sprite()
|
||||
@onready var collision_shape: CollisionShape2D = generate_collision_shape()
|
||||
|
||||
func _init(_planet = null):
|
||||
planet = _planet
|
||||
|
||||
func pointer_text():
|
||||
return "Buried Loot"
|
||||
|
||||