diff --git a/common/game_data/scripts/settings_data.gd b/common/game_data/scripts/settings_data.gd
index f0d5a4e..610a3c1 100644
--- a/common/game_data/scripts/settings_data.gd
+++ b/common/game_data/scripts/settings_data.gd
@@ -8,6 +8,7 @@ const AMBIANCE_BUS_ID = 3
signal language_changed(settings : SettingsData)
signal sound_changed(settings : SettingsData)
signal video_changed(settings : SettingsData)
+signal game_changed(settings : SettingsData)
#region ------------------ Language ------------------
@@ -52,4 +53,30 @@ const AVAILABLE_LANGUAGES_LABEL = [
#region ------------------ Controls ------------------
@export var action_remapped : Array[String] = []
-@export var input_remapped : Array[InputEvent] = []
\ No newline at end of file
+@export var input_remapped : Array[InputEvent] = []
+
+#region ------------------ Game ------------------
+
+const MAX_ZOOM = 1.8
+const MIN_ZOOM = 0.9
+
+# Not in settings pannel
+@export var zoom : float = 1. :
+ set(v):
+ zoom = min(MAX_ZOOM,max(MIN_ZOOM,v))
+ game_changed.emit(self)
+
+@export var closed_help_containers = []
+
+func is_help_container_closed(help_container_name : String) -> bool:
+ return help_container_name in closed_help_containers
+
+func close_help_container(help_container_name : String):
+ if not help_container_name in closed_help_containers:
+ closed_help_containers.append(help_container_name)
+ game_changed.emit(self)
+
+func open_help_container(help_container_name : String):
+ if help_container_name in closed_help_containers:
+ closed_help_containers.erase(help_container_name)
+ game_changed.emit(self)
\ No newline at end of file
diff --git a/common/icons/carambola.svg b/common/icons/carambola.svg
new file mode 100644
index 0000000..ada4f51
--- /dev/null
+++ b/common/icons/carambola.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/common/icons/carambola.svg.import b/common/icons/carambola.svg.import
new file mode 100644
index 0000000..fa72c67
--- /dev/null
+++ b/common/icons/carambola.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bi5jo6pf0acjb"
+path="res://.godot/imported/carambola.svg-5e6376705de1e490bd48f22ac6d19a49.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/carambola.svg"
+dest_files=["res://.godot/imported/carambola.svg-5e6376705de1e490bd48f22ac6d19a49.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/common/icons/clock.svg b/common/icons/clock.svg
new file mode 100644
index 0000000..daaf2f2
--- /dev/null
+++ b/common/icons/clock.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/common/icons/clock.svg.import b/common/icons/clock.svg.import
new file mode 100644
index 0000000..5542982
--- /dev/null
+++ b/common/icons/clock.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dhy4ewvqvlxyi"
+path="res://.godot/imported/clock.svg-730a4e7a10a1bf85842bb9f2c25ee2d8.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/clock.svg"
+dest_files=["res://.godot/imported/clock.svg-730a4e7a10a1bf85842bb9f2c25ee2d8.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
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/common/icons/help-hexagon.svg b/common/icons/help-hexagon.svg
new file mode 100644
index 0000000..f73f8db
--- /dev/null
+++ b/common/icons/help-hexagon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/common/icons/help-hexagon.svg.import b/common/icons/help-hexagon.svg.import
new file mode 100644
index 0000000..d68e65c
--- /dev/null
+++ b/common/icons/help-hexagon.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cwewx7cdy085h"
+path="res://.godot/imported/help-hexagon.svg-b310627b5cc818562c34fa1902bdafb7.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/help-hexagon.svg"
+dest_files=["res://.godot/imported/help-hexagon.svg-b310627b5cc818562c34fa1902bdafb7.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/common/icons/moon.svg b/common/icons/moon.svg
new file mode 100644
index 0000000..378bebb
--- /dev/null
+++ b/common/icons/moon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/common/icons/moon.svg.import b/common/icons/moon.svg.import
new file mode 100644
index 0000000..4f8c60f
--- /dev/null
+++ b/common/icons/moon.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://gtbfays7cdor"
+path="res://.godot/imported/moon.svg-9c4e8477f53c467a6599cc3658d22d46.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/moon.svg"
+dest_files=["res://.godot/imported/moon.svg-9c4e8477f53c467a6599cc3658d22d46.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/common/icons/seeds.svg b/common/icons/seeds.svg
new file mode 100644
index 0000000..901cdd6
--- /dev/null
+++ b/common/icons/seeds.svg
@@ -0,0 +1,60 @@
+
+
diff --git a/common/icons/seeds.svg.import b/common/icons/seeds.svg.import
new file mode 100644
index 0000000..491da77
--- /dev/null
+++ b/common/icons/seeds.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://c2qg7ikkylfv4"
+path="res://.godot/imported/seeds.svg-0b55654a8dffa8660c2d2b7ad24c47e7.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/seeds.svg"
+dest_files=["res://.godot/imported/seeds.svg-0b55654a8dffa8660c2d2b7ad24c47e7.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/common/icons/sun.svg b/common/icons/sun.svg
new file mode 100644
index 0000000..67c8730
--- /dev/null
+++ b/common/icons/sun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/common/icons/sun.svg.import b/common/icons/sun.svg.import
new file mode 100644
index 0000000..f820a59
--- /dev/null
+++ b/common/icons/sun.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://dkxkrerjh3xw3"
+path="res://.godot/imported/sun.svg-6c9addda378e79701e69779b5a8164bb.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/sun.svg"
+dest_files=["res://.godot/imported/sun.svg-6c9addda378e79701e69779b5a8164bb.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/common/icons/tree.svg b/common/icons/tree.svg
new file mode 100644
index 0000000..aaa181a
--- /dev/null
+++ b/common/icons/tree.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/common/icons/tree.svg.import b/common/icons/tree.svg.import
new file mode 100644
index 0000000..223f09a
--- /dev/null
+++ b/common/icons/tree.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://bn2wkun71ocun"
+path="res://.godot/imported/tree.svg-950893a0f1837215730a8a16c385f049.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://common/icons/tree.svg"
+dest_files=["res://.godot/imported/tree.svg-950893a0f1837215730a8a16c385f049.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/entities/camera/scripts/camera.gd b/entities/camera/scripts/camera.gd
index 06f0cd5..fc9e717 100644
--- a/entities/camera/scripts/camera.gd
+++ b/entities/camera/scripts/camera.gd
@@ -1,14 +1,29 @@
extends Camera2D
class_name Camera
-const LERP_WEIGHT = 0.9
+const MOVE_LERP_WEIGHT = 0.9
+const ZOOM_LERP_WEIGHT = 0.05
+
+const ZOOM_STEP = 0.1
@export var following : Node2D
+@onready var settings = GameInfo.settings_data
+
+func _input(_e):
+ if Input.is_action_just_pressed("zoom_in"):
+ settings.zoom = settings.zoom + ZOOM_STEP
+ GameInfo.save_settings()
+ if Input.is_action_just_pressed("zoom_out"):
+ settings.zoom = settings.zoom - ZOOM_STEP
+ GameInfo.save_settings()
func _ready():
if following:
+ zoom = Vector2.ONE * settings.zoom
global_position = following.global_position
func _process(_delta):
if following:
- global_position = following.global_position.lerp(global_position, LERP_WEIGHT)
+ global_position = following.global_position.lerp(global_position, MOVE_LERP_WEIGHT)
+
+ zoom = zoom.lerp(Vector2.ONE * settings.zoom, MOVE_LERP_WEIGHT)
diff --git a/entities/plants/scripts/plant.gd b/entities/plants/scripts/plant.gd
index be5c8b7..98265bc 100644
--- a/entities/plants/scripts/plant.gd
+++ b/entities/plants/scripts/plant.gd
@@ -11,8 +11,8 @@ const SCORE_ICON = preload("res://common/icons/growth.svg")
const DURATION_ICON = preload("res://common/icons/calendar-week.svg")
const SHOVEL_ICON = preload("res://common/icons/shovel.svg")
const GROWING_ICON = preload("res://common/icons/chevrons-up.svg")
-const LIFETIME_ICON= preload("res://common/icons/skull.svg")
-const SEED_ICON = preload("res://common/icons/droplets.svg")
+const LIFETIME_ICON= preload("res://common/icons/clock.svg")
+const SEED_ICON = preload("res://common/icons/seeds.svg")
const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.tscn")
@@ -40,9 +40,11 @@ func _ready():
func (_d : RegionData):
await get_tree().create_timer(0.05).timeout
update_nearby_plant()
+ update_decontamination_area_factor()
)
await get_tree().create_timer(0.05).timeout
update_nearby_plant()
+ update_decontamination_area_factor()
func pointer_text() -> String:
return data.plant_name
@@ -151,6 +153,23 @@ func update_nearby_plant():
data.nearby_plant_updated.emit()
+func update_decontamination_area_factor():
+ var factor = 0.
+ var full_decontaminated = true
+
+ var tiles = Math.get_tiles_in_circle(global_position, influence_zone.radius + Region.TILE_SIZE)
+ for tile : Vector2i in tiles:
+ if region.is_coords_decontaminated([tile]):
+ factor += 1./len(tiles)
+ else :
+ full_decontaminated = false
+
+ if full_decontaminated:
+ data.decontamination_area_factor = 1.
+ else:
+ data.decontamination_area_factor = factor
+
+
func save() -> EntityData:
return data
diff --git a/entities/plants/scripts/plant_archetype.gd b/entities/plants/scripts/plant_archetype.gd
index d475696..c43099c 100644
--- a/entities/plants/scripts/plant_archetype.gd
+++ b/entities/plants/scripts/plant_archetype.gd
@@ -13,10 +13,19 @@ class_name PlantArchetype
AncientMutation.new(),
EphemeralMutation.new(),
FertileMutation.new(),
+ GenerousMutation.new(),
+ HurriedMutation.new(),
+ PrecociousMutation.new(),
+ ProlificMutation.new(),
+ ProtectiveMutation.new(),
+ PureMutation.new(),
PurificationMutation.new(),
+ QualityMutation.new(),
QuickMutation.new(),
+ RobustMutation.new(),
SocialMutation.new(),
- ToughMutation.new()
+ ToughMutation.new(),
+ VivaciousMutation.new(),
]
static func get_all() -> Array[PlantArchetype]:
diff --git a/entities/plants/scripts/plant_data.gd b/entities/plants/scripts/plant_data.gd
index 56c0e25..e78009d 100644
--- a/entities/plants/scripts/plant_data.gd
+++ b/entities/plants/scripts/plant_data.gd
@@ -21,6 +21,7 @@ enum State {PLANTED, GROWING, MATURE, DEAD}
# var texture_builder: TextureBuilder = preload("res://entities/plants/scripts/texture_builder/texture_builder.tres")
+var decontamination_area_factor = 0.
var nearby_plants : Array[PlantData]
func _init(
@@ -83,7 +84,10 @@ func get_score(state: State = get_state()) -> int:
score = m.mutate_score(self , score)
mult = m.mutate_score_multiplier(self , mult)
- return score * mult
+ for pd in nearby_plants:
+ score += pd.get_score_buff()
+
+ return max(0,score) * mult
func get_state() -> State:
if day >= get_lifetime():
@@ -125,7 +129,7 @@ func get_lifetime_buff() -> int:
var buff = 0
for m in mutations:
- buff += m.mutate_lifetime_buff(self)
+ buff = m.mutate_lifetime_buff(self, buff)
return buff
@@ -137,5 +141,13 @@ func get_seed_buff() -> int:
return buff
+func get_score_buff() -> int:
+ var buff = 0
+
+ for m in mutations:
+ buff = m.mutate_score_buff(self, buff)
+
+ return buff
+
func disappear():
disappeared.emit(self )
diff --git a/entities/plants/scripts/plant_mutation.gd b/entities/plants/scripts/plant_mutation.gd
index f77158a..1848f7d 100644
--- a/entities/plants/scripts/plant_mutation.gd
+++ b/entities/plants/scripts/plant_mutation.gd
@@ -20,8 +20,7 @@ func get_mutation_id() -> String:
return ""
func get_mutation_name() -> String:
- printerr("Classe abstraite PlantMutation appelée")
- return ""
+ return tr(get_mutation_id())
func get_mutation_description() -> String:
printerr("Classe abstraite PlantMutation appelée")
@@ -48,12 +47,15 @@ func mutate_seed_number(_plant_data: PlantData, seed_number: int) -> int:
func mutate_seed_random_loose(_plant_data: PlantData, seed_random_loose) -> int:
return seed_random_loose
-func mutate_lifetime_buff(_plant_data: PlantData) -> int:
- return 0
+func mutate_lifetime_buff(_plant_data: PlantData, lifetime_buff : int) -> int:
+ return lifetime_buff
func mutate_seed_buff(_plant_data: PlantData, seed_buff : int) -> int:
return seed_buff
+func mutate_score_buff(_plant_data: PlantData, score_buff : int) -> int:
+ return score_buff
+
func _start_planted_effect(_plant: Plant):
pass
diff --git a/entities/plants/scripts/plant_mutation/fertile_mutation.gd b/entities/plants/scripts/plant_mutation/fertile_mutation.gd
index ff7758c..1896d17 100644
--- a/entities/plants/scripts/plant_mutation/fertile_mutation.gd
+++ b/entities/plants/scripts/plant_mutation/fertile_mutation.gd
@@ -4,6 +4,9 @@ class_name FertileMutation
func get_icon() -> Texture:
return preload("res://common/icons/seedling.svg")
+func get_base_rarity() -> int:
+ return 1
+
func get_mutation_id() -> String:
return "FERTILE"
@@ -13,11 +16,19 @@ func get_mutation_name() -> String:
func get_mutation_description() -> String:
return tr("FERTILE_EFFECT_TEXT").format({
"seed_buff": get_seed_buff(),
- "seed_icon": Text.bbcode_icon(Plant.SEED_ICON)
+ "seed_icon": Text.bbcode_icon(Plant.SEED_ICON),
+ "score_change": get_score_change(),
+ "score_icon": Text.bbcode_icon(Plant.SCORE_ICON),
})
func mutate_seed_buff(_plant_data: PlantData, seed_buff) -> int:
return seed_buff + get_seed_buff()
+func mutate_score(_plant_data: PlantData, score: int) -> int:
+ return score + get_score_change()
+
func get_seed_buff():
- return level
\ No newline at end of file
+ return level
+
+func get_score_change():
+ return -1
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/generous_mutation.gd b/entities/plants/scripts/plant_mutation/generous_mutation.gd
new file mode 100644
index 0000000..ec22f24
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/generous_mutation.gd
@@ -0,0 +1,30 @@
+extends PlantMutation
+class_name GenerousMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/carambola.svg")
+
+func get_base_rarity() -> int:
+ return 1
+
+func get_mutation_id() -> String:
+ return "GENEROUS"
+
+func get_mutation_description() -> String:
+ return tr("GENEROUS_EFFECT_TEXT").format({
+ "score_buff": get_score_buff(),
+ "score_icon": Text.bbcode_icon(Plant.SCORE_ICON)
+ })
+
+func mutate_score_multiplier(plant_data: PlantData, multiplier: int) -> int:
+ if plant_data.get_state() == PlantData.State.MATURE:
+ return 0
+ return multiplier
+
+func mutate_score_buff(plant_data: PlantData, score_buff : int) -> int:
+ if plant_data.get_state() == PlantData.State.MATURE:
+ return score_buff + get_score_buff()
+ return score_buff
+
+func get_score_buff():
+ return level
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/generous_mutation.gd.uid b/entities/plants/scripts/plant_mutation/generous_mutation.gd.uid
new file mode 100644
index 0000000..5e4e9b1
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/generous_mutation.gd.uid
@@ -0,0 +1 @@
+uid://7bfgsrkp6gaq
diff --git a/entities/plants/scripts/plant_mutation/hurried_mutation.gd b/entities/plants/scripts/plant_mutation/hurried_mutation.gd
new file mode 100644
index 0000000..ff9df01
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/hurried_mutation.gd
@@ -0,0 +1,23 @@
+extends PlantMutation
+class_name HurriedMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/chevrons-up.svg")
+
+func get_base_rarity() -> int:
+ return 1
+
+func get_mutation_id() -> String:
+ return "HURRIED"
+
+func get_mutation_description() -> String:
+ return tr("HURRIED_EFFECT_TEXT").format({
+ "growing_time_change": get_growing_time_change(),
+ "growing_time_icon": Text.bbcode_icon(Plant.GROWING_ICON)
+ })
+
+func mutate_growing_time(_plant_data: PlantData, growing_time: int) -> int:
+ return growing_time + get_growing_time_change()
+
+func get_growing_time_change():
+ return -level
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/hurried_mutation.gd.uid b/entities/plants/scripts/plant_mutation/hurried_mutation.gd.uid
new file mode 100644
index 0000000..c19630f
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/hurried_mutation.gd.uid
@@ -0,0 +1 @@
+uid://ch44r5vkwpkwc
diff --git a/entities/plants/scripts/plant_mutation/prolific_mutation.gd b/entities/plants/scripts/plant_mutation/prolific_mutation.gd
new file mode 100644
index 0000000..376849c
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/prolific_mutation.gd
@@ -0,0 +1,20 @@
+extends PlantMutation
+class_name ProlificMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/droplets.svg")
+
+func get_mutation_id() -> String:
+ return "PROLIFIC"
+
+func get_mutation_description() -> String:
+ return tr("PROLIFIC_EFFECT_TEXT").format({
+ "seeds_change": get_seed_change(),
+ "seeds_icon": Text.bbcode_icon(Plant.SEED_ICON)
+ })
+
+func mutate_seed_number(_plant_data: PlantData, seed_number: int) -> int:
+ return get_seed_change() + seed_number
+
+func get_seed_change():
+ return level
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/prolific_mutation.gd.uid b/entities/plants/scripts/plant_mutation/prolific_mutation.gd.uid
new file mode 100644
index 0000000..2102a7e
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/prolific_mutation.gd.uid
@@ -0,0 +1 @@
+uid://csk5xull465m3
diff --git a/entities/plants/scripts/plant_mutation/protective_mutation.gd b/entities/plants/scripts/plant_mutation/protective_mutation.gd
new file mode 100644
index 0000000..b1977be
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/protective_mutation.gd
@@ -0,0 +1,20 @@
+extends PlantMutation
+class_name ProtectiveMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/tree.svg")
+
+func get_mutation_id() -> String:
+ return "PROTECTIVE"
+
+func get_mutation_description() -> String:
+ return tr("PROTECTIVE_EFFECT_TEXT").format({
+ "lifetime_buff": get_lifetime_buff(),
+ "lifetime_icon": Text.bbcode_icon(Plant.LIFETIME_ICON)
+ })
+
+func mutate_lifetime_buff(_plant_data: PlantData, lifetime_buff : int) -> int:
+ return lifetime_buff + get_lifetime_buff()
+
+func get_lifetime_buff():
+ return level
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/protective_mutation.gd.uid b/entities/plants/scripts/plant_mutation/protective_mutation.gd.uid
new file mode 100644
index 0000000..0bcd858
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/protective_mutation.gd.uid
@@ -0,0 +1 @@
+uid://b5nc8f0gnalxu
diff --git a/entities/plants/scripts/plant_mutation/pure_mutation.gd b/entities/plants/scripts/plant_mutation/pure_mutation.gd
new file mode 100644
index 0000000..28553cc
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/pure_mutation.gd
@@ -0,0 +1,25 @@
+extends PlantMutation
+class_name PureMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/north-star.svg")
+
+func get_mutation_id() -> String:
+ return "PURE"
+
+func get_base_rarity() -> int:
+ return 1
+
+func get_mutation_description() -> String:
+ return tr("PURE_EFFECT_TEXT").format({
+ "score_icon": Text.bbcode_icon(Plant.SCORE_ICON),
+ "score_multiplier": get_score_multiplier(),
+ })
+
+func mutate_score_multiplier(plant_data: PlantData, multiplier: int) -> int:
+ if plant_data.decontamination_area_factor == 1.0:
+ return multiplier * get_score_multiplier()
+ return multiplier
+
+func get_score_multiplier()->int:
+ return level
diff --git a/entities/plants/scripts/plant_mutation/pure_mutation.gd.uid b/entities/plants/scripts/plant_mutation/pure_mutation.gd.uid
new file mode 100644
index 0000000..5fab5dd
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/pure_mutation.gd.uid
@@ -0,0 +1 @@
+uid://dh5m6tvkewad6
diff --git a/entities/plants/scripts/plant_mutation/quality_mutation.gd b/entities/plants/scripts/plant_mutation/quality_mutation.gd
index 9fead5c..37d200e 100644
--- a/entities/plants/scripts/plant_mutation/quality_mutation.gd
+++ b/entities/plants/scripts/plant_mutation/quality_mutation.gd
@@ -2,17 +2,11 @@ extends PlantMutation
class_name QualityMutation
func get_icon() -> Texture:
- return preload("res://common/icons/north-star.svg")
-
-func get_base_rarity() -> int:
- return 0
+ return preload("res://common/icons/growth.svg")
func get_mutation_id() -> String:
return "QUALITY"
-func get_mutation_name() -> String:
- return tr("QUALITY")
-
func get_mutation_description() -> String:
return tr("QUALITY_EFFECT_TEXT").format({
"score": get_score(),
diff --git a/entities/plants/scripts/plant_mutation/robust_mutation.gd b/entities/plants/scripts/plant_mutation/robust_mutation.gd
new file mode 100644
index 0000000..6c8ed8b
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/robust_mutation.gd
@@ -0,0 +1,20 @@
+extends PlantMutation
+class_name RobustMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/clock.svg")
+
+func get_mutation_id() -> String:
+ return "ROBUST"
+
+func get_mutation_description() -> String:
+ return tr("ROBUST_EFFECT_TEXT").format({
+ "lifetime_change": get_lifetime_change(),
+ "lifetime_icon": Text.bbcode_icon(Plant.LIFETIME_ICON)
+ })
+
+func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
+ return lifetime + get_lifetime_change()
+
+func get_lifetime_change():
+ return level * 2
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/robust_mutation.gd.uid b/entities/plants/scripts/plant_mutation/robust_mutation.gd.uid
new file mode 100644
index 0000000..04c3ad2
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/robust_mutation.gd.uid
@@ -0,0 +1 @@
+uid://cjcylscs6qn4x
diff --git a/entities/plants/scripts/plant_mutation/vivacious_mutation.gd b/entities/plants/scripts/plant_mutation/vivacious_mutation.gd
new file mode 100644
index 0000000..6aeeabc
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/vivacious_mutation.gd
@@ -0,0 +1,22 @@
+extends PlantMutation
+class_name VivaciousMutation
+
+func get_icon() -> Texture:
+ return preload("res://common/icons/bolt.svg")
+
+func get_mutation_id() -> String:
+ return "VIVACIOUS"
+
+func get_mutation_description() -> String:
+ return tr("VIVACIOUS_EFFECT_TEXT").format({
+ "score_change": get_score_change(),
+ "score_icon": Text.bbcode_icon(Plant.SCORE_ICON)
+ })
+
+func mutate_score(data : PlantData, score : int) -> int:
+ if data.day == data.get_growing_time():
+ return score + get_score_change()
+ return score
+
+func get_score_change():
+ return level * 2
\ No newline at end of file
diff --git a/entities/plants/scripts/plant_mutation/vivacious_mutation.gd.uid b/entities/plants/scripts/plant_mutation/vivacious_mutation.gd.uid
new file mode 100644
index 0000000..be324da
--- /dev/null
+++ b/entities/plants/scripts/plant_mutation/vivacious_mutation.gd.uid
@@ -0,0 +1 @@
+uid://boq38l1dmjvot
diff --git a/entities/plants/scripts/texture_builder/plant_texture_builder.gd b/entities/plants/scripts/texture_builder/plant_texture_builder.gd
index 1187c46..80b3057 100644
--- a/entities/plants/scripts/texture_builder/plant_texture_builder.gd
+++ b/entities/plants/scripts/texture_builder/plant_texture_builder.gd
@@ -125,8 +125,9 @@ func build_plant_texture(plant_data: PlantData) -> Texture:
parts_to_place[OriginType.BASE_LEAF_ORIGIN] = base_leaves
var mutation_weights: Array[int] = []
for mutation in plant_data.mutations:
- parts_to_place[OriginType.MUTATION_ORIGIN].append(parts_mutation_associations[mutation.id].parts)
- mutation_weights.append(mutation_weight_base)
+ if mutation.id in parts_mutation_associations:
+ parts_to_place[OriginType.MUTATION_ORIGIN].append(parts_mutation_associations[mutation.id].parts)
+ mutation_weights.append(mutation_weight_base)
var base_image_coord = blend_part(image_center, -base_part.root.position, base_part)
populate_part(parts_to_place, weight_per_origin_type, mutation_weights, base_part, base_image_coord)
diff --git a/entities/player/inventory/scripts/items/seed.gd b/entities/player/inventory/scripts/items/seed.gd
index f3f00a6..1df4fc5 100644
--- a/entities/player/inventory/scripts/items/seed.gd
+++ b/entities/player/inventory/scripts/items/seed.gd
@@ -7,6 +7,8 @@ const SHOVEL_ICON = preload("res://common/icons/shovel.svg")
const GROWING_ICON = preload("res://common/icons/chevrons-up.svg")
const SCORE_ICON = preload("res://common/icons/growth.svg")
+const RARITY_POOL : Array[int] = [0,0,0,0,0,0,0,1,1,1]
+
@export var plant_name : String
@export var plant_archetype: PlantArchetype
@export var plant_mutations: Array[PlantMutation]
@@ -39,12 +41,11 @@ static func generate_from_parent(plant_data : PlantData) -> Seed:
static func generate_random() -> Seed:
var archetype = PlantArchetype.get_random()
- var random_mutations : Array[PlantMutation] = []
- random_mutations.append(archetype.available_mutations.pick_random().duplicate_deep())
+
var new_seed = Seed.new(
Random.generate_random_word(),
PlantArchetype.get_random(),
- random_mutations
+ [generate_first_mutation(archetype)]
)
return new_seed
@@ -141,6 +142,19 @@ func get_particles() -> Array[EffectParticles.Parameters]:
return param
+static func generate_first_mutation(archetype : PlantArchetype) -> PlantMutation:
+ var rarity : int = RARITY_POOL.pick_random()
+
+ var possible_mutation : PlantMutation = archetype.available_mutations.filter(
+ func (m : PlantMutation): return m.get_base_rarity() <= rarity
+ ).pick_random().duplicate_deep()
+
+ var level_to_add = rarity - possible_mutation.get_base_rarity()
+
+ possible_mutation.level += level_to_add
+
+ return possible_mutation
+
static func mutate_mutations(parent : PlantData) -> Array[PlantMutation]:
var mutation_possibility : Array[MutationPossibility] = [
@@ -152,13 +166,11 @@ static func mutate_mutations(parent : PlantData) -> Array[PlantMutation]:
):
mutation_possibility = [
UpgradeMutation.new(),
- RemoveMutation.new(),
]
elif len(parent.mutations) > 0:
mutation_possibility = [
AddMutation.new(),
UpgradeMutation.new(),
- RemoveMutation.new(),
]
var chosen_mutation_possibility = mutation_possibility.pick_random()
diff --git a/entities/player/inventory/scripts/items/utils/detector_signal.gd b/entities/player/inventory/scripts/items/utils/detector_signal.gd
index cce5a3b..5ace89d 100644
--- a/entities/player/inventory/scripts/items/utils/detector_signal.gd
+++ b/entities/player/inventory/scripts/items/utils/detector_signal.gd
@@ -7,6 +7,7 @@ const PARTICLES_DISTANCE = 100
const DEFAULT_ICON = preload("res://common/icons/north-star.svg")
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
const DOOR_ICON = preload("res://common/icons/logout.svg")
+const PLANT_ICON = preload("res://common/icons/seedling.svg")
var started_time = 0.
var signals : Array[DetectorSignalIndividual] = []
@@ -30,6 +31,13 @@ func _init(region : Region, pos : Vector2):
DOOR_ICON
)
)
+ if e is Plant:
+ signals.append(
+ DetectorSignalIndividual.new(
+ (pos - e.global_position).normalized().angle(),
+ PLANT_ICON
+ )
+ )
func _draw():
if started_time < SIGNAL_DURATION:
diff --git a/entities/player_3d/scripts/player_3d.gd b/entities/player_3d/scripts/player_3d.gd
index f462b61..34f446e 100644
--- a/entities/player_3d/scripts/player_3d.gd
+++ b/entities/player_3d/scripts/player_3d.gd
@@ -59,6 +59,8 @@ func _physics_process(delta):
else:
velocity.x = move_toward(velocity.x, 0, speed)
velocity.z = move_toward(velocity.z, 0, speed)
+ else :
+ velocity = Vector3.ZERO
# Add the gravity.
if not is_on_floor():
diff --git a/gui/game/game_gui.tscn b/gui/game/game_gui.tscn
index 91b76e6..89a00ea 100644
--- a/gui/game/game_gui.tscn
+++ b/gui/game/game_gui.tscn
@@ -11,6 +11,16 @@
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="6_id0t5"]
[ext_resource type="Texture2D" uid="uid://b43thuq8piv18" path="res://common/icons/skull.svg" id="7_dr1y2"]
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
+[ext_resource type="Texture2D" uid="uid://cwewx7cdy085h" path="res://common/icons/help-hexagon.svg" id="12_negho"]
+[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="12_nhqnj"]
+[ext_resource type="Texture2D" uid="uid://bgcymkgxk7mpp" path="res://gui/pause/assets/textures/moss_tutorial_image.png" id="12_p0xoq"]
+[ext_resource type="Script" uid="uid://c65cf2ksbsxwg" path="res://gui/game/help/scripts/help_container.gd" id="13_rcm5b"]
+[ext_resource type="Texture2D" uid="uid://d3ksdxepcjoot" path="res://common/icons/calendar-week.svg" id="13_w16yr"]
+[ext_resource type="Texture2D" uid="uid://cgmxjom200bej" path="res://common/icons/chevrons-up.svg" id="14_mbdxg"]
+[ext_resource type="Texture2D" uid="uid://bhogi5kkltx51" path="res://gui/pause/assets/textures/rock_tutorial_image.png" id="14_negho"]
+[ext_resource type="Texture2D" uid="uid://3fwhxkd0ycga" path="res://gui/pause/assets/textures/talion_tutorial_image.png" id="15_rcm5b"]
+[ext_resource type="Texture2D" uid="uid://dhy4ewvqvlxyi" path="res://common/icons/clock.svg" id="20_ajf5p"]
+[ext_resource type="Texture2D" uid="uid://c2qg7ikkylfv4" path="res://common/icons/seeds.svg" id="21_jomh8"]
[sub_resource type="Gradient" id="Gradient_ykapk"]
offsets = PackedFloat32Array(0.47639486, 1)
@@ -26,6 +36,10 @@ fill_to = Vector2(1.5, 0.5)
font = ExtResource("6_2wykm")
font_size = 40
+[sub_resource type="LabelSettings" id="LabelSettings_rcm5b"]
+font = ExtResource("6_2wykm")
+font_size = 20
+
[node name="GameGui" type="CanvasLayer" unique_id=274698556]
script = ExtResource("1_udau0")
@@ -119,3 +133,228 @@ size_flags_horizontal = 8
size_flags_vertical = 8
text = "GIVE_UP"
icon = ExtResource("7_dr1y2")
+
+[node name="Help" type="VBoxContainer" parent="MarginContainer" unique_id=645268912]
+layout_mode = 2
+size_flags_horizontal = 8
+size_flags_vertical = 0
+
+[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/Help" unique_id=58561073]
+layout_mode = 2
+theme_override_constants/separation = 5
+alignment = 2
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/HBoxContainer" unique_id=147740513]
+layout_mode = 2
+texture = ExtResource("12_negho")
+expand_mode = 3
+stretch_mode = 5
+
+[node name="Label" type="Label" parent="MarginContainer/Help/HBoxContainer" unique_id=245455638]
+layout_mode = 2
+text = "HELP"
+label_settings = SubResource("LabelSettings_rcm5b")
+
+[node name="TerrainHelp" type="FoldableContainer" parent="MarginContainer/Help" unique_id=765624548]
+custom_minimum_size = Vector2(300, 0)
+layout_mode = 2
+size_flags_horizontal = 8
+size_flags_vertical = 0
+title = "TERRAINS"
+script = ExtResource("13_rcm5b")
+help_container_name = "terrain"
+
+[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/Help/TerrainHelp" unique_id=276300201]
+layout_mode = 2
+theme_override_constants/margin_left = 8
+theme_override_constants/margin_top = 8
+theme_override_constants/margin_right = 8
+theme_override_constants/margin_bottom = 8
+
+[node name="Zones" type="VBoxContainer" parent="MarginContainer/Help/TerrainHelp/MarginContainer" unique_id=897827374]
+layout_mode = 2
+
+[node name="Moss" type="HBoxContainer" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones" unique_id=1245369351]
+layout_mode = 2
+size_flags_horizontal = 3
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones/Moss" unique_id=590490498]
+custom_minimum_size = Vector2(0, 60)
+layout_mode = 2
+size_flags_horizontal = 4
+size_flags_vertical = 4
+texture = ExtResource("12_p0xoq")
+expand_mode = 3
+stretch_mode = 5
+
+[node name="RichText" type="RichTextLabel" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones/Moss" unique_id=1908542695]
+layout_mode = 2
+size_flags_horizontal = 3
+theme = ExtResource("12_nhqnj")
+theme_override_fonts/bold_font = ExtResource("6_2wykm")
+theme_override_font_sizes/normal_font_size = 15
+theme_override_font_sizes/bold_font_size = 18
+bbcode_enabled = true
+text = "FERTILE_LAND_TEXT"
+fit_content = true
+vertical_alignment = 1
+
+[node name="Rock" type="HBoxContainer" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones" unique_id=1388177815]
+layout_mode = 2
+size_flags_horizontal = 3
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones/Rock" unique_id=84789195]
+custom_minimum_size = Vector2(0, 60)
+layout_mode = 2
+size_flags_horizontal = 4
+size_flags_vertical = 4
+texture = ExtResource("14_negho")
+expand_mode = 3
+stretch_mode = 5
+
+[node name="RichText" type="RichTextLabel" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones/Rock" unique_id=584054118]
+layout_mode = 2
+size_flags_horizontal = 3
+theme = ExtResource("12_nhqnj")
+theme_override_fonts/bold_font = ExtResource("6_2wykm")
+theme_override_font_sizes/normal_font_size = 15
+theme_override_font_sizes/bold_font_size = 18
+bbcode_enabled = true
+text = "ROCK_TEXT"
+fit_content = true
+vertical_alignment = 1
+
+[node name="Talion" type="HBoxContainer" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones" unique_id=786946987]
+layout_mode = 2
+size_flags_horizontal = 3
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones/Talion" unique_id=1949577473]
+custom_minimum_size = Vector2(0, 60)
+layout_mode = 2
+size_flags_horizontal = 4
+size_flags_vertical = 4
+texture = ExtResource("15_rcm5b")
+expand_mode = 3
+stretch_mode = 5
+
+[node name="RichText" type="RichTextLabel" parent="MarginContainer/Help/TerrainHelp/MarginContainer/Zones/Talion" unique_id=813195094]
+layout_mode = 2
+size_flags_horizontal = 3
+theme = ExtResource("12_nhqnj")
+theme_override_fonts/bold_font = ExtResource("6_2wykm")
+theme_override_font_sizes/normal_font_size = 15
+theme_override_font_sizes/bold_font_size = 18
+bbcode_enabled = true
+text = "TALION_VEIN_TEXT"
+fit_content = true
+vertical_alignment = 1
+
+[node name="IconHelp" type="FoldableContainer" parent="MarginContainer/Help" unique_id=506997372]
+custom_minimum_size = Vector2(300, 0)
+layout_mode = 2
+size_flags_horizontal = 8
+size_flags_vertical = 0
+title = "ICONS_MEANINGS"
+script = ExtResource("13_rcm5b")
+help_container_name = "icon"
+
+[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/Help/IconHelp" unique_id=2076413829]
+layout_mode = 2
+theme_override_constants/margin_left = 8
+theme_override_constants/margin_top = 8
+theme_override_constants/margin_right = 8
+theme_override_constants/margin_bottom = 8
+
+[node name="IconsGrid" type="VBoxContainer" parent="MarginContainer/Help/IconHelp/MarginContainer" unique_id=443451416]
+layout_mode = 2
+alignment = 1
+
+[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid" unique_id=1230753118]
+layout_mode = 2
+theme_override_constants/separation = 4
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer" unique_id=582458449]
+custom_minimum_size = Vector2(25, 25)
+layout_mode = 2
+size_flags_horizontal = 4
+texture = ExtResource("6_id0t5")
+expand_mode = 1
+stretch_mode = 5
+
+[node name="RichTextLabel" type="Label" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer" unique_id=452890750]
+layout_mode = 2
+theme = ExtResource("12_nhqnj")
+text = "PLANT_POINTS"
+vertical_alignment = 1
+
+[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid" unique_id=1347045145]
+layout_mode = 2
+theme_override_constants/separation = 4
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer2" unique_id=157378534]
+custom_minimum_size = Vector2(25, 25)
+layout_mode = 2
+size_flags_horizontal = 4
+texture = ExtResource("13_w16yr")
+expand_mode = 1
+stretch_mode = 5
+
+[node name="RichTextLabel" type="Label" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer2" unique_id=787250244]
+layout_mode = 2
+theme = ExtResource("12_nhqnj")
+text = "DAYS"
+vertical_alignment = 1
+
+[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid" unique_id=209714175]
+layout_mode = 2
+theme_override_constants/separation = 4
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer3" unique_id=1390720076]
+custom_minimum_size = Vector2(25, 25)
+layout_mode = 2
+size_flags_horizontal = 4
+texture = ExtResource("14_mbdxg")
+expand_mode = 1
+stretch_mode = 5
+
+[node name="RichTextLabel" type="Label" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer3" unique_id=1494799300]
+layout_mode = 2
+theme = ExtResource("12_nhqnj")
+text = "GROWING_TIME"
+vertical_alignment = 1
+
+[node name="HBoxContainer4" type="HBoxContainer" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid" unique_id=2039812090]
+layout_mode = 2
+theme_override_constants/separation = 4
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer4" unique_id=353853877]
+custom_minimum_size = Vector2(25, 25)
+layout_mode = 2
+size_flags_horizontal = 4
+texture = ExtResource("20_ajf5p")
+expand_mode = 1
+stretch_mode = 5
+
+[node name="RichTextLabel" type="Label" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer4" unique_id=2071201389]
+layout_mode = 2
+theme = ExtResource("12_nhqnj")
+text = "LIFETIME"
+vertical_alignment = 1
+
+[node name="HBoxContainer5" type="HBoxContainer" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid" unique_id=1706837358]
+layout_mode = 2
+theme_override_constants/separation = 4
+
+[node name="TextureRect" type="TextureRect" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer5" unique_id=298500502]
+custom_minimum_size = Vector2(25, 25)
+layout_mode = 2
+size_flags_horizontal = 4
+texture = ExtResource("21_jomh8")
+expand_mode = 1
+stretch_mode = 5
+
+[node name="RichTextLabel" type="Label" parent="MarginContainer/Help/IconHelp/MarginContainer/IconsGrid/HBoxContainer5" unique_id=1100044131]
+layout_mode = 2
+theme = ExtResource("12_nhqnj")
+text = "SEEDS"
+vertical_alignment = 1
diff --git a/gui/game/help/scripts/help_container.gd b/gui/game/help/scripts/help_container.gd
new file mode 100644
index 0000000..6f2d25e
--- /dev/null
+++ b/gui/game/help/scripts/help_container.gd
@@ -0,0 +1,18 @@
+extends FoldableContainer
+class_name HelpContainer
+
+@export var help_container_name : String = ""
+
+@onready var settings := GameInfo.settings_data
+
+# Called when the node enters the scene tree for the first time.
+func _ready():
+ folded = settings.is_help_container_closed(help_container_name)
+ folding_changed.connect(_on_folding_changed)
+
+func _on_folding_changed(f : bool):
+ if f:
+ settings.close_help_container(help_container_name)
+ else:
+ settings.open_help_container(help_container_name)
+ GameInfo.save_settings()
diff --git a/gui/game/help/scripts/help_container.gd.uid b/gui/game/help/scripts/help_container.gd.uid
new file mode 100644
index 0000000..c1042ec
--- /dev/null
+++ b/gui/game/help/scripts/help_container.gd.uid
@@ -0,0 +1 @@
+uid://c65cf2ksbsxwg
diff --git a/gui/game/pass_day/assets/day_night_sprite.svg b/gui/game/pass_day/assets/day_night_sprite.svg
new file mode 100644
index 0000000..b397f4a
--- /dev/null
+++ b/gui/game/pass_day/assets/day_night_sprite.svg
@@ -0,0 +1,74 @@
+
+
+
+
diff --git a/gui/game/pass_day/assets/day_night_sprite.svg.import b/gui/game/pass_day/assets/day_night_sprite.svg.import
new file mode 100644
index 0000000..8a0fae4
--- /dev/null
+++ b/gui/game/pass_day/assets/day_night_sprite.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://cihiibon53147"
+path="res://.godot/imported/day_night_sprite.svg-b89d7f3e525bc11818c231dc87fa599b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://gui/game/pass_day/assets/day_night_sprite.svg"
+dest_files=["res://.godot/imported/day_night_sprite.svg-b89d7f3e525bc11818c231dc87fa599b.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
+svg/scale=2.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/gui/game/pass_day/pass_day.tscn b/gui/game/pass_day/pass_day.tscn
index 1b3a1de..8f68e4a 100644
--- a/gui/game/pass_day/pass_day.tscn
+++ b/gui/game/pass_day/pass_day.tscn
@@ -7,20 +7,60 @@
[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="4_0pm4g"]
[ext_resource type="Script" uid="uid://0dhj8sdpil7q" path="res://gui/tools/control_animation_player.gd" id="5_dqmg8"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="6_dqmg8"]
+[ext_resource type="Texture2D" uid="uid://cihiibon53147" path="res://gui/game/pass_day/assets/day_night_sprite.svg" id="7_m84xg"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_27lg1"]
shader = ExtResource("1_v570a")
-shader_parameter/strength = 0.0
-shader_parameter/mix_percentage = 0.0
+shader_parameter/strength = 5.45500025585262
+shader_parameter/mix_percentage = 0.02400000114
+
+[sub_resource type="ViewportTexture" id="ViewportTexture_h2bel"]
+viewport_path = NodePath("NightAnimation/SubViewport")
+
+[sub_resource type="Animation" id="Animation_rn4dm"]
+length = 0.001
+tracks/0/type = "value"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath("SubViewport/NightAnimationSprite:rotation")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = {
+"times": PackedFloat32Array(0),
+"transitions": PackedFloat32Array(1),
+"update": 0,
+"values": [0.0]
+}
+
+[sub_resource type="Animation" id="Animation_5ap0m"]
+resource_name = "pass"
+tracks/0/type = "value"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath("SubViewport/NightAnimationSprite:rotation")
+tracks/0/interp = 2
+tracks/0/loop_wrap = true
+tracks/0/keys = {
+"times": PackedFloat32Array(0, 0.26666668, 0.7, 1),
+"transitions": PackedFloat32Array(1, 1, 1, 1),
+"update": 0,
+"values": [0.0, 3.141592653589793, 3.141592653589793, 6.265732014659643]
+}
+
+[sub_resource type="AnimationLibrary" id="AnimationLibrary_wafeq"]
+_data = {
+&"RESET": SubResource("Animation_rn4dm"),
+&"pass": SubResource("Animation_5ap0m")
+}
[node name="PassDay" type="CanvasLayer" unique_id=335255544]
layer = 3
-visible = false
script = ExtResource("1_0pm4g")
[node name="Blur" type="ColorRect" parent="." unique_id=546890405]
unique_name_in_owner = true
physics_interpolation_mode = 0
+visible = false
material = SubResource("ShaderMaterial_27lg1")
anchors_preset = 15
anchor_right = 1.0
@@ -32,7 +72,6 @@ script = ExtResource("2_bhfpo")
[node name="PassDayInfo" type="VBoxContainer" parent="." unique_id=833110506]
unique_name_in_owner = true
-visible = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@@ -46,11 +85,6 @@ unique_name_in_owner = true
script = ExtResource("5_dqmg8")
metadata/_custom_type_script = "uid://0dhj8sdpil7q"
-[node name="EnergyPassDayInfo" parent="PassDayInfo" unique_id=2044341204 instance=ExtResource("2_feyaf")]
-unique_name_in_owner = true
-layout_mode = 2
-size_flags_horizontal = 6
-
[node name="ChargeCount" type="Label" parent="PassDayInfo" unique_id=1326590358]
unique_name_in_owner = true
layout_mode = 2
@@ -60,3 +94,48 @@ text = "%d_CHARGE_LEFT"
label_settings = ExtResource("6_dqmg8")
horizontal_alignment = 1
vertical_alignment = 1
+
+[node name="NightAnimation" type="TextureRect" parent="." unique_id=126988628]
+unique_name_in_owner = true
+custom_minimum_size = Vector2(500, 0)
+anchors_preset = 8
+anchor_left = 0.5
+anchor_top = 0.5
+anchor_right = 0.5
+anchor_bottom = 0.5
+offset_left = -166.0
+offset_top = -178.5
+offset_right = 166.0
+offset_bottom = 178.5
+grow_horizontal = 2
+grow_vertical = 2
+texture = SubResource("ViewportTexture_h2bel")
+expand_mode = 5
+stretch_mode = 5
+
+[node name="NightAnimationPlayer" type="AnimationPlayer" parent="NightAnimation" unique_id=787903570]
+unique_name_in_owner = true
+libraries/ = SubResource("AnimationLibrary_wafeq")
+
+[node name="SubViewport" type="SubViewport" parent="NightAnimation" unique_id=1324502966]
+transparent_bg = true
+size = Vector2i(500, 500)
+
+[node name="NightAnimationSprite" type="Sprite2D" parent="NightAnimation/SubViewport" unique_id=43111409]
+position = Vector2(250, 250)
+texture = ExtResource("7_m84xg")
+
+[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1163984124]
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+theme_override_constants/margin_left = 15
+theme_override_constants/margin_top = 15
+theme_override_constants/margin_right = 15
+theme_override_constants/margin_bottom = 15
+
+[node name="EnergyPassDayInfo" parent="MarginContainer" unique_id=2044341204 instance=ExtResource("2_feyaf")]
+unique_name_in_owner = true
+layout_mode = 2
diff --git a/gui/game/pass_day/scripts/pass_day.gd b/gui/game/pass_day/scripts/pass_day.gd
index 893905e..91e53ed 100644
--- a/gui/game/pass_day/scripts/pass_day.gd
+++ b/gui/game/pass_day/scripts/pass_day.gd
@@ -47,7 +47,7 @@ func setup_energy_values():
current_energy = from_energy
func pass_day_animation():
-
+
setup_energy_values()
%ChargeCount.text = tr('%d_CHARGE_LEFT') % GameInfo.game_data.current_region_data.charges
@@ -60,6 +60,7 @@ func pass_day_animation():
await appear()
is_animation_appeared = true
animation_appeared.emit()
+ %NightAnimationPlayer.play("pass")
await get_tree().create_timer(TIME_MARGIN).timeout
recharging = true
time_since_recharging = 0.
@@ -78,12 +79,20 @@ func appear():
BLUR_MIX_PERCENTAGE,
0.5
)
+ add_tween(
+ "modulate:a",
+ %NightAnimation,
+ 1.,
+ 0.5
+ )
await add_tween(
"blur_strength",
%Blur,
BLUR_STRENGTH,
0.5
).finished
+
+
await %PassDayInfoAnimationPlayer.appear()
func disappear():
@@ -94,12 +103,19 @@ func disappear():
0.0,
0.5
)
+ add_tween(
+ "modulate:a",
+ %NightAnimation,
+ 0.,
+ 0.5
+ )
await add_tween(
"blur_strength",
%Blur,
0.1,
0.5
).finished
+
hide()
func add_tween(
diff --git a/gui/pause/pause.tscn b/gui/pause/pause.tscn
index 4d8e1a1..a4be65a 100644
--- a/gui/pause/pause.tscn
+++ b/gui/pause/pause.tscn
@@ -10,15 +10,7 @@
[ext_resource type="Texture2D" uid="uid://bkwhrq4sp5dcp" path="res://common/icons/device-gamepad.svg" id="7_7c7ks"]
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://common/icons/logout.svg" id="7_yj6f1"]
[ext_resource type="Texture2D" uid="uid://b43thuq8piv18" path="res://common/icons/skull.svg" id="8_mnkqy"]
-[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="9_7c7ks"]
-[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="10_q8jjs"]
-[ext_resource type="Texture2D" uid="uid://bgcymkgxk7mpp" path="res://gui/pause/assets/textures/moss_tutorial_image.png" id="11_mnkqy"]
[ext_resource type="PackedScene" uid="uid://b4qe1dwwsk87t" path="res://gui/menu/controls/controls.tscn" id="11_urlqn"]
-[ext_resource type="Texture2D" uid="uid://bhogi5kkltx51" path="res://gui/pause/assets/textures/rock_tutorial_image.png" id="12_mvn7k"]
-[ext_resource type="Texture2D" uid="uid://d3ksdxepcjoot" path="res://common/icons/calendar-week.svg" id="12_s2e8t"]
-[ext_resource type="Texture2D" uid="uid://3fwhxkd0ycga" path="res://gui/pause/assets/textures/talion_tutorial_image.png" id="13_4n2vt"]
-[ext_resource type="Texture2D" uid="uid://cgmxjom200bej" path="res://common/icons/chevrons-up.svg" id="13_4r74r"]
-[ext_resource type="Texture2D" uid="uid://el06htgr2pda" path="res://common/icons/droplets.svg" id="14_osk7v"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_58dya"]
shader = ExtResource("2_apjlw")
@@ -125,11 +117,7 @@ grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_51ks3")
-[node name="GridContainer" type="GridContainer" parent="Container/MarginContainer" unique_id=1993147027]
-layout_mode = 2
-columns = 2
-
-[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer/GridContainer" unique_id=1262577626]
+[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer" unique_id=1262577626]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
@@ -137,236 +125,44 @@ theme = ExtResource("1_51ks3")
theme_override_constants/separation = 20
alignment = 1
-[node name="PauseTitle" type="Label" parent="Container/MarginContainer/GridContainer/Pause" unique_id=1390949032]
+[node name="PauseTitle" type="Label" parent="Container/MarginContainer/Pause" unique_id=1390949032]
layout_mode = 2
text = "PAUSE"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
-[node name="HBoxContainer" type="VBoxContainer" parent="Container/MarginContainer/GridContainer/Pause" unique_id=616663351]
+[node name="HBoxContainer" type="VBoxContainer" parent="Container/MarginContainer/Pause" unique_id=616663351]
layout_mode = 2
size_flags_horizontal = 4
alignment = 1
-[node name="Resume" type="Button" parent="Container/MarginContainer/GridContainer/Pause/HBoxContainer" unique_id=163836777]
+[node name="Resume" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=163836777]
layout_mode = 2
theme = ExtResource("1_51ks3")
text = "RESUME_GAME"
icon = ExtResource("5_apjlw")
-[node name="Settings" type="Button" parent="Container/MarginContainer/GridContainer/Pause/HBoxContainer" unique_id=1532435179]
+[node name="Settings" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=1532435179]
layout_mode = 2
text = "SETTINGS"
icon = ExtResource("6_yj6f1")
-[node name="Controls" type="Button" parent="Container/MarginContainer/GridContainer/Pause/HBoxContainer" unique_id=138156239]
+[node name="Controls" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=138156239]
layout_mode = 2
text = "CONTROLS"
icon = ExtResource("7_7c7ks")
-[node name="GiveUp" type="Button" parent="Container/MarginContainer/GridContainer/Pause/HBoxContainer" unique_id=1100620343]
+[node name="GiveUp" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=1100620343]
unique_name_in_owner = true
layout_mode = 2
text = "GIVE_UP"
icon = ExtResource("8_mnkqy")
-[node name="Quit" type="Button" parent="Container/MarginContainer/GridContainer/Pause/HBoxContainer" unique_id=1740895928]
+[node name="Quit" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=1740895928]
layout_mode = 2
text = "QUIT"
icon = ExtResource("7_yj6f1")
-[node name="Tutorial" type="VBoxContainer" parent="Container/MarginContainer/GridContainer" unique_id=1979359121]
-layout_mode = 2
-size_flags_horizontal = 3
-alignment = 1
-
-[node name="TutorialIcons" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial" unique_id=54599107]
-layout_mode = 2
-text = "ICONS_MEANINGS"
-label_settings = SubResource("LabelSettings_apjlw")
-horizontal_alignment = 1
-
-[node name="IconsGrid" type="HFlowContainer" parent="Container/MarginContainer/GridContainer/Tutorial" unique_id=827470743]
-layout_mode = 2
-theme_override_constants/h_separation = 8
-theme_override_constants/v_separation = 8
-alignment = 1
-
-[node name="HBoxContainer" type="HBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid" unique_id=1836711773]
-layout_mode = 2
-theme_override_constants/separation = 4
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer" unique_id=1287619966]
-custom_minimum_size = Vector2(40, 40)
-layout_mode = 2
-size_flags_horizontal = 4
-texture = ExtResource("10_q8jjs")
-expand_mode = 1
-stretch_mode = 5
-
-[node name="RichTextLabel" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer" unique_id=1321907717]
-layout_mode = 2
-theme = ExtResource("9_7c7ks")
-text = "PLANT_POINTS"
-vertical_alignment = 1
-
-[node name="HBoxContainer2" type="HBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid" unique_id=1972132878]
-layout_mode = 2
-theme_override_constants/separation = 4
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer2" unique_id=1672315867]
-custom_minimum_size = Vector2(40, 40)
-layout_mode = 2
-size_flags_horizontal = 4
-texture = ExtResource("12_s2e8t")
-expand_mode = 1
-stretch_mode = 5
-
-[node name="RichTextLabel" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer2" unique_id=680718204]
-layout_mode = 2
-theme = ExtResource("9_7c7ks")
-text = "DAYS"
-vertical_alignment = 1
-
-[node name="HBoxContainer3" type="HBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid" unique_id=914958898]
-layout_mode = 2
-theme_override_constants/separation = 4
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer3" unique_id=2070296941]
-custom_minimum_size = Vector2(40, 40)
-layout_mode = 2
-size_flags_horizontal = 4
-texture = ExtResource("13_4r74r")
-expand_mode = 1
-stretch_mode = 5
-
-[node name="RichTextLabel" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer3" unique_id=1440353539]
-layout_mode = 2
-theme = ExtResource("9_7c7ks")
-text = "GROWING_TIME"
-vertical_alignment = 1
-
-[node name="HBoxContainer4" type="HBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid" unique_id=28308100]
-layout_mode = 2
-theme_override_constants/separation = 4
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer4" unique_id=1894190539]
-custom_minimum_size = Vector2(40, 40)
-layout_mode = 2
-size_flags_horizontal = 4
-texture = ExtResource("8_mnkqy")
-expand_mode = 1
-stretch_mode = 5
-
-[node name="RichTextLabel" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer4" unique_id=1869234810]
-layout_mode = 2
-theme = ExtResource("9_7c7ks")
-text = "LIFETIME"
-vertical_alignment = 1
-
-[node name="HBoxContainer5" type="HBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid" unique_id=960270231]
-layout_mode = 2
-theme_override_constants/separation = 4
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer5" unique_id=1275499455]
-custom_minimum_size = Vector2(40, 40)
-layout_mode = 2
-size_flags_horizontal = 4
-texture = ExtResource("14_osk7v")
-expand_mode = 1
-stretch_mode = 5
-
-[node name="RichTextLabel" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial/IconsGrid/HBoxContainer5" unique_id=1267318669]
-layout_mode = 2
-theme = ExtResource("9_7c7ks")
-text = "SEEDS"
-vertical_alignment = 1
-
-[node name="TutorialTerrain" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial" unique_id=749651974]
-layout_mode = 2
-text = "TERRAINS"
-label_settings = SubResource("LabelSettings_apjlw")
-horizontal_alignment = 1
-
-[node name="Zones" type="GridContainer" parent="Container/MarginContainer/GridContainer/Tutorial" unique_id=604890138]
-layout_mode = 2
-columns = 3
-
-[node name="Moss" type="VBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/Zones" unique_id=1098973088]
-layout_mode = 2
-size_flags_horizontal = 3
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/Zones/Moss" unique_id=393539957]
-custom_minimum_size = Vector2(0, 100)
-layout_mode = 2
-size_flags_horizontal = 4
-size_flags_vertical = 4
-texture = ExtResource("11_mnkqy")
-expand_mode = 3
-stretch_mode = 5
-
-[node name="RichText" type="RichTextLabel" parent="Container/MarginContainer/GridContainer/Tutorial/Zones/Moss" unique_id=2026113686]
-layout_mode = 2
-size_flags_horizontal = 3
-theme = ExtResource("9_7c7ks")
-theme_override_fonts/bold_font = ExtResource("4_apjlw")
-theme_override_font_sizes/normal_font_size = 15
-theme_override_font_sizes/bold_font_size = 18
-bbcode_enabled = true
-text = "FERTILE_LAND_TEXT"
-fit_content = true
-vertical_alignment = 1
-
-[node name="Rock" type="VBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/Zones" unique_id=35924894]
-layout_mode = 2
-size_flags_horizontal = 3
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/Zones/Rock" unique_id=92960155]
-custom_minimum_size = Vector2(0, 100)
-layout_mode = 2
-size_flags_horizontal = 4
-size_flags_vertical = 4
-texture = ExtResource("12_mvn7k")
-expand_mode = 3
-stretch_mode = 5
-
-[node name="RichText" type="RichTextLabel" parent="Container/MarginContainer/GridContainer/Tutorial/Zones/Rock" unique_id=2043467484]
-layout_mode = 2
-size_flags_horizontal = 3
-theme = ExtResource("9_7c7ks")
-theme_override_fonts/bold_font = ExtResource("4_apjlw")
-theme_override_font_sizes/normal_font_size = 15
-theme_override_font_sizes/bold_font_size = 18
-bbcode_enabled = true
-text = "ROCK_TEXT"
-fit_content = true
-vertical_alignment = 1
-
-[node name="Talion" type="VBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial/Zones" unique_id=366975247]
-layout_mode = 2
-size_flags_horizontal = 3
-
-[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/Zones/Talion" unique_id=850304517]
-custom_minimum_size = Vector2(0, 100)
-layout_mode = 2
-size_flags_horizontal = 4
-size_flags_vertical = 4
-texture = ExtResource("13_4n2vt")
-expand_mode = 3
-stretch_mode = 5
-
-[node name="RichText" type="RichTextLabel" parent="Container/MarginContainer/GridContainer/Tutorial/Zones/Talion" unique_id=1778894577]
-layout_mode = 2
-size_flags_horizontal = 3
-theme = ExtResource("9_7c7ks")
-theme_override_fonts/bold_font = ExtResource("4_apjlw")
-theme_override_font_sizes/normal_font_size = 15
-theme_override_font_sizes/bold_font_size = 18
-bbcode_enabled = true
-text = "TALION_VEIN_TEXT"
-fit_content = true
-vertical_alignment = 1
-
[node name="Settings" parent="." unique_id=758381952 instance=ExtResource("4_58dya")]
unique_name_in_owner = true
visible = false
@@ -381,8 +177,8 @@ mouse_filter = 2
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_yj6f1")
-[connection signal="pressed" from="Container/MarginContainer/GridContainer/Pause/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
-[connection signal="pressed" from="Container/MarginContainer/GridContainer/Pause/HBoxContainer/Settings" to="." method="_on_settings_pressed"]
-[connection signal="pressed" from="Container/MarginContainer/GridContainer/Pause/HBoxContainer/Controls" to="." method="_on_controls_pressed"]
-[connection signal="pressed" from="Container/MarginContainer/GridContainer/Pause/HBoxContainer/GiveUp" to="." method="_on_give_up_pressed"]
-[connection signal="pressed" from="Container/MarginContainer/GridContainer/Pause/HBoxContainer/Quit" to="." method="_on_quit_pressed"]
+[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
+[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Settings" to="." method="_on_settings_pressed"]
+[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Controls" to="." method="_on_controls_pressed"]
+[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/GiveUp" to="." method="_on_give_up_pressed"]
+[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Quit" to="." method="_on_quit_pressed"]
diff --git a/gui/pointer/scripts/pointer.gd b/gui/pointer/scripts/pointer.gd
index 402d9e0..eda1f1e 100644
--- a/gui/pointer/scripts/pointer.gd
+++ b/gui/pointer/scripts/pointer.gd
@@ -40,7 +40,7 @@ func _process(delta):
%Inspector.position = get_viewport().get_mouse_position()
if current_selected_item and SceneManager.actual_scene.scene_id == "REGION":
- %ActionZone.radius = current_selected_item.usage_zone_radius
+ %ActionZone.radius = current_selected_item.usage_zone_radius * GameInfo.settings_data.zoom
%ActionZone.color = ZONE_ACTIVATED_COLOR if can_use_item else ZONE_DEACTIVATED_COLOR
else:
%ActionZone.radius = 0
@@ -145,21 +145,28 @@ func update_card():
or get_tree().paused
):
%CardVisualiser.hide()
-
elif inspected != null :
-
+
if inspected_card_info != %CardVisualiser.card_info:
%CardVisualiser.card_info = inspected_card_info
%CardVisualiser.show()
var camera = get_viewport().get_camera_2d()
- var screen_size = get_viewport().get_visible_rect().size
+ var screen_size = get_viewport().get_visible_rect().size # * get_viewport().get_camera_2d().zoom
+
if inspected is InspectableEntity:
- %CardPosition.position = inspected.global_position - camera.global_position + screen_size / 2 + inspected.get_card_up_padding() * Vector2.UP
+ %CardPosition.position = (
+ (inspected.global_position - camera.global_position) * get_viewport().get_camera_2d().zoom
+ + ((screen_size) / 2)
+ + inspected.get_card_up_padding() * Vector2.UP
+ )
elif inspected is Control:
%CardPosition.position = inspected.global_position + inspected.size / 2 + CARD_UP_PADDING * Vector2.UP
elif inspected is Node3D:
- %CardPosition.position = get_viewport().get_camera_3d().unproject_position(inspected.global_position) + CARD_UP_PADDING * Vector2.UP
+ %CardPosition.position = (
+ get_viewport().get_camera_3d().unproject_position(inspected.global_position)
+ + CARD_UP_PADDING * Vector2.UP
+ )
# if %CardVisualiser.is_mouse_over():
# time_last_inspected = 0.
diff --git a/project.godot b/project.godot
index f2e3ffa..50523ad 100644
--- a/project.godot
+++ b/project.godot
@@ -16,7 +16,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
config/name="Seeding The Wasteland"
config/description="Seeding planets is a survival, managment and cosy game in which you play a little gardener robot."
-config/version="alpha-1.1"
+config/version="alpha-1.2"
run/main_scene="uid://c5bruelvqbm1k"
config/features=PackedStringArray("4.6", "Forward Plus")
config/icon="uid://df0y0s666ui4h"
@@ -151,7 +151,7 @@ action={
}
drop={
"deadzone": 0.2,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
]
}
pause={
@@ -228,6 +228,16 @@ dialogic_default_action={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
}
+zoom_in={
+"deadzone": 0.2,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
+]
+}
+zoom_out={
+"deadzone": 0.2,
+"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":120,"location":0,"echo":false,"script":null)
+]
+}
[internationalization]
diff --git a/stages/terrain/region/scripts/region_data.gd b/stages/terrain/region/scripts/region_data.gd
index 1a62f5d..a3b6711 100644
--- a/stages/terrain/region/scripts/region_data.gd
+++ b/stages/terrain/region/scripts/region_data.gd
@@ -119,7 +119,10 @@ func end_pass_day():
#region ------------------ Plants ------------------
func add_plant_data(plant_data : PlantData, with_update = true):
- plants.append(plant_data)
+ if plants.find_custom(
+ func (pd : PlantData): return pd.random_seed == plant_data.random_seed
+ ) == -1:
+ plants.append(plant_data)
plant_data.disappeared.connect(_on_plant_disappeared)
plant_data.updated.connect(func (_p : PlantData) : update())
if with_update:
diff --git a/translation/game/gui.csv b/translation/game/gui.csv
index 8c7cd76..481f8fd 100644
--- a/translation/game/gui.csv
+++ b/translation/game/gui.csv
@@ -35,7 +35,6 @@ EFFECT,Effect,Effet
MATURE,Mature,Mature
GROWING,Growing,En train de pousser
JUVENILE,Juvenile,Juvénile
-DECONTAMINATE,Decontaminate,Décontamine
%d_CHARGE_LEFT,%d charge left,%d charges restants
LAST_RECHARGE,One recharge remaining,Une recharge restante
RECHARGE_%d_ENERGY,Recharge %d energy,Recharge %d d’énergie
@@ -46,7 +45,6 @@ WHEN_FILLED,When filled,Si rempli
GIVE_THE_FOLLOWING_ITEM_%s,Give the following item : [b]%s[/b],Donne l’objet suivant : [b]%s[/b]
UPGRADE_MAX_ENERGY,Increases maximum energy,Augmente l’énergie maximum
UPGRADE_MAX_INVENTORY_SIZE,Increases inventory size,Augmente la taille de l’inventaire
-DECONTAMINATE_%d_UNIT_AROUND_IT,Decontaminate %d unit around it,Décontamine %d unités autour d’elle
SEED_PRODUCTION,Seed Production,Production de graines
PRODUCE_%s_SEEDS,Produce %s seeds,Produit %s graines
DAY_%d,Day [b]%d[/b],Jour [b]%d[/b]
@@ -68,12 +66,26 @@ SOCIABLE_EFFECT_TEXT,"When mature, grants [b]{score_increase}[/b]{score_icon} ev
TOUGH,Tough,Solide
TOUGH_EFFECT_TEXT,Multiplies {score_icon} by [b]{score_multiplier}[/b] and add [b]{growing_time}[/b]{growing_icon},"Multiplie {score_icon} par [b]{score_multiplier}[/b] et ajoute [b]{growing_time}[/b]{growing_icon}"
FERTILE,Fertile,Fertile
-FERTILE_EFFECT_TEXT,Add [b]{seed_buff}[/b]{seed_icon} to all nearby plant,Ajoute [b]{seed_buff}[/b]{seed_icon} à toutes les plantes autour
+FERTILE_EFFECT_TEXT,Add [b]{seed_buff}[/b]{seed_icon} to all nearby plant but [b]{score_change}[/b]{score_icon},Ajoute [b]{seed_buff}[/b]{seed_icon} à toutes les plantes autour mais [b]{score_change}[/b]{score_icon}
EPHEMERAL,Ephemeral,Éphémère
EPHEMERAL_EFFECT_TEXT,Add [b]{seed_number}[/b]{seed_icon} but [b]{lifetime_change}[/b]{lifetime_icon},"Ajoute [b]{seed_number}[/b]{seed_icon} mais [b]{lifetime_change}[/b]{lifetime_icon}"
PURIFICATION,Purification,Épuration
-PURIFICATION_EFFECT_TEXT,"When mature, decontaminate in a radius of [b]{purification_radius}[/b]","Une fois mature, décontamine dans un rayon de [b]{purification_radius}[/b]"
-COST_%d_ENERGY,Cost %d energy,Coûte %d d’énergie
+PURIFICATION_EFFECT_TEXT,"When mature, create fertile zone in a radius of [b]{purification_radius}[/b]","Une fois mature, créée une zone fertile dans un rayon de [b]{purification_radius}[/b]"
+HURRIED,Hurried,Pressé
+HURRIED_EFFECT_TEXT,"[b]{growing_time_change}[/b]{growing_time_icon}","[b]{growing_time_change}[/b]{growing_time_icon}"
+VIVACIOUS,Vivacious,Vivace
+VIVACIOUS_EFFECT_TEXT,[b]{score_change}[/b]{score_icon} the first day of maturation,[b]{score_change}[/b]{score_icon} le premier jour de maturation
+ROBUST,Robust,Robuste
+ROBUST_EFFECT_TEXT,[b]+{lifetime_change}[/b]{lifetime_icon},[b]+{lifetime_change}[/b]{lifetime_icon}
+PROLIFIC,Prolific,Prolifique
+PROLIFIC_EFFECT_TEXT,[b]+{seeds_change}[/b]{seeds_icon},[b]+{seeds_change}[/b]{seeds_icon}
+PURE,Pure,Pure
+PURE_EFFECT_TEXT,Multiplies {score_icon} by [b]{score_multiplier}[/b] if the all the area around is fertile,Multiplie {score_icon} par [b]{score_multiplier}[/b] si toute la zone autour est fertile
+GENEROUS,Generous,Généreux
+GENEROUS_EFFECT_TEXT,"When mature, add [b]{score_buff}[/b]{score_icon} to all nearby plants, but no longer make point","Si mature, ajoute [b]{score_buff}[/b]{score_icon} à toutes les plantes à proximité, mais ne génère plus de points"
+PROTECTIVE,Protective,Protecteur
+PROTECTIVE_EFFECT_TEXT,"Ajoute [b]{lifetime_buff}[/b]{lifetime_icon} to all nearby plants","Ajoute [b]{lifetime_buff}[/b]{score_icon} à toutes les plantes à proximité, mais ne génère plus de points"
+COST_%d_ENERGY,Cost %d energy,Coûte %d d'énergie
ONE_TIME_USE,Single use,Usage unique
BUILD_%s,Build %s,Construit %s
FORK,Fork,Fourche
@@ -95,13 +107,13 @@ PICKAXE,Pickaxe,Pioche
PICKAXE_DESC_TEXT,Can dig rock and precious materials,Peut creuser la roche et des matériaux précieux
DIG,Dig,Creuser
OPEN,Open,Ouvrir
-%s_SEED,%s Seed,Graine de %s
-PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE,Plant [b]%s[/b]. Must be used in the decontamined zone.,Plante [b]%s[/b]. Doit être utilisée dans la zone décontaminée.
+ %s_SEED,%s Seed,Graine de %s
+PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE,Plant [b]%s[/b]. Must be used in the fertile zone.,Plante [b]%s[/b]. Doit être utilisée dans la zone fertile.
PLANT_%s,Plant [b]%s[/b],Planter [b]%s[/b]
MOVE_WITH_RIGHT_CLICK_OR_WASD,"Move with right click or WASD","Déplace-toi avec le clic droit ou ZQSD"
SELECT_ITEM_WITH_SCROLL_CLICK_OR_NUMBER,"Select an item in your toolbar with the mouse wheel or by clicking on it","Sélectionne un item dans ta barre d'outil en utilisant la molette ou en cliquant dessus"
LEFT_CLICK_TO_USE_ITEMS,"Use an item with left click","Utilise un item avec le clic gauche"
-DROP_SEED_WITH_KEY,"Drop current item with X","Lâche l'item sélectionné avec X"
+DROP_SEED_WITH_KEY,"Drop current item with Q","Lâche l'item sélectionné avec A"
USE_YOUR_DETECTOR_TO_FIND_THE_BATTERY,Use your [b]Detector[/b] to find the [b]Recharge station[/b],Utilise ton [b]Détecteur[/b] pour trouver la [b]Station de recharge[/b]
TAKE_A_SEED_BY_CLICKING_ON_IT,Take a [b]Seed[/b] by clicking on it,Prend une [b]Graine[/b] en cliquant dessus
DIG_A_TALION_VEIN_WITH_SHOVEL,Dig a [b]Talion Vein[/b] with the [b]Shovel[/b],Creuser un [b]Filon de Talion[/b] avec la [b]Pelle[/b]
@@ -121,6 +133,7 @@ RECHARGE,Recharge,Recharger
RECHARGE_STATION_DESC_TEXT,"[b]You can recharge yourself here.[/b] When recharging, time pass and plants grow.","[b]Tu peux te recharger ici.[/b] Pendant la recharge, le temps passe et les plantes grandissent."
COMPOST,Compost,Compost
START,Start,Commencer
+HELP,Help,Aide
CONTINUE,Continue,Continuer
CHOOSE_A_LANGUAGE,Choose a language,Choisissez une langue
NO_ENERGY_LEFT," (no energy left)", " (pas d'énergie restante)"