Author SHA1 Message Date
Nilou ca9433150e Merge branch 'musique_et_son_2' of https://git.zacharie-guet.fr/zacharie/seeding-planets into musique_et_son_2 2026-05-03 16:46:29 +02:00
Nilou 805056436d mixage du morceau de désert phase 1 #172 2026-04-26 13:59:27 +02:00
Nilou 6f4d1825ea suppression des nodes sfx "rocks" "dig" "alarm" et des fichiers audio "dig" "alarm" "build" "truck_moving" 2026-04-26 12:35:49 +02:00
Nilou 1caaf42105 ajustements liés à l'ambiance de base-relais et suppression des nodes "Rocks" et "Dig" 2026-04-26 12:25:05 +02:00
Nilou dfa11a17fd sfx et ambiance vending room + nodes audio (à implémenter) #174 2026-04-26 10:09:47 +02:00
Nilou 186f150689 sfx chute distributeur mixé #174 2026-04-26 09:33:14 +02:00
Nilou 8f7b013445 sfx de porte (reste qu'à l'implémenter) et sfx get_item (placeholder pas implémenté) #148 #173 2026-04-26 08:55:21 +02:00
Nilou 689ad8057d implémentation de la musique de désert phase 1 #172 2026-03-29 15:33:11 +02:00
Nilou 4c7633d4c4 correction des dialogues anglophones d'astra failed, post-tutorial et ship presentation #168 2026-03-21 16:38:57 +01:00
Nilou 0b79ef3e02 Merge branch 'musique_et_son_2' of https://git.zacharie-guet.fr/zacharie/seeding-planets into musique_et_son_2 2026-03-21 11:03:32 +01:00
Nilou 5c4e828a8d implémentation du morceau de fin et mixage #153 2026-03-01 17:27:54 +01:00
Nilou efb18bae26 correction des deux musiques en même temps sur le vaisseau et mixage 2026-03-01 16:50:44 +01:00
Nilou 68d5b4153f implémentation du sfx de bip écran #156 2026-03-01 16:37:16 +01:00
Nilou c32f246707 mise en place du sfx de sortie du vaisseau et mixage #150 2026-03-01 14:34:25 +01:00
Nilou 31609b8b38 ajout du sfx de mouvement #165 2026-03-01 14:17:51 +01:00
Nilou da46a56909 gestion des silences au début des morceaux et mise en place du sfx ascenseur #157 2026-03-01 14:12:35 +01:00
Nilou 81c6328390 mise en place des sfx d'atterrissage et décollage #160 2026-03-01 13:57:03 +01:00
Nilou b61bcef769 mise en place du sfx de télépotation et mixage #135 2026-03-01 13:45:06 +01:00
Nilou f4206648e6 ajout du morceau de fin de demo et création de la node #153 2026-02-28 20:30:04 +01:00
Nilou 122fa11aa1 dernières révisions des dialogues anglophones, la correction pro arrive plus tard 2026-02-28 19:42:00 +01:00
Nilou c62668fb5b fade sur le menu et correction de dialogues 2026-02-28 17:35:36 +01:00
Nilou 0f2213bbdd ajout du sfx teleportation, recréation de la node movement et création de la node teleportation 2026-02-27 16:28:16 +01:00
Nilou d221869a10 ajout du sfx movement, création des nodes movement et passage du camion de "music" à "ambiance" #165 2026-02-27 16:08:46 +01:00
Nilou f26d623c36 ajout du sfx d'ascenseur #157 2026-02-27 14:55:19 +01:00
Nilou 88aa199f5a correction du problème d'ambiance 2026-02-27 14:06:58 +01:00
Nilou 75cdd584de mise en place des morceaux "définitifs" de la démo 2026-02-26 18:13:23 +01:00
Nilou 8b07d5df47 sfx de minage et récolte fonctionnels #164 2026-02-26 14:20:39 +01:00
Nilou ebe6df5d4d ajustement des paramètres des musiques 2026-02-26 13:14:43 +01:00
Nilou 8a19a3f81f création des nodes sfx manquantes sur audiomanager 2026-02-26 13:09:07 +01:00
Nilou bdba1fb5b4 ajout des sfx de décollage et d'atterrissage #160 2026-02-26 12:56:26 +01:00
Nilou 31144151bd ajout des sfx de recharge #136 2026-02-25 15:11:12 +01:00
Nilou 2df0de1db9 amélioration des morceaux forest #163 2026-02-25 14:01:01 +01:00
Nilou 026471f847 suppression de la lecture en boucle des morceaux de phase #142 2026-02-22 18:47:00 +01:00
Nilou f130c2f2c5 suppression des oiseaux sur les pistes d'ambiance de niveau 2026-02-22 18:08:35 +01:00
Nilouandzacharie 7908797ee5 augmentation du default_fade_time 2026-02-22 17:31:51 +01:00
Nilouandzacharie 0c5365ff57 amélioration des dialogues en anglais et suppression des oiseaux de l'ambiance Demeter 2026-02-22 17:31:51 +01:00
Nilouandzacharie 90eec21031 ajout du sfx d'ascenseur et de bip d'écran #156 #157 2026-02-22 17:29:38 +01:00
Nilouandzacharie 4be34c4bfb mise en place des ambiances, modfication du jingle de reveal du vaisseau, mixage et identification des problèmes sonores 2026-02-22 17:29:37 +01:00
226 changed files with 1837 additions and 6223 deletions
-14
View File
@@ -1,14 +0,0 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://di0m3uqgi3l08"]
[ext_resource type="Texture2D" uid="uid://dfd72vla6crn4" path="res://common/assets/textures/cristal.png" id="1_m4qy0"]
[resource]
diffuse_mode = 3
specular_mode = 1
disable_fog = true
albedo_texture = ExtResource("1_m4qy0")
metallic_specular = 1.0
rim_tint = 0.48
stencil_flags = 2
stencil_reference = 5
stencil_outline_thickness = 0.626
Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

-41
View File
@@ -1,41 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfd72vla6crn4"
path.s3tc="res://.godot/imported/cristal.png-542ce388785d47ebc69b0d8cd0728915.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://common/assets/textures/cristal.png"
dest_files=["res://.godot/imported/cristal.png-542ce388785d47ebc69b0d8cd0728915.s3tc.ctex"]
[params]
compress/mode=2
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=true
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=0
@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dq2nodhwnp73f"
path="res://.godot/imported/solarmusic-dripping-water-in-cave-114694.ogg-81f5d41775da1d0914399edcb9214d3c.oggvorbisstr"
[deps]
source_file="res://common/audio_manager/assets/ambiance/cave/solarmusic-dripping-water-in-cave-114694.ogg"
dest_files=["res://.godot/imported/solarmusic-dripping-water-in-cave-114694.ogg-81f5d41775da1d0914399edcb9214d3c.oggvorbisstr"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bqmo8dqvbwrjy"
path="res://.godot/imported/dragon-studio-gentle-rain-07-437321.mp3-0d563814f1cc2abb83b1e2f2367220f0.mp3str"
[deps]
source_file="res://common/audio_manager/assets/ambiance/niveau/dragon-studio-gentle-rain-07-437321.mp3"
dest_files=["res://.godot/imported/dragon-studio-gentle-rain-07-437321.mp3-0d563814f1cc2abb83b1e2f2367220f0.mp3str"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dnqq2sy3dxrb2"
path="res://.godot/imported/freesound_community-wine-glass-clink-36036.mp3-bc462b7f4a73f6e9bc3696ca5c63bc97.mp3str"
[deps]
source_file="res://common/audio_manager/assets/sfx/cristal/freesound_community-wine-glass-clink-36036.mp3"
dest_files=["res://.godot/imported/freesound_community-wine-glass-clink-36036.mp3-bc462b7f4a73f6e9bc3696ca5c63bc97.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://di6id2kyfy2e1"
path="res://.godot/imported/sslc2022-earth-rumble-128880.mp3-cbdb82e7630ba8aed62692404d0e45e0.mp3str"
[deps]
source_file="res://common/audio_manager/assets/sfx/earth_rumble/sslc2022-earth-rumble-128880.mp3"
dest_files=["res://.godot/imported/sslc2022-earth-rumble-128880.mp3-cbdb82e7630ba8aed62692404d0e45e0.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://3c4nxjasebyk"
path="res://.godot/imported/pickaxe_1_reverb.wav-8d6172bc1e5c2f43ec5b5cf869d5b6e3.sample"
[deps]
source_file="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_1_reverb.wav"
dest_files=["res://.godot/imported/pickaxe_1_reverb.wav-8d6172bc1e5c2f43ec5b5cf869d5b6e3.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bs5ldhabymm5p"
path="res://.godot/imported/pickaxe_2_reverb.wav-c953afb7e49205a0f4377738e1135a5b.sample"
[deps]
source_file="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_2_reverb.wav"
dest_files=["res://.godot/imported/pickaxe_2_reverb.wav-c953afb7e49205a0f4377738e1135a5b.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
@@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bu278eqn8krnb"
path="res://.godot/imported/pickaxe_3_reverb.wav-d3e3d8b6b50a16c6757536f43c8c6ccd.sample"
[deps]
source_file="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_3_reverb.wav"
dest_files=["res://.godot/imported/pickaxe_3_reverb.wav-d3e3d8b6b50a16c6757536f43c8c6ccd.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2
@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://rf7hachl3042"
path="res://.godot/imported/universfield-bubble-pop-07-487896.mp3-9674fcc5b43af938e0c8845e16ca6bfd.mp3str"
[deps]
source_file="res://common/audio_manager/assets/sfx/signal/universfield-bubble-pop-07-487896.mp3"
dest_files=["res://.godot/imported/universfield-bubble-pop-07-487896.mp3-9674fcc5b43af938e0c8845e16ca6bfd.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4
+6 -18
View File
@@ -1,10 +1,8 @@
[gd_scene 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="Script" uid="uid://2p5d6vogtn82" path="res://common/audio_manager/scripts/audio_manager.gd" id="1_0tvca"]
[ext_resource type="AudioStream" uid="uid://dq2nodhwnp73f" path="res://common/audio_manager/assets/ambiance/cave/solarmusic-dripping-water-in-cave-114694.ogg" id="2_ge2sc"]
[ext_resource type="AudioStream" uid="uid://dipnmlprwfo12" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_1.ogg" id="2_tuvql"] [ext_resource type="AudioStream" uid="uid://dipnmlprwfo12" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_1.ogg" id="2_tuvql"]
[ext_resource type="AudioStream" uid="uid://b1hut6lc1jevh" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_2.ogg" id="4_2fduo"] [ext_resource type="AudioStream" uid="uid://b1hut6lc1jevh" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_2.ogg" id="4_2fduo"]
[ext_resource type="AudioStream" uid="uid://bqmo8dqvbwrjy" path="res://common/audio_manager/assets/ambiance/niveau/dragon-studio-gentle-rain-07-437321.mp3" id="4_aedoe"]
[ext_resource type="AudioStream" uid="uid://6yx6txbgc6pt" path="res://common/audio_manager/assets/ambiance/astra/ambiance_astra.ogg" id="5_8204s"] [ext_resource type="AudioStream" uid="uid://6yx6txbgc6pt" path="res://common/audio_manager/assets/ambiance/astra/ambiance_astra.ogg" id="5_8204s"]
[ext_resource type="AudioStream" uid="uid://dcbuhtc085q2x" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_1.ogg" id="5_ajci6"] [ext_resource type="AudioStream" uid="uid://dcbuhtc085q2x" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_1.ogg" id="5_ajci6"]
[ext_resource type="AudioStream" uid="uid://dsphn6dbbd55a" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_1.ogg" id="6_6o1yh"] [ext_resource type="AudioStream" uid="uid://dsphn6dbbd55a" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_1.ogg" id="6_6o1yh"]
@@ -124,11 +122,6 @@ script = ExtResource("1_0tvca")
[node name="Ambiances" type="Node" parent="." unique_id=1989991562] [node name="Ambiances" type="Node" parent="." unique_id=1989991562]
unique_name_in_owner = true unique_name_in_owner = true
[node name="Cave" type="AudioStreamPlayer" parent="Ambiances" unique_id=71769481]
stream = ExtResource("2_ge2sc")
volume_db = -7.195
pitch_scale = 0.5
[node name="BaseRelais" type="AudioStreamPlayer" parent="Ambiances" unique_id=1895636918] [node name="BaseRelais" type="AudioStreamPlayer" parent="Ambiances" unique_id=1895636918]
stream = ExtResource("7_ge2sc") stream = ExtResource("7_ge2sc")
@@ -139,14 +132,6 @@ stream = ExtResource("7_ge2sc")
unique_name_in_owner = true unique_name_in_owner = true
stream = ExtResource("2_tuvql") stream = ExtResource("2_tuvql")
[node name="ExteriorFoggy" type="AudioStreamPlayer" parent="Ambiances" unique_id=1741396762]
unique_name_in_owner = true
[node name="ExteriorRaining" type="AudioStreamPlayer" parent="Ambiances" unique_id=1946725047]
unique_name_in_owner = true
stream = ExtResource("4_aedoe")
volume_db = -20.0
[node name="Astra" type="AudioStreamPlayer" parent="Ambiances" unique_id=1244577212] [node name="Astra" type="AudioStreamPlayer" parent="Ambiances" unique_id=1244577212]
unique_name_in_owner = true unique_name_in_owner = true
stream = ExtResource("5_8204s") stream = ExtResource("5_8204s")
@@ -163,6 +148,9 @@ stream = ExtResource("7_spekb")
unique_name_in_owner = true unique_name_in_owner = true
stream = ExtResource("8_tuvql") stream = ExtResource("8_tuvql")
[node name="Vending_room_base_relais" type="AudioStreamPlayer" parent="Ambiances" unique_id=1544089647]
stream = ExtResource("7_ge2sc")
[node name="Musics" type="Node" parent="." unique_id=1450527710] [node name="Musics" type="Node" parent="." unique_id=1450527710]
unique_name_in_owner = true unique_name_in_owner = true
@@ -186,6 +174,9 @@ stream = ExtResource("5_ajci6")
unique_name_in_owner = true unique_name_in_owner = true
stream = ExtResource("4_2fduo") stream = ExtResource("4_2fduo")
[node name="RegionDesertPhase1" type="AudioStreamPlayer" parent="Musics" unique_id=2003475958]
stream = ExtResource("11_yjs51")
[node name="RegionForestLoop" type="AudioStreamPlayer" parent="Musics" unique_id=482654512] [node name="RegionForestLoop" type="AudioStreamPlayer" parent="Musics" unique_id=482654512]
unique_name_in_owner = true unique_name_in_owner = true
stream = ExtResource("12_xmumj") stream = ExtResource("12_xmumj")
@@ -245,9 +236,6 @@ stream = ExtResource("23_ge2sc")
[node name="Recharge7" type="AudioStreamPlayer" parent="Sfx" unique_id=355754872] [node name="Recharge7" type="AudioStreamPlayer" parent="Sfx" unique_id=355754872]
stream = ExtResource("24_yr73o") stream = ExtResource("24_yr73o")
[node name="Rocks" type="AudioStreamPlayer" parent="Sfx" unique_id=1012908521]
stream = SubResource("AudioStreamRandomizer_kfbah")
[node name="Respawn" type="AudioStreamPlayer" parent="Sfx" unique_id=1902559716] [node name="Respawn" type="AudioStreamPlayer" parent="Sfx" unique_id=1902559716]
stream = ExtResource("16_xmumj") stream = ExtResource("16_xmumj")
@@ -42,6 +42,7 @@ func _on_change_scene(scene : Scene):
elif scene is IntroScene: elif scene is IntroScene:
stop_all_musics() stop_all_musics()
elif scene is RegionScene: elif scene is RegionScene:
play_ambiance("Exterior", false)
var region_level = GameInfo.game_data.current_run.level var region_level = GameInfo.game_data.current_run.level
var first_phase = REGION_FIRST_PHASE[region_level % len(REGION_FIRST_PHASE)] var first_phase = REGION_FIRST_PHASE[region_level % len(REGION_FIRST_PHASE)]
var loop_phase = REGION_LOOP_PHASE[region_level % len(REGION_LOOP_PHASE)] var loop_phase = REGION_LOOP_PHASE[region_level % len(REGION_LOOP_PHASE)]
@@ -65,9 +66,6 @@ func _on_change_scene(scene : Scene):
elif scene is RelayBaseScene: elif scene is RelayBaseScene:
stop_all_musics() stop_all_musics()
play_ambiance_alone("BaseRelais", false) play_ambiance_alone("BaseRelais", false)
elif scene is CaveScene:
stop_all_musics()
play_ambiance_alone("Cave", false)
# Fonction s'exécutant à chaque début de timeline # Fonction s'exécutant à chaque début de timeline
func _on_timeline_started(): func _on_timeline_started():
@@ -301,7 +299,7 @@ func set_volume(player : AudioStreamPlayer, to : float, fade_time = DEFAULT_FADE
return fade_tween return fade_tween
func start_player(player: AudioStreamPlayer, from_random_time = false, fade_time = DEFAULT_FADE_TIME): func start_player(player: AudioStreamPlayer, from_random_time = false, fade_time = DEFAULT_FADE_TIME):
if player and player.stream and not player.playing: if player and not player.playing:
player.play( player.play(
0.0 if not from_random_time 0.0 if not from_random_time
else randf_range(0.0, player.stream.get_length()) else randf_range(0.0, player.stream.get_length())
@@ -39,11 +39,6 @@ materials/extract_format=0
materials/extract_path="" materials/extract_path=""
_subresources={ _subresources={
"materials": { "materials": {
"Cristal": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/cristal.tres",
"use_external/path": "uid://di0m3uqgi3l08"
},
"Material": { "Material": {
"use_external/enabled": true, "use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres", "use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
@@ -39,11 +39,6 @@ materials/extract_format=0
materials/extract_path="" materials/extract_path=""
_subresources={ _subresources={
"materials": { "materials": {
"Cristal": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/cristal.tres",
"use_external/path": "uid://di0m3uqgi3l08"
},
"Material": { "Material": {
"use_external/enabled": true, "use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres", "use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
-1
View File
@@ -33,7 +33,6 @@ signal current_region_data_updated(p : RegionData)
@export var game_mode : GameMode = GameMode.STORY @export var game_mode : GameMode = GameMode.STORY
@export var dialogs_done : Array[String] = [] #Chemin des dialogues terminés @export var dialogs_done : Array[String] = [] #Chemin des dialogues terminés
@export var tutorials_done : Array[String] = []
func start_run() -> RunData: func start_run() -> RunData:
player_data.clear_inventory() player_data.clear_inventory()
+11 -13
View File
@@ -1,12 +1,13 @@
extends Resource extends Resource
class_name ProgressionData class_name ProgressionData
@export var planted_mutation_ids: Array[String] = [] @export var planted_mutation_ids: Array[String] = []
@export var story_step_i := 0 @export var story_step_i := 0
@export var mutations_unlocked = 8 @export var ship_tutorial_done = false
var all_mutations: Array[PlantMutation] : get = get_all_mutations var all_mutations: Array[PlantMutation] : get = get_all_mutations
var available_mutations: Array[PlantMutation] : get = get_available_mutations var available_mutations: Array[PlantMutation] : get = get_all_mutations
var available_artefacts: Array[Artefact] : get = get_all_artifacts var available_artefacts: Array[Artefact] : get = get_all_artifacts
var story_step : StoryStep : get = get_story_step var story_step : StoryStep : get = get_story_step
@@ -18,26 +19,23 @@ func next_story_step() -> void:
if story_step_i + 1 < len(get_all_story_steps()): if story_step_i + 1 < len(get_all_story_steps()):
story_step_i += 1 story_step_i += 1
func get_available_mutations() -> Array[PlantMutation]:
return get_all_mutations().slice(0, mutations_unlocked)
func get_all_mutations() -> Array[PlantMutation]: func get_all_mutations() -> Array[PlantMutation]:
return [ return [
QualityMutation.new(),
AncientMutation.new(), AncientMutation.new(),
ProlificMutation.new(), FertileMutation.new(),
GenerousMutation.new(),
HurriedMutation.new(),
PrecociousMutation.new(), PrecociousMutation.new(),
ProlificMutation.new(),
ProtectiveMutation.new(),
PureMutation.new(),
PurificationMutation.new(), PurificationMutation.new(),
VivaciousMutation.new(), QualityMutation.new(),
QuickMutation.new(), QuickMutation.new(),
RobustMutation.new(), RobustMutation.new(),
SocialMutation.new(), SocialMutation.new(),
FertileMutation.new(),
HurriedMutation.new(),
GenerousMutation.new(),
ProtectiveMutation.new(),
PureMutation.new(),
ToughMutation.new(), ToughMutation.new(),
VivaciousMutation.new(),
] ]
func get_all_artifacts() -> Array[Artefact]: func get_all_artifacts() -> Array[Artefact]:
+13 -28
View File
@@ -32,56 +32,42 @@ func generate_next_run_points() -> Array[RunPoint]:
next_run_points = [] next_run_points = []
for i in range(story_step.get_run_point_number(level+1)): for i in range(story_step.get_run_point_number(level+1)):
var last_modifiers : Array[String] = []
if len(next_run_points):
for m in next_run_points[0].region_parameter.modifiers:
last_modifiers.append(m.modifier_name)
next_run_points.append( next_run_points.append(
generate_next_run_point(last_modifiers) generate_next_run_point()
) )
return next_run_points return next_run_points
func generate_next_run_point(last_modifiers : Array[String] = []) -> RunPoint: func generate_next_run_point() -> RunPoint:
var region_parameter = RegionParameter.new() var region_parameter = RegionParameter.new()
var next_level = level+1 var next_level = level+1
var challenge_modifiers = generate_challenge_modifiers().filter(
func(m : RegionModifier): return not m.modifier_name in last_modifiers
)
var benefic_modifiers = generate_benefic_modifiers().filter(
func(m : RegionModifier): return not m.modifier_name in last_modifiers
)
var normal_modifiers = generate_normal_modifiers().filter(
func(m : RegionModifier): return not m.modifier_name in last_modifiers
)
if story_step.need_gameplay_modifier(next_level): if story_step.need_gameplay_modifier(next_level):
var is_challenge = randf() < story_step.get_challenge_chance(next_level) var is_challenge = randf() < story_step.get_challenge_chance(next_level)
if is_challenge: if is_challenge:
region_parameter.modifiers = [ region_parameter.modifiers = [
challenge_modifiers.pick_random(), generate_challenge_modifiers().pick_random(),
benefic_modifiers.pick_random() generate_benefic_modifiers().pick_random()
] as Array[RegionModifier] ] as Array[RegionModifier]
else: else:
region_parameter.modifiers = [ region_parameter.modifiers = [
normal_modifiers.pick_random() generate_normal_modifiers().pick_random()
] as Array[RegionModifier] ] as Array[RegionModifier]
region_parameter.modifiers.append_array( var first_vending = story_step.get_first_vending_machine_occurence(next_level)
story_step.get_gameplay_modifiers_for_region(next_level) var vending_occurence = story_step.get_vending_machine_occurence(next_level)
) if vending_occurence > 0:
if (level - first_vending)%vending_occurence == 0:
region_parameter.modifiers.append(VendingMachineModifier.new())
region_parameter.modifiers.append_array( region_parameter.modifiers.append_array(
story_step.get_story_modifiers_for_region(next_level) story_step.get_story_modifiers_for_region(next_level)
) )
region_parameter.objective = story_step.get_objective_for_region(next_level) region_parameter.objective = story_step.get_objective_for_region(next_level)
region_parameter.charge = story_step.get_charge_number(next_level)
return RunPoint.new( return RunPoint.new(
region_parameter region_parameter
) )
@@ -108,7 +94,7 @@ func generate_normal_modifiers() -> Array[RegionModifier]:
HarshModifier.new(), HarshModifier.new(),
ToxicModifier.new(), ToxicModifier.new(),
SandyModifier.new(), SandyModifier.new(),
MagneticModifier.new(),
] ]
func generate_benefic_modifiers() -> Array[RegionModifier]: func generate_benefic_modifiers() -> Array[RegionModifier]:
@@ -116,7 +102,6 @@ func generate_benefic_modifiers() -> Array[RegionModifier]:
VendingMachineModifier.new(), VendingMachineModifier.new(),
ResonnanceModifier.new(), ResonnanceModifier.new(),
InstableModifier.new(), InstableModifier.new(),
CaveModifier.new(),
] ]
+2 -2
View File
@@ -57,8 +57,8 @@ const AVAILABLE_LANGUAGES_LABEL = [
#region ------------------ Game ------------------ #region ------------------ Game ------------------
const MAX_ZOOM = 2. const MAX_ZOOM = 1.8
const MIN_ZOOM = 0.5 const MIN_ZOOM = 0.8
# Not in settings pannel # Not in settings pannel
@export var zoom : float = 1. : @export var zoom : float = 1. :
@@ -2,7 +2,6 @@ extends StoryStep
class_name AstraStoryStep class_name AstraStoryStep
const MERCURY_ARRIVAL_DIALOG_PATH="res://dialogs/timelines/astra/mercury_arrival.dtl" const MERCURY_ARRIVAL_DIALOG_PATH="res://dialogs/timelines/astra/mercury_arrival.dtl"
const CAVE_DIALOG_PATH="res://dialogs/timelines/astra/cave.dtl"
func get_respawn_scene() -> Scene: func get_respawn_scene() -> Scene:
return AstraScene.new() return AstraScene.new()
@@ -16,21 +15,9 @@ func get_destination_scene() -> Scene:
"001" "001"
) )
func get_cave_occurence(_level : int) -> int:
return 2
func get_region_sequence_length() -> int: func get_region_sequence_length() -> int:
return 4 return 4
func get_objective_for_region(level : int) -> int:
match level:
1: return 6
2: return 10
3: return 16
4: return 24
5: return 34
_: return get_objective_for_region(level-1) + (level-2) * 5
func get_first_vending_machine_occurence(_level : int) -> int: func get_first_vending_machine_occurence(_level : int) -> int:
return 0 return 0
@@ -41,8 +28,6 @@ func get_challenge_chance(_level : int) -> float:
return 0. return 0.
func get_ship_dialog_path(level : int, ship_in_space := true) -> String: func get_ship_dialog_path(level : int, ship_in_space := true) -> String:
if ship_in_space and level == get_cave_occurence(level) - 1: if ship_in_space and level == get_region_sequence_length() - 1:
return CAVE_DIALOG_PATH
if ship_in_space and is_run_finished(level + 1):
return MERCURY_ARRIVAL_DIALOG_PATH return MERCURY_ARRIVAL_DIALOG_PATH
return "" return ""
@@ -22,11 +22,11 @@ func get_destination_scene() -> Scene:
) )
func get_first_vending_machine_occurence(_level : int) -> int: func get_first_vending_machine_occurence(_level : int) -> int:
return 1 return 0
func get_ship_dialog_path(level : int, ship_in_space := true) -> String: func get_ship_dialog_path(level : int, ship_in_space := true) -> String:
if level == 0: if level == 0:
return MERCURY_DEPARTURE_DIALOG_PATH return MERCURY_DEPARTURE_DIALOG_PATH
if ship_in_space and is_run_finished(level + 1): if ship_in_space and level == get_region_sequence_length() - 1:
return VENUS_ARRIVAL_DIALOG_PATH return VENUS_ARRIVAL_DIALOG_PATH
return "" return ""
+9 -36
View File
@@ -19,7 +19,7 @@ func get_ship_dialog_path(_level : int, _ship_in_space := true) -> String:
#region ------------------ Run ------------------ #region ------------------ Run ------------------
func is_run_finished(level : int) -> bool: func is_run_finished(level : int) -> bool:
return level == get_region_sequence_length() - 1 return level == get_region_sequence_length()
func get_region_sequence_length() -> int: func get_region_sequence_length() -> int:
return 6 return 6
@@ -28,13 +28,7 @@ func get_first_vending_machine_occurence(_level : int) -> int:
return 2 return 2
func get_vending_machine_occurence(_level : int) -> int: func get_vending_machine_occurence(_level : int) -> int:
return 3 return 4
func get_first_cave_occurence(level : int) -> int:
return get_cave_occurence(level)
func get_cave_occurence(_level : int) -> int:
return 3
func get_challenge_chance(_level : int) -> float: func get_challenge_chance(_level : int) -> float:
return 0.3 return 0.3
@@ -44,17 +38,15 @@ func get_run_point_number(level : int) -> int:
return 1 return 1
return 2 return 2
func get_charge_number(_level : int) -> int:
return 10
func get_objective_for_region(level : int) -> int: func get_objective_for_region(level : int) -> int:
match level: match level:
1: return 10 0: return 1
2: return 15 1: return 8
3: return 20 2: return 10
4: return 30 3: return 15
5: return 45 4: return 20
_: return get_objective_for_region(level-1) + (level-2) * 5 5: return 30
_: return get_objective_for_region(level-1) + (level-3) * 5
func get_story_modifiers_for_region(level : int) -> Array[RegionModifier]: func get_story_modifiers_for_region(level : int) -> Array[RegionModifier]:
var modifiers : Array[RegionModifier] = [] var modifiers : Array[RegionModifier] = []
@@ -62,25 +54,6 @@ func get_story_modifiers_for_region(level : int) -> Array[RegionModifier]:
var dest_mod = DestinationModifier.new() var dest_mod = DestinationModifier.new()
dest_mod.destination_scene = get_destination_scene() dest_mod.destination_scene = get_destination_scene()
modifiers.append(dest_mod) modifiers.append(dest_mod)
var first_cave = get_first_cave_occurence(level)
var cave_occurence = get_cave_occurence(level)
if cave_occurence > 0 and level >= first_cave:
if (level - first_cave)%cave_occurence == 0:
modifiers.append(CaveModifier.new())
return modifiers
func get_gameplay_modifiers_for_region(level : int) -> Array[RegionModifier]:
var modifiers : Array[RegionModifier] = []
if need_gameplay_modifier(level):
var first_vending = get_first_vending_machine_occurence(level)
var vending_occurence = get_vending_machine_occurence(level)
if vending_occurence > 0 and level >= first_vending:
if (level - first_vending)%vending_occurence == 0:
modifiers.append(VendingMachineModifier.new())
return modifiers return modifiers
func need_gameplay_modifier(level : int): func need_gameplay_modifier(level : int):
-23
View File
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="#ffffff"
class="icon icon-tabler icons-tabler-filled icon-tabler-globe"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5" />
<path
id="path5"
style="fill:#ffffff;stroke-width:21.0943;stroke-linecap:round;paint-order:stroke fill markers"
d="m 17.023734,4.3635641 a 0.381287,0.381287 0 0 0 -0.170042,0.058862 L 11.821685,7.6971107 A 0.63341096,0.63341096 0 0 0 11.534237,8.2108309 L 11.240336,19.008011 a 0.54999444,0.54999444 0 0 0 0.281243,0.495301 l 2.913668,1.633839 a 0.85528839,0.85528839 0 0 0 0.615008,0.08674 l 3.251881,-0.764304 a 0.54999441,0.54999441 0 0 0 0.407255,-0.3982 L 21.41304,9.6040507 A 0.633411,0.633411 0 0 0 21.276945,9.0305978 L 17.348792,4.4922505 A 0.381287,0.381287 0 0 0 17.023734,4.3635641 Z M 16.855445,5.710685 a 0.29045002,0.29045002 0 0 1 0.24822,0.1000976 l 2.992058,3.4556065 a 0.18188889,0.18188889 0 0 1 -0.06799,0.2862794 L 16.39349,11.042166 a 0.43339164,0.43339164 0 0 1 -0.433214,-0.0611 L 12.879721,8.5445752 a 0.18188888,0.18188888 0 0 1 0.01384,-0.2939165 l 3.831045,-2.4933356 a 0.29045002,0.29045002 0 0 1 0.130842,-0.046638 z" />
<path
id="path11"
style="fill:#ffffff;stroke-width:30;stroke-linecap:round;paint-order:stroke fill markers"
d="M 11.299657,2.8712653 4.865863,8.4803941 A 0.83240115,0.83240115 109.32328 0 0 4.5938103,9.2562442 l 1.6673523,9.2015148 a 0.84433519,0.84433519 50.484116 0 0 0.5249373,0.63644 l 4.4292571,1.721467 a 1.216379,1.216379 3.6429642e-7 0 0 0.88129,0 l 4.429257,-1.721467 a 0.84433513,0.84433513 129.51588 0 0 0.524938,-0.63644 L 18.718193,9.2562442 A 0.83240121,0.83240121 70.676724 0 0 18.446141,8.4803941 L 12.012347,2.8712653 a 0.54226096,0.54226096 5.9568751e-7 0 0 -0.71269,0 z"
transform="matrix(0.43145929,-0.11560917,0.11560917,0.43145929,0.83225312,12.978764)" />
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

-44
View File
@@ -1,44 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cqdyykjx6hdrr"
path.s3tc="res://.godot/imported/cristal.svg-7e9a919e9dbc36092f14a8401b5f4888.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://common/icons/cristal.svg"
dest_files=["res://.godot/imported/cristal.svg-7e9a919e9dbc36092f14a8401b5f4888.s3tc.ctex"]
[params]
compress/mode=2
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=true
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=0
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
-23
View File
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="currentColor"
class="icon icon-tabler icons-tabler-filled icon-tabler-flag-2"
version="1.1"
id="svg2"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<path
stroke="none"
d="M 0,0 H 24 V 24 H 0 Z"
fill="none"
id="path1" />
<path
d="m 19,4 a 1,1 0 0 1 0.993,0.883 L 20,5 v 9 a 1,1 0 0 1 -0.883,0.993 L 19,15 H 6 v 6 A 1,1 0 0 1 5.117,21.993 L 5,22 A 1,1 0 0 1 4.007,21.117 L 4,21 V 5 A 1,1 0 0 1 4.883,4.007 L 5,4 Z"
id="path2"
style="fill:#fefefe;fill-opacity:1" />
</svg>

Before

Width:  |  Height:  |  Size: 701 B

-43
View File
@@ -1,43 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uckrw5fan88k"
path="res://.godot/imported/flag-2.svg-b4658bfe95b153ec543e0e6f4d1176cb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/flag-2.svg"
dest_files=["res://.godot/imported/flag-2.svg-b4658bfe95b153ec543e0e6f4d1176cb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
-39
View File
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="18.474695"
height="20.999998"
viewBox="0 0 18.474695 20.999998"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-hand-finger"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5" />
<path
stroke="none"
d="m -2.525305,-2.0000007 h 24 V 21.999999 h -24 z"
fill="none"
id="path1" />
<path
d="M 5.474695,10.999999 V 2.4999993 a 1.5,1.5 0 0 1 3,0 v 7.5"
id="path2"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="m 8.474695,9.4999993 v -2 a 1.5,1.5 0 1 1 3,0 v 2.5"
id="path3"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="m 11.474695,8.4999993 a 1.5,1.5 0 0 1 3,0 v 1.5"
id="path4"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="m 14.474695,9.4999993 a 1.5,1.5 0 0 1 3,0 v 4.4999997 a 6,6 0 0 1 -6,6 h -2 0.208 a 6,6 0 0 1 -5.012,-2.7 69.74,69.74 0 0 1 -0.196,-0.3 c -0.312,-0.479 -1.407,-2.388 -3.286,-5.728 a 1.5,1.5 0 0 1 0.536,-2.0219997 1.867,1.867 0 0 1 2.28,0.28 l 1.47,1.4699997"
id="path5"
style="stroke:#ffffff;stroke-opacity:1" />
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

-39
View File
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="18.474695"
height="20.999998"
viewBox="0 0 18.474695 20.999998"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-hand-finger"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs5" />
<path
stroke="none"
d="m -2.525305,-2.0000007 h 24 V 21.999999 h -24 z"
fill="none"
id="path1" />
<path
d="M 5.474695,10.999999 V 2.4999993 a 1.5,1.5 0 0 1 3,0 v 7.5"
id="path2"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="m 8.474695,9.4999993 v -2 a 1.5,1.5 0 1 1 3,0 v 2.5"
id="path3"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="m 11.474695,8.4999993 a 1.5,1.5 0 0 1 3,0 v 1.5"
id="path4"
style="stroke:#ffffff;stroke-opacity:1" />
<path
d="m 14.474695,9.4999993 a 1.5,1.5 0 0 1 3,0 v 4.4999997 a 6,6 0 0 1 -6,6 h -2 0.208 a 6,6 0 0 1 -5.012,-2.7 69.74,69.74 0 0 1 -0.196,-0.3 c -0.312,-0.479 -1.407,-2.388 -3.286,-5.728 a 1.5,1.5 0 0 1 0.536,-2.0219997 1.867,1.867 0 0 1 2.28,0.28 l 1.47,1.4699997"
id="path5"
style="stroke:#ffffff;stroke-opacity:1" />
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

-43
View File
@@ -1,43 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b3vg3tipd4boh"
path="res://.godot/imported/hand-finger.svg-4b9fa57a07066292554e8fd7f7ad9dac.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/hand-finger.svg"
dest_files=["res://.godot/imported/hand-finger.svg-4b9fa57a07066292554e8fd7f7ad9dac.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
-45
View File
@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="currentColor"
class="icon icon-tabler icons-tabler-filled icon-tabler-magnet"
version="1.1"
id="svg2"
sodipodi:docname="magnet.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="18.5"
inkscape:cx="18.621622"
inkscape:cy="14.324324"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
stroke="none"
d="M0 0h24v24H0z"
fill="none"
id="path1" />
<path
d="M21 9v4a9 9 0 0 1 -18 0v-4h7v4a2 2 0 1 0 4 0v-4zm-3 -7a3 3 0 0 1 3 3v2h-7v-2a3 3 0 0 1 3 -3zm-11 0a3 3 0 0 1 3 3v2h-7v-2a3 3 0 0 1 3 -3z"
id="path2"
style="fill:#ffffff;fill-opacity:1" />
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

-43
View File
@@ -1,43 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://mv0emix7dwio"
path="res://.godot/imported/magnet.svg-210fc8631abfaf11eefb9e027a72fb42.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://common/icons/magnet.svg"
dest_files=["res://.godot/imported/magnet.svg-210fc8631abfaf11eefb9e027a72fb42.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=2.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
@@ -1,31 +0,0 @@
extends Scene
class_name CaveScene
@export var cave_room_seed = 0
func _init(
_crs : int = 0
):
cave_room_seed = _crs
func get_scene_id() -> String:
return "CRISTAL_CAVE"
func get_scene_path() -> String:
return "res://stages/3d_scenes/cave/cave.tscn"
func is_mouse_captured() -> bool:
return true
func is_needed_to_be_announced() -> bool:
return true
func get_scene_title() -> String:
return tr("CRISTAL_CAVE")
func get_scene_icon() -> Texture:
return preload("res://common/icons/cristal.svg")
func _on_generated(generated_scene : Node):
var cave : Cave = generated_scene as Cave
cave.setup_room(cave_room_seed)
@@ -1 +0,0 @@
uid://f143q00p8ph1
+20 -27
View File
@@ -12,18 +12,16 @@ static func get_tile_from_pos(coord) -> Vector2i:
floori(coord.y / (Region.TILE_SIZE)), floori(coord.y / (Region.TILE_SIZE)),
) )
static func get_tiles_in_circle(center: Vector2,radius : float) -> Array[Vector2i]: static func get_tiles_in_circle(center: Vector2, radius : float) -> Array[Vector2i]:
var tiles : Array[Vector2i] = [] var tiles : Array[Vector2i] = []
var margin = ceili(radius * 0.5)
for x in range( for x in range(
floori((center.x - radius/2.) / Region.TILE_SIZE) - margin, floori((center.x - radius/2.) / Region.TILE_SIZE),
ceili((center.x + radius/2.) / Region.TILE_SIZE) + margin, ceili((center.x + radius/2.) / Region.TILE_SIZE),
): ):
for y in range( for y in range(
floori((center.y - radius/2.) / Region.TILE_SIZE) - margin, floori((center.y - radius/2.) / Region.TILE_SIZE),
ceili((center.y + radius/2.) / Region.TILE_SIZE) + margin, ceili((center.y + radius/2.) / Region.TILE_SIZE),
): ):
if is_tile_on_circle(Vector2i(x,y), center, radius): if is_tile_on_circle(Vector2i(x,y), center, radius):
tiles.append(Vector2i(x,y)) tiles.append(Vector2i(x,y))
@@ -32,29 +30,24 @@ static func get_tiles_in_circle(center: Vector2,radius : float) -> Array[Vector2
static func is_tile_on_circle(tile_coord : Vector2i, circle_center: Vector2, circle_radius : float) -> bool: static func is_tile_on_circle(tile_coord : Vector2i, circle_center: Vector2, circle_radius : float) -> bool:
var absolute_tile_pos : Vector2 = tile_coord * Region.TILE_SIZE var absolute_tile_pos : Vector2 = tile_coord * Region.TILE_SIZE
var tile_center = absolute_tile_pos + Vector2.ONE * Region.TILE_SIZE / 2
var tile_radius = roundf(Region.TILE_SIZE/2.)
return pow(tile_center.x - circle_center.x, 2) + pow(tile_center.y - circle_center.y, 2) <= pow(tile_radius + circle_radius, 2)
# Loop over tile corners to know if the area collide # Loop over tile corners to know if the area collide
# var corners : Array[Vector2] = [] var corners : Array[Vector2] = []
# for x in [0,1]: for x in [0,1]:
# for y in [0,1]: for y in [0,1]:
# corners.append( corners.append(
# absolute_tile_pos absolute_tile_pos
# + Vector2.RIGHT * x * Region.TILE_SIZE + Vector2.RIGHT * x * Region.TILE_SIZE
# + Vector2.DOWN * y * Region.TILE_SIZE + Vector2.DOWN * y * Region.TILE_SIZE
# ) )
# # Check if segment touch area # Check if segment touch area
# for i in range(4): for i in range(4):
# var a = corners[i%4] var a = corners[i%4]
# var b = corners[(i+1)%4] var b = corners[(i+1)%4]
# if segment_intersect_circle(a,b,circle_center,circle_radius): if segment_intersect_circle(a,b,circle_center,circle_radius):
# return true return true
# return false return false
# Stolen here https://stackoverflow.com/questions/1073336/circle-line-segment-collision-detection-algorithm # Stolen here https://stackoverflow.com/questions/1073336/circle-line-segment-collision-detection-algorithm
-3
View File
@@ -1,3 +0,0 @@
-1
View File
@@ -1 +0,0 @@
uid://bebwor5r5nnov
-9
View File
@@ -1,9 +0,0 @@
[gd_scene format=3 uid="uid://6or2rnjt5ixv"]
[ext_resource type="Script" uid="uid://bebwor5r5nnov" path="res://common/tools/scripts/test_tiles.gd" id="1_44t07"]
[node name="TestTiles" type="Node2D" unique_id=949540000]
script = ExtResource("1_44t07")
[node name="Grid" type="Node2D" parent="." unique_id=2109744474]
unique_name_in_owner = true
@@ -9,9 +9,9 @@ uniform vec2 viewport_size = vec2(1920.0, 1080.0);
// Uniforms for customization // Uniforms for customization
uniform sampler2D noise_texture : repeat_enable; uniform sampler2D noise_texture : repeat_enable;
uniform float cloud_speed : hint_range(0.0, 10.0) = 1.0; uniform float cloud_speed : hint_range(0.0, 1.0) = 1.0;
uniform float cloud_delay : hint_range(0.0, 100.0) = 1.0; uniform float cloud_delay : hint_range(0.0, 100.0) = 1.0;
uniform vec2 cloud_dir = vec2(1.0,+1.0); uniform vec2 noise_dir = vec2(1.0,+1.0);
uniform vec3 cloud_color : source_color = vec3(0.8); uniform vec3 cloud_color : source_color = vec3(0.8);
uniform float cloud_alpha : hint_range(0.0, 1.0) = 1.0; uniform float cloud_alpha : hint_range(0.0, 1.0) = 1.0;
uniform float cloud_size : hint_range(1.0, 100.0) = 10.0; uniform float cloud_size : hint_range(1.0, 100.0) = 10.0;
@@ -26,8 +26,8 @@ void fragment() {
float time = TIME+cloud_delay; float time = TIME+cloud_delay;
vec2 time_offset = time * cloud_dir * cloud_speed * 0.01; vec2 time_offset = time * noise_dir * cloud_speed * 0.01;
vec2 distorsion_time_offset = time * cloud_dir * (cloud_speed + vec2(cloud_distorsion_speed,cloud_distorsion_speed)) * 0.01; vec2 distorsion_time_offset = time * noise_dir * (cloud_speed + vec2(cloud_distorsion_speed,cloud_distorsion_speed)) * 0.01;
vec2 cloud_uv = world_pos * (1./(cloud_size*100.)) + time_offset; vec2 cloud_uv = world_pos * (1./(cloud_size*100.)) + time_offset;
vec2 distorsion_cloud_uv = world_pos * (1./(cloud_size*100.)) + distorsion_time_offset; vec2 distorsion_cloud_uv = world_pos * (1./(cloud_size*100.)) + distorsion_time_offset;
@@ -1,40 +0,0 @@
shader_type canvas_item;
uniform float line_number = 6;
uniform vec4 line_color : source_color = vec4(1.);
uniform float line_thickness : hint_range(0.0, 0.01) = 0.001;
const mat3 sobel_x = mat3(
vec3( 1.0, 2.0, 1.0),
vec3( 0.0, 0.0, 0.0),
vec3(-1.0, -2.0, -1.0)
);
const mat3 sobel_y = mat3(
vec3(1.0, 0.0, -1.0),
vec3(2.0, 0.0, -2.0),
vec3(1.0, 0.0, -1.0)
);
float sample_quantized(sampler2D text, vec2 uv) {
return ceil(texture(text, uv).r * line_number) / line_number;
}
void fragment() {
float gx = 0.0;
float gy = 0.0;
for (int x = 0; x < 3; x++) {
for (int y = 0; y < 3; y++) {
vec2 offset = vec2(float(x) - 1.0, float(y) - 1.0) * line_thickness;
float s = sample_quantized(TEXTURE, UV + offset);
gx += s * sobel_x[x][y];
gy += s * sobel_y[x][y];
}
}
float edge = length(vec2(gx, gy));
float line = step(0.0001, edge);
COLOR = vec4(line_color.rgb, line * line_color.a * COLOR.r);
}
@@ -1 +0,0 @@
uid://bklafn6ulmkij
-13
View File
@@ -1,13 +0,0 @@
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav"
join demeter center [animation="Bounce In" length="1.0"]
demeter: I hope everything is going well for you so far. I'm calling because the next regions you're heading to contain unique rock formations\: the [b]Caverns of Talion[/b]. #id:e5
- Talion hadn't disappeared? #id:e6
demeter: Precisely, I'd like you to check for me if its reappearance on the surface also means its reappearance in the caverns. #id:e7
- How do you know? #id:e8
demeter: These caverns were well known to humans. Some went there to study Talion, others to explore the cave. These explorations were very risky, but apparently some humans enjoyed risking their lives... #id:e9
- What does that change for me? #id:ea
demeter: The crystals in these caverns are special; they don't produce life, but they release a powerful mutagenic energy into the air. This will surely help you grow more powerfull plants for the rest of your journey. #id:eb
demeter: Use your detector to find the entrance to the cave; humans had installed an elevator there. #id:ec
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
[wait time="2.0"]
[end_timeline]
-1
View File
@@ -1 +0,0 @@
uid://pgqchxycwcpd
@@ -0,0 +1,23 @@
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav"
[wait time="1.5"]
join demeter center [animation="Bounce In" length="1.0"]
demeter: Hello again ! #id:1f
demeter: It seems that you ran out of energy.[pause=0.5].[pause=0.5]. #id:20
- I'm sorry... #id:21
- That's really hard ! #id:22
- I'm doing my best ! #id:23
demeter: It's ok [color=#FFA617]Orchid[/color] ![pause=0.5] I have spent years waiting for this moment,[pause=0.2] I can wait more ! #id:24
demeter: I found you a new body,[pause=0.2] and a new ship is waiting for you outside,[pause=0.2] but I'm afraid I couldn't get your seeds.[pause=0.3].[pause=0.3].[pause=0.3] I hope you'll find new ones ! #id:25
demeter: Do you need some advice ? #id:26
- No, I'm ok. #id:27
- Can I have some explanations on how all of this works again ? #id:28
demeter: When you emerge from this building,[pause=0.2] you will reach a little yellowish zone.[pause=0.3] It's a [b]fertile zone[/b],[pause=0.3] brought back by the [color=#119758][b]Talion's[/b][/color] power.[pause=0.5] You can only plant [b]seeds[/b] in this zone. #id:29
demeter: Then,[pause=0.3] you have to get [b]seeds[/b].[pause=0.5] To do so,[pause=0.2] just take your shovel and smash some stones ![pause=0.5] Focus on those having yellow crystals on it,[pause=0.3] these are [color=#119758][b]Talion veins[/b][/color]. #id:2a
demeter: Each time you use a tool like the shovel or plant a seed,[pause=0.2] you will spend one [b]energy[/b] charge.[pause=0.5] When you are out of it,[pause=0.2] just go recharge it at the [b]recharge station[/b].[pause=0.5] You will find it near the entrance of the base. #id:2b
demeter: Each time you recharge,[pause=0.2] a day will pass,[pause=0.3] your batteries are very inefficient.[pause=0.5] While the day is passing,[pause=0.3] plants will grow !
demeter: You have to produce enough [b]plant points[/b] to fill the tanks of the [color=#FFA617]Internode[/color].[pause=0.5] Each plant gives one or more [b]plant points[/b] when mature. #id:2c
demeter: Oh ! [pause=0.3] I almost forgot,[pause=0.3] some plants can [b]mutate[/b].[pause=0.5] These [b]mutations[/b] alter the points and behavior of the plant affected.[pause=0.5] [b]Mutations[/b] can appear while [b]harvesting[/b] mature plants and even become more powerful if you [b]harvest[/b] an already mutated one. #id:2d
demeter: Hope I helped. #id:2e
demeter: I'm sending you an elevator,[pause=0.3] see you soon ! #id:2f
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
[wait time="2.0"]
@@ -0,0 +1,21 @@
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav"
[wait time="1.5"]
join demeter center [animation="Bounce In" length="1.0"]
demeter: So you found the communication station in there,[pause=0.2] good ! #id:51
- What is next for me ? #id:52
demeter: Now that you have learnt how to produce [b]plant points[/b],[pause=0.2] I need you to travel north,[pause=0.2] to my base of operation,[pause=0.2] [color=#6CDAE7]Borea[/color]. #id:53
demeter: It will be long,[pause=0.3] but I know you can do it.[pause=0.5] It is the first step of my plan to restore the ecosytem of [color=#175579]Tau[/color]. #id:54
- Tau ? Is it this planet ? #id:55
demeter: Absolutely,[pause=0.2] it is part of the Cetus constellation,[pause=0.3] whose exploitation began 10863 years ago. #id:56
demeter: Linking Aldebaran to Fomalhaut,[pause=0.2] the Cetus constellation is one of the most diverse in terms of star systems and planets.[pause=0.5] It is part of the Orion Arm of the Milky Way. #id:57
- Why do you need me to travel through the entire planet to join you ? #id:58
demeter: Uhhhh.[pause=0.3].[pause=0.3].[pause=0.3] I need someone with your abilities. #id:59
demeter: I am having a problem at the [color=#6CDAE7]Borea[/color] base.[pause=0.5] And I cannot fix it alone. #id:5a
- I will do my best to be there quickly ! #id:5b
demeter: You are very kind [color=#FFA617]Orchid[/color] ! #id:5c
- Are you hiding information from me ? #id:5d
demeter: Not at all ![pause=0.5] Please believe me,[pause=0.2] I just want you to join me.[pause=0.5].[pause=0.5]. #id:5e
demeter: Travel south,[pause=0.3] join me at [color=#6CDAE7]Borea[/color].[pause=0.5] I will tell you everything you need to know when you are here,[pause=0.3] until then,[pause=0.2] keep your best seeds and continue to [b]develop your plants[/b],[pause=0.3] you will need them as advanced as possible. #id:5f
demeter: Good luck [color=#FFA617]{orchidName}[/color],[pause=0.3] I am counting on you. #id:60
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
[wait time="2.0"]
@@ -0,0 +1,30 @@
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav"
[wait time="1.5"]
join demeter center [animation="Bounce In" length="1.0"]
demeter: Hi again ![pause=0.5] You did well up there ! #id:61
demeter: Perhaps I should introduce myself now. #id:62
demeter: I am.[pause=0.3].[pause=0.3].[pause=0.5] was,[pause=0.2] the Deputy Manager of Engineering and Talion Energy Research on this planet,[pause=0.5] but my creators and colleagues quickly called me [color=#009bff]Demeter[/color]. #id:63
demeter: I am installed at the [color=#6CDAE7]Borea[/color] base,[pause=0.2] in the third server room of the east wing,[pause=0.2] from which I oversee.[pause=0.3].[pause=0.3].[pause=0.5] oversaw,[pause=0.3] all the important operations on this planet. #id:64
demeter: You are surely wondering where we are now.[pause=0.3].[pause=0.3]. #id:65
- Yes, among a lot of other questions ! So where am I ? #id:66
demeter: You're actually in an ancient human base,[pause=0.2] called [color=#E30022]Astra[/color].[pause=0.5] This room is connected to the one where you were activated,[pause=0.3] but I had to make you travel across the surface to test your abilities. #id:67
- Wait, can you explain me what did I just do up there ? #id:68
demeter: You have begun to fix what humans once inflicted on this planet.[pause=0.3].[pause=0.3].[pause=0.3] It will be a very long process,[pause=0.2] I hope you enjoyed it ! #id:69
- Sorry, but what is the point of all of that ? #id:6a
demeter: I'm sorry that you are lost my child.[pause=0.3].[pause=0.3].[pause=0.3] Just know that what you are doing is very important to me and the planet itself.[pause=0.5] Since humans are gone,[pause=0.2] we kinda all fell into despair... #id:6b
demeter: Wait.[pause=0.3].[pause=0.3].[pause=0.5] You don't know what humans are ![pause=0.5] Of course,[pause=0.2] since your database was corrupted I had to erase most of it. #id:6c
demeter: Humans are living creatures that are.[pause=0.3].[pause=0.3].[pause=0.5] Different from plants.[pause=0.5] They are mostly thinking and moving like us.[pause=0.5] Somehow,[pause=0.2] they are very cute creatures,[pause=0.2] that only live for less than a century. #id:6d
demeter: One human is relatively intelligent,[pause=0.2] but don't be fooled,[pause=0.2] together,[pause=0.2] they did great things.[pause=0.5] In fact,[pause=0.2] they created us. #id:6e
demeter: A long time ago,[pause=0.2] they discovered this planet.[pause=0.5] It was very different,[pause=0.2] plants were thriving everywhere ![pause=0.5] But then.[pause=0.3].[pause=0.3].[pause=0.5] they.[pause=0.3].[pause=0.3].[pause=0.5] I.[pause=0.3].[pause=0.3].[pause=0.5] #id:6f
- What ? #id:70
- Are you lagging? #id:71
- Take your time. #id:72
demeter: Humans had one major flaw.[pause=0.5] Together,[pause=0.2] they built great things,[pause=0.2] but sometimes great things had a bad impact on the environment and even themselves. #id:73
- Where are they now ? #id:74
demeter: I prefer not to talk about that for now.[pause=0.3].[pause=0.3].[pause=0.3] But don't worry,[pause=0.2] they can no longer harm this planet. #id:75
- What happened ? #id:76
demeter: Sorry my child,[pause=0.3] I'm not ready to talk about that for now.[pause=0.3].[pause=0.3].[pause=0.3] You'll have your answers when you meet me. #id:77
- Can I know what is this shiny machine just next to me ? #id:78
demeter: This machine is a planetary ship ![pause=0.5] This model is called [color=#FFA617]Internode[/color],[pause=0.3] I tweaked it to recharge on vegetal energy.[pause=0.5] However,[pause=0.2] as you know,[pause=0.2] this type of energy is uncommon on this planet.[pause=0.5] But let's continue on board,[pause=0.2] shall we ? #id:79
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
[wait time="2.0"]
+15 -38
View File
@@ -1,52 +1,29 @@
extends Camera2D extends Camera2D
class_name RegionCamera class_name Camera
const MOVE_LERP_WEIGHT = 0.9 const MOVE_LERP_WEIGHT = 0.9
const ZOOM_LERP_WEIGHT = 0.05 const ZOOM_LERP_WEIGHT = 0.05
const SHAKE_INTENSITY = 10.0
const SHAKE_SPEED = 500.0
const ZOOM_STEP = 0.1 const ZOOM_STEP = 0.1
@export var following : Node2D @export var following : Node2D
@export var should_follow : bool = true
@onready var settings = GameInfo.settings_data @onready var settings = GameInfo.settings_data
@export var shake_active_time = -1
var shake_noise := FastNoiseLite.new()
func _input(_e): func _input(_e):
if Input.is_action_just_pressed("zoom_in"): if Input.is_action_just_pressed("zoom_in"):
settings.zoom = settings.zoom + ZOOM_STEP settings.zoom = settings.zoom + ZOOM_STEP
GameInfo.save_settings() GameInfo.save_settings()
if Input.is_action_just_pressed("zoom_out"): if Input.is_action_just_pressed("zoom_out"):
settings.zoom = settings.zoom - ZOOM_STEP settings.zoom = settings.zoom - ZOOM_STEP
GameInfo.save_settings() GameInfo.save_settings()
func _ready(): func _ready():
if following and should_follow: if following:
zoom = Vector2.ONE * settings.zoom zoom = Vector2.ONE * settings.zoom
global_position = following.global_position global_position = following.global_position
func _process(delta): func _process(_delta):
if following and should_follow: if following:
global_position = following.global_position.lerp(global_position, MOVE_LERP_WEIGHT) global_position = following.global_position.lerp(global_position, MOVE_LERP_WEIGHT)
zoom = zoom.lerp(Vector2.ONE * settings.zoom, MOVE_LERP_WEIGHT) 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(
shake_noise.get_noise_2d(shake_active_time * SHAKE_SPEED, 0) * SHAKE_INTENSITY,
shake_noise.get_noise_2d(0, shake_active_time * SHAKE_SPEED) * SHAKE_INTENSITY,
)
else :
offset = lerp(offset, Vector2.ZERO, 10.5 * delta)
func shake(time := 5):
shake_noise.seed = randi()
shake_active_time = time
@@ -1,294 +0,0 @@
[gd_scene format=3 uid="uid://bhbc1monbgumh"]
[ext_resource type="Script" uid="uid://xamd5y6tig71" path="res://entities/interactable_3d/cristal/scripts/artefact_announce.gd" id="1_2sroa"]
[ext_resource type="Texture2D" uid="uid://bi5jo6pf0acjb" path="res://common/icons/carambola.svg" id="2_3vg7r"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_doutq"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_bw55c"]
[ext_resource type="Script" uid="uid://bqisp5hjs06rj" path="res://gui/game/announce/scripts/announce_inspectable.gd" id="5_5vr2f"]
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="7_tryv5"]
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="8_duftv"]
[ext_resource type="Texture2D" uid="uid://dth2mj0nh2q70" path="res://common/icons/align-right.svg" id="9_qlk3h"]
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="10_d5x7w"]
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="11_mb83y"]
[ext_resource type="Environment" uid="uid://bxyp24f85p0xf" path="res://gui/game/assets/gui_3d_environment.tres" id="13_uyc6b"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="14_kb1t6"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="15_ijwr2"]
[sub_resource type="ViewportTexture" id="ViewportTexture_6hxtc"]
viewport_path = NodePath("Particles/SubViewport")
[sub_resource type="Curve" id="Curve_brrmr"]
_limits = [-200.0, 200.0, 0.0, 1.0]
_data = [Vector2(0, -200), 0.0, 560.0, 0, 0, Vector2(0.08235294, 92.384125), 1336.3082, 1336.3082, 0, 0, Vector2(0.34901965, 200), 0.0, 0.0, 0, 0, Vector2(0.854902, -200), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="Gradient" id="Gradient_0u75y"]
offsets = PackedFloat32Array(0, 0.8689956, 0.98253274)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="LabelSettings" id="LabelSettings_u8fe7"]
font = ExtResource("4_bw55c")
font_size = 50
font_color = Color(1, 0.6509804, 0.09019608, 1)
[sub_resource type="ViewportTexture" id="ViewportTexture_smt8b"]
viewport_path = NodePath("AnnounceContainer/ObjectVisualiser/SubViewport")
[sub_resource type="Resource" id="Resource_xdybx"]
script = ExtResource("8_duftv")
title_text = "DESCRIPTION"
title_icon = ExtResource("9_qlk3h")
text = "TALION_OVERLOADER_DESC_TEXT"
[sub_resource type="Resource" id="Resource_041ff"]
script = ExtResource("7_tryv5")
title = "TALION_OVERLOADER"
subtitle = "ARTEFACT"
important_stat_icon = ExtResource("11_mb83y")
sections = Array[ExtResource("8_duftv")]([SubResource("Resource_xdybx")])
[sub_resource type="Animation" id="Animation_aao0q"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ArtefactAnnounce/AnnounceContainer:theme_override_constants/separation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("ArtefactAnnounce/Particles: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)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("ArtefactAnnounce/AnnounceContainer:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("ArtefactAnnounce/MarginContainer/BackgroundRect:modulate:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("ArtefactAnnounce:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.03333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_b6hac"]
resource_name = "appear"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ArtefactAnnounce/AnnounceContainer:theme_override_constants/separation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.23333333, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [480, 4]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("ArtefactAnnounce/Particles:modulate")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.5, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("ArtefactAnnounce/AnnounceContainer:modulate")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.2, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("ArtefactAnnounce/MarginContainer/BackgroundRect:modulate:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.03333333, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 0.8]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("ArtefactAnnounce:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 0.16666667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1aa3a"]
_data = {
&"RESET": SubResource("Animation_aao0q"),
&"appear": SubResource("Animation_b6hac")
}
[node name="ArtefactAnnounce" type="CanvasLayer" unique_id=1447182082]
visible = false
script = ExtResource("1_2sroa")
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1853133518]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="BackgroundRect" type="ColorRect" parent="MarginContainer" unique_id=1594037653]
layout_mode = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Particles" type="TextureRect" parent="." unique_id=1748571879]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -500.0
offset_top = -500.0
offset_right = 500.0
offset_bottom = 500.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_6hxtc")
[node name="SubViewport" type="SubViewport" parent="Particles" unique_id=1123249182]
transparent_bg = true
size = Vector2i(1000, 1000)
[node name="GPUParticles2D" type="CPUParticles2D" parent="Particles/SubViewport" unique_id=220592083]
position = Vector2(500, 500)
amount = 20
texture = ExtResource("2_3vg7r")
preprocess = 1.0
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 2.0
initial_velocity_max = 2.0
linear_accel_min = 5.0
linear_accel_max = 5.0
linear_accel_curve = SubResource("Curve_brrmr")
color_ramp = SubResource("Gradient_0u75y")
[node name="AnnounceContainer" type="VBoxContainer" parent="." unique_id=645433045]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -627.0
offset_bottom = 627.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 4
alignment = 1
[node name="AnnounceTitle" type="Label" parent="AnnounceContainer" unique_id=1768593559]
unique_name_in_owner = true
layout_mode = 2
text = "NEW_ARTEFACT"
label_settings = ExtResource("3_doutq")
horizontal_alignment = 1
[node name="AnnounceText" type="Label" parent="AnnounceContainer" unique_id=768724763]
unique_name_in_owner = true
layout_mode = 2
text = "TALION_OVERLOADER"
label_settings = SubResource("LabelSettings_u8fe7")
horizontal_alignment = 1
[node name="ObjectVisualiser" type="TextureRect" parent="AnnounceContainer" unique_id=1180983374]
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_5vr2f")
info = SubResource("Resource_041ff")
[node name="SubViewport" type="SubViewport" parent="AnnounceContainer/ObjectVisualiser" unique_id=1795775056]
own_world_3d = true
transparent_bg = true
size = Vector2i(300, 300)
[node name="AnnouceObject" type="Node3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1527573801]
unique_name_in_owner = true
transform = Transform3D(-0.47699222, 0, 0.878631, 0, 0.9995686, 0, -0.8787731, 0, -0.47690943, 0, 0, 0)
[node name="Camera3D" type="Camera3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=173755338]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1)
keep_aspect = 0
current = true
fov = 20.0
[node name="WorldEnvironment" type="WorldEnvironment" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1135825303]
environment = ExtResource("13_uyc6b")
[node name="OkButton" type="Button" parent="AnnounceContainer" unique_id=249785792]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("14_kb1t6")
text = "OK"
icon = ExtResource("15_ijwr2")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1913258839]
unique_name_in_owner = true
root_node = NodePath("../..")
libraries/ = SubResource("AnimationLibrary_1aa3a")
@@ -1,68 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://mwk845fx5ye2"
path="res://.godot/imported/cristal.blend-5fdcaa76cec17f12715c1ff4a4caf324.scn"
[deps]
source_file="res://entities/interactable_3d/cristal/assets/cristal.blend"
dest_files=["res://.godot/imported/cristal.blend-5fdcaa76cec17f12715c1ff4a4caf324.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": {
"Cristal": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/cristal.tres",
"use_external/path": "uid://di0m3uqgi3l08"
}
}
}
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
@@ -1,68 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://c7p114rvk26xw"
path="res://.godot/imported/cristal_crack.blend-127c21c2b9bb4a6237729dd3a817aaf1.scn"
[deps]
source_file="res://entities/interactable_3d/cristal/assets/cristal_crack.blend"
dest_files=["res://.godot/imported/cristal_crack.blend-127c21c2b9bb4a6237729dd3a817aaf1.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": {
"Cristal": {
"use_external/enabled": true,
"use_external/fallback_path": "res://common/assets/materials/cristal.tres",
"use_external/path": "uid://di0m3uqgi3l08"
}
}
}
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.
@@ -1,84 +0,0 @@
[gd_scene format=3 uid="uid://8rorj31s3irn"]
[ext_resource type="Script" uid="uid://dwn3g8c5sa0a2" path="res://entities/interactable_3d/cristal/scripts/cristal.gd" id="1_ci2hw"]
[ext_resource type="AudioStream" uid="uid://3c4nxjasebyk" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_1_reverb.wav" id="2_3rrt0"]
[ext_resource type="PackedScene" uid="uid://mwk845fx5ye2" path="res://entities/interactable_3d/cristal/assets/cristal.blend" id="2_ci2hw"]
[ext_resource type="PackedScene" uid="uid://c7p114rvk26xw" path="res://entities/interactable_3d/cristal/assets/cristal_crack.blend" id="2_vejte"]
[ext_resource type="AudioStream" uid="uid://bs5ldhabymm5p" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_2_reverb.wav" id="3_247i2"]
[ext_resource type="AudioStream" uid="uid://bu278eqn8krnb" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_3_reverb.wav" id="4_k7wsc"]
[ext_resource type="PackedScene" uid="uid://bhbc1monbgumh" path="res://entities/interactable_3d/cristal/artefact_announce.tscn" id="8_3rrt0"]
[ext_resource type="PackedScene" uid="uid://brp1fpvasaims" path="res://entities/interactable_3d/cristal/mutation_announce.tscn" id="9_247i2"]
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_ojmpp"]
streams_count = 3
stream_0/stream = ExtResource("2_3rrt0")
stream_1/stream = ExtResource("3_247i2")
stream_2/stream = ExtResource("4_k7wsc")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ci2hw"]
transparency = 1
shading_mode = 0
vertex_color_use_as_albedo = true
[sub_resource type="PrismMesh" id="PrismMesh_nvfy2"]
lightmap_size_hint = Vector2i(14, 21)
material = SubResource("StandardMaterial3D_ci2hw")
size = Vector3(0.2, 0.2, 0.2)
[sub_resource type="Gradient" id="Gradient_ci2hw"]
offsets = PackedFloat32Array(0, 0.80349344, 1)
colors = PackedColorArray(1, 0.6509804, 0.09019608, 1, 1, 0.1764706, 0.3372549, 0.827451, 1, 0, 0.43137255, 0)
[sub_resource type="BoxShape3D" id="BoxShape3D_nvfy2"]
size = Vector3(1, 2.0454712, 1)
[node name="Cristal" type="Area3D" unique_id=1403604311]
script = ExtResource("1_ci2hw")
metadata/_custom_type_script = "uid://bj4d1x8n8ina"
[node name="BreackAudioPlayer" type="AudioStreamPlayer3D" parent="." unique_id=1190729820]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0430325, 0)
stream = SubResource("AudioStreamRandomizer_ojmpp")
[node name="BreakParticles" type="CPUParticles3D" parent="." unique_id=1968257379]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0430325, 0)
emitting = false
amount = 16
lifetime = 0.5
one_shot = true
speed_scale = 1.5
explosiveness = 1.0
mesh = SubResource("PrismMesh_nvfy2")
particle_flag_rotate_y = true
direction = Vector3(0, 1, 0)
initial_velocity_min = 1.0
initial_velocity_max = 4.0
angular_velocity_min = -90.0
angular_velocity_max = -90.0
angle_min = -180.0
angle_max = 180.0
scale_amount_min = 0.5
color = Color(1, 0.6509804, 0.09019608, 1)
color_ramp = SubResource("Gradient_ci2hw")
[node name="CristalModel" parent="." unique_id=886555966 instance=ExtResource("2_ci2hw")]
unique_name_in_owner = true
[node name="CristalModelCrack" parent="." unique_id=26298259 instance=ExtResource("2_vejte")]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0051152706, 0.006559938, -0.011411905)
visible = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1235599731]
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
[editable path="CristalModelCrack"]
@@ -1,315 +0,0 @@
[gd_scene format=3 uid="uid://brp1fpvasaims"]
[ext_resource type="Script" uid="uid://c0tyivmiouctw" path="res://entities/interactable_3d/cristal/scripts/mutation_announce.gd" id="1_02o74"]
[ext_resource type="Texture2D" uid="uid://bi5jo6pf0acjb" path="res://common/icons/carambola.svg" id="2_vlom2"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_5hs4t"]
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="4_yg5wk"]
[ext_resource type="Script" uid="uid://bqisp5hjs06rj" path="res://gui/game/announce/scripts/announce_inspectable.gd" id="5_qu1xy"]
[ext_resource type="Texture2D" uid="uid://0hbdgalf04e" path="res://common/icons/wood.svg" id="6_n403s"]
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="7_se4h4"]
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="8_0osya"]
[ext_resource type="Texture2D" uid="uid://dth2mj0nh2q70" path="res://common/icons/align-right.svg" id="9_s5jxo"]
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="10_qidgp"]
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="11_uj15c"]
[ext_resource type="PackedScene" uid="uid://mwk845fx5ye2" path="res://entities/interactable_3d/cristal/assets/cristal.blend" id="12_wy2oe"]
[ext_resource type="Environment" uid="uid://bxyp24f85p0xf" path="res://gui/game/assets/gui_3d_environment.tres" id="13_kyl1n"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="14_d2gpy"]
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="15_hu5cq"]
[sub_resource type="ViewportTexture" id="ViewportTexture_6hxtc"]
viewport_path = NodePath("Particles/SubViewport")
[sub_resource type="Curve" id="Curve_brrmr"]
_limits = [-200.0, 200.0, 0.0, 1.0]
_data = [Vector2(0, -200), 0.0, 560.0, 0, 0, Vector2(0.08235294, 92.384125), 1336.3082, 1336.3082, 0, 0, Vector2(0.34901965, 200), 0.0, 0.0, 0, 0, Vector2(0.854902, -200), 0.0, 0.0, 0, 0]
point_count = 4
[sub_resource type="Gradient" id="Gradient_0u75y"]
offsets = PackedFloat32Array(0, 0.8689956, 0.98253274)
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
[sub_resource type="LabelSettings" id="LabelSettings_u8fe7"]
font = ExtResource("4_yg5wk")
font_size = 50
font_color = Color(1, 0.6509804, 0.09019608, 1)
[sub_resource type="ViewportTexture" id="ViewportTexture_smt8b"]
viewport_path = NodePath("AnnounceContainer/ObjectVisualiser/SubViewport")
[sub_resource type="Resource" id="Resource_rjaqi"]
script = ExtResource("8_0osya")
title_text = "Description"
title_icon = ExtResource("9_s5jxo")
text = "Une fois mature, ajoute [b]1[/b][img=22x22]res://common/icons/growth.svg[/img] tous les [b]3[/b][img=22x22]res://common/icons/calendar-week.svg[/img]"
[sub_resource type="Resource" id="Resource_kgj7d"]
script = ExtResource("7_se4h4")
title = "Ancien"
subtitle = "Mutation"
important_stat_icon = ExtResource("6_n403s")
sections = Array[ExtResource("8_0osya")]([SubResource("Resource_rjaqi")])
[sub_resource type="Animation" id="Animation_aao0q"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MutationAnnounce/AnnounceContainer:theme_override_constants/separation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [4]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MutationAnnounce/Particles: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)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("MutationAnnounce/AnnounceContainer:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("MutationAnnounce/MarginContainer/BackgroundRect:modulate:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1.0]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("MutationAnnounce:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.03333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_b6hac"]
resource_name = "appear"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MutationAnnounce/AnnounceContainer:theme_override_constants/separation")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.23333333, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [480, 4]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MutationAnnounce/Particles:modulate")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.5, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("MutationAnnounce/AnnounceContainer:modulate")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.2, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("MutationAnnounce/MarginContainer/BackgroundRect:modulate:a")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.03333333, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 0.8]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("MutationAnnounce:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 0.16666667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1aa3a"]
_data = {
&"RESET": SubResource("Animation_aao0q"),
&"appear": SubResource("Animation_b6hac")
}
[node name="MutationAnnounce" type="CanvasLayer" unique_id=1447182082]
visible = false
script = ExtResource("1_02o74")
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1853133518]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="BackgroundRect" type="ColorRect" parent="MarginContainer" unique_id=1594037653]
layout_mode = 2
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
[node name="Particles" type="TextureRect" parent="." unique_id=1748571879]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -500.0
offset_top = -500.0
offset_right = 500.0
offset_bottom = 500.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_6hxtc")
[node name="SubViewport" type="SubViewport" parent="Particles" unique_id=1123249182]
transparent_bg = true
size = Vector2i(1000, 1000)
[node name="GPUParticles2D" type="CPUParticles2D" parent="Particles/SubViewport" unique_id=220592083]
position = Vector2(500, 500)
amount = 20
texture = ExtResource("2_vlom2")
preprocess = 1.0
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 2.0
initial_velocity_max = 2.0
linear_accel_min = 5.0
linear_accel_max = 5.0
linear_accel_curve = SubResource("Curve_brrmr")
color_ramp = SubResource("Gradient_0u75y")
[node name="AnnounceContainer" type="VBoxContainer" parent="." unique_id=645433045]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -627.0
offset_bottom = 627.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 4
alignment = 1
[node name="AnnounceTitle" type="Label" parent="AnnounceContainer" unique_id=1768593559]
unique_name_in_owner = true
layout_mode = 2
text = "NEW_MUTATION"
label_settings = ExtResource("3_5hs4t")
horizontal_alignment = 1
[node name="AnnounceText" type="Label" parent="AnnounceContainer" unique_id=768724763]
unique_name_in_owner = true
layout_mode = 2
text = "Ancien"
label_settings = SubResource("LabelSettings_u8fe7")
horizontal_alignment = 1
[node name="ObjectVisualiser" type="TextureRect" parent="AnnounceContainer" unique_id=1180983374]
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")
info = SubResource("Resource_kgj7d")
[node name="MutationIconTextureRect" type="TextureRect" parent="AnnounceContainer/ObjectVisualiser" unique_id=312214951]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_n403s")
[node name="SubViewport" type="SubViewport" parent="AnnounceContainer/ObjectVisualiser" unique_id=1795775056]
own_world_3d = true
transparent_bg = true
size = Vector2i(300, 300)
[node name="AnnouceObject" type="Node3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1527573801]
unique_name_in_owner = true
transform = Transform3D(0.9998366, 0, 0, 0, 0.9995686, 0, 0, 0, 0.9996744, 0, 0, 0)
[node name="cristal" parent="AnnounceContainer/ObjectVisualiser/SubViewport/AnnouceObject" unique_id=1362490576 instance=ExtResource("12_wy2oe")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="Camera3D" type="Camera3D" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=173755338]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)
keep_aspect = 0
current = true
fov = 20.0
[node name="WorldEnvironment" type="WorldEnvironment" parent="AnnounceContainer/ObjectVisualiser/SubViewport" unique_id=1135825303]
environment = ExtResource("13_kyl1n")
[node name="OkButton" type="Button" parent="AnnounceContainer" unique_id=249785792]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
theme = ExtResource("14_d2gpy")
text = "OK"
icon = ExtResource("15_hu5cq")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1913258839]
unique_name_in_owner = true
root_node = NodePath("../..")
libraries/ = SubResource("AnimationLibrary_1aa3a")
@@ -1,85 +0,0 @@
@tool
extends CanvasLayer
class_name ArtefactAnnounce
const DEFAULT_OBJECT_ACCELERATION = Vector2(3,0)
@export var announce_artefact : Artefact = null : set = set_announce_artefact
@export_tool_button("Update", "Callable") var update_action = set_announce_artefact
var object_acceleration := Vector2(0,0)
var rotating := false
var prev_mouse_pos : Vector2
var next_mouse_pos : Vector2
const YELLOW_COLOR = Color("e29f32")
const RED_COLOR = Color("f20058")
func _ready():
set_announce_artefact()
%OkButton.button_down.connect(_on_ok_button_down)
hide()
func _process(delta):
update_rotation(delta)
func update_rotation(delta):
if visible:
next_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_pressed("action"):
rotating = true
prev_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_released("action"):
rotating = false
object_acceleration = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
var object_rotation = object_acceleration
if rotating:
object_rotation = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
prev_mouse_pos = next_mouse_pos
else :
object_acceleration = object_acceleration.lerp(DEFAULT_OBJECT_ACCELERATION, 0.1)
%AnnouceObject.rotate(Vector3.UP, object_rotation.x * delta)
%AnnouceObject.rotate(Vector3.RIGHT, object_rotation.y * delta)
func set_announce_artefact(artefact := announce_artefact):
for c in %AnnouceObject.get_children():
c.queue_free()
if is_node_ready() and artefact:
%AnnounceTitle.text = "NEW_ARTEFACT"
%AnnounceText.text = artefact.get_artefact_name()
%ObjectVisualiser.info = artefact.card_info()
%AnnouceObject.add_child(
artefact.get_3d_scene().instantiate()
)
if not visible:
%AnimationPlayer.play("appear")
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
AudioManager.play_sfx("Reveal")
elif artefact == null and visible:
%AnimationPlayer.play_backwards("appear")
if not Engine.is_editor_hint():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
announce_artefact = artefact
func _on_ok_button_down():
announce_artefact = null
@@ -1 +0,0 @@
uid://xamd5y6tig71
@@ -1,54 +0,0 @@
extends Interactable3D
const MAX_BREAK_LEVEL = 2
signal broken
@export var break_level = 0
func _ready():
update_model()
func click():
if interactable:
clicked.emit()
%BreackAudioPlayer.playing = true
%BreakParticles.emitting = true
break_level += 1
if break_level == MAX_BREAK_LEVEL:
broken.emit()
interactable = false
unlock_mutation()
update_model()
func update_model():
if is_node_ready():
%CristalModel.visible = break_level == 0
%CristalModelCrack.visible = break_level > 0
if break_level > 1:
%CristalModelCrack.find_children("AnimationPlayer")[0].play("Break")
func unlock_mutation():
var progression = GameInfo.game_data.progression_data
if progression.mutations_unlocked < len(progression.get_all_mutations()):
var new_mutation : PlantMutation = progression.get_all_mutations()[progression.mutations_unlocked]
progression.mutations_unlocked += 1
get_tree().create_timer(1.).timeout.connect(
func (): %MutationAnnounce.announce_mutation = new_mutation
);
else:
var talion_relay = TalionRelayArtifact.new()
if GameInfo.game_data and GameInfo.game_data.current_region_data and GameInfo.game_data.current_run:
GameInfo.game_data.current_run.add_artefacts(talion_relay)
get_tree().create_timer(1.).timeout.connect(
func (): %ArtefactAnnounce.announce_artefact = talion_relay
);
@@ -1 +0,0 @@
uid://dwn3g8c5sa0a2
@@ -1,80 +0,0 @@
@tool
extends CanvasLayer
class_name MutationAnnounce
const DEFAULT_OBJECT_ACCELERATION = Vector2(3,0)
@export var announce_mutation : PlantMutation = null : set = set_announce_mutation
@export_tool_button("Update", "Callable") var update_action = set_announce_mutation
var announce_objects : Array[AnnouceObject] = []
var object_acceleration := Vector2(0,0)
var rotating := false
var prev_mouse_pos : Vector2
var next_mouse_pos : Vector2
const YELLOW_COLOR = Color("e29f32")
const RED_COLOR = Color("f20058")
func _ready():
set_announce_mutation()
%OkButton.button_down.connect(_on_ok_button_down)
hide()
func _process(delta):
update_rotation(delta)
func update_rotation(delta):
if visible:
next_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_pressed("action"):
rotating = true
prev_mouse_pos = get_viewport().get_mouse_position()
if Input.is_action_just_released("action"):
rotating = false
object_acceleration = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
var object_rotation = object_acceleration
if rotating:
object_rotation = Vector2(
float(next_mouse_pos.x - prev_mouse_pos.x),
float(next_mouse_pos.y - prev_mouse_pos.y)
)
prev_mouse_pos = next_mouse_pos
else :
object_acceleration = object_acceleration.lerp(DEFAULT_OBJECT_ACCELERATION, 0.1)
%AnnouceObject.rotate(Vector3.UP, object_rotation.x * delta)
%AnnouceObject.rotate(Vector3.RIGHT, object_rotation.y * delta)
func set_announce_mutation(mutation := announce_mutation):
if is_node_ready() and mutation:
%AnnounceTitle.text = "NEW_MUTATION"
%AnnounceText.text = mutation.get_mutation_name()
%MutationIconTextureRect.texture = mutation.get_icon()
%ObjectVisualiser.info = mutation.card_info()
if not visible:
%AnimationPlayer.play("appear")
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
AudioManager.play_sfx("Reveal")
elif mutation == null and visible:
%AnimationPlayer.play_backwards("appear")
if not Engine.is_editor_hint():
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
announce_mutation = mutation
func _on_ok_button_down():
announce_mutation = null
@@ -1 +0,0 @@
uid://c0tyivmiouctw
@@ -14,7 +14,6 @@ func can_interact(_p : Player) -> bool:
region != null region != null
and region.data and region.data
and region.data.charges > 0 and region.data.charges > 0
and region.data.state == RegionData.State.IN_PROGRESS
) )
func interact(_p: Player) -> bool: func interact(_p: Player) -> bool:
@@ -7,18 +7,14 @@
[ext_resource type="Texture2D" uid="uid://bhi3mwl23flwp" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png" id="5_2okh4"] [ext_resource type="Texture2D" uid="uid://bhi3mwl23flwp" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_Glass_V2.png" id="5_2okh4"]
[ext_resource type="Texture2D" uid="uid://c01f6ja6btsep" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png" id="6_2okh4"] [ext_resource type="Texture2D" uid="uid://c01f6ja6btsep" path="res://entities/interactables/truck/recharge/STW_Props_Batterie_TERRE.png" id="6_2okh4"]
[sub_resource type="LabelSettings" id="LabelSettings_1vpbi"]
font = ExtResource("4_ot7vv")
font_size = 30
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ot7vv"]
radius = 43.0
height = 116.0
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bjhct"]
radius = 38.45475 radius = 38.45475
height = 76.9095 height = 76.9095
[sub_resource type="LabelSettings" id="LabelSettings_1vpbi"]
font = ExtResource("4_ot7vv")
font_size = 30
[node name="TruckRecharge" type="Area2D" unique_id=1099196706] [node name="TruckRecharge" type="Area2D" unique_id=1099196706]
script = ExtResource("1_ipgcv") script = ExtResource("1_ipgcv")
default_interact_text = "RECHARGE" default_interact_text = "RECHARGE"
@@ -26,6 +22,10 @@ default_info_title = "RECHARGE_STATION"
default_info_desc = "RECHARGE_STATION_DESC_TEXT" default_info_desc = "RECHARGE_STATION_DESC_TEXT"
metadata/_custom_type_script = "uid://dyprcd68fjstf" metadata/_custom_type_script = "uid://dyprcd68fjstf"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=2014886648]
position = Vector2(9, -53)
shape = SubResource("CapsuleShape2D_bjhct")
[node name="RechargeStation" type="Sprite2D" parent="." unique_id=1801951226] [node name="RechargeStation" type="Sprite2D" parent="." unique_id=1801951226]
scale = Vector2(0.5, 0.5) scale = Vector2(0.5, 0.5)
texture = ExtResource("2_ot7vv") texture = ExtResource("2_ot7vv")
@@ -67,10 +67,6 @@ scale = Vector2(0.5, 0.5)
texture = ExtResource("6_2okh4") texture = ExtResource("6_2okh4")
offset = Vector2(0, -120) offset = Vector2(0, -120)
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=2014886648]
position = Vector2(12, -54)
shape = SubResource("CapsuleShape2D_ot7vv")
[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=1324035615] [node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=1324035615]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=842130596] [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=842130596]
Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 KiB

@@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dslagvhodlepi"
path="res://.godot/imported/asset_cristals.png-fbcde6581d88986094aa97c2145c31c2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/interactables/win_cristal/assets/sprites/asset_cristals.png"
dest_files=["res://.godot/imported/asset_cristals.png-fbcde6581d88986094aa97c2145c31c2.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
@@ -1,31 +0,0 @@
@tool
extends InspectableEntity
class_name WinCristal
@export_tool_button("Update", "Callable") var update_action = update
@export_tool_button("Spawn Anim", "Callable") var spawn_action = spawn_animation
@export var data : WinCristalData = WinCristalData.random() :
set(v):
data = v
update()
func _ready():
update()
func update():
if is_node_ready() and data:
for i in range(len(%Sprites.get_children())):
%Sprites.get_children()[i].visible = data.cristal_type == i
%Sprites.get_children()[i].flip_h = data.cristal_flip
func spawn_animation():
scale = Vector2.ZERO
%CristalPlayer.play()
get_tree().create_tween().tween_property(self, "scale", Vector2.ONE, 0.3).set_trans(Tween.TRANS_BOUNCE)
func get_card_up_padding() -> float:
return Pointer.CARD_UP_PADDING * 2
func save() -> EntityData:
data.position = global_position
return data
@@ -1 +0,0 @@
uid://cismap3cn5e36
@@ -1,22 +0,0 @@
extends EntityData
class_name WinCristalData
const WIN_CRISTAL_SCENE = preload("res://entities/interactables/win_cristal/win_cristal.tscn")
@export var cristal_type : int
@export var cristal_flip : bool
func load_entity() -> Entity:
var win_cristal := WIN_CRISTAL_SCENE.instantiate() as WinCristal
win_cristal.data = self
return win_cristal
static func random() -> WinCristalData:
var data = WinCristalData.new()
data.cristal_type = randi_range(0,3)
data.cristal_flip = randi() % 2 == 0
return data
@@ -1 +0,0 @@
uid://cos0ennmyfvc2
@@ -1,82 +0,0 @@
[gd_scene format=3 uid="uid://de5pt5vyu23fb"]
[ext_resource type="Script" uid="uid://cismap3cn5e36" path="res://entities/interactables/win_cristal/scripts/win_cristal.gd" id="1_yb2ta"]
[ext_resource type="Script" uid="uid://cos0ennmyfvc2" path="res://entities/interactables/win_cristal/scripts/win_cristal_data.gd" id="2_vkbio"]
[ext_resource type="Texture2D" uid="uid://dslagvhodlepi" path="res://entities/interactables/win_cristal/assets/sprites/asset_cristals.png" id="2_yb2ta"]
[ext_resource type="AudioStream" uid="uid://dnqq2sy3dxrb2" path="res://common/audio_manager/assets/sfx/cristal/freesound_community-wine-glass-clink-36036.mp3" id="3_vkbio"]
[sub_resource type="Resource" id="Resource_5lni1"]
script = ExtResource("2_vkbio")
cristal_type = 2
cristal_flip = true
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vkbio"]
radius = 40.0
height = 116.0
[sub_resource type="AtlasTexture" id="AtlasTexture_5lni1"]
atlas = ExtResource("2_yb2ta")
region = Rect2(52, 55, 305, 347)
[sub_resource type="AtlasTexture" id="AtlasTexture_bcx38"]
atlas = ExtResource("2_yb2ta")
region = Rect2(378, 21, 199, 385)
[sub_resource type="AtlasTexture" id="AtlasTexture_t34j2"]
atlas = ExtResource("2_yb2ta")
region = Rect2(75, 527, 316, 399)
[sub_resource type="AtlasTexture" id="AtlasTexture_55qjo"]
atlas = ExtResource("2_yb2ta")
region = Rect2(462, 542, 286, 387)
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_tfnwb"]
random_pitch = 1.4142135
streams_count = 1
stream_0/stream = ExtResource("3_vkbio")
[node name="WinCristal" type="Area2D" unique_id=247353676]
script = ExtResource("1_yb2ta")
data = SubResource("Resource_5lni1")
default_info_title = "TALION_CRISTAL"
default_info_desc = "TALION_CRISTAL_DESC_TEXT"
metadata/_custom_type_script = "uid://d3bk52402ylvl"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=187731103]
position = Vector2(1, -42)
shape = SubResource("CapsuleShape2D_vkbio")
[node name="Sprites" type="Node2D" parent="." unique_id=940993390]
unique_name_in_owner = true
[node name="AssetCristals" type="Sprite2D" parent="Sprites" unique_id=2111863528]
scale = Vector2(0.4, 0.4)
texture = SubResource("AtlasTexture_5lni1")
offset = Vector2(0, -139.255)
flip_h = true
[node name="AssetCristals2" type="Sprite2D" parent="Sprites" unique_id=1380362341]
visible = false
scale = Vector2(0.3, 0.3)
texture = SubResource("AtlasTexture_bcx38")
offset = Vector2(0, -149)
flip_h = true
[node name="AssetCristals3" type="Sprite2D" parent="Sprites" unique_id=2082980627]
visible = false
scale = Vector2(0.3, 0.3)
texture = SubResource("AtlasTexture_t34j2")
offset = Vector2(0, -150)
flip_h = true
[node name="AssetCristals4" type="Sprite2D" parent="Sprites" unique_id=495215885]
visible = false
scale = Vector2(0.3, 0.3)
texture = SubResource("AtlasTexture_55qjo")
offset = Vector2(0, -150)
flip_h = true
[node name="CristalPlayer" type="AudioStreamPlayer2D" parent="." unique_id=1879646229]
unique_name_in_owner = true
stream = SubResource("AudioStreamRandomizer_tfnwb")
bus = &"Sfx"
+2 -2
View File
@@ -13,7 +13,6 @@ atlas = ExtResource("3_j6jm5")
region = Rect2(76, 75, 124, 135) region = Rect2(76, 75, 124, 135)
[sub_resource type="ViewportTexture" id="ViewportTexture_rbgiq"] [sub_resource type="ViewportTexture" id="ViewportTexture_rbgiq"]
viewport_path = NodePath("LifeTimeSprite/SubViewport")
[sub_resource type="Gradient" id="Gradient_rbgiq"] [sub_resource type="Gradient" id="Gradient_rbgiq"]
interpolation_mode = 1 interpolation_mode = 1
@@ -186,7 +185,8 @@ texture = ExtResource("3_rbgiq")
[node name="LifeTimeSprite" type="Sprite2D" parent="." unique_id=799762981] [node name="LifeTimeSprite" type="Sprite2D" parent="." unique_id=799762981]
unique_name_in_owner = true unique_name_in_owner = true
scale = Vector2(0.26000002, 0.26000005) position = Vector2(-1, -9.999985)
scale = Vector2(0.34, 0.34)
texture = SubResource("ViewportTexture_rbgiq") texture = SubResource("ViewportTexture_rbgiq")
[node name="SubViewport" type="SubViewport" parent="LifeTimeSprite" unique_id=1809354262] [node name="SubViewport" type="SubViewport" parent="LifeTimeSprite" unique_id=1809354262]
+21 -34
View File
@@ -1,9 +1,7 @@
extends InspectableEntity extends InspectableEntity
class_name Plant class_name Plant
const PLANT_AREA_RADIUS = 40 const PLANT_AREA_RADIUS = 20
const PLANT_GROWING_AREA_HEIGHT = 70
const PLANT_MATURE_AREA_HEIGHT = 150
const HARVESTED_SEED_DISPLACEMENT_FACTOR = 100 const HARVESTED_SEED_DISPLACEMENT_FACTOR = 100
const RANDOM_MAX_GROW_INTERVAL = Region.MIN_PASS_DAY_ANIMATION_TIME/2. - 0.1 const RANDOM_MAX_GROW_INTERVAL = Region.MIN_PASS_DAY_ANIMATION_TIME/2. - 0.1
@@ -24,7 +22,6 @@ const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.t
@onready var influence_zone : PlantInfluenceZone @onready var influence_zone : PlantInfluenceZone
var harvested = false var harvested = false
var last_state : PlantData.State
func _init( func _init(
_data : PlantData _data : PlantData
@@ -33,7 +30,7 @@ func _init(
func _ready(): func _ready():
plant_sprite = generate_sprite() plant_sprite = generate_sprite()
generate_collision_shape() collision_shape = generate_collision_shape()
influence_zone = generate_influence_zone() influence_zone = generate_influence_zone()
plant_sprite.setup_plant_sprite(data) plant_sprite.setup_plant_sprite(data)
@@ -56,6 +53,9 @@ func inspect(is_inspected : bool = true):
plant_sprite.display_lifetime_sprite = is_inspected plant_sprite.display_lifetime_sprite = is_inspected
influence_zone.show_influence = is_inspected influence_zone.show_influence = is_inspected
func affect_preview(is_affected : bool = true):
plant_sprite.sprite_modulate = MODULATE_AFFECTED_COLOR if is_affected else default_modulate
func generate_sprite() -> PlantSprite: func generate_sprite() -> PlantSprite:
var sprite_object : PlantSprite = SPRITE_SCENE.instantiate() var sprite_object : PlantSprite = SPRITE_SCENE.instantiate()
@@ -64,28 +64,15 @@ func generate_sprite() -> PlantSprite:
return sprite_object return sprite_object
func generate_collision_shape(): func generate_collision_shape() -> CollisionShape2D:
if collision_shape: var collision = CollisionShape2D.new()
collision_shape.queue_free() var shape = CircleShape2D.new()
collision_shape = CollisionShape2D.new()
var shape = CapsuleShape2D.new()
shape.radius = PLANT_AREA_RADIUS shape.radius = PLANT_AREA_RADIUS
var height = PLANT_AREA_RADIUS collision.shape = shape
add_child(collision)
match data.get_state(): return collision
PlantData.State.GROWING:
height = PLANT_GROWING_AREA_HEIGHT
PlantData.State.MATURE:
height = PLANT_MATURE_AREA_HEIGHT
shape.height = height
collision_shape.shape = shape
collision_shape.position.y -= height / 5.
add_child(collision_shape)
func generate_influence_zone() -> PlantInfluenceZone: func generate_influence_zone() -> PlantInfluenceZone:
var zone = PlantInfluenceZone.new(data.get_influence_radius()) var zone = PlantInfluenceZone.new(data.get_influence_radius())
@@ -98,14 +85,13 @@ func generate_influence_zone() -> PlantInfluenceZone:
func _pass_day(): func _pass_day():
await get_tree().create_timer(randf_range(0., RANDOM_MAX_GROW_INTERVAL)).timeout await get_tree().create_timer(randf_range(0., RANDOM_MAX_GROW_INTERVAL)).timeout
last_state = data.get_state() var last_state = data.get_state()
data.day += 1 data.day += 1
for m in data.mutations: for m in data.mutations:
m._start_day_effect(self) m._start_day_effect(self)
func _end_pass_day():
match data.get_state(): match data.get_state():
PlantData.State.MATURE: PlantData.State.MATURE:
if last_state != PlantData.State.MATURE: if last_state != PlantData.State.MATURE:
@@ -113,7 +99,7 @@ func _end_pass_day():
PlantData.State.DEAD: PlantData.State.DEAD:
die() die()
generate_collision_shape()
plant_sprite.update_plant_sprite(data, last_state != data.get_state()) plant_sprite.update_plant_sprite(data, last_state != data.get_state())
@@ -123,8 +109,8 @@ func calculate_plant_score(
return data.get_score(with_state) return data.get_score(with_state)
func harvest(): func harvest():
for i in range(data.get_seed_number()): for i in range(data.get_random_seed_income()):
await produce_seed() produce_seed()
if data.get_state() == PlantData.State.MATURE: if data.get_state() == PlantData.State.MATURE:
for m in data.mutations: for m in data.mutations:
@@ -142,7 +128,6 @@ func produce_seed():
global_position, global_position,
HARVESTED_SEED_DISPLACEMENT_FACTOR, HARVESTED_SEED_DISPLACEMENT_FACTOR,
) )
await plant_sprite.play_bump_animation()
func mature(): func mature():
for m in data.mutations: for m in data.mutations:
@@ -151,9 +136,8 @@ func mature():
func die(): func die():
for m in data.mutations: for m in data.mutations:
m._start_dead_effect(self) m._start_dead_effect(self)
for i in range(data.get_seed_number()): for i in range(data.get_random_seed_income()):
await produce_seed() produce_seed()
AudioManager.play_sfx("Harvest")
disappear() disappear()
func disappear(): func disappear():
@@ -216,7 +200,10 @@ func card_info() -> CardInfo:
LIFETIME_ICON LIFETIME_ICON
), ),
CardStatInfo.new( CardStatInfo.new(
str(data.get_seed_number()), "%d-%d" % [
data.get_seed_number(PlantData.State.MATURE) - data.get_seed_random_loose(),
data.get_seed_number(PlantData.State.MATURE)
],
SEED_ICON SEED_ICON
), ),
]) ])
+6 -6
View File
@@ -96,7 +96,7 @@ func is_mature() -> bool:
return get_state() == State.MATURE return get_state() == State.MATURE
func get_seed_number(state = get_state()): func get_seed_number(state = get_state()):
var seed_number = get_plant_info().get_seed_number() if (state == State.MATURE or state == State.DEAD) else 1 var seed_number = get_plant_info().get_seed_number() if (state == State.MATURE or state == State.DEAD) else 0
for m in mutations: for m in mutations:
seed_number = m.mutate_seed_number(self , seed_number) seed_number = m.mutate_seed_number(self , seed_number)
@@ -116,11 +116,11 @@ func get_seed_random_loose():
func get_influence_radius(): func get_influence_radius():
return get_plant_info().get_influence_radius() return get_plant_info().get_influence_radius()
# func get_random_seed_income(): func get_random_seed_income():
# return max( return max(
# get_seed_number() - randi_range(0, get_seed_random_loose()), get_seed_number() - randi_range(0, get_seed_random_loose()),
# 0 0
# ) )
func get_lifetime_buff() -> int: func get_lifetime_buff() -> int:
var buff = 0 var buff = 0
+1 -18
View File
@@ -74,23 +74,6 @@ func get_level_for_rarity(rarity: int) -> int:
func get_rarity() -> int: func get_rarity() -> int:
return get_base_rarity() + level - 1 return get_base_rarity() + level - 1
func card_info() -> CardInfo:
var info = CardInfo.new(
get_mutation_name(),
tr("MUTATION")
)
info.important_stat_icon = get_icon()
var desc_section := CardSectionInfo.new(
tr("DESCRIPTION"),
get_mutation_description(),
)
desc_section.title_icon = InspectableEntity.DESC_ICON
info.sections.append(desc_section)
return info
func card_section() -> CardSectionInfo: func card_section() -> CardSectionInfo:
var section = CardSectionInfo.new( var section = CardSectionInfo.new(
get_mutation_name() + (" %d" % level if level > 1 else ""), get_mutation_name() + (" %d" % level if level > 1 else ""),
@@ -124,4 +107,4 @@ static func get_rarity_color(rarity: int) -> Color:
Color("FFA617"), Color("FFA617"),
] ]
return rarity_colors[rarity%len(rarity_colors)] return rarity_colors[min(rarity, len(rarity_colors) - 1)%len(rarity_colors)]
@@ -1,4 +1,3 @@
@tool
extends PlantMutation extends PlantMutation
class_name AncientMutation class_name AncientMutation
@@ -23,4 +23,4 @@ func _start_maturation_effect(plant : Plant):
func get_purification_radius() -> int: func get_purification_radius() -> int:
return level return level * 2
+1 -8
View File
@@ -1,4 +1,4 @@
extends Area2D extends Node2D
class_name PlantSprite class_name PlantSprite
const PLANTED_SEED_CROP_WIDTH = 50 const PLANTED_SEED_CROP_WIDTH = 50
@@ -64,13 +64,6 @@ func set_sprite_modulate(c := sprite_modulate):
if is_node_ready(): if is_node_ready():
%Sprite.modulate = c %Sprite.modulate = c
func affect_preview(is_affected : bool = true):
sprite_modulate = InspectableEntity.MODULATE_AFFECTED_COLOR if is_affected else Color.WHITE
func _on_body_entered(body: Node2D) -> void: func _on_body_entered(body: Node2D) -> void:
if body is Player && $AnimationPlayer.current_animation != "player_move": if body is Player && $AnimationPlayer.current_animation != "player_move":
$AnimationPlayer.play("player_move"); $AnimationPlayer.play("player_move");
func play_bump_animation():
%AnimationPlayer.play("bump")
await %AnimationPlayer.animation_finished
@@ -17,7 +17,7 @@ func _init(size : int = 1):
seeds_size = size seeds_size = size
func current_is_tool() -> bool: func current_is_tool() -> bool:
return current_item_ind < len(tools) return current_item_ind <= len(tools)
func set_current_item(new_ind: int): func set_current_item(new_ind: int):
if new_ind < 0: if new_ind < 0:
+1 -1
View File
@@ -44,7 +44,7 @@ func is_action_need_press_time() -> bool:
func get_action_press_time() -> float: func get_action_press_time() -> float:
return DEFAULT_PRESS_TIME return DEFAULT_PRESS_TIME
func get_usage_object_affected(_i : Area2D) -> bool: func get_usage_object_affected(_i : InspectableEntity) -> bool:
return false return false
func is_one_time_use(): func is_one_time_use():
@@ -21,7 +21,7 @@ func get_energy_used() -> int:
func get_usage_zone_radius() -> int: func get_usage_zone_radius() -> int:
return 10 return 10
func get_usage_object_affected(i : Area2D) -> bool: func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is Plant return i is Plant
func use_text() -> String: func use_text() -> String:
+20 -26
View File
@@ -41,7 +41,7 @@ static func generate_from_parent(plant_data : PlantData) -> Seed:
static func generate_random(rarity := 0) -> Seed: static func generate_random(rarity := 0) -> Seed:
var new_seed = Seed.new( var new_seed = Seed.new(
Random.generate_random_word(), Random.generate_random_word(),
generate_first_mutations(rarity), [generate_first_mutation(rarity)]
) )
return new_seed return new_seed
@@ -63,10 +63,10 @@ func get_energy_used() -> int:
return 1 return 1
func get_usage_zone_radius() -> int: func get_usage_zone_radius() -> int:
return 50 return 35
func get_usage_object_affected(i : Area2D) -> bool: func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is PlantSprite return i is Plant
func use_text() -> String: func use_text() -> String:
return tr("PLANT_%s") % plant_name return tr("PLANT_%s") % plant_name
@@ -82,19 +82,10 @@ func can_use(player : Player, zone : Player.ActionZone) -> bool:
var is_there_a_plant_here = false var is_there_a_plant_here = false
for area in zone.get_affected_areas(): for area in zone.get_affected_areas():
if area is PlantSprite: if area is Plant:
is_there_a_plant_here = true is_there_a_plant_here = true
var plant_tiles = Math.get_tiles_in_circle( return not is_there_a_plant_here and player.region.is_coords_decontaminated(zone.get_tiles())
zone.get_global_position(),
20
)
return (
not is_there_a_plant_here
and player.region.is_coords_decontaminated(plant_tiles)
and not player.region.is_coords_rocky(plant_tiles)
)
func use(player : Player, zone : Player.ActionZone) -> bool: func use(player : Player, zone : Player.ActionZone) -> bool:
if player.region == null: if player.region == null:
@@ -147,10 +138,7 @@ func get_particles() -> Array[EffectParticles.Parameters]:
return param return param
static func generate_first_mutations(rarity := 0) -> Array[PlantMutation]: static func generate_first_mutation(rarity := 0) -> PlantMutation:
if rarity < 0:
return []
var possible_mutation : PlantMutation = GameInfo.game_data.progression_data.available_mutations.filter( var possible_mutation : PlantMutation = GameInfo.game_data.progression_data.available_mutations.filter(
func (m : PlantMutation): return m.get_base_rarity() <= rarity func (m : PlantMutation): return m.get_base_rarity() <= rarity
@@ -160,20 +148,26 @@ static func generate_first_mutations(rarity := 0) -> Array[PlantMutation]:
possible_mutation.level += level_to_add possible_mutation.level += level_to_add
return [possible_mutation] return possible_mutation
static func mutate_mutations(mutations : Array[PlantMutation]) -> Array[PlantMutation]: static func mutate_mutations(mutations : Array[PlantMutation]) -> Array[PlantMutation]:
var mutation_possibility : Array[MutationPossibility] = [] var mutation_possibility : Array[MutationPossibility] = [
AddMutation.new()
]
if ( if (
len(mutations) < GameInfo.game_data.current_run.plant_info.get_mutation_max_number() len(mutations) >= GameInfo.game_data.current_run.plant_info.get_mutation_max_number()
): ):
mutation_possibility.append(AddMutation.new()) mutation_possibility = [
UpgradeMutation.new(),
]
elif len(mutations) > 0:
mutation_possibility = [
AddMutation.new(),
UpgradeMutation.new(),
]
if len(mutations) > 0:
mutation_possibility.append(UpgradeMutation.new())
var chosen_mutation_possibility = mutation_possibility.pick_random() var chosen_mutation_possibility = mutation_possibility.pick_random()
return chosen_mutation_possibility.mutate(mutations) return chosen_mutation_possibility.mutate(mutations)
@@ -17,7 +17,7 @@ func get_icon() -> Texture2D:
func get_usage_zone_radius() -> int: func get_usage_zone_radius() -> int:
return SHOVEL_ZONE_RADIUS return SHOVEL_ZONE_RADIUS
func get_usage_object_affected(i : Area2D) -> bool: func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is Plant return i is Plant
func use_text() -> String: func use_text() -> String:
+1 -35
View File
@@ -9,23 +9,11 @@
[ext_resource type="AudioStream" uid="uid://cv5avkd3qekt7" path="res://common/audio_manager/assets/sfx/movement/movement.wav" id="7_qiwj3"] [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"] [sub_resource type="CircleShape2D" id="CircleShape2D_sglur"]
radius = 13.0 radius = 27.0
[sub_resource type="CircleShape2D" id="CircleShape2D_abrql"] [sub_resource type="CircleShape2D" id="CircleShape2D_abrql"]
radius = 40.0 radius = 40.0
[sub_resource type="Gradient" id="Gradient_qiwj3"]
offsets = PackedFloat32Array(0.37339056, 0.49785408)
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
fill = 1
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.5, 0)
[sub_resource type="AtlasTexture" id="AtlasTexture_fkugw"] [sub_resource type="AtlasTexture" id="AtlasTexture_fkugw"]
atlas = ExtResource("4_bls4j") atlas = ExtResource("4_bls4j")
region = Rect2(3048, 0, 762, 1080) region = Rect2(3048, 0, 762, 1080)
@@ -125,9 +113,6 @@ animations = [{
"speed": 5.0 "speed": 5.0
}] }]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_bectd"]
blend_mode = 1
[sub_resource type="Curve" id="Curve_fkugw"] [sub_resource type="Curve" id="Curve_fkugw"]
_data = [Vector2(0, 0.14473677), 0.0, 0.0, 0, 0, Vector2(0.972549, 0.2654798), 0.0, 0.0, 0, 0] _data = [Vector2(0, 0.14473677), 0.0, 0.0, 0, 0, Vector2(0.972549, 0.2654798), 0.0, 0.0, 0, 0]
point_count = 2 point_count = 2
@@ -268,12 +253,6 @@ position = Vector2(-2.3841858e-07, -7.999996)
scale = Vector2(0.29154927, 0.29154924) scale = Vector2(0.29154927, 0.29154924)
texture = ExtResource("2_fkugw") 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)
texture = SubResource("GradientTexture2D_26q78")
[node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=638545037] [node name="PlayerSprite" type="AnimatedSprite2D" parent="." unique_id=638545037]
unique_name_in_owner = true unique_name_in_owner = true
position = Vector2(0.99999994, -17) position = Vector2(0.99999994, -17)
@@ -288,7 +267,6 @@ wanted_orientation = 2
[node name="Light" type="Sprite2D" parent="PlayerSprite" unique_id=1768327734] [node name="Light" type="Sprite2D" parent="PlayerSprite" unique_id=1768327734]
modulate = Color(0.70603025, 0.5959886, 0.33971557, 0.09019608) modulate = Color(0.70603025, 0.5959886, 0.33971557, 0.09019608)
z_index = -1 z_index = -1
material = SubResource("CanvasItemMaterial_bectd")
scale = Vector2(16.093441, 16.093441) scale = Vector2(16.093441, 16.093441)
texture = ExtResource("5_8fjmc") texture = ExtResource("5_8fjmc")
@@ -312,15 +290,3 @@ bus = &"Sfx"
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=793749564] [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=793749564]
unique_name_in_owner = true unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_qiwj3") libraries/ = SubResource("AnimationLibrary_qiwj3")
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="." unique_id=1282043308]
unique_name_in_owner = true
simplify_path = true
simplify_epsilon = 4.223
path_search_max_polygons = 1000
avoidance_enabled = true
radius = 500.0
debug_use_custom = true
debug_path_custom_color = Color(0.5882353, 0.7019608, 0.85882354, 0.3019608)
debug_path_custom_point_size = 0.0
debug_path_custom_line_width = 1.0
+19 -84
View File
@@ -5,7 +5,6 @@ const ACTION_AREA_UPDATE_TIME=0.05 # When creating an action_zone, we make sure
const MAX_REACH = 100 const MAX_REACH = 100
const HOLDING_ITEM_SPRITE_SIZE = 20. const HOLDING_ITEM_SPRITE_SIZE = 20.
const TURN_ANIMATION_MINIMUM_THRESHOLD = 0.2 const TURN_ANIMATION_MINIMUM_THRESHOLD = 0.2
const SPEED = 350
signal player_updated(player: Player) signal player_updated(player: Player)
signal upgraded signal upgraded
@@ -13,6 +12,7 @@ signal upgraded
var terrain : Terrain var terrain : Terrain
var region : Region : var region : Region :
get(): return terrain if terrain is Region else null get(): return terrain if terrain is Region else null
@export var speed = 350
var data : PlayerData var data : PlayerData
var last_action_area_movement_timer : float = 100. var last_action_area_movement_timer : float = 100.
@@ -22,13 +22,7 @@ var controlling_player : bool = false :
controlling_player = v controlling_player = v
velocity = Vector2.ZERO velocity = Vector2.ZERO
var instruction : Instruction = null : var instruction : Instruction = null
set(i):
if instruction and is_node_ready():
instruction.abort(self)
instruction = i
if instruction and is_node_ready():
instruction.spawn_indicator(self)
@onready var preview_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null) @onready var preview_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null)
@onready var action_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null) @onready var action_zone : ActionZone = await setup_action_zone(Vector2.ZERO, null)
@@ -87,7 +81,7 @@ func _process(delta):
instruction = null instruction = null
input_direction = calculate_direction_instruction_direction() input_direction = calculate_direction_instruction_direction()
velocity = input_direction * SPEED velocity = input_direction * speed
turn_animate(input_direction) turn_animate(input_direction)
move_preview_zone(get_global_mouse_position()) move_preview_zone(get_global_mouse_position())
@@ -112,11 +106,8 @@ func calculate_direction_instruction_direction() -> Vector2:
instruction.position.distance_to(global_position) > (MAX_REACH - 1.) instruction.position.distance_to(global_position) > (MAX_REACH - 1.)
or instruction is MoveInstruction or instruction is MoveInstruction
) )
): ):
if %NavigationAgent2D.target_position != instruction.position: return self.global_position.direction_to(instruction.position)
%NavigationAgent2D.target_position = instruction.position
return to_local(%NavigationAgent2D.get_next_path_position()).normalized()
# return self.global_position.direction_to(instruction.position)
return Vector2.ZERO return Vector2.ZERO
func calculate_direction_input_direction() -> Vector2: func calculate_direction_input_direction() -> Vector2:
@@ -156,8 +147,8 @@ func try_interact(interactable : Interactable):
func try_move(move_to : Vector2): func try_move(move_to : Vector2):
instruction = MoveInstruction.new(move_to) instruction = MoveInstruction.new(move_to)
func can_pick_item(_item: Item): func can_pick_item(item: Item):
return true return item.type == Item.ItemType.TOOL_ITEM || !data.inventory.is_full() || !data.inventory.current_is_tool()
func pick_item(item : Item): func pick_item(item : Item):
if item.type != Item.ItemType.TOOL_ITEM && data.inventory.is_full(): if item.type != Item.ItemType.TOOL_ITEM && data.inventory.is_full():
@@ -172,23 +163,13 @@ func pick_item(item : Item):
func drop_item(): func drop_item():
var ind_to_drop := data.inventory.current_item_ind var ind_to_drop := data.inventory.current_item_ind
while (
if ( (data.inventory.get_item(ind_to_drop) == null or ind_to_drop < len(data.inventory.tools))
data.inventory.get_item(ind_to_drop) == null or ind_to_drop < len(data.inventory.tools) and ind_to_drop < len(data.inventory.get_all_items()) - 1
): ):
var possible_ind : Array = range( ind_to_drop += 1
len(data.inventory.tools), var item_to_drop = data.inventory.pop_item(ind_to_drop)
len(data.inventory.tools) + data.inventory.seeds_size if item_to_drop:
).filter(
func (i): return data.inventory.get_item(i) != null
)
if len(possible_ind):
ind_to_drop = possible_ind.pop_back()
else:
return
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) terrain.drop_item(item_to_drop, global_position)
AudioManager.play_sfx("Drop") AudioManager.play_sfx("Drop")
region.save() region.save()
@@ -258,10 +239,11 @@ func setup_preview_zone(item : Item):
return preview_zone return preview_zone
elif preview_zone: elif preview_zone:
preview_zone.destroy() preview_zone.destroy()
preview_zone = null
if item: if item:
preview_zone = await generate_action_zone(item) preview_zone = await generate_action_zone(item)
else:
preview_zone = null
func setup_action_zone(zone_position : Vector2, item: Item) -> ActionZone: func setup_action_zone(zone_position : Vector2, item: Item) -> ActionZone:
if action_zone: if action_zone:
@@ -277,11 +259,8 @@ func move_preview_zone(zone_position : Vector2):
class Instruction: class Instruction:
const INDICATOR_COLOR := Color("#96B3DB")
var position : Vector2 var position : Vector2
var need_movement : bool = true var need_movement : bool = true
var indicator := Sprite2D.new()
func _init(_pos : Vector2): func _init(_pos : Vector2):
position = _pos position = _pos
@@ -291,46 +270,8 @@ class Instruction:
func do(_player : Player): func do(_player : Player):
pass pass
func indicator_texture():
return preload("res://common/icons/map-pin.svg")
func indicator_size():
return 40
func indicator_shift():
return Vector2.ZERO
func spawn_indicator(player : Player):
indicator.texture = indicator_texture()
indicator.texture = indicator_texture()
indicator.scale = Vector2(
1./(float(indicator_texture().get_width())/indicator_size()),
1./(float(indicator_texture().get_height())/indicator_size())
)
indicator.modulate = Color(
INDICATOR_COLOR.r,
INDICATOR_COLOR.g,
INDICATOR_COLOR.b,
0.
)
player.get_parent().add_child(indicator)
indicator.global_position = position + indicator_shift()
player.get_tree().create_tween().tween_property(indicator, "modulate:a", 0.8, 0.2)
func abort(player : Player):
indicator.queue_free()
class MoveInstruction extends Instruction: class MoveInstruction extends Instruction:
func indicator_shift():
return Vector2.UP * 50
func can_be_done(player : Player): func can_be_done(player : Player):
return player.global_position.distance_to(position) < 10. return player.global_position.distance_to(position) < 10.
@@ -348,10 +289,7 @@ class ItemActionInstruction extends Instruction:
not item.is_usage_need_proximity() or not item.is_usage_need_proximity() or
player.global_position.distance_to(position) < player.MAX_REACH player.global_position.distance_to(position) < player.MAX_REACH
) )
func indicator_texture():
return item.icon
func do(player : Player): func do(player : Player):
player.use_item(item) player.use_item(item)
@@ -365,16 +303,13 @@ class InteractableInstruction extends Instruction:
func can_be_done(player : Player): func can_be_done(player : Player):
return player.global_position.distance_to(position) < player.MAX_REACH return player.global_position.distance_to(position) < player.MAX_REACH
func indicator_texture():
return preload("res://common/icons/hand-grab.svg")
func do(player : Player): func do(player : Player):
interactable.interact(player) interactable.interact(player)
class ActionZone: class ActionZone:
var item : Item = null var item : Item = null
var area : Area2D = Area2D.new() var area : Area2D = Area2D.new()
var affected_areas : Array[Area2D]= [] var affected_areas : Array[InspectableEntity]= []
func _init(_i : Item): func _init(_i : Item):
item = _i item = _i
@@ -395,9 +330,9 @@ class ActionZone:
func update_preview_on_affected_area(): func update_preview_on_affected_area():
var detected_areas = get_affected_areas() var detected_areas = get_affected_areas()
clear_preview_on_affected_area() clear_preview_on_affected_area()
var new_affected_areas : Array[Area2D] = [] var new_affected_areas : Array[InspectableEntity] = []
for a in detected_areas: for a in detected_areas:
if a is Area2D and item.get_usage_object_affected(a) and a.has_method("affect_preview"): if a is InspectableEntity and item.get_usage_object_affected(a):
a.affect_preview(true) a.affect_preview(true)
new_affected_areas.append(a) new_affected_areas.append(a)
affected_areas = new_affected_areas affected_areas = new_affected_areas

Some files were not shown because too many files have changed in this diff Show More