Dev de la démo

* Modification de l'apparence de l'UI des dialogues
* Changement de l'ordre de déblocage des mutations
* Ajout d'une confirmation pour l'abandon
* Ajout de la scène de fin avec la base Boréa, en tant que fin de démo
* Modification des icône de durée de vie, temps de pousse, et de mort
* Ajout d'un icône au dessus du joueur quand il n'a plus d'énergie
* Amélioration des dialogues du jeu
* Changement du modèle du téléphone
* Ajout de cellule d'énergie et de cellule de talion trouvable sur la carte
* Il est à nouveau possible de se recharger après la fin d'une région
* Buff des mutations ancien sociale et solide
* Modification de la mutation fertile (ne donne de gain de graine qu'à la maturation)
* Ajout d'une récupération automatique des graines
* Ajout de deux cartons de tutoriel ainsi qu'une option pour les revoir dans l'aide de jeu
* Amélioration générale du tutoriel
* Ajout d'un écran titre digne de ce nom
* Lors de l'arrivée à destination, ne téléporte plus le joueur sur une map vide, mais directement dans les lieux de cinématique
* Ajout graphique de plus de pattern de mousse et de roche
* Le talion apparait maintenant sur toute la carte
* La roche peut désormais apparaitre sur la zone de départ
* Ajout dud modificateur de région Canyon
* Equilibrage général
* Fix de bugs en tout genre
This commit is contained in:
2026-05-27 19:13:32 +02:00
parent 4c4b051f3f
commit 908878dff4
289 changed files with 8802 additions and 1520 deletions

View File

@@ -36,7 +36,6 @@ func _process(delta):
zoom = zoom.lerp(Vector2.ONE * settings.zoom, MOVE_LERP_WEIGHT)
if shake_active_time > 0.:
print(shake_noise.get_noise_2d(shake_active_time * SHAKE_SPEED, 0) * SHAKE_INTENSITY)
shake_active_time -= delta
offset = Vector2(

View File

@@ -0,0 +1,89 @@
[gd_scene format=3 uid="uid://c2unmkf4ec4gf"]
[ext_resource type="Script" uid="uid://ds8qj6h3nerkt" path="res://entities/interactable_3d/ai_receptacle/scripts/ai_receptacle.gd" id="1_f5pxu"]
[ext_resource type="Texture2D" uid="uid://dg00xnpp6ixls" path="res://common/icons/server-2.svg" id="2_f5pxu"]
[ext_resource type="PackedScene" uid="uid://b50g4ufp0ul5x" path="res://entities/interactable_3d/ai_receptacle/assets/3d/ai_receptacle.blend" id="2_hstrx"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="3_ocu3y"]
[ext_resource type="PackedScene" uid="uid://dssuk68nfqq1y" path="res://entities/interactable_3d/ai_receptacle/assets/3d/ai_receptacle_broken.blend" id="4_drapv"]
[sub_resource type="BoxShape3D" id="BoxShape3D_f5pxu"]
size = Vector3(1.4648438, 1.5727539, 1.1850586)
[sub_resource type="ViewportTexture" id="ViewportTexture_drapv"]
viewport_path = NodePath("Screen/SubViewport")
[sub_resource type="LabelSettings" id="LabelSettings_s7ckp"]
font = ExtResource("3_ocu3y")
font_size = 30
[node name="AiReceptacle" type="Area3D" unique_id=1082354698]
script = ExtResource("1_f5pxu")
screen_icon = ExtResource("2_f5pxu")
screen_text = "Hello"
screen_turned_on = true
metadata/_custom_type_script = "uid://bj4d1x8n8ina"
[node name="Model" parent="." unique_id=462471051 instance=ExtResource("2_hstrx")]
unique_name_in_owner = true
[node name="ModelBroken" parent="." unique_id=1633938801 instance=ExtResource("4_drapv")]
unique_name_in_owner = true
visible = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=447695736]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0038106, 3.0576665)
shape = SubResource("BoxShape3D_f5pxu")
[node name="Screen" type="Sprite3D" parent="." unique_id=1396407912]
transform = Transform3D(1, 0, 0, 0, 0.8021926, 0.5970652, 0, -0.5970652, 0.8021926, 0, 0.8748945, 3.3313272)
pixel_size = 0.0018
texture = SubResource("ViewportTexture_drapv")
[node name="SubViewport" type="SubViewport" parent="Screen" unique_id=709453654]
disable_3d = true
transparent_bg = true
size = Vector2i(595, 367)
[node name="TurnedOffBackground" type="ColorRect" parent="Screen/SubViewport" unique_id=65019012]
unique_name_in_owner = true
visible = false
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.0627451, 0.05882353, 0.16862746, 1)
[node name="ScreenContent" type="MarginContainer" parent="Screen/SubViewport" unique_id=380698147]
unique_name_in_owner = true
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 16
theme_override_constants/margin_top = 16
theme_override_constants/margin_right = 16
theme_override_constants/margin_bottom = 16
[node name="VBoxContainer" type="VBoxContainer" parent="Screen/SubViewport/ScreenContent" unique_id=1893636910]
layout_mode = 2
size_flags_vertical = 4
alignment = 1
[node name="ScreenIcon" type="TextureRect" parent="Screen/SubViewport/ScreenContent/VBoxContainer" unique_id=697782774]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 100)
layout_mode = 2
texture = ExtResource("2_f5pxu")
expand_mode = 1
stretch_mode = 5
[node name="ScreenTitle" type="Label" parent="Screen/SubViewport/ScreenContent/VBoxContainer" unique_id=443526476]
unique_name_in_owner = true
layout_mode = 2
text = "Hello"
label_settings = SubResource("LabelSettings_s7ckp")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 3

View File

@@ -0,0 +1,73 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b50g4ufp0ul5x"
path="res://.godot/imported/ai_receptacle.blend-b318d06849ebd1a83015daf5e59aedc4.scn"
[deps]
source_file="res://entities/interactable_3d/ai_receptacle/assets/3d/ai_receptacle.blend"
dest_files=["res://.godot/imported/ai_receptacle.blend-b318d06849ebd1a83015daf5e59aedc4.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": {
"Default3D": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
},
"Glass": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/glass_3d.tres",
"use_external/path": "uid://b5vlcdry8vtgi"
}
}
}
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

@@ -0,0 +1,73 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dssuk68nfqq1y"
path="res://.godot/imported/ai_receptacle_broken.blend-ab45bb89545c07a9942287d0298bb2da.scn"
[deps]
source_file="res://entities/interactable_3d/ai_receptacle/assets/3d/ai_receptacle_broken.blend"
dest_files=["res://.godot/imported/ai_receptacle_broken.blend-ab45bb89545c07a9942287d0298bb2da.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": {
"Default3D": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
"use_external/path": "uid://dvvi1k5c5iowc"
},
"Glass": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/glass_3d.tres",
"use_external/path": "uid://b5vlcdry8vtgi"
}
}
}
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

@@ -0,0 +1,35 @@
@tool
extends Interactable3D
class_name AiReceptacle
@export var screen_icon : Texture :
set(v):
screen_icon = v
update()
@export var screen_text : String :
set(v):
screen_text = v
update()
@export var screen_turned_on : bool = false :
set(v):
screen_turned_on = v
update()
@export var broken : bool = false :
set(v):
broken = v
update()
func _ready():
update()
func update():
if is_node_ready():
%TurnedOffBackground.visible = not screen_turned_on
%ScreenContent.visible = screen_turned_on
%ScreenIcon.texture = screen_icon
%ScreenTitle.text = screen_text
%Model.visible = not broken
%ModelBroken.visible = broken

View File

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

View File

@@ -181,6 +181,7 @@ _data = {
}
[node name="ArtefactAnnounce" type="CanvasLayer" unique_id=1447182082]
layer = 2
visible = false
script = ExtResource("1_2sroa")
@@ -190,6 +191,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="BackgroundRect" type="ColorRect" parent="MarginContainer" unique_id=1594037653]
layout_mode = 2
@@ -207,6 +209,7 @@ offset_right = 500.0
offset_bottom = 500.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = SubResource("ViewportTexture_6hxtc")
[node name="SubViewport" type="SubViewport" parent="Particles" unique_id=1123249182]
@@ -235,6 +238,7 @@ offset_top = -627.0
offset_bottom = 627.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_constants/separation = 4
alignment = 1

View File

@@ -75,10 +75,10 @@ visible = false
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9791151, 0)
shape = SubResource("BoxShape3D_nvfy2")
[node name="MutationAnnounce" parent="." unique_id=1447182082 instance=ExtResource("9_247i2")]
unique_name_in_owner = true
[node name="ArtefactAnnounce" parent="." unique_id=114641656 instance=ExtResource("8_3rrt0")]
unique_name_in_owner = true
[node name="MutationAnnounce" parent="." unique_id=1447182082 instance=ExtResource("9_247i2")]
unique_name_in_owner = true
[editable path="CristalModelCrack"]

View File

@@ -183,6 +183,7 @@ _data = {
}
[node name="MutationAnnounce" type="CanvasLayer" unique_id=1447182082]
layer = 2
visible = false
script = ExtResource("1_02o74")
@@ -192,9 +193,11 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="BackgroundRect" type="ColorRect" parent="MarginContainer" unique_id=1594037653]
layout_mode = 2
mouse_filter = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Particles" type="TextureRect" parent="." unique_id=1748571879]
@@ -209,6 +212,7 @@ offset_right = 500.0
offset_bottom = 500.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = SubResource("ViewportTexture_6hxtc")
[node name="SubViewport" type="SubViewport" parent="Particles" unique_id=1123249182]
@@ -258,7 +262,6 @@ horizontal_alignment = 1
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
mouse_filter = 0
texture = SubResource("ViewportTexture_smt8b")
stretch_mode = 5
script = ExtResource("5_qu1xy")

View File

@@ -1,14 +1,18 @@
extends Area3D
class_name Interactable3D
@export var interactable = true
@export var inspectable = false
@export var interactable := true : set = set_interactable
@export var inspectable := false
signal clicked
@export var hover_animation_player : AnimationPlayer
@export var audio_player : AudioStreamPlayer3D
func _ready():
set_interactable()
func click():
if interactable:
clicked.emit()
@@ -22,7 +26,7 @@ func stop_audio():
audio_player.stop()
func _on_mouse_entered():
if hover_animation_player and interactable:
if hover_animation_player and interactable and hover_animation_player.has_animation("hover"):
hover_animation_player.play("hover")
if inspectable:
Pointer.inspect(self)
@@ -35,3 +39,12 @@ func _on_mouse_exited():
func card_info() -> CardInfo:
return null
func set_interactable(i := interactable):
interactable = i
if is_node_ready() and hover_animation_player:
if i and hover_animation_player.has_animation("activated"):
hover_animation_player.play("activated")
if not i and hover_animation_player.has_animation("deactivated"):
hover_animation_player.play("deactivated")

View File

@@ -16,7 +16,7 @@ viewport_path = NodePath("Screen/SubViewport")
[sub_resource type="LabelSettings" id="LabelSettings_cqerb"]
font = ExtResource("3_h5gyd")
font_size = 30
font_size = 20
[node name="OrchidSaver" type="Area3D" unique_id=381308711]
script = ExtResource("1_tiit5")

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,13 +1,22 @@
[gd_scene format=3 uid="uid://csx7d5khjd6y5"]
[ext_resource type="Script" uid="uid://bj4d1x8n8ina" path="res://entities/interactable_3d/interactable_3d.gd" id="1_2si4a"]
[ext_resource type="Script" uid="uid://chedhuxpxro4k" path="res://entities/interactable_3d/phone/scripts/phone.gd" id="1_2si4a"]
[ext_resource type="AudioStream" uid="uid://ocm1dkkhv7ls" path="res://common/audio_manager/assets/sfx/phone/phone_ringing.wav" id="2_w00q2"]
[ext_resource type="PackedScene" uid="uid://5dytwh4wydcg" path="res://entities/interactable_3d/phone/assets/3d/phone.blend" id="3_lp5jo"]
[ext_resource type="Texture2D" uid="uid://dks6cugwif2em" path="res://common/icons/phone.svg" id="4_gtuax"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_mwti2"]
radius = 0.9633789
height = 2.4316406
radius = 0.87646484
height = 2.0859375
[sub_resource type="Gradient" id="Gradient_w00q2"]
offsets = PackedFloat32Array(0.020833334, 1)
colors = PackedColorArray(0.0627451, 0.05882353, 0.16862746, 1, 0.0627451, 0.05882353, 0.16862746, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_lp5jo"]
gradient = SubResource("Gradient_w00q2")
width = 139
height = 96
[sub_resource type="Animation" id="Animation_v4tdl"]
length = 0.001
@@ -23,6 +32,86 @@ tracks/0/keys = {
"update": 0,
"values": [Vector3(1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Model/Sprite3D:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Model/OffScreenBackground:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_gtuax"]
resource_name = "activated"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Model/Sprite3D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Model/OffScreenBackground:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_euiu0"]
resource_name = "deactivated"
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Model/Sprite3D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.033333335),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Model/OffScreenBackground:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_lkqnn"]
resource_name = "hover"
@@ -43,36 +132,95 @@ tracks/0/keys = {
[sub_resource type="AnimationLibrary" id="AnimationLibrary_xa016"]
_data = {
&"RESET": SubResource("Animation_v4tdl"),
&"activated": SubResource("Animation_gtuax"),
&"deactivated": SubResource("Animation_euiu0"),
&"hover": SubResource("Animation_lkqnn")
}
[sub_resource type="Animation" id="Animation_1kswv"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Model:rotation:z")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0.0]
}
[sub_resource type="Animation" id="Animation_ckx3x"]
resource_name = "ring"
length = 1.95
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Model:rotation:z")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.2, 0.3, 0.4, 0.5, 0.6, 0.70000005, 0.8000001, 1, 1.1, 1.2, 1.3, 1.4, 1.5000001, 1.6),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0.0, -0.03, 0.03, -0.03, 0.03, -0.03, 0.03, 0.0, -0.03, 0.03, -0.03, 0.03, -0.03, 0.03, 0.0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_bc3p2"]
_data = {
&"RESET": SubResource("Animation_1kswv"),
&"ring": SubResource("Animation_ckx3x")
}
[node name="Phone" type="Area3D" unique_id=429299908 node_paths=PackedStringArray("hover_animation_player", "audio_player")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
transform = Transform3D(-1, 0, -1.509958e-07, 0, 1, 0, 1.509958e-07, 0, -1, 0, 0, 0)
script = ExtResource("1_2si4a")
hover_animation_player = NodePath("HoverAnimationPlayer")
audio_player = NodePath("AudioStreamPlayer3D")
metadata/_custom_type_script = "uid://bj4d1x8n8ina"
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=660671507]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.21582031, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5439453, 0)
shape = SubResource("CapsuleShape3D_mwti2")
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="." unique_id=73991663]
stream = ExtResource("2_w00q2")
bus = &"Sfx"
[node name="Model" parent="." unique_id=178278867 instance=ExtResource("3_lp5jo")]
[node name="Model" parent="." unique_id=1951271790 instance=ExtResource("3_lp5jo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.000101934645, 0)
[node name="PhoneSignal" parent="Model" index="1" unique_id=2035875887]
transform = Transform3D(0.99678284, 0, -0.080149435, 0, 1, 0, 0.080149435, 0, 0.99678284, -0.27000237, 1.5518044, -0.16334502)
[node name="Sprite3D" type="Sprite3D" parent="Model" unique_id=2025147118]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.1913681, 0.3055997, -0.095009446)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.023056125, 0.6826539, -0.33169416)
visible = false
pixel_size = 0.005
texture = ExtResource("4_gtuax")
[node name="OffScreenBackground" type="Sprite3D" parent="Model" unique_id=802126508]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.023056127, 0.6826539, -0.34936276)
pixel_size = 0.005
texture = SubResource("GradientTexture2D_lp5jo")
[node name="OmniLight3D" type="OmniLight3D" parent="Model" unique_id=1684592543]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.9604645e-08, 0.9238404, -0.47173643)
light_color = Color(0.87551093, 0.72609586, 0.8473426, 1)
shadow_enabled = true
omni_range = 1.8928293
[node name="AnimationPlayer" parent="Model" index="6" unique_id=636985304]
autoplay = &"Turning"
[node name="HoverAnimationPlayer" type="AnimationPlayer" parent="." unique_id=1414304456]
libraries/ = SubResource("AnimationLibrary_xa016")
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1684592543]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.9604645e-08, 1.0397238, -0.47173643)
light_color = Color(0.87551093, 0.72609586, 0.8473426, 1)
shadow_enabled = true
omni_range = 1.8928293
[node name="RingingAnimationPlayer" type="AnimationPlayer" parent="." unique_id=1401157488]
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_bc3p2")
[editable path="Model"]

View File

@@ -0,0 +1,21 @@
extends Interactable3D
class_name Phone
func click():
if interactable:
clicked.emit()
interactable = false
func set_interactable(i := interactable):
interactable = i
if is_node_ready() and hover_animation_player:
if i and hover_animation_player.has_animation("activated"):
hover_animation_player.play("activated")
if not i and hover_animation_player.has_animation("deactivated"):
hover_animation_player.play("deactivated")
if i :
%RingingAnimationPlayer.play("ring")
else:
%RingingAnimationPlayer.stop()

View File

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

View File

@@ -112,9 +112,8 @@ fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(1, 0.5)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_6w4e0"]
radius = 25.393593
height = 50.787186
[sub_resource type="CircleShape2D" id="CircleShape2D_6w4e0"]
radius = 16.583923
[node name="Door" type="Area2D" unique_id=2053096538]
process_mode = 4
@@ -155,4 +154,4 @@ scale = Vector2(1.3906125, 1.3906125)
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=676936346]
position = Vector2(0, 12)
shape = SubResource("CapsuleShape2D_6w4e0")
shape = SubResource("CircleShape2D_6w4e0")

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dh6jdqoy2xu65"
path="res://.godot/imported/energy_cell_off.png-d0f76768f0abf3252fb82e90132330e5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/energy_cell/assets/sprites/energy_cell_off.png"
dest_files=["res://.godot/imported/energy_cell_off.png-d0f76768f0abf3252fb82e90132330e5.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: 54 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ds65vxsiitxit"
path="res://.godot/imported/energy_cell_on.png-ddddaeafbe8fcf8fce63d8a58ab82019.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/energy_cell/assets/sprites/energy_cell_on.png"
dest_files=["res://.godot/imported/energy_cell_on.png-ddddaeafbe8fcf8fce63d8a58ab82019.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,102 @@
[gd_scene format=3 uid="uid://d3fam2jq74kxq"]
[ext_resource type="Script" uid="uid://b25sqd4v2i3v2" path="res://entities/interactables/energy_cell/scripts/energy_cell.gd" id="1_nheea"]
[ext_resource type="Texture2D" uid="uid://ds65vxsiitxit" path="res://entities/interactables/energy_cell/assets/sprites/energy_cell_on.png" id="2_fnyaf"]
[ext_resource type="Texture2D" uid="uid://dh6jdqoy2xu65" path="res://entities/interactables/energy_cell/assets/sprites/energy_cell_off.png" id="3_t6ydv"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ylpt4"]
radius = 39.115215
[sub_resource type="Animation" id="Animation_lsc7u"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprites:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0000001]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprites:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0000001]
}
[sub_resource type="Animation" id="Animation_ei886"]
resource_name = "squeeze"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprites:scale:x")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.16666667, 0.33333334, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [1.0000001, 0.705, 1.5, 1.0000001]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprites:scale:y")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.16666667, 0.33333334, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [1.0000001, 1.5, 0.7, 1.0000001]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_d2c63"]
_data = {
&"RESET": SubResource("Animation_lsc7u"),
&"squeeze": SubResource("Animation_ei886")
}
[node name="EnergyCell" type="Area2D" unique_id=1375150025]
script = ExtResource("1_nheea")
used = true
default_interact_text = "OPEN"
available = false
default_info_title = "ENERGY_CELL"
default_info_desc = "ENERGY_CELL_DESC_TEXT"
metadata/_custom_type_script = "uid://dyprcd68fjstf"
[node name="Sprites" type="Node2D" parent="." unique_id=979185380]
scale = Vector2(1.0000001, 1.0000001)
[node name="SpriteOff" type="Sprite2D" parent="Sprites" unique_id=1278139902]
unique_name_in_owner = true
position = Vector2(0, -11.999998)
scale = Vector2(0.17999999, 0.17999999)
texture = ExtResource("3_t6ydv")
[node name="SpriteOn" type="Sprite2D" parent="Sprites" unique_id=750798992]
unique_name_in_owner = true
visible = false
position = Vector2(0, -11.999998)
scale = Vector2(0.17999999, 0.17999999)
texture = ExtResource("2_fnyaf")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=836925562]
position = Vector2(0, -11.999998)
shape = SubResource("CircleShape2D_ylpt4")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1320210428]
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_d2c63")

View File

@@ -0,0 +1,38 @@
@tool
extends Interactable
class_name EnergyCell
const GIVEN_ENERGY = 1
@export var used = false : set = set_used
func _ready():
set_used()
func set_used(v = used):
used = v
available = not used
if is_node_ready():
%AnimationPlayer.play("squeeze")
await get_tree().create_timer(0.2).timeout
%SpriteOff.visible = used
%SpriteOn.visible = not used
func can_interact(p : Player) -> bool:
return p.data.energy < p.data.max_energy
func interact(p : Player) -> bool:
if not used and region:
used = true
available = false
p.data.energy += GIVEN_ENERGY
interacted.emit(p)
region.data.used_objects.append(name)
AudioManager.play_sfx("Recharge1")
return true
return false

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bk2w3tophr7nh"
path="res://.godot/imported/talion_cell_off.png-f9e1927bb52c04ea9e2d4a53e89bb0e0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/talion_cell/assets/sprites/talion_cell_off.png"
dest_files=["res://.godot/imported/talion_cell_off.png-f9e1927bb52c04ea9e2d4a53e89bb0e0.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: 58 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qef2wvgb62cb"
path="res://.godot/imported/talion_cell_on.png-a65f44148c257de0107a156068275044.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/talion_cell/assets/sprites/talion_cell_on.png"
dest_files=["res://.godot/imported/talion_cell_on.png-a65f44148c257de0107a156068275044.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,40 @@
@tool
extends Interactable
class_name TalionCell
const SEED_RARITY = 2
@export var used = false : set = set_used
func _ready():
set_used()
func set_used(v = used):
used = v
available = not used
if is_node_ready():
%AnimationPlayer.play("squeeze")
await get_tree().create_timer(0.2).timeout
%SpriteOff.visible = used
%SpriteOn.visible = not used
func interact(p : Player) -> bool:
if not used and region:
used = true
available = false
var new_seed = Seed.generate_random(SEED_RARITY)
p.region.drop_item(
new_seed,
global_position,
10
)
interacted.emit(p)
region.data.used_objects.append(name)
AudioManager.play_sfx("Drop")
return true
return false

View File

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

View File

@@ -0,0 +1,100 @@
[gd_scene format=3 uid="uid://cfxowdtmvxbtt"]
[ext_resource type="Script" uid="uid://1xhrot6srly6" path="res://entities/interactables/talion_cell/scripts/talion_cell.gd" id="1_lsc7u"]
[ext_resource type="Texture2D" uid="uid://bk2w3tophr7nh" path="res://entities/interactables/talion_cell/assets/sprites/talion_cell_off.png" id="2_ei886"]
[ext_resource type="Texture2D" uid="uid://qef2wvgb62cb" path="res://entities/interactables/talion_cell/assets/sprites/talion_cell_on.png" id="3_d2c63"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ylpt4"]
radius = 39.115215
[sub_resource type="Animation" id="Animation_lsc7u"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprites:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0000001]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprites:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0000001]
}
[sub_resource type="Animation" id="Animation_ei886"]
resource_name = "squeeze"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprites:scale:x")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.16666667, 0.33333334, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [1.0000001, 0.705, 1.5, 1.0000001]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprites:scale:y")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.16666667, 0.33333334, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [1.0000001, 1.5, 0.7, 1.0000001]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_d2c63"]
_data = {
&"RESET": SubResource("Animation_lsc7u"),
&"squeeze": SubResource("Animation_ei886")
}
[node name="TalionCell" type="Area2D" unique_id=1375150025]
script = ExtResource("1_lsc7u")
default_interact_text = "OPEN"
default_info_title = "TALION_CELL"
default_info_desc = "TALION_CELL_DESC_TEXT"
metadata/_custom_type_script = "uid://dyprcd68fjstf"
[node name="Sprites" type="Node2D" parent="." unique_id=979185380]
scale = Vector2(1.0000001, 1.0000001)
[node name="SpriteOff" type="Sprite2D" parent="Sprites" unique_id=1278139902]
unique_name_in_owner = true
visible = false
position = Vector2(0, -11.999998)
scale = Vector2(0.17999999, 0.17999999)
texture = ExtResource("2_ei886")
[node name="SpriteOn" type="Sprite2D" parent="Sprites" unique_id=750798992]
unique_name_in_owner = true
position = Vector2(0, -11.999998)
scale = Vector2(0.17999999, 0.17999999)
texture = ExtResource("3_d2c63")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=836925562]
position = Vector2(0, -11.999998)
shape = SubResource("CircleShape2D_ylpt4")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1320210428]
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_d2c63")

View File

@@ -6,15 +6,18 @@ func _ready():
update()
func update():
%EnergyTextContainer.modulate = Color.WHITE if region.data.charges > 0 else Color.RED
%EnergyTextContainer.modulate = (
Color.WHITE if region.data.charges > 0
else Color.RED )
%EnergyText.text = str(region.data.charges)
if not region.data.pass_day_ended.is_connected(update):
region.data.pass_day_ended.connect(update)
func can_interact(_p : Player) -> bool:
return (
region != null
and region.data
and region.data.charges > 0
and region.data.state == RegionData.State.IN_PROGRESS
)
func interact(_p: Player) -> bool:

View File

@@ -15,9 +15,8 @@ font_size = 30
radius = 43.0
height = 116.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
radius = 38.45475
height = 76.9095
[sub_resource type="CircleShape2D" id="CircleShape2D_ot7vv"]
radius = 22.803507
[node name="TruckRecharge" type="Area2D" unique_id=1099196706]
script = ExtResource("1_ipgcv")
@@ -76,4 +75,4 @@ shape = SubResource("CapsuleShape2D_ot7vv")
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=842130596]
position = Vector2(12.000001, -41.000004)
rotation = 0.18545866
shape = SubResource("CapsuleShape2D_bjhct")
shape = SubResource("CircleShape2D_ot7vv")

View File

@@ -5,8 +5,8 @@
[ext_resource type="Texture2D" uid="uid://do3wxh7k38m7u" path="res://entities/plants/assets/sprites/seed_buried_texture.png" id="3_rbgiq"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_rbgiq"]
radius = 22.0
height = 50.0
radius = 26.0
height = 52.0
[sub_resource type="AtlasTexture" id="AtlasTexture_wyuub"]
atlas = ExtResource("3_j6jm5")
@@ -164,7 +164,7 @@ _data = {
script = ExtResource("1_pq8o7")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1893251777]
position = Vector2(0, -14)
position = Vector2(0, -2)
shape = SubResource("CapsuleShape2D_rbgiq")
[node name="Sprite" type="Sprite2D" parent="." unique_id=1693882598]

View File

@@ -9,10 +9,10 @@ const HARVESTED_SEED_DISPLACEMENT_FACTOR = 100
const RANDOM_MAX_GROW_INTERVAL = Region.MIN_PASS_DAY_ANIMATION_TIME/2. - 0.1
const PLANT_TYPE_ICON = preload("res://common/icons/seedling.svg")
const SCORE_ICON = preload("res://common/icons/growth.svg")
const DURATION_ICON = preload("res://common/icons/calendar-week.svg")
const DURATION_ICON = preload("res://common/icons/clock.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/clock.svg")
const GROWING_ICON = preload("res://common/icons/clock-up.svg")
const LIFETIME_ICON= preload("res://common/icons/clock-death.svg")
const SEED_ICON = preload("res://common/icons/seeds.svg")
const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.tscn")

View File

@@ -67,12 +67,12 @@ func get_growing_time() -> int:
for m in mutations:
growing_time = m.mutate_growing_time(self , growing_time)
return growing_time
return max(1,growing_time)
func get_score(state: State = get_state()) -> int:
var score = get_plant_info().get_base_score() if state == State.MATURE else 0
var mult := 1
var mult := 1.
for m in mutations:
score = m.mutate_score(self , score)
@@ -81,7 +81,7 @@ func get_score(state: State = get_state()) -> int:
for pd in nearby_plants:
score += pd.get_score_buff()
return max(0,score) * max(0,mult)
return ceili(max(0,score) * max(0,mult))
func get_state() -> State:
if day >= get_lifetime():

View File

@@ -2,6 +2,8 @@
extends Resource
class_name PlantMutation
const MAX_RARITY = 6
@export var level: int = 1
var id: String: get = get_mutation_id
@@ -29,7 +31,7 @@ func mutate_plant_data(_plant_data: PlantData):
func mutate_score(_plant_data: PlantData, score: int) -> int:
return score
func mutate_score_multiplier(_plant_data: PlantData, multiplier: int) -> int:
func mutate_score_multiplier(_plant_data: PlantData, multiplier: float) -> float:
return multiplier
func mutate_lifetime(_plant_data: PlantData, lifetime: int) -> int:
@@ -118,10 +120,11 @@ static func get_rarity_text(rarity) -> String:
static func get_rarity_color(rarity: int) -> Color:
var rarity_colors: Array[Color] = [
Color("2364AA"),
Color("25C147"),
Color("8B2DFF"),
Color("FF006E"),
Color("25c147"),
Color("00c6ca"),
Color("8b2dff"),
Color("ff006e"),
Color("ff5427"),
Color("FFA617"),
]

View File

@@ -2,7 +2,7 @@
extends PlantMutation
class_name AncientMutation
const DEFAULT_DAY_FACTOR = 4
const DEFAULT_DAY_FACTOR = 3
func get_icon() -> Texture:
return preload("res://common/icons/wood.svg")

View File

@@ -21,11 +21,15 @@ func get_mutation_description() -> String:
"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_seed_buff(data: PlantData, seed_buff) -> int:
if data.get_state() == PlantData.State.MATURE:
return seed_buff + get_seed_buff()
return seed_buff
func mutate_score(_plant_data: PlantData, score: int) -> int:
return score + get_score_change()
func mutate_score(data: PlantData, score: int) -> int:
if data.get_state() == PlantData.State.MATURE:
return score + get_score_change()
return score
func get_seed_buff():
return level

View File

@@ -16,8 +16,8 @@ func get_mutation_description() -> String:
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON)
})
func mutate_score_multiplier(plant_data: PlantData, multiplier: int) -> int:
return multiplier - 1
func mutate_score_multiplier(_pd: PlantData, _m: float) -> float:
return 0
func mutate_score_buff(plant_data: PlantData, score_buff : int) -> int:
if plant_data.get_state() == PlantData.State.MATURE:

View File

@@ -2,7 +2,7 @@ extends PlantMutation
class_name ProlificMutation
func get_icon() -> Texture:
return preload("res://common/icons/droplets.svg")
return preload("res://common/icons/seeds.svg")
func get_mutation_id() -> String:
return "PROLIFIC"

View File

@@ -16,7 +16,7 @@ func get_mutation_description() -> String:
"score_multiplier": get_score_multiplier() + 1,
})
func mutate_score_multiplier(plant_data: PlantData, multiplier: int) -> int:
func mutate_score_multiplier(plant_data: PlantData, multiplier: float) -> float:
if plant_data.decontamination_area_factor == 1.0:
return multiplier + get_score_multiplier()
return multiplier

View File

@@ -1,7 +1,7 @@
extends PlantMutation
class_name SocialMutation
const DEFAULT_PLANT_BY_POINT = 4
const DEFAULT_PLANT_BY_POINT = 3
func get_icon() -> Texture:
return preload("res://common/icons/users-group.svg")

View File

@@ -13,19 +13,19 @@ func get_mutation_name() -> String:
func get_mutation_description() -> String:
return tr("TOUGH_EFFECT_TEXT").format({
"score_icon": Text.bbcode_icon(Plant.SCORE_ICON),
"score_multiplier": get_score_multiplier(),
"score_multiplier": get_score_multiplier() + 1.,
"growing_time": get_growing_time_increase(),
"growing_icon": Text.bbcode_icon(Plant.GROWING_ICON)
})
func mutate_score_multiplier(_plant_data: PlantData, multiplier: int) -> int:
return multiplier * get_score_multiplier()
func mutate_score_multiplier(_plant_data: PlantData, multiplier: float) -> float:
return multiplier + get_score_multiplier()
func mutate_growing_time(_plant_data: PlantData, growing_time: int) -> int:
return maxi(0, growing_time + get_growing_time_increase())
return growing_time + maxi(0, get_growing_time_increase())
func get_growing_time_increase()->int:
return 4 - level
func get_score_multiplier()->int:
return 2
func get_score_multiplier()->float:
return 0.5 * level

View File

@@ -22,7 +22,7 @@ func get_usage_zone_radius() -> int:
return 10
func get_usage_object_affected(i : Area2D) -> bool:
return i is Plant
return i is Plant and Pointer.inspected == i
func use_text() -> String:
return tr("HARVEST")
@@ -30,14 +30,14 @@ func use_text() -> String:
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
var areas = zone.get_affected_areas()
for area in areas :
if area is Plant:
if area is Plant and Pointer.inspected == area:
return true
return false
func use(player : Player, zone : Player.ActionZone) -> bool:
var has_plant = false
for area in zone.get_affected_areas():
if area and area is Plant:
if area and area is Plant and Pointer.inspected == area:
harvest(area, player)
await player.get_tree().create_timer(USE_INTERVAL).timeout
has_plant = true

View File

@@ -2,7 +2,6 @@ extends Item
class_name Seed
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")
@export var plant_name : String
@@ -21,12 +20,16 @@ func _init(
static func generate_from_parent(plant_data : PlantData) -> Seed:
var mutations : Array[PlantMutation] = plant_data.mutations
var mutation_probability = GameInfo.game_data.current_run.plant_info.get_mutation_probability()
# Mutate for every time mutation probability exceed 1
while mutation_probability > 1:
mutations = mutate_mutations(plant_data.mutations)
mutation_probability -= 1
mutations.sort_custom(
func (a : PlantMutation, b : PlantMutation): return a.get_mutation_name() < b.get_mutation_name()
)
if (
plant_data.get_state() == PlantData.State.MATURE
and randf() < GameInfo.game_data.current_run.plant_info.get_mutation_probability()
@@ -168,13 +171,17 @@ static func generate_first_mutations(rarity := 0) -> Array[PlantMutation]:
static func mutate_mutations(mutations : Array[PlantMutation]) -> Array[PlantMutation]:
var mutation_possibility : Array[MutationPossibility] = []
var evolvable_mutations : Array[PlantMutation] = mutations.filter(
func (m : PlantMutation): return m.get_rarity() < PlantMutation.MAX_RARITY
)
if (
len(mutations) < GameInfo.game_data.current_run.plant_info.get_mutation_max_number()
):
mutation_possibility.append(AddMutation.new())
if len(mutations) > 0:
if len(evolvable_mutations) > 0:
mutation_possibility.append(UpgradeMutation.new())
var chosen_mutation_possibility = mutation_possibility.pick_random()
@@ -206,7 +213,15 @@ class UpgradeMutation extends MutationPossibility:
) -> Array[PlantMutation]:
var new_mutations = mutations.duplicate_deep()
new_mutations.pick_random().level += 1
var evolvable_mutations_id : Array[int] = []
for i in range(len(mutations)):
var m = mutations[i]
if m.get_rarity() < PlantMutation.MAX_RARITY:
evolvable_mutations_id.append(i)
if len(evolvable_mutations_id):
new_mutations[evolvable_mutations_id.pick_random()].level += 1
return new_mutations

View File

@@ -6,6 +6,7 @@
[ext_resource type="Texture2D" uid="uid://c7ff87jniga5m" path="res://entities/player/assets/sprites/robot.png" id="4_bls4j"]
[ext_resource type="Texture2D" uid="uid://drgl0d51d4cf7" path="res://entities/player/assets/sprites/radial-gradient.png" id="5_8fjmc"]
[ext_resource type="Script" uid="uid://b1mmtgmi5oq86" path="res://entities/player/scripts/player_sprite.gd" id="5_fkugw"]
[ext_resource type="Texture2D" uid="uid://51255tpyl6vj" path="res://common/icons/no-bolt.svg" id="7_26q78"]
[ext_resource type="AudioStream" uid="uid://cv5avkd3qekt7" path="res://common/audio_manager/assets/sfx/movement/movement.wav" id="7_qiwj3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_sglur"]
@@ -15,13 +16,13 @@ radius = 13.0
radius = 40.0
[sub_resource type="Gradient" id="Gradient_qiwj3"]
offsets = PackedFloat32Array(0.37339056, 0.49785408)
offsets = PackedFloat32Array(0.25, 0.4)
colors = PackedColorArray(0.043137256, 0.050980393, 0.15686275, 0, 0.043137256, 0.050980393, 0.15686275, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_26q78"]
gradient = SubResource("Gradient_qiwj3")
width = 600
height = 600
width = 1000
height = 1000
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.5, 0)
@@ -136,6 +137,41 @@ point_count = 2
offsets = PackedFloat32Array(0, 0.77729255, 1)
colors = PackedColorArray(0.5803922, 0.7058824, 0.8862745, 1, 0.5785, 0.70829165, 0.89, 1, 0.5785, 0.70829165, 0.89, 0)
[sub_resource type="Animation" id="Animation_bectd"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position:y")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
[sub_resource type="Animation" id="Animation_wvtmh"]
resource_name = "bounce"
loop_mode = 1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position:y")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(2, 2),
"points": PackedFloat32Array(-1097.2793, 0, 0, 0, -139.75659, -1097.2793, 0, -112.66321, 0, 0),
"times": PackedFloat32Array(0, 1)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7thud"]
_data = {
&"RESET": SubResource("Animation_bectd"),
&"bounce": SubResource("Animation_wvtmh")
}
[sub_resource type="Animation" id="Animation_fkugw"]
length = 0.001
tracks/0/type = "value"
@@ -256,6 +292,7 @@ position = Vector2(0, -17)
shape = SubResource("CircleShape2D_sglur")
[node name="InteractArea2D" type="Area2D" parent="." unique_id=1048722411]
unique_name_in_owner = true
position = Vector2(0, -12)
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractArea2D" unique_id=1242017003]
@@ -271,7 +308,7 @@ texture = ExtResource("2_fkugw")
[node name="Fog" type="Sprite2D" parent="." unique_id=1590893330]
z_index = 10
position = Vector2(0.99999994, -17)
scale = Vector2(8, 8)
scale = Vector2(5.8320003, 5.8320003)
texture = SubResource("GradientTexture2D_26q78")
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=638545037]
@@ -303,6 +340,17 @@ gravity = Vector2(0, 100)
scale_amount_curve = SubResource("Curve_fkugw")
color_ramp = SubResource("Gradient_bls4j")
[node name="NoEnergyLeftIcon" type="Sprite2D" parent="PlayerSprite" unique_id=1059424679]
unique_name_in_owner = true
modulate = Color(1, 0, 0.43137255, 1)
position = Vector2(-15.239998, 0)
scale = Vector2(10.16, 10.16)
texture = ExtResource("7_26q78")
[node name="AnimationPlayer" type="AnimationPlayer" parent="PlayerSprite/NoEnergyLeftIcon" unique_id=390014722]
libraries/ = SubResource("AnimationLibrary_7thud")
autoplay = &"bounce"
[node name="MovementAudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=20243230]
unique_name_in_owner = true
stream = ExtResource("7_qiwj3")

View File

@@ -6,6 +6,7 @@ const MAX_REACH = 100
const HOLDING_ITEM_SPRITE_SIZE = 20.
const TURN_ANIMATION_MINIMUM_THRESHOLD = 0.2
const SPEED = 350
const JUST_DROPPED_ITEM_UPDATE_INTERVAL = 1.
signal player_updated(player: Player)
signal upgraded
@@ -30,15 +31,22 @@ var instruction : Instruction = null :
if instruction and is_node_ready():
instruction.spawn_indicator(self)
var just_dropped_item_objects : Array = []
var last_just_dropped_item_objects_updated := 0.
var elapsed_time := 0.
@onready var preview_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null)
@onready var action_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null)
func _ready():
data = GameInfo.game_data.player_data
data.updated.connect(_on_data_changed)
data.inventory.updated.connect(_on_inventory_updated)
player_updated.emit(self)
Pointer.player = self
setup_preview_zone(data.inventory.get_item())
%NoEnergyLeftIcon.visible = data.energy == 0
func appear(with_falling_animation = true):
if with_falling_animation:
@@ -70,6 +78,7 @@ func _end_pass_day():
controlling_player = true
func _process(delta):
elapsed_time += delta
last_action_area_movement_timer += delta
if controlling_player:
@@ -99,12 +108,39 @@ func _process(delta):
elif velocity != Vector2.ZERO and %MovementAudioStreamPlayer.playing == false:
%MovementAudioStreamPlayer.play()
# print("-----")
# print(elapsed_time)
# print(last_just_dropped_item_objects_updated)
if elapsed_time > last_just_dropped_item_objects_updated + JUST_DROPPED_ITEM_UPDATE_INTERVAL:
update_just_dropped_item_objects()
take_surrounding_seeds()
move_and_slide()
func _on_data_changed(pd : PlayerData):
%NoEnergyLeftIcon.visible = pd.energy == 0
func _on_inventory_updated(_inventory: Inventory):
setup_preview_zone(data.inventory.get_item())
emit_signal("player_updated", self)
func update_just_dropped_item_objects():
last_just_dropped_item_objects_updated = elapsed_time
var overlapping_areas = (%InteractArea2D as Area2D).get_overlapping_areas()
just_dropped_item_objects = just_dropped_item_objects.filter(
func (i : ItemObject): return i in overlapping_areas
)
func take_surrounding_seeds():
var overlapping_areas = (%InteractArea2D as Area2D).get_overlapping_areas()
if not data.inventory.is_full():
for area in overlapping_areas:
if area is ItemObject and not area in just_dropped_item_objects:
area.interact(self)
return
func calculate_direction_instruction_direction() -> Vector2:
if (
instruction
@@ -189,7 +225,8 @@ func drop_item():
var item_to_drop : Item = data.inventory.pop_item(ind_to_drop)
if item_to_drop and item_to_drop.type != Item.ItemType.TOOL_ITEM:
terrain.drop_item(item_to_drop, global_position)
var dropped_item_object = terrain.drop_item(item_to_drop, global_position)
just_dropped_item_objects.append(dropped_item_object)
AudioManager.play_sfx("Drop")
region.save()

View File

@@ -10,7 +10,7 @@ const DEFAULT_INVENTORY_SIZE = 3
@export var energy : int = DEFAULT_MAX_ENERGY :
set(v):
energy = v
energy = min(v,max_energy)
updated.emit(self)
@export var inventory := Inventory.new(DEFAULT_INVENTORY_SIZE)

View File

@@ -2,15 +2,20 @@
[ext_resource type="Script" uid="uid://3rrym6yv7xyp" path="res://entities/player_3d/scripts/player_3d.gd" id="1_pvvbh"]
[ext_resource type="Material" uid="uid://cr7bp4fhh1ipr" path="res://entities/player_3d/resources/materials/post_process_quad.tres" id="2_fcmrk"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_o44vi"]
[ext_resource type="Texture2D" uid="uid://ba8vh5h3r6pr2" path="res://common/icons/focus.svg" id="4_sbfo8"]
[sub_resource type="QuadMesh" id="QuadMesh_o44vi"]
size = Vector2(2, 2)
size = Vector2(3, 3)
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eodxe"]
radius = 0.5854492
height = 1.7342377
[sub_resource type="LabelSettings" id="LabelSettings_fcmrk"]
font = ExtResource("4_o44vi")
font_size = 30
[sub_resource type="Gradient" id="Gradient_dqi2u"]
interpolation_mode = 1
offsets = PackedFloat32Array(0.7046632, 0.78238344, 1)
@@ -54,8 +59,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.19785136, 0)
current = true
near = 0.003
[node name="MeshInstance3D" type="MeshInstance3D" parent="Camera3D" unique_id=1477584785]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.1755164e-08, 0, -0.46892682)
[node name="Outline" type="MeshInstance3D" parent="Camera3D" unique_id=1477584785]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.9337665e-08, 0, -0.87116754)
mesh = SubResource("QuadMesh_o44vi")
surface_material_override/0 = ExtResource("2_fcmrk")
@@ -88,6 +93,36 @@ size_flags_vertical = 4
texture = ExtResource("4_sbfo8")
expand_mode = 1
[node name="3dTutorial" type="MarginContainer" parent="CanvasLayer" unique_id=259323543]
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="MoveTutorial" type="Label" parent="CanvasLayer/3dTutorial" unique_id=1165378520]
unique_name_in_owner = true
visible = false
layout_mode = 2
size_flags_vertical = 0
text = "MOVE_WITH_RIGHT_CLICK_OR_WASD"
label_settings = SubResource("LabelSettings_fcmrk")
horizontal_alignment = 1
vertical_alignment = 1
[node name="InteractTutorial" type="Label" parent="CanvasLayer/3dTutorial" unique_id=1117243867]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
text = "INTERACT_WITH_LEFT_CLICK"
label_settings = SubResource("LabelSettings_fcmrk")
horizontal_alignment = 1
vertical_alignment = 1
[node name="CPUParticles3D" type="CPUParticles3D" parent="." unique_id=1470634574]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.66324395, 0)
amount = 5

View File

@@ -5,7 +5,7 @@
[resource]
render_priority = 0
shader = ExtResource("1_tvsbc")
shader_parameter/step_count = 3
shader_parameter/step_count = 5
shader_parameter/thickness = 2.0000000149012003
shader_parameter/edge_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
shader_parameter/fade_start = 100.0

View File

@@ -11,7 +11,7 @@ const MOUSE_SENSIVITY = 0.002
const RAY_LENGTH = 10.
const PUSH_FORCE = 0.6
var cockpit_action_hovered : Interactable3D = null
var action_hovered : Interactable3D = null
var query_mouse := false
@export var controlling_player = true
@@ -28,22 +28,30 @@ func _ready():
controlling_player = true
)
%MoveTutorial.visible = not "3d_move" in GameInfo.game_data.tutorials_done
%InteractTutorial.visible = false
func _input(event):
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
rotate_y(-event.relative.x * MOUSE_SENSIVITY)
%Camera3D.rotate_x(-event.relative.y * MOUSE_SENSIVITY)
%Camera3D.rotation.x = clampf($Camera3D.rotation.x, -deg_to_rad(70), deg_to_rad(70))
query_mouse = true
if event.is_action_pressed("action") and cockpit_action_hovered and cockpit_action_hovered.interactable:
cockpit_action_hovered.click()
if controlling_player:
if event is InputEventMouseMotion and Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
rotate_y(-event.relative.x * MOUSE_SENSIVITY)
%Camera3D.rotate_x(-event.relative.y * MOUSE_SENSIVITY)
%Camera3D.rotation.x = clampf($Camera3D.rotation.x, -deg_to_rad(70), deg_to_rad(70))
query_mouse = true
if event.is_action_pressed("action") and action_hovered and action_hovered.interactable:
if %InteractTutorial.visible:
var tween = create_tween()
tween.tween_property(%InteractTutorial, "modulate:a", 0., 0.8)
GameInfo.game_data.tutorials_done.append("3d_action")
action_hovered.click()
func _physics_process(delta):
if controlling_player:
if query_mouse:
update_mouse_hovered_cockpit_actions()
update_mouse_hovered_actions()
%PointerTexture.texture = (
POINTER_ACTION_TEXTURE if cockpit_action_hovered != null and cockpit_action_hovered.interactable
POINTER_ACTION_TEXTURE if action_hovered != null and action_hovered.interactable
else POINTER_TEXTURE
)
query_mouse = false
@@ -60,6 +68,12 @@ func _physics_process(delta):
else:
velocity.x = move_toward(velocity.x, 0, speed)
velocity.z = move_toward(velocity.z, 0, speed)
if %MoveTutorial.visible and direction.length():
var tween = create_tween()
tween.tween_property(%MoveTutorial, "modulate:a", 0., 0.8)
GameInfo.game_data.tutorials_done.append("3d_move")
else :
velocity = Vector3.ZERO
@@ -75,7 +89,7 @@ func _physics_process(delta):
-collision.get_normal() * PUSH_FORCE
)
func update_mouse_hovered_cockpit_actions() -> void:
func update_mouse_hovered_actions() -> void:
var space_state = get_world_3d().direct_space_state
var middle_screen = get_viewport().get_visible_rect().size / 2
@@ -87,12 +101,19 @@ func update_mouse_hovered_cockpit_actions() -> void:
var result = space_state.intersect_ray(query)
if result and result.collider and result.collider is Interactable3D:
if cockpit_action_hovered != result.collider:
if cockpit_action_hovered and cockpit_action_hovered != result.collider:
cockpit_action_hovered._on_mouse_exited()
cockpit_action_hovered = result.collider
cockpit_action_hovered._on_mouse_entered()
if action_hovered != result.collider:
if action_hovered and action_hovered != result.collider:
action_hovered._on_mouse_exited()
action_hovered = result.collider
action_hovered._on_mouse_entered()
if not "3d_action" in GameInfo.game_data.tutorials_done:
%InteractTutorial.visible = true
%InteractTutorial.modulate.a = 0.
var tween = create_tween()
tween.tween_property(%InteractTutorial, "modulate:a", 1., 0.2)
else :
if cockpit_action_hovered:
cockpit_action_hovered._on_mouse_exited()
cockpit_action_hovered = null
if action_hovered:
action_hovered._on_mouse_exited()
action_hovered = null

View File

@@ -1,9 +1,13 @@
extends Area2D
class_name Entity
var terrain : Terrain
var terrain : Terrain : set = set_terrain
var region : Region :
get(): return terrain if terrain is Region else null
func set_terrain(v : Terrain):
print(v)
terrain = v
func save() -> EntityData:
return null