ajout d'une gui en 3d, d'un tuto et correction de bug à la pelletée

This commit is contained in:
2026-02-07 00:22:12 +01:00
parent 5722fbb437
commit 3fa84994cd
45 changed files with 885 additions and 321 deletions

3
.gitignore vendored
View File

@@ -19,3 +19,6 @@ mono_crash.*.json
.vscode
.export/
stw_demo_save.tres
stw_settings.tres

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=3 uid="uid://b6hscxcrj065q"]
[gd_scene format=3 uid="uid://b6hscxcrj065q"]
[ext_resource type="Script" uid="uid://2p5d6vogtn82" path="res://common/audio_manager/scripts/audio_manager.gd" id="1_0tvca"]
[ext_resource type="AudioStream" uid="uid://dipnmlprwfo12" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_1.ogg" id="2_tuvql"]
@@ -56,52 +56,52 @@ streams_count = 2
stream_0/stream = ExtResource("20_pu6t4")
stream_1/stream = ExtResource("21_dk5s6")
[node name="AudioManager" type="Node"]
[node name="AudioManager" type="Node" unique_id=1871137180]
process_mode = 3
script = ExtResource("1_0tvca")
default_fade_time = 2.0
[node name="Ambiance" type="Node" parent="."]
[node name="Ambiance" type="Node" parent="." unique_id=1989991562]
unique_name_in_owner = true
[node name="Exterior" type="AudioStreamPlayer" parent="Ambiance"]
[node name="Exterior" type="AudioStreamPlayer" parent="Ambiance" unique_id=1405716780]
unique_name_in_owner = true
stream = ExtResource("2_tuvql")
[node name="Musics" type="Node" parent="."]
[node name="Musics" type="Node" parent="." unique_id=1450527710]
unique_name_in_owner = true
[node name="Region" type="AudioStreamPlayer" parent="Musics"]
[node name="Region" type="AudioStreamPlayer" parent="Musics" unique_id=1029114070]
unique_name_in_owner = true
stream = SubResource("AudioStreamPlaylist_ajci6")
[node name="Title" type="AudioStreamPlayer" parent="Musics"]
[node name="Title" type="AudioStreamPlayer" parent="Musics" unique_id=2105759422]
unique_name_in_owner = true
stream = ExtResource("7_tuvql")
[node name="Truck" type="AudioStreamPlayer" parent="Musics"]
[node name="Truck" type="AudioStreamPlayer" parent="Musics" unique_id=1165150318]
unique_name_in_owner = true
stream = ExtResource("8_0e5ja")
[node name="Sfx" type="Node" parent="."]
[node name="Sfx" type="Node" parent="." unique_id=2023641207]
unique_name_in_owner = true
[node name="Dig" type="AudioStreamPlayer" parent="Sfx"]
[node name="Dig" type="AudioStreamPlayer" parent="Sfx" unique_id=486042600]
stream = SubResource("AudioStreamRandomizer_kfbah")
[node name="Drop" type="AudioStreamPlayer" parent="Sfx"]
[node name="Drop" type="AudioStreamPlayer" parent="Sfx" unique_id=1391500830]
stream = SubResource("AudioStreamRandomizer_1w04j")
[node name="Harvest" type="AudioStreamPlayer" parent="Sfx"]
[node name="Harvest" type="AudioStreamPlayer" parent="Sfx" unique_id=345539331]
stream = SubResource("AudioStreamRandomizer_i4m0x")
[node name="PickUp" type="AudioStreamPlayer" parent="Sfx"]
[node name="PickUp" type="AudioStreamPlayer" parent="Sfx" unique_id=176915166]
stream = SubResource("AudioStreamRandomizer_jjdv2")
volume_db = -10.0
[node name="Announce" type="AudioStreamPlayer" parent="Sfx"]
[node name="Announce" type="AudioStreamPlayer" parent="Sfx" unique_id=876644323]
stream = ExtResource("22_btfwx")
volume_db = 8.627
[node name="Alarm" type="AudioStreamPlayer" parent="Sfx"]
[node name="Alarm" type="AudioStreamPlayer" parent="Sfx" unique_id=689347925]
stream = ExtResource("23_fwu3w")

View File

@@ -5,7 +5,7 @@ const MAX_VOLUME = 24.
@onready var settings : SettingsData = GameInfo.settings_data
@export var default_fade_time = 1.0
@export var default_fade_time = 0.5
@export var playing_music : AudioStreamPlayer = null
@export var playing_ambiance : AudioStreamPlayer = null
@@ -91,31 +91,36 @@ func play_sfx(sfx_name : String):
printerr("Sfx %s not found" % sfx_name)
func play_music(music_name : String = ""):
if playing_music:
await set_volume(playing_music, MIN_VOLUME).finished
if playing_music:
playing_music.stop()
reset_volume(playing_music)
var old_music = playing_music
playing_music = null
if old_music:
await set_volume(old_music, MIN_VOLUME).finished
if old_music and old_music != playing_music:
print(old_music)
old_music.stop()
reset_volume(old_music)
if music_name:
var player := %Musics.find_child(music_name) as AudioStreamPlayer
if player:
playing_music = player
player.play()
set_volume(player, get_volume_from_parent(player))
else:
printerr("Music %s not found" % music_name)
func play_ambiance(ambiance_name : String = ""):
if playing_ambiance:
await set_volume(playing_ambiance, MIN_VOLUME).finished
if playing_ambiance:
playing_ambiance.stop()
reset_volume(playing_ambiance)
var old_ambiance = playing_ambiance
playing_ambiance = null
if old_ambiance:
await set_volume(old_ambiance, MIN_VOLUME).finished
if old_ambiance and old_ambiance != playing_ambiance:
old_ambiance.stop()
reset_volume(old_ambiance)
if ambiance_name:
var player := %Ambiance.find_child(ambiance_name) as AudioStreamPlayer
if player:
playing_ambiance = player
player.play()
set_volume(player, get_volume_from_parent(player))
else:
printerr("Sfx %s not found" % ambiance_name)
printerr("Ambiance %s not found" % ambiance_name)

View File

@@ -30,7 +30,6 @@ func save_game_data():
func load_settings_data() -> SettingsData:
if ResourceLoader.exists(SAVE_SETTINGS_LOCATION):
print("settings exists")
settings_data = ResourceLoader.load(SAVE_SETTINGS_LOCATION).duplicate_deep()
else :
settings_data = SettingsData.new()
@@ -70,5 +69,4 @@ func update_inputs(s : SettingsData = settings_data):
for i in range(len(s.input_remapped)):
InputMap.action_erase_events(s.action_remapped[i])
InputMap.action_add_event(s.action_remapped[i], s.input_remapped[i])
print("Update %s action to %s" % [s.action_remapped[i], s.input_remapped[i].as_text()])

View File

@@ -7,7 +7,7 @@ const VOWEL = ["a","e","i","o","u","y"]
const CONSONANTS = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "z"]
static func generate_random_word(random_seed = randi()) -> String:
static func generate_random_word(_random_seed = randi()) -> String:
var word_len = randf_range(4,8)
var word = ''
var last_letter_is_vowel = false

View File

@@ -138,15 +138,10 @@ func card_info() -> CardInfo:
data.archetype.archetype_name
)
var state = data.get_state()
info.important_stat_icon = PLANT_POINT_ICON
info.important_stat_text = "%d" % calculate_plant_score()
info.type_icon = PLANT_TYPE_ICON
var state_text = tr("MATURE")
if state != PlantData.State.MATURE:
state_text = tr("GROWING")
info.stats.append_array([
CardStatInfo.new(

View File

@@ -10,6 +10,7 @@ func build_seed_texture(_random_seed : int) -> Texture:
return PLACEHOLDER_SEED_TEXTURE
func build_plant_texture(plant_data : PlantData) -> Texture:
match plant_data.get_state():
PlantData.State.MATURE:
return PLACEHOLDER_MATURE_TEXTURE

View File

@@ -97,7 +97,6 @@ func is_full():
return true
func clear():
print("clearing inventory")
for i in range(len(items)):
items[i] = null
updated.emit(self)

View File

@@ -39,6 +39,6 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
return true
func harvest(p : Plant, player: Player):
func harvest(p : Plant, _player: Player):
AudioManager.play_sfx("Harvest")
p.harvest()

View File

@@ -38,6 +38,8 @@ func _physics_process(delta):
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var input_dir = Input.get_vector("move_left", "move_right", "move_up", "move_down")
if Input.is_action_pressed("move_pointer"):
input_dir.y = -1
var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if direction:
velocity.x = direction.x * SPEED

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,6 @@
[gd_resource type="Environment" format=3 uid="uid://bxyp24f85p0xf"]
[resource]
ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
ambient_light_energy = 2.29

Binary file not shown.

View File

@@ -0,0 +1,68 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://ddfdj8lb24f6g"
path="res://.godot/imported/battery.blend-724853c18018bdd43a8c1a47a4cb5ee6.scn"
[deps]
source_file="res://gui/game/energy_info/assets/3d/battery.blend"
dest_files=["res://.godot/imported/battery.blend-724853c18018bdd43a8c1a47a4cb5ee6.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Material": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

View File

@@ -1,37 +1,55 @@
[gd_scene load_steps=6 format=3 uid="uid://brfsapvj2quxm"]
[gd_scene format=3 uid="uid://brfsapvj2quxm"]
[ext_resource type="Script" uid="uid://0dhj8sdpil7q" path="res://gui/tools/control_animation_player.gd" id="1_g7kwx"]
[ext_resource type="Script" uid="uid://b77b1yr81r462" path="res://gui/game/energy_info/scripts/energy_info.gd" id="1_h7p5h"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="2_h7p5h"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="3_c14dn"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="4_rqwov"]
[ext_resource type="PackedScene" uid="uid://ddfdj8lb24f6g" path="res://gui/game/energy_info/assets/3d/battery.blend" id="6_c14dn"]
[ext_resource type="Material" uid="uid://cr7bp4fhh1ipr" path="res://entities/player_3d/resources/materials/post_process_quad.tres" id="7_rqwov"]
[ext_resource type="Environment" uid="uid://bxyp24f85p0xf" path="res://gui/game/assets/gui_3d_environment.tres" id="8_tj7lw"]
[node name="EnergyInfo" type="HBoxContainer"]
modulate = Color(1, 0, 0, 1)
offset_right = 167.0
offset_bottom = 75.0
[sub_resource type="ViewportTexture" id="ViewportTexture_h7p5h"]
viewport_path = NodePath("BatteryViewport")
[sub_resource type="QuadMesh" id="QuadMesh_tj7lw"]
size = Vector2(2, 2)
[node name="EnergyInfo" type="MarginContainer" unique_id=698017539]
offset_right = 144.0
offset_bottom = 184.0
size_flags_horizontal = 2
size_flags_vertical = 0
theme_override_constants/separation = 0
alignment = 1
script = ExtResource("1_h7p5h")
wanted_max_energy = 3
[node name="EnergyAnimationPlayer" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("1_g7kwx")
metadata/_custom_type_script = "uid://0dhj8sdpil7q"
[node name="MarginContainer" type="MarginContainer" parent="."]
[node name="TextureRect" type="TextureRect" parent="." unique_id=1995434270]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = -25
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = -15
texture = SubResource("ViewportTexture_h7p5h")
stretch_mode = 2
[node name="EnergyCount" type="RichTextLabel" parent="MarginContainer"]
[node name="IconPlacer" type="MarginContainer" parent="." unique_id=667163887]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
theme_override_constants/margin_top = 13
theme_override_constants/margin_right = 20
theme_override_constants/margin_bottom = 0
[node name="Icon" type="TextureRect" parent="IconPlacer" unique_id=274278115]
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
texture = ExtResource("4_rqwov")
expand_mode = 1
stretch_mode = 5
[node name="TextPlacer" type="MarginContainer" parent="." unique_id=1669037421]
layout_mode = 2
size_flags_vertical = 0
theme_override_constants/margin_left = 7
theme_override_constants/margin_top = 81
theme_override_constants/margin_right = 7
[node name="EnergyCount" type="RichTextLabel" parent="TextPlacer" unique_id=1073572949]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("2_h7p5h")
@@ -40,19 +58,35 @@ theme_override_fonts/bold_font = ExtResource("3_c14dn")
theme_override_fonts/bold_italics_font = ExtResource("3_c14dn")
theme_override_fonts/italics_font = ExtResource("3_c14dn")
theme_override_font_sizes/normal_font_size = 30
theme_override_font_sizes/bold_font_size = 100
theme_override_font_sizes/bold_font_size = 70
bbcode_enabled = true
text = "[b]0[/b] / 3"
fit_content = true
autowrap_mode = 0
horizontal_alignment = 1
vertical_alignment = 1
[node name="Icon" type="TextureRect" parent="."]
custom_minimum_size = Vector2(50, 50)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
texture = ExtResource("4_rqwov")
expand_mode = 4
stretch_mode = 5
[node name="EnergyAnimationPlayer" type="Node" parent="." unique_id=666526156]
unique_name_in_owner = true
script = ExtResource("1_g7kwx")
metadata/_custom_type_script = "uid://0dhj8sdpil7q"
[node name="BatteryViewport" type="SubViewport" parent="." unique_id=146346475]
own_world_3d = true
transparent_bg = true
size = Vector2i(144, 184)
[node name="battery" parent="BatteryViewport" unique_id=1405747982 instance=ExtResource("6_c14dn")]
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 0, 0, 0)
[node name="Camera3D" type="Camera3D" parent="BatteryViewport" unique_id=328545179]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 4.2918096, -0.38356447, 0)
current = true
fov = 39.9
[node name="MeshInstance3D" type="MeshInstance3D" parent="BatteryViewport" unique_id=1467847837]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 2.8120923, -0.4413929, 0)
mesh = SubResource("QuadMesh_tj7lw")
surface_material_override/0 = ExtResource("7_rqwov")
[node name="WorldEnvironment" type="WorldEnvironment" parent="BatteryViewport" unique_id=1322215759]
environment = ExtResource("8_tj7lw")

View File

@@ -1,5 +1,5 @@
@tool
extends HBoxContainer
extends MarginContainer
class_name EnergyInfo
@export var wanted_energy = 0
@@ -13,7 +13,7 @@ var max_energy := 0
func update(
_energy : int,
_max_energy : int,
with_animation := true,
_with_animation := true,
):
var changed = (energy != _energy or max_energy != _max_energy)
if changed:
@@ -24,4 +24,4 @@ func update(
# if with_animation:
# %EnergyAnimationPlayer.bounce()
%EnergyCount.text = energy_count_text
modulate = Color.WHITE if energy > 0 else Color.RED
%EnergyCount.modulate = Color.WHITE if energy > 0 else Color.RED

View File

@@ -4,8 +4,7 @@
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="2_nq5i2"]
[ext_resource type="PackedScene" uid="uid://brfsapvj2quxm" path="res://gui/game/energy_info/energy_info.tscn" id="4_2wykm"]
[ext_resource type="PackedScene" uid="uid://fnv0qhkh40mv" path="res://gui/game/announce/announce.tscn" id="4_h6540"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="4_ujg5r"]
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="7_id0t5"]
[ext_resource type="PackedScene" uid="uid://df0eop555wfj5" path="res://gui/game/objective_progress_bar/objective_progress_bar.tscn" id="6_dr1y2"]
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
[node name="GameGui" type="CanvasLayer" unique_id=274698556]
@@ -43,51 +42,12 @@ layout_mode = 2
size_flags_horizontal = 4
mouse_filter = 2
[node name="ChargeCount" type="Label" parent="MarginContainer/VBoxContainer" unique_id=587242538]
[node name="ObjectiveProgressBar" parent="MarginContainer/VBoxContainer" unique_id=2043451865 instance=ExtResource("6_dr1y2")]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
text = "%d_CHARGE_LEFT"
label_settings = ExtResource("4_ujg5r")
horizontal_alignment = 1
vertical_alignment = 1
[node name="QuotaProgressBar" type="ProgressBar" parent="MarginContainer/VBoxContainer" unique_id=1464968400]
unique_name_in_owner = true
custom_minimum_size = Vector2(400, 50)
layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_nq5i2")
rounded = true
show_percentage = false
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/QuotaProgressBar" unique_id=1897590382]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_constants/separation = 2
alignment = 1
[node name="ObjectiveProgressText" type="Label" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer" unique_id=1326076389]
unique_name_in_owner = true
layout_mode = 2
text = "X"
label_settings = ExtResource("4_ujg5r")
horizontal_alignment = 1
vertical_alignment = 1
[node name="ObjectiveIcon" type="TextureRect" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer" unique_id=857464776]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
mouse_filter = 2
texture = ExtResource("7_id0t5")
expand_mode = 1
stretch_mode = 5
size_flags_vertical = 4
progress = null
[node name="Inventory" parent="MarginContainer" unique_id=1407862321 instance=ExtResource("9_id0t5")]
unique_name_in_owner = true

Binary file not shown.

View File

@@ -0,0 +1,68 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cam5igcebfvsd"
path="res://.godot/imported/gauge.blend-d20a9fef9f559503de033e50245cff9d.scn"
[deps]
source_file="res://gui/game/objective_progress_bar/assets/3d/gauge.blend"
dest_files=["res://.godot/imported/gauge.blend-d20a9fef9f559503de033e50245cff9d.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"Material": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
}
}
}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/export_geometry_nodes_instances=false
blender/meshes/gpu_instances=false
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
gltf/naming_version=2

Binary file not shown.

View File

@@ -0,0 +1,92 @@
[gd_scene format=3 uid="uid://df0eop555wfj5"]
[ext_resource type="Material" uid="uid://cr7bp4fhh1ipr" path="res://entities/player_3d/resources/materials/post_process_quad.tres" id="1_j2f28"]
[ext_resource type="Script" uid="uid://brqgqwh5uwksh" path="res://gui/game/objective_progress_bar/scripts/objective_progress_bar.gd" id="1_wl86c"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="2_vk2vv"]
[ext_resource type="Environment" uid="uid://bxyp24f85p0xf" path="res://gui/game/assets/gui_3d_environment.tres" id="2_wl86c"]
[ext_resource type="PackedScene" uid="uid://cam5igcebfvsd" path="res://gui/game/objective_progress_bar/assets/3d/gauge.blend" id="3_3aubw"]
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="3_7sip7"]
[sub_resource type="ViewportTexture" id="ViewportTexture_3aubw"]
viewport_path = NodePath("ProgressBarViewPort")
[sub_resource type="QuadMesh" id="QuadMesh_vk2vv"]
size = Vector2(2, 2)
[sub_resource type="Gradient" id="Gradient_vk2vv"]
colors = PackedColorArray(1, 0, 0.43137255, 1, 1, 0.6509804, 0.09019608, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_7sip7"]
gradient = SubResource("Gradient_vk2vv")
[node name="ObjectiveProgressBar" type="MarginContainer" unique_id=2043451865]
offset_right = 300.0
offset_bottom = 75.0
size_flags_horizontal = 0
size_flags_vertical = 0
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 0
script = ExtResource("1_wl86c")
progress = 0.815
text = "0/5"
[node name="TextureRect" type="TextureRect" parent="." unique_id=1998625871]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
texture = SubResource("ViewportTexture_3aubw")
stretch_mode = 5
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=304487768]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
mouse_filter = 2
theme_override_constants/separation = 2
alignment = 1
[node name="ProgressText" type="Label" parent="HBoxContainer" unique_id=1471735717]
unique_name_in_owner = true
layout_mode = 2
text = "0/5"
label_settings = ExtResource("2_vk2vv")
horizontal_alignment = 1
vertical_alignment = 1
[node name="Icon" type="TextureRect" parent="HBoxContainer" unique_id=531688920]
custom_minimum_size = Vector2(30, 30)
layout_mode = 2
mouse_filter = 2
texture = ExtResource("3_7sip7")
expand_mode = 1
stretch_mode = 5
[node name="ProgressBarViewPort" type="SubViewport" parent="." unique_id=459282221]
own_world_3d = true
transparent_bg = true
size = Vector2i(479, 117)
[node name="Camera3D" type="Camera3D" parent="ProgressBarViewPort" unique_id=1739830500]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 16.5, 0, -0.2)
keep_aspect = 0
fov = 44.6
[node name="MeshInstance3D" type="MeshInstance3D" parent="ProgressBarViewPort/Camera3D" unique_id=2049023784]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.2)
mesh = SubResource("QuadMesh_vk2vv")
skeleton = NodePath("../..")
surface_material_override/0 = ExtResource("1_j2f28")
[node name="WorldEnvironment" type="WorldEnvironment" parent="ProgressBarViewPort" unique_id=1743124302]
environment = ExtResource("2_wl86c")
[node name="gauge" parent="ProgressBarViewPort" unique_id=1465667654 instance=ExtResource("3_3aubw")]
[node name="ProgressBar" type="Sprite3D" parent="ProgressBarViewPort" unique_id=1289085425]
unique_name_in_owner = true
transform = Transform3D(-1.5140532e-07, 0, 0.989, 0, 200, 0, -3.46375, 0, -4.3230564e-08, 0.27917147, -1.0458755, 5.3935585)
centered = false
texture = SubResource("GradientTexture1D_7sip7")

View File

@@ -0,0 +1,24 @@
@tool
extends MarginContainer
class_name ObjectivProgressBar
const MAX_PROGRESS_BAR_SCALE = 4.25
const PROGRESS_BAR_WEIGHT = 0.1
@export var progress := 0. : set = set_progress
@export var text := "" :
set(v):
text = v
if is_node_ready():
%ProgressText.text = v
func _ready():
if progress != null:
%ProgressBar.scale.x = progress * MAX_PROGRESS_BAR_SCALE
%ProgressText.text = text
func set_progress(_progress : float):
progress = _progress
if is_node_ready() and progress != null:
%ProgressBar.scale.x = min(1., progress) * MAX_PROGRESS_BAR_SCALE

View File

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

View File

@@ -15,6 +15,7 @@ shader_parameter/mix_percentage = 0.0
[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]
@@ -31,7 +32,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
@@ -48,7 +48,7 @@ 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 = 3
size_flags_horizontal = 6
[node name="ChargeCount" type="Label" parent="PassDayInfo" unique_id=1326590358]
unique_name_in_owner = true

View File

@@ -1,170 +0,0 @@
[gd_scene format=3 uid="uid://csiacsndm62ll"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_51ks3"]
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/game/pause/scripts/pause.gd" id="1_he4ox"]
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://common/vfx/materials/shaders/blur.gdshader" id="2_apjlw"]
[ext_resource type="PackedScene" uid="uid://g6lbgg1fhc25" path="res://gui/menu/settings/settings.tscn" id="4_58dya"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_apjlw"]
[ext_resource type="Texture2D" uid="uid://vmsn54d1ptih" path="res://common/icons/player-play.svg" id="5_apjlw"]
[ext_resource type="Texture2D" uid="uid://cixd5j8yqpavg" path="res://common/icons/settings.svg" id="6_yj6f1"]
[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="PackedScene" uid="uid://b4qe1dwwsk87t" path="res://gui/menu/controls/controls.tscn" id="11_urlqn"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_58dya"]
shader = ExtResource("2_apjlw")
shader_parameter/strength = 3.3
shader_parameter/mix_percentage = 0.3
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("4_apjlw")
font_size = 30
[sub_resource type="Animation" id="Animation_58dya"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Container:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_apjlw"]
resource_name = "pause"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0333333),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Container:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.033333335, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yj6f1"]
_data = {
&"RESET": SubResource("Animation_58dya"),
&"pause": SubResource("Animation_apjlw")
}
[node name="Pause" type="CanvasLayer" unique_id=2045727851]
process_mode = 3
layer = 100
visible = false
script = ExtResource("1_he4ox")
[node name="Container" type="Control" parent="." unique_id=69447299]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="ColorRect" type="ColorRect" parent="Container" unique_id=862826206]
material = SubResource("ShaderMaterial_58dya")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="MarginContainer" type="MarginContainer" parent="Container" unique_id=243001225]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_51ks3")
[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer" unique_id=1262577626]
layout_mode = 2
theme = ExtResource("1_51ks3")
theme_override_constants/separation = 20
alignment = 1
[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/Pause" unique_id=616663351]
layout_mode = 2
size_flags_horizontal = 4
alignment = 1
[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/Pause/HBoxContainer" unique_id=1532435179]
layout_mode = 2
text = "SETTINGS"
icon = ExtResource("6_yj6f1")
[node name="Controls" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=138156239]
layout_mode = 2
text = "CONTROLS"
icon = ExtResource("7_7c7ks")
[node name="Quit" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=1740895928]
layout_mode = 2
text = "QUIT"
icon = ExtResource("7_yj6f1")
[node name="Settings" parent="." unique_id=758381952 instance=ExtResource("4_58dya")]
unique_name_in_owner = true
mouse_filter = 2
[node name="Controls" parent="." unique_id=358658336 instance=ExtResource("11_urlqn")]
unique_name_in_owner = true
mouse_filter = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1779993260]
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_yj6f1")
[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/Quit" to="." method="_on_quit_pressed"]

View File

@@ -33,22 +33,29 @@ func player_update(player_data : PlayerData, with_animation = true):
func _on_region_updated(region_data : RegionData):
charge_update(region_data)
func charge_update(region_data : RegionData):
%ChargeCount.text = tr("%d_CHARGE_LEFT") % (region_data.charges)
func charge_update(_region_data : RegionData):
pass
# %ChargeCount.text = tr("%d_CHARGE_LEFT") % (region_data.charges)
func score_update(with_animation = true):
var objective_progression : float
if GameInfo.game_data.current_region_data.state == RegionData.State.SUCCEEDED:
objective_progression = 1.
%ObjectiveProgressBar.text = tr("FILLED")
else:
var objective = GameInfo.game_data.current_region_data.objective
var objective_progression_percent : float = (float(score_mirror) / float(objective)) * 100
%ObjectiveProgressText.text = "%d/%d" % [score_mirror, objective]
objective_progression = (float(score_mirror) / max(float(objective), 1))
%ObjectiveProgressBar.text = "%d/%d" % [score_mirror, objective]
if with_animation:
get_tree().create_tween().tween_property(
%QuotaProgressBar,
"value",
objective_progression_percent,
%ObjectiveProgressBar,
"progress",
objective_progression,
0.5,
)
else: %QuotaProgressBar.value = objective_progression_percent
else:
%ObjectiveProgressBar.set_progress(objective_progression)
func _on_plant_changing_score(plant_data: PlantData, amount : int):
if GameInfo.game_data.current_region_data.in_passing_day_animation:
@@ -62,7 +69,7 @@ func _on_plant_changing_score(plant_data: PlantData, amount : int):
spawn_score_particle(
plant_data.position - camera.global_position + screen_size / 2,
%QuotaProgressBar.global_position + %QuotaProgressBar.size / 2,
%ObjectiveProgressBar.global_position + %ObjectiveProgressBar.size / 2,
0.8
)

View File

@@ -124,7 +124,7 @@ class TakeSeedStep extends Step:
return false
class PlantSeedStep extends Step:
func generate_indicators(p: Player, region : Region) -> Array[InGameIndicator]:
func generate_indicators(_p: Player, _region : Region) -> Array[InGameIndicator]:
var indicator = generate_indicator(tr("PLANT_THE_SEED_IN_DECONTAMINED_ZONE"))
indicator.follow_game_position(Region.CHUNK_TILE_SIZE/2. * Region.TILE_SIZE * Vector2.ONE)
return [indicator]

View File

@@ -23,7 +23,7 @@ func create_input_list():
child.queue_free()
for action in InputMap.get_actions():
if action.substr(0, 3) != "ui_":
if action.substr(0, 3) != "ui_" and action.substr(0, 8) != "dialogic":
var input_group = instantiate_input_group()
input_group.action_name = action
%ControlsContainer.add_child(input_group)

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bku47nx7clom4"
path="res://.godot/imported/card_tutorial_image.png-a8f51388f4585abed9acb5f7a239ec3a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/pause/assets/textures/card_tutorial_image.png"
dest_files=["res://.godot/imported/card_tutorial_image.png-a8f51388f4585abed9acb5f7a239ec3a.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bgcymkgxk7mpp"
path="res://.godot/imported/moss_tutorial_image.png-16564772748bcd6f6a254bbb4489ca04.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/pause/assets/textures/moss_tutorial_image.png"
dest_files=["res://.godot/imported/moss_tutorial_image.png-16564772748bcd6f6a254bbb4489ca04.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bhogi5kkltx51"
path="res://.godot/imported/rock_tutorial_image.png-470c554eaae84faa2ce91747195ec908.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/pause/assets/textures/rock_tutorial_image.png"
dest_files=["res://.godot/imported/rock_tutorial_image.png-470c554eaae84faa2ce91747195ec908.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3fwhxkd0ycga"
path="res://.godot/imported/talion_tutorial_image.png-37970792a3de645d9b6683ff21339134.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://gui/pause/assets/textures/talion_tutorial_image.png"
dest_files=["res://.godot/imported/talion_tutorial_image.png-37970792a3de645d9b6683ff21339134.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

302
gui/pause/pause.tscn Normal file
View File

@@ -0,0 +1,302 @@
[gd_scene format=3 uid="uid://csiacsndm62ll"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_51ks3"]
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/pause/scripts/pause.gd" id="1_he4ox"]
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://common/vfx/materials/shaders/blur.gdshader" id="2_apjlw"]
[ext_resource type="PackedScene" uid="uid://g6lbgg1fhc25" path="res://gui/menu/settings/settings.tscn" id="4_58dya"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_apjlw"]
[ext_resource type="Texture2D" uid="uid://vmsn54d1ptih" path="res://common/icons/player-play.svg" id="5_apjlw"]
[ext_resource type="Texture2D" uid="uid://cixd5j8yqpavg" path="res://common/icons/settings.svg" id="6_yj6f1"]
[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="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="9_7c7ks"]
[ext_resource type="Texture2D" uid="uid://bku47nx7clom4" path="res://gui/pause/assets/textures/card_tutorial_image.png" id="9_sepn1"]
[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://3fwhxkd0ycga" path="res://gui/pause/assets/textures/talion_tutorial_image.png" id="13_4n2vt"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_58dya"]
shader = ExtResource("2_apjlw")
shader_parameter/strength = 3.3
shader_parameter/mix_percentage = 0.3
[sub_resource type="LabelSettings" id="LabelSettings_apjlw"]
font = ExtResource("4_apjlw")
font_size = 30
[sub_resource type="Animation" id="Animation_58dya"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Container:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_apjlw"]
resource_name = "pause"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0333333),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Container:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.033333335, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_yj6f1"]
_data = {
&"RESET": SubResource("Animation_58dya"),
&"pause": SubResource("Animation_apjlw")
}
[node name="Pause" type="CanvasLayer" unique_id=2045727851]
process_mode = 3
layer = 100
visible = false
script = ExtResource("1_he4ox")
[node name="Container" type="Control" parent="." unique_id=69447299]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="ColorRect" type="ColorRect" parent="Container" unique_id=862826206]
material = SubResource("ShaderMaterial_58dya")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="MarginContainer" type="MarginContainer" parent="Container" unique_id=243001225]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
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]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource("1_51ks3")
theme_override_constants/separation = 20
alignment = 1
[node name="PauseTitle" type="Label" parent="Container/MarginContainer/GridContainer/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]
layout_mode = 2
size_flags_horizontal = 4
alignment = 1
[node name="Resume" type="Button" parent="Container/MarginContainer/GridContainer/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]
layout_mode = 2
text = "SETTINGS"
icon = ExtResource("6_yj6f1")
[node name="Controls" type="Button" parent="Container/MarginContainer/GridContainer/Pause/HBoxContainer" unique_id=138156239]
layout_mode = 2
text = "CONTROLS"
icon = ExtResource("7_7c7ks")
[node name="Quit" type="Button" parent="Container/MarginContainer/GridContainer/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="TutorialPlants" type="Label" parent="Container/MarginContainer/GridContainer/Tutorial" unique_id=54599107]
layout_mode = 2
text = "PLANT_INFO"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="Plants" type="HBoxContainer" parent="Container/MarginContainer/GridContainer/Tutorial" unique_id=1658568175]
layout_mode = 2
alignment = 1
[node name="TextureRect" type="TextureRect" parent="Container/MarginContainer/GridContainer/Tutorial/Plants" unique_id=1418592623]
layout_mode = 2
texture = ExtResource("9_sepn1")
expand_mode = 3
stretch_mode = 5
[node name="RichText" type="RichTextLabel" parent="Container/MarginContainer/GridContainer/Tutorial/Plants" unique_id=1176432130]
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 = "PLANT_INFO_TEXT"
fit_content = true
autowrap_mode = 0
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 = "DECONTAMINED_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
mouse_filter = 2
[node name="Controls" parent="." unique_id=358658336 instance=ExtResource("11_urlqn")]
unique_name_in_owner = true
mouse_filter = 2
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1779993260]
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/Quit" to="." method="_on_quit_pressed"]

View File

@@ -2,6 +2,9 @@ extends CanvasLayer
var pause = false : set = set_pause
func _ready():
hide()
func set_pause(p):
if p != pause:
if p:

View File

@@ -30,7 +30,7 @@ buses/default_bus_layout=""
Pointer="*res://gui/pointer/pointer.tscn"
AudioManager="*res://common/audio_manager/audio_manager.tscn"
GameInfo="*res://common/game_info/game_info.gd"
Pause="*res://gui/game/pause/pause.tscn"
Pause="*res://gui/pause/pause.tscn"
Dialogic="*res://addons/dialogic/Core/DialogicGameHandler.gd"
LoadingScreen="*res://gui/loading_screen/loading_screen.tscn"
SceneManager="*res://common/scene_manager/scene_manager.tscn"

View File

@@ -171,7 +171,7 @@ _data = {
}
[sub_resource type="FastNoiseLite" id="FastNoiseLite_5t1te"]
seed = 811286534
seed = -1559714386
frequency = 1.0
[sub_resource type="Animation" id="Animation_koamw"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 243 KiB

View File

@@ -24,7 +24,6 @@ const DEFAULT_OBJECTIVE := 10
@export var state : State = State.IN_PROGRESS :
set(v):
print("Set state to %d" % v)
state = v
@export var chunks_data : Dictionary[String, ChunkData]
@@ -54,7 +53,6 @@ func _init(
tutorial = parameter.tutorial
func update():
print("Score %d > Objective %d" % [get_score(), objective] )
if objective > 0 and get_score() >= objective:
state = State.SUCCEEDED
if state != State.SUCCEEDED and charges == 0:
@@ -125,10 +123,15 @@ func add_plant_data(plant_data : PlantData, with_update = true):
_on_plant_updated(plant_data)
func _on_plant_updated(plant_data : PlantData):
print("for plant %s" % plant_data.plant_name)
var old_plant_score = score_by_plant[plant_data]
print("old score = %d" % old_plant_score)
score_by_plant[plant_data] = plant_data.get_score()
print("new score = %d" % score_by_plant[plant_data])
if old_plant_score != score_by_plant[plant_data]:
print("plant changin score")
plant_changing_score.emit(plant_data, score_by_plant[plant_data] - old_plant_score)
update()

View File

@@ -1,19 +1,21 @@
keys,en,fr
STORY_TEXT,"[b]You are a lone robot, sent on a contaminated planet.[/b]
Your job : planting seeds to restore life on the planet. Each seed has different effects and grant you garden points, [b]you have to reach a certain garden score each 7 days to continue[/b].
Be careful, [b]you can only plant in the decontamined zone[/b], but some plants can decontaminate your garden.
[b]Good luck![/b]","[b]Vous êtes un robot, envoyé seul sur une planète contaminée.[/b]
Votre mission : planter des graines pour redonner vie à cette planète. Chaque graine a des effets uniques et vous octroie des points de jardin, [b]vous devrez atteindre un certain score de jardin tous les 7 jours pour continuer[/b].
Attention, [b]vous ne pouvez planter que dans la zone décontaminée[/b], mais certaines plantes peuvent décontaminer votre jardin.
[b]Bonne chance ![/b]"
CONTROLS_TEXT,"Directional Arrows/Right Click : Move
Left Click : Interact/Pick up
Mouse Wheel : Change held item
X : Drop Item","Flèches directionnelles/Clic droit : Se déplacer
Clic Gauche : Interagir/Ramasser
Molette : Changer l'objet en main
X : Lâcher lobjet"
STORY,Story,Histoire
TUTORIAL,Tutorial,Tutoriel
PLANT_INFO,Plant Info, Informations de plantes
PLANT_INFO_TEXT,"[b]1[/b] Name
[b]2[/b] Archetype
[b]3[/b] Score
[b]4[/b] Age
[b]5[/b] Growing time
[b]6[/b] Lifetime","[b]1[/b] Nom
[b]2[/b] Archétype
[b]3[/b] Score
[b]4[/b] Age
[b]5[/b] Durée de pousse
[b]6[/b] Durée de vie"
TERRAINS,Terrains,Terrains
DECONTAMINED_LAND_TEXT,[b]Decontamined Land[/b] Seeds can only be planted on this zone,[b]Terres décontaminée[/b] Des graines peuvent être plantées dans cette zone
ROCK_TEXT,[b]Rock[/b] Can be dug with a pickaxe,[b]Roche[/b] Peut être creusée avec une pioche
TALION_VEIN_TEXT,"[b]Talion Vein[/b] Can be dug with a pickaxe, contains random seeds","[b]Veine de Talion[/b] Peut être creusée avec une pioche, contient des graines aléatoire"
OK,Ok,Ok
GARDEN,Garden,Jardin
COMMA,", ",","
@@ -183,3 +185,4 @@ MISSION_SUCCEEDED,Mission Succeeded,Mission Réussie
MISSION_FAILED,Mission Failed,Mission Échouée
MISSION_IN_PROGRESS,Mission In Progress,Mission En Cours
%d_PLANTS,%d plants,%d plantes
FILLED,Filled,Rempli
1 keys en fr
2 STORY_TEXT TUTORIAL [b]You are a lone robot, sent on a contaminated planet.[/b] Your job : planting seeds to restore life on the planet. Each seed has different effects and grant you garden points, [b]you have to reach a certain garden score each 7 days to continue[/b]. Be careful, [b]you can only plant in the decontamined zone[/b], but some plants can decontaminate your garden. [b]Good luck![/b] Tutorial [b]Vous êtes un robot, envoyé seul sur une planète contaminée.[/b] Votre mission : planter des graines pour redonner vie à cette planète. Chaque graine a des effets uniques et vous octroie des points de jardin, [b]vous devrez atteindre un certain score de jardin tous les 7 jours pour continuer[/b]. Attention, [b]vous ne pouvez planter que dans la zone décontaminée[/b], mais certaines plantes peuvent décontaminer votre jardin. [b]Bonne chance ![/b] Tutoriel
3 CONTROLS_TEXT PLANT_INFO Directional Arrows/Right Click : Move Left Click : Interact/Pick up Mouse Wheel : Change held item X : Drop Item Plant Info Flèches directionnelles/Clic droit : Se déplacer Clic Gauche : Interagir/Ramasser Molette : Changer l'objet en main X : Lâcher l’objet Informations de plantes
4 STORY PLANT_INFO_TEXT Story [b]1[/b] Name [b]2[/b] Archetype [b]3[/b] Score [b]4[/b] Age [b]5[/b] Growing time [b]6[/b] Lifetime Histoire [b]1[/b] Nom [b]2[/b] Archétype [b]3[/b] Score [b]4[/b] Age [b]5[/b] Durée de pousse [b]6[/b] Durée de vie
5 OK TERRAINS Ok Terrains Ok Terrains
6 GARDEN DECONTAMINED_LAND_TEXT Garden [b]Decontamined Land[/b] Seeds can only be planted on this zone Jardin [b]Terres décontaminée[/b] Des graines peuvent être plantées dans cette zone
7 COMMA ROCK_TEXT , [b]Rock[/b] Can be dug with a pickaxe , [b]Roche[/b] Peut être creusée avec une pioche
8 OR TALION_VEIN_TEXT or [b]Talion Vein[/b] Can be dug with a pickaxe, contains random seeds ou [b]Veine de Talion[/b] Peut être creusée avec une pioche, contient des graines aléatoire
9 PAUSE OK Pause Ok Pause Ok
10 CONTROLS GARDEN Controls Garden Contrôles Jardin
11 RESUME_GAME COMMA Resume , Reprendre ,
12 RESTART OR Restart or Recommencer ou
13 QUIT PAUSE Quit Pause Quitter Pause
14 SEED CONTROLS Seed Controls Graine Contrôles
15 TAKE RESUME_GAME Take Resume Prendre Reprendre
16 PACKAGE RESTART Crate Restart Caisse de matériel Recommencer
17 QUIT Quit Quitter
18 SEED Seed Graine
19 DESCRIPTION TAKE Description Take Description Prendre
20 USE PACKAGE Use Crate Utiliser Caisse de matériel
21 ON_MATURE DESCRIPTION On maturation Description Une fois mature Description
185
186
187
188