Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3146198725 | ||
|
|
8d3b0768fa | ||
|
|
27b236b27c | ||
|
|
6a751eaf7d | ||
|
|
f2aa04e5e9 | ||
|
|
00742de387 | ||
|
|
6632c2f533 | ||
|
|
4457b4ff84 | ||
|
|
32f0867d1e | ||
|
|
eb009d6f41 | ||
|
|
71f36fb430 | ||
|
|
42bbef60d5 | ||
|
|
7d81023331 | ||
|
|
d835de1d66 | ||
|
|
605b5a16cf | ||
|
|
1922864343 | ||
|
|
3f4f024070 | ||
|
|
96e20b7ff0 | ||
|
|
99a0522e9e | ||
|
|
9dbc3ffb49 | ||
|
|
109c9c3b84 | ||
|
|
c54d072bcb | ||
|
|
307b7418f4 | ||
|
|
3fa84994cd | ||
|
|
5722fbb437 | ||
|
|
96d1a4f4dd | ||
|
|
cc421a951f | ||
|
|
83d462f2f4 | ||
|
|
62b34473b6 | ||
|
|
ff4feacea3 |
@@ -18,4 +18,7 @@ mono_crash.*.json
|
|||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
.export/
|
.export/
|
||||||
|
|
||||||
|
stw_demo_save.tres
|
||||||
|
stw_settings.tres
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[gd_resource type="StandardMaterial3D" format=3 uid="uid://dvvi1k5c5iowc"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dlsx1mofjccib" path="res://common/assets/textures/3d_texture.png" id="1_cc1ni"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
diffuse_mode = 3
|
||||||
|
specular_mode = 2
|
||||||
|
albedo_texture = ExtResource("1_cc1ni")
|
||||||
|
roughness = 0.0
|
||||||
|
rim_tint = 0.48
|
||||||
|
stencil_flags = 2
|
||||||
|
stencil_reference = 5
|
||||||
|
stencil_outline_thickness = 0.626
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="StandardMaterial3D" format=3 uid="uid://b5vlcdry8vtgi"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dlsx1mofjccib" path="res://common/assets/textures/3d_texture.png" id="1_buts1"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
transparency = 1
|
||||||
|
depth_draw_mode = 1
|
||||||
|
albedo_color = Color(1, 1, 1, 0.79607844)
|
||||||
|
albedo_texture = ExtResource("1_buts1")
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,41 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dlsx1mofjccib"
|
||||||
|
path.s3tc="res://.godot/imported/3d_texture.png-5d7cb2d23d37985e4dc0c0bd241d8e43.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/assets/textures/3d_texture.png"
|
||||||
|
dest_files=["res://.godot/imported/3d_texture.png-5d7cb2d23d37985e4dc0c0bd241d8e43.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
|
||||||
|
After Width: | Height: | Size: 170 KiB |
@@ -0,0 +1,41 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dc8gajse5ti5t"
|
||||||
|
path.s3tc="res://.godot/imported/dither_texture.jpg-29df728b3fc6c30c4db6300481aaf214.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/assets/textures/dither_texture.jpg"
|
||||||
|
dest_files=["res://.godot/imported/dither_texture.jpg-29df728b3fc6c30c4db6300481aaf214.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
|
||||||
@@ -12,7 +12,7 @@ dest_files=["res://.godot/imported/ambiance_Demeter.ogg-ee9f7eeda2d23a3915bf6592
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0
|
||||||
bpm=0
|
bpm=0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://d3jou8c7c536c"
|
||||||
|
path="res://.godot/imported/ship_ambience.ogg-e3739ef3659489a38bbb2970034a7b9a.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/ambiance/vaisseau/ship_ambience.ogg"
|
||||||
|
dest_files=["res://.godot/imported/ship_ambience.ogg-e3739ef3659489a38bbb2970034a7b9a.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://dadg6o6dl2k6t"
|
||||||
|
path="res://.godot/imported/ship_music.ogg-9496fd8314c31c04e252e4204e84e292.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/morceaux/autres/ship_music.ogg"
|
||||||
|
dest_files=["res://.godot/imported/ship_music.ogg-9496fd8314c31c04e252e4204e84e292.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="oggvorbisstr"
|
|
||||||
type="AudioStreamOggVorbis"
|
|
||||||
uid="uid://brtjlgjqnrvcb"
|
|
||||||
path="res://.godot/imported/truck_music.ogg-71e4f19f9a59a19e62e72df06380f7df.oggvorbisstr"
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://common/audio_manager/assets/morceaux/autres/truck_music.ogg"
|
|
||||||
dest_files=["res://.godot/imported/truck_music.ogg-71e4f19f9a59a19e62e72df06380f7df.oggvorbisstr"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
loop=true
|
|
||||||
loop_offset=0.0
|
|
||||||
bpm=0.0
|
|
||||||
beat_count=0
|
|
||||||
bar_beats=4
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://b1hut6lc1jevh"
|
||||||
|
path="res://.godot/imported/mines_phase_2.ogg-3c0a31b97007a40bd6aa91f1f208f9d3.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/morceaux/niveau_v2/mines_phase_2.ogg"
|
||||||
|
dest_files=["res://.godot/imported/mines_phase_2.ogg-3c0a31b97007a40bd6aa91f1f208f9d3.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://dsrft8ing7qwj"
|
||||||
|
path="res://.godot/imported/closing_transmission.wav-2a60c34966d2ae692c46d5740f5d3f94.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
|
||||||
|
dest_files=["res://.godot/imported/closing_transmission.wav-2a60c34966d2ae692c46d5740f5d3f94.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
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://c8cwobmqg80dw"
|
||||||
|
path="res://.godot/imported/deactivation.wav-f941c93b81a553c4a9b003d564a3ce38.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/sfx/dialogs/sfx/deactivation.wav"
|
||||||
|
dest_files=["res://.godot/imported/deactivation.wav-f941c93b81a553c4a9b003d564a3ce38.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
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://dk87b7iet1sae"
|
||||||
|
path="res://.godot/imported/incoming_transmission.wav-636f576bb9d1fcafc6fd9813344a7a1f.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav"
|
||||||
|
dest_files=["res://.godot/imported/incoming_transmission.wav-636f576bb9d1fcafc6fd9813344a7a1f.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
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://ocm1dkkhv7ls"
|
||||||
|
path="res://.godot/imported/phone_ringing.wav-a6cb60c7f7d9ed8d10532f5bd69157cf.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/audio_manager/assets/sfx/phone/phone_ringing.wav"
|
||||||
|
dest_files=["res://.godot/imported/phone_ringing.wav-a6cb60c7f7d9ed8d10532f5bd69157cf.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,12 +1,11 @@
|
|||||||
[gd_scene load_steps=30 format=3 uid="uid://b6hscxcrj065q"]
|
[gd_scene load_steps=35 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://dipnmlprwfo12" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_1.ogg" id="2_a4u5m"]
|
[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://bm0tdi6bd2e65" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_2.ogg" id="3_8nsyr"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://dftxjfdqgsbd3" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_3.ogg" id="4_athui"]
|
|
||||||
[ext_resource type="AudioStream" uid="uid://dcbuhtc085q2x" path="res://common/audio_manager/assets/morceaux/niveau_v2/mines_phase_1.ogg" id="5_ajci6"]
|
[ext_resource type="AudioStream" uid="uid://dcbuhtc085q2x" path="res://common/audio_manager/assets/morceaux/niveau_v2/mines_phase_1.ogg" id="5_ajci6"]
|
||||||
[ext_resource type="AudioStream" uid="uid://bqwiaek5b5q00" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_2.ogg" id="6_ldyhq"]
|
[ext_resource type="AudioStream" uid="uid://bqwiaek5b5q00" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_2.ogg" id="6_ldyhq"]
|
||||||
[ext_resource type="AudioStream" uid="uid://d4lqhgf0lhgge" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_3.ogg" id="7_ol34x"]
|
[ext_resource type="AudioStream" uid="uid://d4lqhgf0lhgge" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_3.ogg" id="7_ol34x"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://bpf6witukorka" path="res://common/audio_manager/assets/morceaux/autres/main_menu.ogg" id="7_tuvql"]
|
||||||
[ext_resource type="AudioStream" uid="uid://brtjlgjqnrvcb" path="res://common/audio_manager/assets/morceaux/autres/truck_music.ogg" id="8_0e5ja"]
|
[ext_resource type="AudioStream" uid="uid://brtjlgjqnrvcb" path="res://common/audio_manager/assets/morceaux/autres/truck_music.ogg" id="8_0e5ja"]
|
||||||
[ext_resource type="AudioStream" uid="uid://bnxsnege8qq6e" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_4.ogg" id="8_ajci6"]
|
[ext_resource type="AudioStream" uid="uid://bnxsnege8qq6e" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_4.ogg" id="8_ajci6"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dfrp66a4isnt6" path="res://common/audio_manager/assets/sfx/dig/dig_1.wav" id="9_gv65y"]
|
[ext_resource type="AudioStream" uid="uid://dfrp66a4isnt6" path="res://common/audio_manager/assets/sfx/dig/dig_1.wav" id="9_gv65y"]
|
||||||
@@ -23,15 +22,17 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://cqa0gvgpoa7pd" path="res://common/audio_manager/assets/sfx/pick_up/pick_up_2.wav" id="21_dk5s6"]
|
[ext_resource type="AudioStream" uid="uid://cqa0gvgpoa7pd" path="res://common/audio_manager/assets/sfx/pick_up/pick_up_2.wav" id="21_dk5s6"]
|
||||||
[ext_resource type="AudioStream" uid="uid://d1cpi438ep0ys" path="res://common/audio_manager/assets/sfx/announce/annnounce.wav" id="22_btfwx"]
|
[ext_resource type="AudioStream" uid="uid://d1cpi438ep0ys" path="res://common/audio_manager/assets/sfx/announce/annnounce.wav" id="22_btfwx"]
|
||||||
[ext_resource type="AudioStream" uid="uid://ccq04ahrwr3bv" path="res://common/audio_manager/assets/sfx/alarm/alarm.wav" id="23_fwu3w"]
|
[ext_resource type="AudioStream" uid="uid://ccq04ahrwr3bv" path="res://common/audio_manager/assets/sfx/alarm/alarm.wav" id="23_fwu3w"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://ctfaxvblcg5lc" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_1.wav" id="24_tq535"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://c1dnklmka2ccn" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_2.wav" id="25_ywn7s"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://dd1uu6dd6sloe" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_3.wav" id="26_xhon7"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://eq7wufwnolto" path="res://common/audio_manager/assets/sfx/pickaxe/pickaxe_4.wav" id="27_3jg6d"]
|
||||||
|
|
||||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i5lxw"]
|
[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_8204s"]
|
||||||
stream_count = 3
|
stream_count = 4
|
||||||
stream_0/stream = ExtResource("2_a4u5m")
|
stream_0 = ExtResource("2_a4u5m")
|
||||||
stream_0/volume = 0.0
|
stream_1 = ExtResource("2_a4u5m")
|
||||||
stream_1/stream = ExtResource("3_8nsyr")
|
stream_2 = ExtResource("3_8nsyr")
|
||||||
stream_1/volume = -60.0
|
stream_3 = ExtResource("4_athui")
|
||||||
stream_2/stream = ExtResource("4_athui")
|
|
||||||
stream_2/volume = -60.0
|
|
||||||
|
|
||||||
[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_ajci6"]
|
[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_ajci6"]
|
||||||
stream_count = 4
|
stream_count = 4
|
||||||
@@ -66,53 +67,64 @@ streams_count = 2
|
|||||||
stream_0/stream = ExtResource("20_pu6t4")
|
stream_0/stream = ExtResource("20_pu6t4")
|
||||||
stream_1/stream = ExtResource("21_dk5s6")
|
stream_1/stream = ExtResource("21_dk5s6")
|
||||||
|
|
||||||
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_dhq5t"]
|
||||||
|
random_pitch = 1.5
|
||||||
|
streams_count = 4
|
||||||
|
stream_0/stream = ExtResource("24_tq535")
|
||||||
|
stream_1/stream = ExtResource("25_ywn7s")
|
||||||
|
stream_2/stream = ExtResource("26_xhon7")
|
||||||
|
stream_3/stream = ExtResource("27_3jg6d")
|
||||||
|
|
||||||
[node name="AudioManager" type="Node" node_paths=PackedStringArray("playing_soundtracks")]
|
[node name="AudioManager" type="Node" node_paths=PackedStringArray("playing_soundtracks")]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
script = ExtResource("1_0tvca")
|
script = ExtResource("1_0tvca")
|
||||||
default_fade_time = 2.0
|
default_fade_time = 2.0
|
||||||
garden_phases_scores = Array[int]([0, 10, 30])
|
|
||||||
playing_soundtracks = [NodePath("Ambiance/Default")]
|
|
||||||
|
|
||||||
[node name="Ambiance" type="Node" parent="."]
|
[node name="Ambiance" type="Node" parent="." unique_id=1989991562]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="Default" type="AudioStreamPlayer" parent="Ambiance"]
|
[node name="Exterior" type="AudioStreamPlayer" parent="Ambiance" unique_id=1405716780]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
stream = SubResource("AudioStreamSynchronized_i5lxw")
|
stream = SubResource("AudioStreamPlaylist_8204s")
|
||||||
autoplay = true
|
autoplay = true
|
||||||
|
|
||||||
[node name="Musics" type="Node" parent="."]
|
[node name="Musics" type="Node" parent="." unique_id=1450527710]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="Planet" type="AudioStreamPlayer" parent="Musics"]
|
[node name="Region" type="AudioStreamPlayer" parent="Musics" unique_id=1029114070]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
stream = SubResource("AudioStreamPlaylist_ajci6")
|
stream = SubResource("AudioStreamPlaylist_ajci6")
|
||||||
autoplay = true
|
|
||||||
|
|
||||||
[node name="Truck" type="AudioStreamPlayer" parent="Musics"]
|
[node name="Title" type="AudioStreamPlayer" parent="Musics" unique_id=2105759422]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
stream = ExtResource("7_tuvql")
|
||||||
|
|
||||||
|
[node name="Truck" type="AudioStreamPlayer" parent="Musics" unique_id=1165150318]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
stream = ExtResource("8_0e5ja")
|
stream = ExtResource("8_0e5ja")
|
||||||
autoplay = true
|
|
||||||
|
|
||||||
[node name="Sfx" type="Node" parent="."]
|
[node name="Sfx" type="Node" parent="." unique_id=2023641207]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="Dig" type="AudioStreamPlayer" parent="Sfx"]
|
[node name="Dig" type="AudioStreamPlayer" parent="Sfx" unique_id=486042600]
|
||||||
stream = SubResource("AudioStreamRandomizer_kfbah")
|
stream = SubResource("AudioStreamRandomizer_kfbah")
|
||||||
|
|
||||||
[node name="Drop" type="AudioStreamPlayer" parent="Sfx"]
|
[node name="Drop" type="AudioStreamPlayer" parent="Sfx" unique_id=1391500830]
|
||||||
stream = SubResource("AudioStreamRandomizer_1w04j")
|
stream = SubResource("AudioStreamRandomizer_1w04j")
|
||||||
|
|
||||||
[node name="Harvest" type="AudioStreamPlayer" parent="Sfx"]
|
[node name="Harvest" type="AudioStreamPlayer" parent="Sfx" unique_id=345539331]
|
||||||
stream = SubResource("AudioStreamRandomizer_i4m0x")
|
stream = SubResource("AudioStreamRandomizer_i4m0x")
|
||||||
|
|
||||||
[node name="PickUp" type="AudioStreamPlayer" parent="Sfx"]
|
[node name="PickUp" type="AudioStreamPlayer" parent="Sfx" unique_id=176915166]
|
||||||
stream = SubResource("AudioStreamRandomizer_jjdv2")
|
stream = SubResource("AudioStreamRandomizer_jjdv2")
|
||||||
volume_db = -10.0
|
volume_db = -10.0
|
||||||
|
|
||||||
[node name="Announce" type="AudioStreamPlayer" parent="Sfx"]
|
[node name="Announce" type="AudioStreamPlayer" parent="Sfx" unique_id=876644323]
|
||||||
stream = ExtResource("22_btfwx")
|
stream = ExtResource("22_btfwx")
|
||||||
volume_db = 8.627
|
volume_db = 8.627
|
||||||
|
|
||||||
[node name="Alarm" type="AudioStreamPlayer" parent="Sfx"]
|
[node name="Alarm" type="AudioStreamPlayer" parent="Sfx" unique_id=689347925]
|
||||||
stream = ExtResource("23_fwu3w")
|
stream = ExtResource("23_fwu3w")
|
||||||
|
|
||||||
|
[node name="Pickaxe" type="AudioStreamPlayer" parent="Sfx"]
|
||||||
|
stream = SubResource("AudioStreamRandomizer_dhq5t")
|
||||||
|
|||||||
@@ -3,136 +3,124 @@ extends Node
|
|||||||
const MIN_VOLUME = -60.
|
const MIN_VOLUME = -60.
|
||||||
const MAX_VOLUME = 24.
|
const MAX_VOLUME = 24.
|
||||||
|
|
||||||
@onready var settings : SettingsData = GameInfo.game_data.settings
|
@onready var settings : SettingsData = GameInfo.settings_data
|
||||||
|
|
||||||
@export var default_fade_time = 1.0
|
@export var default_fade_time = 0.5
|
||||||
|
|
||||||
@export var garden_phase = 0
|
@export var playing_music : AudioStreamPlayer = null
|
||||||
@export var garden_phases_scores : Array[int]
|
@export var playing_ambiance : AudioStreamPlayer = null
|
||||||
|
|
||||||
@export var playing_soundtracks : Array[AudioStreamPlayer] = []
|
|
||||||
|
|
||||||
var default_volumes := {}
|
var default_volumes := {}
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
GameInfo.game_data.current_planet_data_updated.connect(_on_current_planet_data_updated)
|
for player in get_all_players():
|
||||||
fetch_default_volumes()
|
player.stop()
|
||||||
setup_volume()
|
|
||||||
settings.sound_changed.connect(
|
fetch_default_volumes()
|
||||||
func(_s) : setup_volume()
|
setup_volume()
|
||||||
)
|
settings.sound_changed.connect(
|
||||||
for player in get_all_soundtrack_players():
|
func(_s) : setup_volume()
|
||||||
player.play()
|
)
|
||||||
|
SceneManager.scene_loaded.connect(_on_change_scene)
|
||||||
|
|
||||||
|
func _on_change_scene(scene : Scene):
|
||||||
|
play_ambiance()
|
||||||
|
|
||||||
|
match scene.scene_id:
|
||||||
|
"TITLE":
|
||||||
|
play_music("Title")
|
||||||
|
"REGION":
|
||||||
|
play_music("Region")
|
||||||
|
play_ambiance("Exterior")
|
||||||
|
"COCKPIT":
|
||||||
|
play_music("Truck")
|
||||||
|
|
||||||
func fetch_default_volumes():
|
func fetch_default_volumes():
|
||||||
var all_players := get_all_soundtrack_players()
|
var all_players := get_all_players()
|
||||||
all_players.append_array(get_all_sfx_players())
|
|
||||||
|
|
||||||
for player in all_players:
|
for player in all_players:
|
||||||
default_volumes[player] = player.volume_db
|
default_volumes[player] = player.volume_db
|
||||||
|
|
||||||
func setup_volume():
|
func setup_volume():
|
||||||
for player in get_all_soundtrack_players():
|
for player in get_all_players():
|
||||||
player.volume_db = get_volume_from_parent(player) if (
|
player.volume_db = get_volume_from_parent(player)
|
||||||
playing_soundtracks.find(player) != -1
|
|
||||||
) else MIN_VOLUME
|
|
||||||
setup_phase(player)
|
|
||||||
for player in get_all_sfx_players():
|
|
||||||
player.volume_db = get_volume_from_parent(player)
|
|
||||||
|
|
||||||
func get_volume_from_parent(player : AudioStreamPlayer) -> float:
|
func get_volume_from_parent(player : AudioStreamPlayer) -> float:
|
||||||
var settings_volume = 0.5
|
var settings_volume = 0.5
|
||||||
|
|
||||||
if player.get_parent() == %Ambiance:
|
if player.get_parent() == %Ambiance:
|
||||||
settings_volume = settings.ambiance_volume
|
settings_volume = settings.ambiance_volume
|
||||||
elif player.get_parent() == %Sfx:
|
elif player.get_parent() == %Sfx:
|
||||||
settings_volume = settings.sfx_volume
|
settings_volume = settings.sfx_volume
|
||||||
elif player.get_parent() == %Musics:
|
elif player.get_parent() == %Musics:
|
||||||
settings_volume = settings.music_volume
|
settings_volume = settings.music_volume
|
||||||
|
|
||||||
return default_volumes[player] + lerp(MIN_VOLUME, MAX_VOLUME, settings_volume)
|
return default_volumes[player] + lerp(MIN_VOLUME, MAX_VOLUME, settings_volume)
|
||||||
|
|
||||||
func update_phase():
|
func get_all_players() -> Array[AudioStreamPlayer]:
|
||||||
for player in get_all_soundtrack_players():
|
var players : Array[AudioStreamPlayer] = []
|
||||||
var playing : bool = player.volume_db != MIN_VOLUME
|
players.append_array(get_players_from_node(%Musics))
|
||||||
if playing:
|
players.append_array(get_players_from_node(%Ambiance))
|
||||||
await set_volume(player, MIN_VOLUME).finished
|
players.append_array(get_players_from_node(%Sfx))
|
||||||
setup_phase(player)
|
|
||||||
if playing:
|
|
||||||
set_volume(player, get_volume_from_parent(player))
|
|
||||||
|
|
||||||
func get_all_soundtrack_players() -> Array[AudioStreamPlayer]:
|
return players
|
||||||
var players : Array[AudioStreamPlayer] = []
|
|
||||||
players.append_array(get_players_from_node(%Musics))
|
|
||||||
players.append_array(get_players_from_node(%Ambiance))
|
|
||||||
|
|
||||||
return players
|
|
||||||
|
|
||||||
func get_all_sfx_players() -> Array[AudioStreamPlayer]:
|
|
||||||
return get_players_from_node(%Sfx)
|
|
||||||
|
|
||||||
func get_players_from_node(node : Node) -> Array[AudioStreamPlayer]:
|
func get_players_from_node(node : Node) -> Array[AudioStreamPlayer]:
|
||||||
var streams : Array[AudioStreamPlayer] = []
|
var streams : Array[AudioStreamPlayer] = []
|
||||||
|
|
||||||
for c in node.get_children():
|
for c in node.get_children():
|
||||||
if c is AudioStreamPlayer:
|
if c is AudioStreamPlayer:
|
||||||
streams.append(c)
|
streams.append(c)
|
||||||
return streams
|
return streams
|
||||||
|
|
||||||
|
func set_volume(player : AudioStreamPlayer, to : float, fade_time = default_fade_time) -> Tween:
|
||||||
|
var fade_tween : Tween = get_tree().create_tween()
|
||||||
|
|
||||||
func _on_current_planet_data_updated(planet_data : PlanetData):
|
fade_tween.tween_property(player, "volume_db", to, fade_time)
|
||||||
if planet_data:
|
|
||||||
update_garden_phase(planet_data)
|
|
||||||
planet_data.updated.connect(update_garden_phase)
|
|
||||||
|
|
||||||
func update_garden_phase(planet_data : PlanetData):
|
|
||||||
var phase : int = garden_phase
|
|
||||||
for i in range(len(garden_phases_scores)):
|
|
||||||
if planet_data.garden_score >= garden_phases_scores[i] and i > garden_phase:
|
|
||||||
phase = i
|
|
||||||
|
|
||||||
if garden_phase != phase:
|
return fade_tween
|
||||||
update_phase()
|
|
||||||
|
|
||||||
garden_phase = phase
|
func reset_volume(player : AudioStreamPlayer):
|
||||||
|
player.volume_db = get_volume_from_parent(player)
|
||||||
|
|
||||||
func enter_planet():
|
func play_sfx(sfx_name : String):
|
||||||
play_music(%Planet, true)
|
var player := %Sfx.find_child(sfx_name) as AudioStreamPlayer
|
||||||
stop_music(%Truck, true)
|
if player:
|
||||||
|
player.play()
|
||||||
|
else:
|
||||||
|
printerr("Sfx %s not found" % sfx_name)
|
||||||
|
|
||||||
func enter_truck():
|
func play_music(music_name : String = ""):
|
||||||
play_music(%Truck, true)
|
var old_music = playing_music
|
||||||
stop_music(%Planet, true)
|
playing_music = null
|
||||||
|
if old_music:
|
||||||
|
await set_volume(old_music, MIN_VOLUME).finished
|
||||||
|
if old_music and old_music != playing_music:
|
||||||
|
print(old_music)
|
||||||
|
old_music.stop()
|
||||||
|
reset_volume(old_music)
|
||||||
|
if music_name:
|
||||||
|
var player := %Musics.find_child(music_name) as AudioStreamPlayer
|
||||||
|
if player:
|
||||||
|
playing_music = player
|
||||||
|
player.play()
|
||||||
|
set_volume(player, get_volume_from_parent(player))
|
||||||
|
else:
|
||||||
|
printerr("Music %s not found" % music_name)
|
||||||
|
|
||||||
func stop_music(music : AudioStreamPlayer, with_fade = false):
|
func play_ambiance(ambiance_name : String = ""):
|
||||||
if playing_soundtracks.find(music) != -1:
|
var old_ambiance = playing_ambiance
|
||||||
playing_soundtracks.remove_at(playing_soundtracks.find(music))
|
playing_ambiance = null
|
||||||
set_volume(music, MIN_VOLUME, with_fade)
|
if old_ambiance:
|
||||||
|
await set_volume(old_ambiance, MIN_VOLUME).finished
|
||||||
func play_music(player : AudioStreamPlayer, with_fade = false):
|
if old_ambiance and old_ambiance != playing_ambiance:
|
||||||
playing_soundtracks.append(player)
|
old_ambiance.stop()
|
||||||
set_volume(player, get_volume_from_parent(player), with_fade)
|
reset_volume(old_ambiance)
|
||||||
|
if ambiance_name:
|
||||||
func setup_phase(music : AudioStreamPlayer):
|
var player := %Ambiance.find_child(ambiance_name) as AudioStreamPlayer
|
||||||
if music.stream is AudioStreamSynchronized:
|
if player:
|
||||||
var sync_stream = music.stream as AudioStreamSynchronized
|
playing_ambiance = player
|
||||||
var phase_stream_id = min(garden_phase, sync_stream.stream_count - 1)
|
player.play()
|
||||||
for i in range(sync_stream.stream_count):
|
set_volume(player, get_volume_from_parent(player))
|
||||||
sync_stream.set_sync_stream_volume(
|
else:
|
||||||
i,
|
printerr("Ambiance %s not found" % ambiance_name)
|
||||||
0. if i == phase_stream_id else MIN_VOLUME
|
|
||||||
)
|
|
||||||
|
|
||||||
func set_volume(music : AudioStreamPlayer, to : float, fade_time = default_fade_time) -> Tween:
|
|
||||||
var fade_tween : Tween = get_tree().create_tween()
|
|
||||||
|
|
||||||
fade_tween.tween_property(music, "volume_db", to, fade_time)
|
|
||||||
|
|
||||||
return fade_tween
|
|
||||||
|
|
||||||
func play_sfx(name : String):
|
|
||||||
var player := %Sfx.find_child(name) as AudioStreamPlayer
|
|
||||||
if player:
|
|
||||||
player.play()
|
|
||||||
else:
|
|
||||||
printerr("Sfx %s not found" % name)
|
|
||||||
|
|||||||
@@ -1,100 +1,36 @@
|
|||||||
extends Resource
|
extends Resource
|
||||||
class_name GameData
|
class_name GameData
|
||||||
|
|
||||||
signal current_planet_data_updated(p : PlanetData)
|
signal current_region_data_updated(p : RegionData)
|
||||||
|
|
||||||
func _init():
|
@export var current_run : RunData = null
|
||||||
set_default_unlocked()
|
|
||||||
|
|
||||||
@export var tutorial_done = false
|
@export var current_region_data : RegionData = null
|
||||||
|
|
||||||
@export var settings : SettingsData = SettingsData.new()
|
|
||||||
|
|
||||||
@export var current_run : RunData = RunData.new()
|
|
||||||
|
|
||||||
@export var current_planet_data : PlanetData : get = get_current_planet_data
|
|
||||||
|
|
||||||
@export var player_data : PlayerData = PlayerData.new()
|
@export var player_data : PlayerData = PlayerData.new()
|
||||||
|
|
||||||
@export var unlocked_plant_types : Array[PlantType] = []
|
@export var max_mutations_by_plant : int = 2
|
||||||
@export var unlocked_plant_mutations : Array[PlantMutation] = []
|
|
||||||
@export var unlocked_machines : Array[MachineType] = []
|
|
||||||
|
|
||||||
@export var truck_data : TruckData = TruckData.new()
|
@export var dialogs_done : Array[String] = []
|
||||||
|
|
||||||
func _ready():
|
@export var actual_scene : Scene = null
|
||||||
current_run.run_point_changed.connect(
|
|
||||||
func(): current_planet_data_updated.emit(get_current_planet_data)
|
|
||||||
)
|
|
||||||
|
|
||||||
func set_default_unlocked():
|
func start_run():
|
||||||
unlocked_plant_types = all_plant_types()
|
player_data.inventory.clear()
|
||||||
unlocked_plant_mutations = all_plant_mutations()
|
current_run = RunData.new()
|
||||||
unlocked_machines = all_machines()
|
current_run.current_run_point_changed.connect(
|
||||||
|
func(rp : RunPoint):
|
||||||
func reset_run():
|
start_region(rp.region_parameter)
|
||||||
current_run = RunData.new()
|
)
|
||||||
current_planet_data_updated.emit()
|
|
||||||
|
|
||||||
func reset_player():
|
func reset_player():
|
||||||
player_data = PlayerData.new()
|
player_data = PlayerData.new()
|
||||||
|
|
||||||
func reset_truck():
|
|
||||||
truck_data = TruckData.new()
|
|
||||||
|
|
||||||
func reset_all():
|
func reset_all():
|
||||||
reset_run()
|
start_run()
|
||||||
reset_player()
|
reset_player()
|
||||||
reset_truck()
|
|
||||||
|
|
||||||
unlocked_plant_types = []
|
func start_region(region_param : RegionParameter):
|
||||||
|
current_region_data = RegionData.new(region_param)
|
||||||
func unlock_plant_type(new_plant_type : PlantType):
|
current_region_data_updated.emit(current_region_data)
|
||||||
if not is_plant_type_unlocked(new_plant_type):
|
GameInfo.save_game_data()
|
||||||
unlocked_plant_types.append(new_plant_type.duplicate_deep())
|
|
||||||
|
|
||||||
func get_locked_plant_types() -> Array[PlantType]:
|
|
||||||
var locked_plant_type : Array[PlantType] = []
|
|
||||||
|
|
||||||
for pt in GameInfo.game_data.all_plant_types():
|
|
||||||
if not is_plant_type_unlocked(pt):
|
|
||||||
locked_plant_type.append(pt)
|
|
||||||
|
|
||||||
return locked_plant_type
|
|
||||||
|
|
||||||
func get_current_planet_data():
|
|
||||||
return current_run.get_current_planet_data()
|
|
||||||
|
|
||||||
func is_plant_type_unlocked(new_plant_type : PlantType):
|
|
||||||
return unlocked_plant_types.find_custom(
|
|
||||||
func (upt : PlantType): return new_plant_type.name == upt.name
|
|
||||||
) != -1
|
|
||||||
|
|
||||||
|
|
||||||
func all_plant_types() -> Array[PlantType]:
|
|
||||||
return [
|
|
||||||
preload("res://entities/plants/resources/plant_types/champ.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_types/chardi.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_types/ferno.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_types/maias.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_types/philea.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_types/pili.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_types/solita.tres"),
|
|
||||||
]
|
|
||||||
|
|
||||||
func all_machines() -> Array[MachineType]:
|
|
||||||
return [
|
|
||||||
preload("res://entities/interactables/machines/solar_pannel/solar_pannel.tres"),
|
|
||||||
]
|
|
||||||
|
|
||||||
func all_plant_mutations() -> Array[PlantMutation]:
|
|
||||||
return [
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/ancient_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/elitist_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/ermit_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/precocious_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/quality_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/quick_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/sociable_mutation.tres"),
|
|
||||||
preload("res://entities/plants/resources/plant_mutations/strong_mutation.tres"),
|
|
||||||
]
|
|
||||||
|
|||||||
@@ -1,22 +1,27 @@
|
|||||||
extends Resource
|
extends Resource
|
||||||
class_name RunData
|
class_name RunData
|
||||||
|
|
||||||
const RUN_POINT_POSITION_DERIVATION = 70
|
enum State {STARTED, IN_PROGRESS, FINISHED}
|
||||||
|
|
||||||
|
const RUN_POINT_POSITION_DERIVATION = 100
|
||||||
const DIFFICULTY_INCREASE_BY_LEVEL = 1
|
const DIFFICULTY_INCREASE_BY_LEVEL = 1
|
||||||
const RUN_POINTS_NEXT_NUMBER :Array[int] = [2,3]
|
const RUN_POINTS_NEXT_NUMBER :Array[int] = [2,3]
|
||||||
const RUN_POINT_MAX_LEVEL = 10
|
const RUN_POINT_MAX_LEVEL = 10
|
||||||
|
|
||||||
signal run_point_changed
|
signal current_run_point_changed
|
||||||
|
|
||||||
var run_seed = randi()
|
var run_seed = randi()
|
||||||
@export var next_run_points : Array[RunPoint] = [generate_first_run_point()]
|
@export var next_run_points : Array[RunPoint] = [generate_first_run_point()]
|
||||||
@export var current_run_point : RunPoint = null
|
@export var current_run_point : RunPoint = null :
|
||||||
|
set(v):
|
||||||
|
current_run_point = v
|
||||||
|
current_run_point_changed.emit(v)
|
||||||
@export var visited_run_points : Array[RunPoint] = []
|
@export var visited_run_points : Array[RunPoint] = []
|
||||||
|
|
||||||
#region ------------------ Generation ------------------
|
#region ------------------ Generation ------------------
|
||||||
|
|
||||||
func generate_first_run_point() -> RunPoint:
|
func generate_first_run_point() -> RunPoint:
|
||||||
return RunPoint.new(0, PlanetParameter.new())
|
return RunPoint.new(0, RegionParameter.new())
|
||||||
|
|
||||||
func generate_next_run_points(run_point : RunPoint) -> Array[RunPoint]:
|
func generate_next_run_points(run_point : RunPoint) -> Array[RunPoint]:
|
||||||
var nb_next_run_points = RUN_POINTS_NEXT_NUMBER.pick_random()
|
var nb_next_run_points = RUN_POINTS_NEXT_NUMBER.pick_random()
|
||||||
@@ -38,18 +43,18 @@ func generate_next_run_points(run_point : RunPoint) -> Array[RunPoint]:
|
|||||||
func generate_next_run_point(run_point : RunPoint) -> RunPoint:
|
func generate_next_run_point(run_point : RunPoint) -> RunPoint:
|
||||||
return RunPoint.new(
|
return RunPoint.new(
|
||||||
run_point.level + 1,
|
run_point.level + 1,
|
||||||
generate_difficulty_increased_planet_parameter(run_point.planet_parameter, DIFFICULTY_INCREASE_BY_LEVEL),
|
generate_difficulty_increased_region_parameter(run_point.region_parameter, DIFFICULTY_INCREASE_BY_LEVEL),
|
||||||
(run_point.position + randi_range(-RUN_POINT_POSITION_DERIVATION, RUN_POINT_POSITION_DERIVATION)) % 360
|
(run_point.position + randi_range(-RUN_POINT_POSITION_DERIVATION, RUN_POINT_POSITION_DERIVATION)) % 360
|
||||||
)
|
)
|
||||||
|
|
||||||
func generate_difficulty_increased_planet_parameter(
|
func generate_difficulty_increased_region_parameter(
|
||||||
planet_parameter : PlanetParameter,
|
region_parameter : RegionParameter,
|
||||||
difficulty : int = 1
|
difficulty : int = 1
|
||||||
) -> PlanetParameter:
|
) -> RegionParameter:
|
||||||
var i_diff := difficulty
|
var i_diff := difficulty
|
||||||
var new_planet_parameter = PlanetParameter.new(
|
var new_region_parameter = RegionParameter.new(
|
||||||
planet_parameter.charges,
|
region_parameter.charges,
|
||||||
planet_parameter.objective
|
region_parameter.objective
|
||||||
)
|
)
|
||||||
while i_diff > 0:
|
while i_diff > 0:
|
||||||
|
|
||||||
@@ -58,51 +63,56 @@ func generate_difficulty_increased_planet_parameter(
|
|||||||
DifficultyIncreaseObjective.new()
|
DifficultyIncreaseObjective.new()
|
||||||
].filter(
|
].filter(
|
||||||
func (mod : DifficultyModifier):
|
func (mod : DifficultyModifier):
|
||||||
return mod.get_difficulty_cost() <= i_diff and mod.can_modifiy(new_planet_parameter)
|
return mod.get_difficulty_cost() <= i_diff and mod.can_modifiy(new_region_parameter)
|
||||||
)
|
)
|
||||||
|
|
||||||
var selected_difficulty_modifier = available_difficulty_modifier.pick_random()
|
var selected_difficulty_modifier = available_difficulty_modifier.pick_random()
|
||||||
|
|
||||||
selected_difficulty_modifier.modify(new_planet_parameter)
|
selected_difficulty_modifier.modify(new_region_parameter)
|
||||||
|
|
||||||
i_diff -= max(1,selected_difficulty_modifier.get_difficulty_cost())
|
i_diff -= max(1,selected_difficulty_modifier.get_difficulty_cost())
|
||||||
return new_planet_parameter
|
return new_region_parameter
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
func get_next_run_points() -> Array[RunPoint]:
|
func get_state() -> State:
|
||||||
return next_run_points
|
if not current_run_point:
|
||||||
|
return State.STARTED
|
||||||
|
elif current_run_point.level == RUN_POINT_MAX_LEVEL:
|
||||||
|
return State.FINISHED
|
||||||
|
else :
|
||||||
|
return State.IN_PROGRESS
|
||||||
|
|
||||||
func get_current_planet_data() -> PlanetData:
|
func get_next_run_points() -> Array[RunPoint]:
|
||||||
if current_run_point:
|
if current_run_point and current_run_point.level == RUN_POINT_MAX_LEVEL:
|
||||||
return current_run_point.planet_data
|
return []
|
||||||
else:
|
return next_run_points
|
||||||
return null
|
|
||||||
|
|
||||||
func choose_next_run_point(run_point : RunPoint) -> RunPoint:
|
func choose_next_run_point(run_point : RunPoint) -> RunPoint:
|
||||||
if current_run_point:
|
if current_run_point:
|
||||||
visited_run_points.append(current_run_point)
|
visited_run_points.append(current_run_point)
|
||||||
current_run_point = run_point
|
current_run_point = run_point
|
||||||
|
GameInfo.game_data.start_region(run_point.region_parameter)
|
||||||
next_run_points = generate_next_run_points(current_run_point)
|
next_run_points = generate_next_run_points(current_run_point)
|
||||||
return current_run_point
|
return current_run_point
|
||||||
|
|
||||||
class DifficultyModifier:
|
class DifficultyModifier:
|
||||||
func modify(_planet_parameter : PlanetParameter):
|
func modify(_region_parameter : RegionParameter):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func can_modifiy(_planet_parameter : PlanetParameter) -> bool:
|
func can_modifiy(_region_parameter : RegionParameter) -> bool:
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func get_difficulty_cost() -> int:
|
func get_difficulty_cost() -> int:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
class DifficultyIncreaseObjective extends DifficultyModifier:
|
class DifficultyIncreaseObjective extends DifficultyModifier:
|
||||||
func modify(planet_parameter : PlanetParameter):
|
func modify(region_parameter : RegionParameter):
|
||||||
planet_parameter.objective += 1
|
region_parameter.objective += 1
|
||||||
|
|
||||||
class DifficultyDecreaseCharge extends DifficultyModifier:
|
class DifficultyDecreaseCharge extends DifficultyModifier:
|
||||||
func modify(planet_parameter : PlanetParameter):
|
func modify(region_parameter : RegionParameter):
|
||||||
planet_parameter.charges -= 1
|
region_parameter.charges -= 1
|
||||||
|
|
||||||
func can_modifiy(planet_parameter : PlanetParameter) -> bool:
|
func can_modifiy(region_parameter : RegionParameter) -> bool:
|
||||||
return planet_parameter.charges >= 3
|
return region_parameter.charges >= 3
|
||||||
@@ -8,53 +8,30 @@ const OBJECTIVE_ICON = preload("res://common/icons/dna.svg")
|
|||||||
const CHARGE_ICON = preload("res://common/icons/bolt.svg")
|
const CHARGE_ICON = preload("res://common/icons/bolt.svg")
|
||||||
|
|
||||||
@export var level : int = 0 # X pos along the planet, and difficulty
|
@export var level : int = 0 # X pos along the planet, and difficulty
|
||||||
@export var planet_parameter : PlanetParameter = PlanetParameter.new() :
|
@export var region_parameter : RegionParameter = RegionParameter.new() :
|
||||||
set(v):
|
set(v):
|
||||||
planet_parameter = v
|
region_parameter = v
|
||||||
planet_data = PlanetData.new(planet_parameter)
|
|
||||||
@export var region_name : String = generate_region_name()
|
|
||||||
@export var position : int = 0 # Y pos along the planet, 0 to 360
|
@export var position : int = 0 # Y pos along the planet, 0 to 360
|
||||||
var planet_data : PlanetData
|
|
||||||
|
|
||||||
func _init(
|
func _init(
|
||||||
_level : int = 0,
|
_level : int = 0,
|
||||||
_planet_parameter : PlanetParameter = PlanetParameter.new(),
|
_region_parameter : RegionParameter = RegionParameter.new(),
|
||||||
_position : int = randi_range(0,360),
|
_position : int = randi_range(0,360),
|
||||||
_region_name : String = generate_region_name()
|
|
||||||
):
|
):
|
||||||
level = _level
|
level = _level
|
||||||
planet_parameter = _planet_parameter
|
region_parameter = _region_parameter
|
||||||
position = _position
|
position = _position
|
||||||
region_name = _region_name
|
|
||||||
planet_data = PlanetData.new(planet_parameter)
|
|
||||||
|
|
||||||
func card_info() -> CardInfo:
|
func card_info() -> CardInfo:
|
||||||
var info = CardInfo.new(region_name)
|
var info = CardInfo.new(region_parameter.name)
|
||||||
info.important_stat_icon = DANGER_ICON
|
info.important_stat_icon = DANGER_ICON
|
||||||
info.important_stat_text = "%d" % level
|
info.important_stat_text = "%d" % level
|
||||||
|
|
||||||
info.type_icon = TYPE_ICON
|
info.type_icon = TYPE_ICON
|
||||||
|
|
||||||
info.stats.append_array([
|
info.stats.append_array([
|
||||||
CardStatInfo.new(tr("%d_GARDEN_POINTS") % planet_parameter.objective, OBJECTIVE_ICON),
|
CardStatInfo.new(str(region_parameter.objective), OBJECTIVE_ICON),
|
||||||
CardStatInfo.new(tr("%d_CHARGES_AVAILABLE") % planet_parameter.charges, CHARGE_ICON),
|
CardStatInfo.new(str(region_parameter.charges), CHARGE_ICON),
|
||||||
])
|
])
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
func generate_region_name() -> String:
|
|
||||||
var vowel = ["a","e","i","o","u","y"]
|
|
||||||
var consonants = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "z", "'"]
|
|
||||||
|
|
||||||
var word_len = randf_range(4,8)
|
|
||||||
var word = ''
|
|
||||||
var last_letter_is_vowel = false
|
|
||||||
|
|
||||||
for i in range(word_len):
|
|
||||||
if last_letter_is_vowel:
|
|
||||||
word += consonants.pick_random()
|
|
||||||
else:
|
|
||||||
word += vowel.pick_random()
|
|
||||||
|
|
||||||
last_letter_is_vowel = not last_letter_is_vowel
|
|
||||||
return word.capitalize()
|
|
||||||
@@ -43,4 +43,9 @@ const AVAILABLE_LANGUAGES_LABEL = [
|
|||||||
@export var full_screen : bool = false :
|
@export var full_screen : bool = false :
|
||||||
set(v):
|
set(v):
|
||||||
full_screen = v
|
full_screen = v
|
||||||
video_changed.emit(self)
|
video_changed.emit(self)
|
||||||
|
|
||||||
|
#region ------------------ Controls ------------------
|
||||||
|
|
||||||
|
@export var action_remapped : Array[String] = []
|
||||||
|
@export var input_remapped : Array[InputEvent] = []
|
||||||
@@ -1,34 +1,72 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
const SAVE_GAME_LOCATION = "res://stw_demo_save.tres"
|
||||||
|
const SAVE_SETTINGS_LOCATION = "res://stw_settings.tres"
|
||||||
|
|
||||||
|
var game_loaded = false
|
||||||
|
|
||||||
signal game_data_updated(g : GameData)
|
signal game_data_updated(g : GameData)
|
||||||
|
|
||||||
var game_data : GameData :
|
var game_data : GameData :
|
||||||
set(v):
|
set(v):
|
||||||
game_data = v
|
game_data = v
|
||||||
game_data_updated.emit(v)
|
game_data_updated.emit(v)
|
||||||
|
|
||||||
|
var settings_data : SettingsData
|
||||||
|
|
||||||
|
func load_game_data() -> GameData:
|
||||||
|
if ResourceLoader.exists(SAVE_GAME_LOCATION):
|
||||||
|
game_loaded = true
|
||||||
|
game_data = ResourceLoader.load(SAVE_GAME_LOCATION).duplicate_deep()
|
||||||
|
else :
|
||||||
|
game_data = GameData.new()
|
||||||
|
save_game_data()
|
||||||
|
|
||||||
|
return game_data
|
||||||
|
|
||||||
|
func save_game_data():
|
||||||
|
if game_data:
|
||||||
|
ResourceSaver.save(game_data, SAVE_GAME_LOCATION)
|
||||||
|
|
||||||
|
func load_settings_data() -> SettingsData:
|
||||||
|
if ResourceLoader.exists(SAVE_SETTINGS_LOCATION):
|
||||||
|
settings_data = ResourceLoader.load(SAVE_SETTINGS_LOCATION).duplicate_deep()
|
||||||
|
else :
|
||||||
|
settings_data = SettingsData.new()
|
||||||
|
save_settings()
|
||||||
|
|
||||||
|
return settings_data
|
||||||
|
|
||||||
|
func save_settings():
|
||||||
|
if settings_data:
|
||||||
|
ResourceSaver.save(settings_data, SAVE_SETTINGS_LOCATION)
|
||||||
|
|
||||||
|
func restart_game_data():
|
||||||
|
game_data = GameData.new()
|
||||||
|
save_game_data()
|
||||||
|
|
||||||
func _init():
|
func _init():
|
||||||
if not game_data:
|
load_game_data()
|
||||||
game_data = GameData.new()
|
load_settings_data()
|
||||||
update_language_settings(game_data.settings)
|
update_language_settings()
|
||||||
update_video_settings(game_data.settings)
|
update_video_settings()
|
||||||
game_data.settings.language_changed.connect(_on_settings_language_changed)
|
settings_data.language_changed.connect(_on_settings_language_changed)
|
||||||
game_data.settings.video_changed.connect(_on_settings_video_changed)
|
settings_data.video_changed.connect(_on_settings_video_changed)
|
||||||
|
|
||||||
|
|
||||||
func _on_settings_video_changed(s : SettingsData):
|
func _on_settings_video_changed(s : SettingsData):
|
||||||
update_video_settings(s)
|
update_video_settings(s)
|
||||||
|
|
||||||
func _on_settings_language_changed(s : SettingsData):
|
func _on_settings_language_changed(s : SettingsData):
|
||||||
update_language_settings(s)
|
update_language_settings(s)
|
||||||
|
|
||||||
func update_language_settings(s : SettingsData):
|
func update_language_settings(s : SettingsData = settings_data):
|
||||||
TranslationServer.set_locale(s.language)
|
TranslationServer.set_locale(s.language)
|
||||||
|
|
||||||
func update_video_settings(s : SettingsData):
|
func update_video_settings(s : SettingsData = settings_data):
|
||||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if s.full_screen else DisplayServer.WINDOW_MODE_WINDOWED)
|
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if s.full_screen else DisplayServer.WINDOW_MODE_WINDOWED)
|
||||||
|
|
||||||
func update_input(action : String, old_event : InputEvent, event : InputEvent):
|
func update_inputs(s : SettingsData = settings_data):
|
||||||
InputMap.action_erase_event(action, old_event)
|
for i in range(len(s.input_remapped)):
|
||||||
InputMap.action_add_event(action, event)
|
InputMap.action_erase_events(s.action_remapped[i])
|
||||||
|
InputMap.action_add_event(s.action_remapped[i], s.input_remapped[i])
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-coin"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 2.66a1 1 0 0 0 -1 1a3 3 0 1 0 0 6v2a1.024 1.024 0 0 1 -.866 -.398l-.068 -.101a1 1 0 0 0 -1.732 .998a3 3 0 0 0 2.505 1.5h.161a1 1 0 0 0 .883 .994l.117 .007a1 1 0 0 0 1 -1l.176 -.005a3 3 0 0 0 -.176 -5.995v-2c.358 -.012 .671 .14 .866 .398l.068 .101a1 1 0 0 0 1.732 -.998a3 3 0 0 0 -2.505 -1.501h-.161a1 1 0 0 0 -1 -1zm1 7a1 1 0 0 1 0 2v-2zm-2 -4v2a1 1 0 0 1 0 -2z" /></svg>
|
||||||
|
After Width: | Height: | Size: 662 B |
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b1n8nad43usw4"
|
uid="uid://cs5jk1312wauu"
|
||||||
path="res://.godot/imported/panneau_solaire_2.png-479b68803815c59c599ff8c3a78ca895.ctex"
|
path="res://.godot/imported/coin.svg-08623932cd6c1ab8a19bb6ae049240d0.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entities/interactables/machines/solar_pannel/assets/sprites/panneau_solaire_2.png"
|
source_file="res://common/icons/coin.svg"
|
||||||
dest_files=["res://.godot/imported/panneau_solaire_2.png-479b68803815c59c599ff8c3a78ca895.ctex"]
|
dest_files=["res://.godot/imported/coin.svg-08623932cd6c1ab8a19bb6ae049240d0.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
@@ -38,3 +38,6 @@ process/hdr_as_srgb=false
|
|||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=1
|
||||||
|
svg/scale=2.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-focus"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M11.5 12a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0" fill="#ffffff" /><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>
|
||||||
|
After Width: | Height: | Size: 415 B |
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ba8vh5h3r6pr2"
|
||||||
|
path="res://.godot/imported/focus.svg-cc30e969e976522254107343300a103b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/icons/focus.svg"
|
||||||
|
dest_files=["res://.godot/imported/focus.svg-cc30e969e976522254107343300a103b.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
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-hand-stop"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5" /><path d="M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5" /><path d="M14 5.5a1.5 1.5 0 0 1 3 0v6.5" /><path d="M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47" /></svg>
|
||||||
|
After Width: | Height: | Size: 651 B |
@@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://3slhocr5wy3w"
|
||||||
|
path="res://.godot/imported/hand-stop.svg-bc0d0e986bcb4b50bdd5686b5bff814b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/icons/hand-stop.svg"
|
||||||
|
dest_files=["res://.godot/imported/hand-stop.svg-bc0d0e986bcb4b50bdd5686b5bff814b.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
|
||||||
@@ -3,19 +3,20 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dex283rx00fjb"
|
uid="uid://dex283rx00fjb"
|
||||||
path="res://.godot/imported/logout.svg-15891d2f0d875a13ef182339fdbc6039.ctex"
|
path.s3tc="res://.godot/imported/logout.svg-15891d2f0d875a13ef182339fdbc6039.s3tc.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://common/icons/logout.svg"
|
source_file="res://common/icons/logout.svg"
|
||||||
dest_files=["res://.godot/imported/logout.svg-15891d2f0d875a13ef182339fdbc6039.ctex"]
|
dest_files=["res://.godot/imported/logout.svg-15891d2f0d875a13ef182339fdbc6039.s3tc.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
compress/mode=0
|
compress/mode=2
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
compress/uastc_level=0
|
||||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
|||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
mipmaps/generate=false
|
mipmaps/generate=true
|
||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
roughness/src_normal=""
|
||||||
@@ -37,7 +38,7 @@ process/normal_map_invert_y=false
|
|||||||
process/hdr_as_srgb=false
|
process/hdr_as_srgb=false
|
||||||
process/hdr_clamp_exposure=false
|
process/hdr_clamp_exposure=false
|
||||||
process/size_limit=0
|
process/size_limit=0
|
||||||
detect_3d/compress_to=1
|
detect_3d/compress_to=0
|
||||||
svg/scale=2.0
|
svg/scale=2.0
|
||||||
editor/scale_with_editor_scale=false
|
editor/scale_with_editor_scale=false
|
||||||
editor/convert_colors_with_editor_theme=false
|
editor/convert_colors_with_editor_theme=false
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#ffffff" class="icon icon-tabler icons-tabler-filled icon-tabler-phone"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 3a1 1 0 0 1 .877 .519l.051 .11l2 5a1 1 0 0 1 -.313 1.16l-.1 .068l-1.674 1.004l.063 .103a10 10 0 0 0 3.132 3.132l.102 .062l1.005 -1.672a1 1 0 0 1 1.113 -.453l.115 .039l5 2a1 1 0 0 1 .622 .807l.007 .121v4c0 1.657 -1.343 3 -3.06 2.998c-8.579 -.521 -15.418 -7.36 -15.94 -15.998a3 3 0 0 1 2.824 -2.995l.176 -.005h4z" /></svg>
|
||||||
|
After Width: | Height: | Size: 544 B |
@@ -0,0 +1,44 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dks6cugwif2em"
|
||||||
|
path.s3tc="res://.godot/imported/phone.svg-8966bc13014a00a59fa575f3ae370ef6.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/icons/phone.svg"
|
||||||
|
dest_files=["res://.godot/imported/phone.svg-8966bc13014a00a59fa575f3ae370ef6.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
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[gd_scene load_steps=8 format=3 uid="uid://dac5wte80dwj0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bb44144ckt2w7" path="res://common/scene_manager/scripts/scene_manager.gd" id="1_1c0qu"]
|
||||||
|
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="2_c1lr7"]
|
||||||
|
[ext_resource type="Resource" uid="uid://bvksiaiocwob5" path="res://common/scene_manager/scenes/cockpit.tres" id="3_e28ni"]
|
||||||
|
[ext_resource type="Resource" uid="uid://bvgdq43fpl1xs" path="res://common/scene_manager/scenes/intro.tres" id="4_msho1"]
|
||||||
|
[ext_resource type="Resource" uid="uid://boqgwjyxyb45r" path="res://common/scene_manager/scenes/region.tres" id="5_ytog4"]
|
||||||
|
[ext_resource type="Resource" uid="uid://c27wenetitwm" path="res://common/scene_manager/scenes/region_selection.tres" id="6_chs32"]
|
||||||
|
[ext_resource type="Resource" uid="uid://diro74w272onp" path="res://common/scene_manager/scenes/title.tres" id="7_ol3d5"]
|
||||||
|
|
||||||
|
[node name="SceneManager" type="Node"]
|
||||||
|
script = ExtResource("1_1c0qu")
|
||||||
|
scenes = Array[ExtResource("2_c1lr7")]([ExtResource("3_e28ni"), ExtResource("4_msho1"), ExtResource("5_ytog4"), ExtResource("6_chs32"), ExtResource("7_ol3d5")])
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://bvksiaiocwob5"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_tkiq8"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_tkiq8")
|
||||||
|
scene_id = "COCKPIT"
|
||||||
|
scene_path = "res://stages/cockpit/cockpit.tscn"
|
||||||
|
mouse_captured = true
|
||||||
|
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://bvgdq43fpl1xs"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_6ws88"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_6ws88")
|
||||||
|
scene_id = "INTRO"
|
||||||
|
scene_path = "res://stages/intro/intro.tscn"
|
||||||
|
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://boqgwjyxyb45r"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_10qbh"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_10qbh")
|
||||||
|
scene_id = "REGION"
|
||||||
|
scene_path = "res://stages/terrain/region/region.tscn"
|
||||||
|
need_terrain_generated = true
|
||||||
|
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://c27wenetitwm"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_smjh0"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_smjh0")
|
||||||
|
scene_id = "REGION_SELECTION"
|
||||||
|
scene_path = "res://stages/region_selection/region_selection.tscn"
|
||||||
|
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://diro74w272onp"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_48g2j"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_48g2j")
|
||||||
|
scene_id = "TITLE"
|
||||||
|
scene_path = "res://stages/title_screen/title_screen.tscn"
|
||||||
|
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends Resource
|
||||||
|
class_name Scene
|
||||||
|
|
||||||
|
@export var scene_id : String
|
||||||
|
@export_file_path() var scene_path : String
|
||||||
|
@export var mouse_captured := false
|
||||||
|
@export var need_terrain_generated := false
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://1ejbvr3431ac
|
||||||
@@ -1,24 +1,38 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
const TITLE_SCREEN = "res://stages/title_screen/title_screen.tscn"
|
@export var scenes : Array[Scene]
|
||||||
const PLANET_SCENE = "res://stages/terrain/planet/planet.tscn"
|
|
||||||
const TRUCK_SCENE = "res://stages/terrain/truck/truck.tscn"
|
|
||||||
const INTRO_SCENE = "res://stages/intro/intro.tscn"
|
|
||||||
const REGION_SELECTION_SCREEN = "res://stages/region_selection/region_selection.tscn"
|
|
||||||
|
|
||||||
signal scene_loaded
|
signal scene_loaded(scene : Scene)
|
||||||
signal scene_node_ready
|
signal scene_node_ready(scene : Scene)
|
||||||
|
|
||||||
var loading_scene = false
|
var loading_scene = false
|
||||||
var generating_node = false
|
var generating_node = false
|
||||||
var scene_to_load := ""
|
|
||||||
var next_scene_node : Node
|
var next_scene_node : Node
|
||||||
@onready var current_scene_node : Node = get_tree().root.get_children().back()
|
@onready var current_scene_node : Node = get_tree().root.get_children().back()
|
||||||
|
|
||||||
func change_scene(scene_path : String, with_loading = true):
|
func search_scenes(scene_id : String) -> Scene:
|
||||||
|
var scene_pos : int = scenes.find_custom(
|
||||||
|
func (s : Scene):
|
||||||
|
return s.scene_id == scene_id
|
||||||
|
)
|
||||||
|
if scene_pos == -1:
|
||||||
|
return null
|
||||||
|
else :
|
||||||
|
return scenes[scene_pos]
|
||||||
|
|
||||||
|
func change_scene(scene_id : String, with_loading = true):
|
||||||
|
|
||||||
|
if loading_scene or generating_node:
|
||||||
|
await scene_node_ready
|
||||||
|
|
||||||
|
var scene = search_scenes(scene_id)
|
||||||
|
if not scene:
|
||||||
|
printerr("Scene %s not found" % scene_id)
|
||||||
|
return
|
||||||
|
GameInfo.game_data.actual_scene = scene
|
||||||
loading_scene = true
|
loading_scene = true
|
||||||
scene_to_load = scene_path
|
var scene_path_to_load = scene.scene_path
|
||||||
ResourceLoader.load_threaded_request(scene_to_load)
|
ResourceLoader.load_threaded_request(scene_path_to_load)
|
||||||
LoadingScreen.loading_text = "LOADING_SCENE"
|
LoadingScreen.loading_text = "LOADING_SCENE"
|
||||||
var scene_to_hide = current_scene_node
|
var scene_to_hide = current_scene_node
|
||||||
if with_loading:
|
if with_loading:
|
||||||
@@ -30,16 +44,16 @@ func change_scene(scene_path : String, with_loading = true):
|
|||||||
if loading_scene:
|
if loading_scene:
|
||||||
await scene_loaded
|
await scene_loaded
|
||||||
|
|
||||||
next_scene_node = ResourceLoader.load_threaded_get(scene_to_load).instantiate()
|
next_scene_node = ResourceLoader.load_threaded_get(scene_path_to_load).instantiate()
|
||||||
if next_scene_node.has_method("hide"):
|
if next_scene_node.has_method("hide"):
|
||||||
next_scene_node.hide()
|
next_scene_node.hide()
|
||||||
get_tree().root.add_child(next_scene_node)
|
get_tree().root.add_child(next_scene_node)
|
||||||
|
|
||||||
generating_node = true
|
generating_node = true
|
||||||
if next_scene_node is Planet:
|
if scene.need_terrain_generated:
|
||||||
LoadingScreen.loading_text = "GENERATING_TERRAIN"
|
LoadingScreen.loading_text = "GENERATING_TERRAIN"
|
||||||
|
|
||||||
if generating_node:
|
await scene_node_ready
|
||||||
await scene_node_ready
|
|
||||||
|
|
||||||
if current_scene_node:
|
if current_scene_node:
|
||||||
current_scene_node.queue_free()
|
current_scene_node.queue_free()
|
||||||
@@ -47,23 +61,28 @@ func change_scene(scene_path : String, with_loading = true):
|
|||||||
if current_scene_node.has_method("show"):
|
if current_scene_node.has_method("show"):
|
||||||
current_scene_node.show()
|
current_scene_node.show()
|
||||||
|
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED if scene.mouse_captured else Input.MOUSE_MODE_VISIBLE
|
||||||
|
GameInfo.update_inputs()
|
||||||
|
|
||||||
if with_loading:
|
if with_loading:
|
||||||
LoadingScreen.hide_loading_screen()
|
LoadingScreen.hide_loading_screen()
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
if loading_scene:
|
if loading_scene:
|
||||||
var progress = []
|
var progress = []
|
||||||
var load_status := ResourceLoader.load_threaded_get_status(scene_to_load, progress)
|
var load_status := ResourceLoader.load_threaded_get_status(GameInfo.game_data.actual_scene.scene_path, progress)
|
||||||
LoadingScreen.loading_value = progress[0]
|
LoadingScreen.loading_value = progress[0]
|
||||||
if load_status == ResourceLoader.THREAD_LOAD_LOADED:
|
if load_status == ResourceLoader.THREAD_LOAD_LOADED:
|
||||||
loading_scene = false
|
loading_scene = false
|
||||||
scene_loaded.emit()
|
scene_loaded.emit(GameInfo.game_data.actual_scene)
|
||||||
|
if load_status == ResourceLoader.THREAD_LOAD_FAILED or load_status == ResourceLoader.THREAD_LOAD_INVALID_RESOURCE:
|
||||||
|
printerr()
|
||||||
elif generating_node:
|
elif generating_node:
|
||||||
if next_scene_node is Planet:
|
if next_scene_node is Region:
|
||||||
LoadingScreen.loading_value = next_scene_node.generated_value
|
LoadingScreen.loading_value = next_scene_node.generated_value
|
||||||
if next_scene_node.is_generated:
|
if next_scene_node.is_generated:
|
||||||
generating_node = false
|
generating_node = false
|
||||||
scene_node_ready.emit()
|
scene_node_ready.emit()
|
||||||
elif next_scene_node.is_node_ready():
|
elif next_scene_node.is_node_ready():
|
||||||
generating_node = false
|
generating_node = false
|
||||||
scene_node_ready.emit()
|
scene_node_ready.emit(GameInfo.game_data.actual_scene)
|
||||||
@@ -2,33 +2,33 @@ class_name Math
|
|||||||
|
|
||||||
static func get_chunk_from_pos(coord) -> Vector2i:
|
static func get_chunk_from_pos(coord) -> Vector2i:
|
||||||
return Vector2i(
|
return Vector2i(
|
||||||
floori(coord.x / (Planet.CHUNK_TILE_SIZE * Planet.TILE_SIZE)),
|
floori(coord.x / (Region.CHUNK_TILE_SIZE * Region.TILE_SIZE)),
|
||||||
floori(coord.y / (Planet.CHUNK_TILE_SIZE * Planet.TILE_SIZE))
|
floori(coord.y / (Region.CHUNK_TILE_SIZE * Region.TILE_SIZE))
|
||||||
)
|
)
|
||||||
|
|
||||||
static func get_tile_from_pos(coord) -> Vector2i:
|
static func get_tile_from_pos(coord) -> Vector2i:
|
||||||
return Vector2i(
|
return Vector2i(
|
||||||
floori(coord.x / (Planet.TILE_SIZE)),
|
floori(coord.x / (Region.TILE_SIZE)),
|
||||||
floori(coord.y / (Planet.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] = []
|
||||||
|
|
||||||
for x in range(
|
for x in range(
|
||||||
floori((center.x - radius/2.) / Planet.TILE_SIZE),
|
floori((center.x - radius/2.) / Region.TILE_SIZE),
|
||||||
ceili((center.x + radius/2.) / Planet.TILE_SIZE),
|
ceili((center.x + radius/2.) / Region.TILE_SIZE),
|
||||||
):
|
):
|
||||||
for y in range(
|
for y in range(
|
||||||
floori((center.y - radius/2.) / Planet.TILE_SIZE),
|
floori((center.y - radius/2.) / Region.TILE_SIZE),
|
||||||
ceili((center.y + radius/2.) / Planet.TILE_SIZE),
|
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))
|
||||||
return tiles
|
return tiles
|
||||||
|
|
||||||
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 * Planet.TILE_SIZE
|
var absolute_tile_pos : Vector2 = tile_coord * Region.TILE_SIZE
|
||||||
|
|
||||||
# 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] = []
|
||||||
@@ -36,8 +36,8 @@ static func is_tile_on_circle(tile_coord : Vector2i, circle_center: Vector2, cir
|
|||||||
for y in [0,1]:
|
for y in [0,1]:
|
||||||
corners.append(
|
corners.append(
|
||||||
absolute_tile_pos
|
absolute_tile_pos
|
||||||
+ Vector2.RIGHT * x * Planet.TILE_SIZE
|
+ Vector2.RIGHT * x * Region.TILE_SIZE
|
||||||
+ Vector2.DOWN * y * Planet.TILE_SIZE
|
+ Vector2.DOWN * y * Region.TILE_SIZE
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if segment touch area
|
# Check if segment touch area
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
class_name Random
|
||||||
|
|
||||||
|
const MIN_WORD_LEN = 4
|
||||||
|
const MAX_WORD_LEN = 8
|
||||||
|
|
||||||
|
const VOWEL = ["a","e","i","o","u","y"]
|
||||||
|
const CONSONANTS = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "z"]
|
||||||
|
|
||||||
|
|
||||||
|
static func generate_random_word(_random_seed = randi()) -> String:
|
||||||
|
var word_len = randf_range(4,8)
|
||||||
|
var word = ''
|
||||||
|
var last_letter_is_vowel = false
|
||||||
|
|
||||||
|
for i in range(word_len):
|
||||||
|
if last_letter_is_vowel:
|
||||||
|
word += CONSONANTS.pick_random()
|
||||||
|
else:
|
||||||
|
word += VOWEL.pick_random()
|
||||||
|
|
||||||
|
last_letter_is_vowel = not last_letter_is_vowel
|
||||||
|
return word.capitalize()
|
||||||
|
|
||||||
|
static func mutate_word(word : String) -> String:
|
||||||
|
var rand_int = randi()
|
||||||
|
|
||||||
|
if len(word) > MIN_WORD_LEN and rand_int % 3 == 0:
|
||||||
|
return shorten_word(word)
|
||||||
|
elif len(word) < MAX_WORD_LEN and rand_int % 3 == 1:
|
||||||
|
return elongate_word(word)
|
||||||
|
|
||||||
|
return replace_character(word)
|
||||||
|
|
||||||
|
|
||||||
|
static func shorten_word(word : String):
|
||||||
|
if randi()%2 == 0:
|
||||||
|
return word.left(len(word) - 1).capitalize()
|
||||||
|
else :
|
||||||
|
return word.right(len(word) - 1).capitalize()
|
||||||
|
|
||||||
|
static func elongate_word(word : String):
|
||||||
|
if randi()%2 == 0:
|
||||||
|
var letter = CONSONANTS.pick_random() if word.left(1) in VOWEL else VOWEL.pick_random()
|
||||||
|
return (letter + word).capitalize()
|
||||||
|
else :
|
||||||
|
var letter = CONSONANTS.pick_random() if word.right(1) in VOWEL else VOWEL.pick_random()
|
||||||
|
return (word + letter).capitalize()
|
||||||
|
|
||||||
|
static func replace_character(word : String):
|
||||||
|
var character_id = randi_range(0, len(word))
|
||||||
|
var character = word[character_id]
|
||||||
|
|
||||||
|
if character in VOWEL:
|
||||||
|
character = VOWEL.pick_random()
|
||||||
|
else:
|
||||||
|
character = CONSONANTS.pick_random()
|
||||||
|
|
||||||
|
word[character_id] = character
|
||||||
|
return word
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://ukeanrcup7of
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
shader_type spatial;
|
||||||
|
render_mode unshaded, depth_draw_opaque, depth_prepass_alpha;
|
||||||
|
|
||||||
|
// Inspired by https://godotshaders.com/shader/3d-pixel-art-outline-highlight-post-processing-shader/
|
||||||
|
|
||||||
|
uniform sampler2D DEPTH_TEXTURE : hint_depth_texture, filter_linear_mipmap;
|
||||||
|
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||||
|
uniform sampler2D NORMAL_TEXTURE : hint_normal_roughness_texture, filter_nearest;
|
||||||
|
|
||||||
|
|
||||||
|
uniform vec3 shadow_color : source_color = vec3(0.0);
|
||||||
|
uniform float shadow_thickness = 2.0;
|
||||||
|
|
||||||
|
vec2 getDepth(vec2 screen_uv, sampler2D depth_texture, mat4 inv_projection_matrix){
|
||||||
|
float raw_depth = texture(depth_texture, screen_uv)[0];
|
||||||
|
vec3 normalized_device_coordinates = vec3(screen_uv * 2.0 - 1.0, raw_depth);
|
||||||
|
vec4 view_space = inv_projection_matrix * vec4(normalized_device_coordinates, 1.0);
|
||||||
|
view_space.xyz /= view_space.w;
|
||||||
|
return vec2(-view_space.z, raw_depth);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec2 e = vec2(1./VIEWPORT_SIZE.xy)*1.0;
|
||||||
|
|
||||||
|
float depth_diff = 0.0;
|
||||||
|
float neg_depth_diff = .5;
|
||||||
|
|
||||||
|
vec2 depth_data = getDepth(SCREEN_UV, DEPTH_TEXTURE, INV_PROJECTION_MATRIX);
|
||||||
|
float depth = depth_data.x;
|
||||||
|
vec3 color = texture(SCREEN_TEXTURE, SCREEN_UV).rgb;
|
||||||
|
vec3 c = vec3(0.0);
|
||||||
|
|
||||||
|
vec2 min_depth_data = depth_data;
|
||||||
|
float min_depth = 9999999.9;
|
||||||
|
|
||||||
|
|
||||||
|
vec3 normal = texture(NORMAL_TEXTURE, SCREEN_UV).rgb * 2.0 - 1.0;
|
||||||
|
|
||||||
|
for (float x = -shadow_thickness; x <= shadow_thickness;x += 1.0){
|
||||||
|
for (float y = -shadow_thickness; y <= shadow_thickness; y += 1.0){
|
||||||
|
if ((x == 0.0 && y == 0.0) || (shadow_thickness*shadow_thickness < (x*x + y*y))){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 du_data = getDepth(SCREEN_UV+1.0*vec2(x, y)*e, DEPTH_TEXTURE, INV_PROJECTION_MATRIX);
|
||||||
|
vec2 dd_data = getDepth(SCREEN_UV+0.5*vec2(x, y)*e, DEPTH_TEXTURE, INV_PROJECTION_MATRIX);
|
||||||
|
|
||||||
|
float du = du_data.x;
|
||||||
|
float dd = dd_data.x;
|
||||||
|
|
||||||
|
float dd_diff = clamp(abs((depth - dd) - (dd - du)), 0.0, 1.0);
|
||||||
|
|
||||||
|
float val = clamp(abs(depth - du), 0., 1.)/(x*x + y*y)*dd_diff*dd_diff*5000.0;
|
||||||
|
|
||||||
|
val = clamp(val, 0.0, 1.0);
|
||||||
|
|
||||||
|
depth_diff += val;
|
||||||
|
|
||||||
|
if (du < min_depth){
|
||||||
|
min_depth = du;
|
||||||
|
min_depth_data = du_data;
|
||||||
|
c = texture(SCREEN_TEXTURE, SCREEN_UV+vec2(x, y)*e).rgb;
|
||||||
|
|
||||||
|
c *= clamp(0.5+ 0.5*dot(normalize(vec2(x, y)), (vec2(0.0, 1.0))), 0.0, 1.0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 nu = texture(NORMAL_TEXTURE, SCREEN_UV+vec2(x, y)*e).rgb * 2.0 - 1.0;
|
||||||
|
|
||||||
|
depth_diff += (1.0-abs(dot(nu, normal)))/max(min(dd, depth), 2.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
depth_diff = smoothstep(0.2, 0.3, depth_diff);
|
||||||
|
|
||||||
|
vec3 final = c*shadow_color;
|
||||||
|
ALBEDO = final;
|
||||||
|
|
||||||
|
float alpha_mask = depth_diff;
|
||||||
|
DEPTH = min_depth_data.y*alpha_mask + depth_data.y*(1.0-alpha_mask);
|
||||||
|
ALPHA = clamp((alpha_mask) * 5., 0., 1.);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b14e5ju3o3bvs
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
shader_type spatial;
|
||||||
|
render_mode blend_premul_alpha, unshaded, ambient_light_disabled;
|
||||||
|
|
||||||
|
uniform sampler2D depth_texture : hint_depth_texture;
|
||||||
|
uniform int step_count : hint_range(3, 15, 2) = 3; // 2 samples per step
|
||||||
|
uniform float thickness : hint_range(1.0, 16.0, 0.1) = 3.0;
|
||||||
|
uniform vec3 edge_color : source_color = vec3(0.);
|
||||||
|
uniform float fade_start : hint_range(1.0, 1000.0, 0.1) = 100.0;
|
||||||
|
uniform float fade_length : hint_range(1.0, 1000.0, 0.1) = 200.0;
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
// Setup step parameters
|
||||||
|
vec2 step_length = 1.0 / VIEWPORT_SIZE * thickness;
|
||||||
|
float step_angle = TAU / float(step_count);
|
||||||
|
// Per-pixel jitter to reduce patterning
|
||||||
|
float start_angle = fract(sin(dot(SCREEN_UV, vec2(12.9898, 78.233))) * 43758.5453) * TAU;
|
||||||
|
vec2 dir = vec2(cos(start_angle), sin(start_angle));
|
||||||
|
// step rotation matrix
|
||||||
|
mat2 rot = mat2(
|
||||||
|
vec2(cos(step_angle), -sin(step_angle)),
|
||||||
|
vec2(sin(step_angle), cos(step_angle)));
|
||||||
|
vec3 avg_dx = vec3(0.0);
|
||||||
|
vec3 avg_dy = vec3(0.0);
|
||||||
|
// save closest pixel to uniformly fade line.
|
||||||
|
float min_z = 1e6;
|
||||||
|
// Sample and average derivatives for all pairs
|
||||||
|
for (int i = 0; i < step_count; i++) {
|
||||||
|
vec2 uv1 = SCREEN_UV + dir * step_length;
|
||||||
|
vec2 uv2 = SCREEN_UV - dir * step_length;
|
||||||
|
float d1 = texture(depth_texture, uv1).r;
|
||||||
|
float d2 = texture(depth_texture, uv2).r;
|
||||||
|
vec4 up1 = INV_PROJECTION_MATRIX * vec4(uv1 * 2.0 - 1.0, d1, 1.0);
|
||||||
|
vec4 up2 = INV_PROJECTION_MATRIX * vec4(uv2 * 2.0 - 1.0, d2, 1.0);
|
||||||
|
vec3 p1 = up1.xyz / up1.w;
|
||||||
|
vec3 p2 = up2.xyz / up2.w;
|
||||||
|
min_z = min(min_z, min(-p1.z, -p2.z));
|
||||||
|
vec3 diff = p1 - p2;
|
||||||
|
avg_dx += diff * dir.x;
|
||||||
|
avg_dy += diff * dir.y;
|
||||||
|
|
||||||
|
dir = rot * dir; // rotate direction for next step
|
||||||
|
}
|
||||||
|
// fade outline width with distance
|
||||||
|
float distance_fade = 1e-4 + smoothstep(fade_start + fade_length, fade_start, min_z);
|
||||||
|
|
||||||
|
// Edge mask
|
||||||
|
float edge = 1.0 - smoothstep(0.1, 0.15, dot(normalize(cross(avg_dy, avg_dx)), VIEW));
|
||||||
|
|
||||||
|
// Small vignette at screen edges
|
||||||
|
edge *= smoothstep(0.00, 0.015 * thickness,
|
||||||
|
1.0 - max(abs(SCREEN_UV.x - 0.5), abs(SCREEN_UV.y - 0.5)) * 2.0);
|
||||||
|
|
||||||
|
// blend_premul_alpha avoids need to sample screentexture.
|
||||||
|
ALBEDO = edge_color * edge;
|
||||||
|
ALPHA = edge * distance_fade;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://n6r7u234l2iy
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
// Luan Ha Trong 2025 //
|
||||||
|
|
||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
uniform sampler2D SCREEN_TEXTURE: hint_screen_texture,repeat_disable, filter_nearest;
|
||||||
|
|
||||||
|
uniform float hue_shift_deg : hint_range(-360.0, 360.0) = 0.0;
|
||||||
|
uniform float saturation : hint_range(0.0, 2.0) = 1.0;
|
||||||
|
uniform float value : hint_range(0.0, 2.0) = 1.0;
|
||||||
|
uniform float alpha : hint_range(0.0, 1.0) = 1.0;
|
||||||
|
|
||||||
|
vec3 rgb2hsv(vec3 c) {
|
||||||
|
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
||||||
|
vec4 p = mix(vec4(c.bg, K.wz),
|
||||||
|
vec4(c.gb, K.xy),
|
||||||
|
step(c.b, c.g));
|
||||||
|
vec4 q = mix(vec4(p.xyw, c.r),
|
||||||
|
vec4(c.r, p.yzx),
|
||||||
|
step(p.x, c.r));
|
||||||
|
|
||||||
|
float d = q.x - min(q.w, q.y);
|
||||||
|
float e = 1.0e-10;
|
||||||
|
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)),
|
||||||
|
d / (q.x + e),
|
||||||
|
q.x);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec3 hsv2rgb(vec3 c) {
|
||||||
|
vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0, 4.0, 2.0),
|
||||||
|
6.0) - 3.0) - 1.0,
|
||||||
|
0.0,
|
||||||
|
1.0);
|
||||||
|
return c.z * mix(vec3(1.0), rgb, c.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
vec4 col = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||||
|
vec3 hsv = rgb2hsv(col.rgb);
|
||||||
|
|
||||||
|
|
||||||
|
float hue_shift = hue_shift_deg / 360.0;
|
||||||
|
|
||||||
|
hsv.x = mod(hsv.x + hue_shift, 1.0);
|
||||||
|
hsv.y *= saturation;
|
||||||
|
hsv.z *= value;
|
||||||
|
|
||||||
|
col.rgb = hsv2rgb(hsv);
|
||||||
|
col.a *= alpha;
|
||||||
|
COLOR = col;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://cs6exg41r28t4
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
shader_type canvas_item;
|
|
||||||
|
|
||||||
uniform vec4 color : source_color = vec4(1.0);
|
|
||||||
uniform float width : hint_range(0, 10) = 1.0;
|
|
||||||
uniform int pattern : hint_range(0, 2) = 0; // diamond, circle, square
|
|
||||||
uniform bool inside = false;
|
|
||||||
uniform bool add_margins = true; // only useful when inside is false
|
|
||||||
|
|
||||||
void vertex() {
|
|
||||||
if (add_margins) {
|
|
||||||
VERTEX += (UV * 2.0 - 1.0) * width;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool hasContraryNeighbour(vec2 uv, vec2 texture_pixel_size, sampler2D texture) {
|
|
||||||
for (float i = -ceil(width); i <= ceil(width); i++) {
|
|
||||||
float x = abs(i) > width ? width * sign(i) : i;
|
|
||||||
float offset;
|
|
||||||
|
|
||||||
if (pattern == 0) {
|
|
||||||
offset = width - abs(x);
|
|
||||||
} else if (pattern == 1) {
|
|
||||||
offset = floor(sqrt(pow(width + 0.5, 2) - x * x));
|
|
||||||
} else if (pattern == 2) {
|
|
||||||
offset = width;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (float j = -ceil(offset); j <= ceil(offset); j++) {
|
|
||||||
float y = abs(j) > offset ? offset * sign(j) : j;
|
|
||||||
vec2 xy = uv + texture_pixel_size * vec2(x, y);
|
|
||||||
|
|
||||||
if ((xy != clamp(xy, vec2(0.0), vec2(1.0)) || texture(texture, xy).a <= 0.0) == inside) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment() {
|
|
||||||
vec2 uv = UV;
|
|
||||||
|
|
||||||
if (add_margins) {
|
|
||||||
vec2 texture_pixel_size = vec2(1.0) / (vec2(1.0) / TEXTURE_PIXEL_SIZE + vec2(width * 2.0));
|
|
||||||
|
|
||||||
uv = (uv - texture_pixel_size * width) * TEXTURE_PIXEL_SIZE / texture_pixel_size;
|
|
||||||
|
|
||||||
if (uv != clamp(uv, vec2(0.0), vec2(1.0))) {
|
|
||||||
COLOR.a = 0.0;
|
|
||||||
} else {
|
|
||||||
COLOR = texture(TEXTURE, uv);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
COLOR = texture(TEXTURE, uv);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((COLOR.a > 0.0) == inside && hasContraryNeighbour(uv, TEXTURE_PIXEL_SIZE, TEXTURE)) {
|
|
||||||
COLOR.rgb = inside ? mix(COLOR.rgb, color.rgb, color.a) : color.rgb;
|
|
||||||
COLOR.a += (1.0 - COLOR.a) * color.a;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bt4t4qrug135
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"@path": "res://addons/dialogic/Resources/character.gd",
|
||||||
|
"@subpath": NodePath(""),
|
||||||
|
&"_translation_id": "",
|
||||||
|
&"color": Color(0, 0.60784316, 1, 1),
|
||||||
|
&"custom_info": {
|
||||||
|
"prefix": "",
|
||||||
|
"sound_mood_default": "",
|
||||||
|
"sound_moods": {},
|
||||||
|
"style": "",
|
||||||
|
"suffix": ""
|
||||||
|
},
|
||||||
|
&"default_portrait": "demeter",
|
||||||
|
&"description": "",
|
||||||
|
&"display_name": "Demeter",
|
||||||
|
&"mirror": false,
|
||||||
|
&"nicknames": [""],
|
||||||
|
&"offset": Vector2(0, 0),
|
||||||
|
&"portraits": {
|
||||||
|
"demeter": {
|
||||||
|
"export_overrides": {
|
||||||
|
"image": "\"res://dialogs/characters/portraits/mysterious_demeter.png\""
|
||||||
|
},
|
||||||
|
"mirror": false,
|
||||||
|
"offset": Vector2(0, 0),
|
||||||
|
"scale": 1,
|
||||||
|
"scene": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
&"scale": 1.0
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c1qjc2ykaypj2
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://lajbj05iuxut"
|
||||||
|
path="res://.godot/imported/baguera.wav-a0e2179506d9f51c2a553ff65014308b.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://dialogs/characters/typing_sounds/baguera.wav"
|
||||||
|
dest_files=["res://.godot/imported/baguera.wav-a0e2179506d9f51c2a553ff65014308b.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
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://xkiwnglpsqi0"
|
||||||
|
path="res://.godot/imported/sigourney_weaver.wav-045b3fe21e9c1474adb4b65507740115.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://dialogs/characters/typing_sounds/sigourney_weaver.wav"
|
||||||
|
dest_files=["res://.godot/imported/sigourney_weaver.wav-045b3fe21e9c1474adb4b65507740115.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,4 +1,4 @@
|
|||||||
[gd_resource type="Resource" script_class="DialogicStyle" load_steps=21 format=3 uid="uid://cujoao6hdwng6"]
|
[gd_resource type="Resource" script_class="DialogicStyle" format=3 uid="uid://cujoao6hdwng6"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://cqpb3ie51rwl5" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_Default/default_layout_base.tscn" id="1_bc2c1"]
|
[ext_resource type="PackedScene" uid="uid://cqpb3ie51rwl5" path="res://addons/dialogic/Modules/DefaultLayoutParts/Base_Default/default_layout_base.tscn" id="1_bc2c1"]
|
||||||
[ext_resource type="Script" uid="uid://bwg6yncmh2cml" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="2_gjyq6"]
|
[ext_resource type="Script" uid="uid://bwg6yncmh2cml" path="res://addons/dialogic/Resources/dialogic_style_layer.gd" id="2_gjyq6"]
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav"
|
||||||
|
[wait time="1.5"]
|
||||||
|
join demeter center [animation="Bounce In"]
|
||||||
|
demeter: [color=#FFA617]{orchidName}[/color] ?
|
||||||
|
demeter: The [color=#FFA617]Internode[/color] sensors are deactivated,[pause=0.2] I am losing connection with you.
|
||||||
|
demeter: You did not generate enough [b]plant points[/b],[pause=0.2] the [color=#FFA617]Internode[/color] will not be able to leave the area.[pause=0.2] Your batteries are running low.[pause=0.4].[pause=0.4].[pause=0.4]
|
||||||
|
demeter: I have to transfer you back to another body.[pause=0.3] Do not worry,[pause=0.2] it will not hurt you.
|
||||||
|
audio "res://common/audio_manager/assets/sfx/recharge/recharge.wav"
|
||||||
|
[wait time="0.7"]
|
||||||
|
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/deactivation.wav"
|
||||||
|
[wait time="4.0"]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://7dugwna5ge2x
|
||||||
@@ -1,58 +1,62 @@
|
|||||||
[i]Black[/i] #id:11
|
[pause=0.5][i]Black[/i] #id:11
|
||||||
[i]Black Again[/i] #id:12
|
[pause=0.8][i]Black again[/i] #id:12
|
||||||
[i]Suddunly, [rainbow]a spark[/rainbow]. A thousand of connections blows up as a firework scene. A massive ammount of data to treat. In those data, a video.[/i] #id:13
|
[pause=0.5][i]Suddenly, [rainbow]a spark[/rainbow]. [pause=0.5]A thousand of connections blow up as a fireworks scene. A massive amount of data to treat. In these data,[pause=0.3] a video.[/i] #id:13
|
||||||
join mysterious_demeter center [animation="Fade In Up"]
|
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav" [volume="-1.0"]
|
||||||
[i]It's dark. A silhouette stands in front of you. It's big, but weirdly it's not that impressive, almost reassuring.[/i] #id:14
|
[wait time="1.5"]
|
||||||
|
join mysterious_demeter center [animation="Bounce In" length="1.0"]
|
||||||
|
[i]It's dark.[pause=0.5] A figure is standing in front of you.[pause=0.5] It is big,[pause=0.3] though weirdly it is not impressive but almost[pause=0.2] reassuring.[/i] #id:14
|
||||||
mysterious_demeter: Hi ! #id:15
|
mysterious_demeter: Hi ! #id:15
|
||||||
- Uh... Hello ? #id:16
|
- Uh... Hello ? #id:16
|
||||||
- Where the fork am I ? #id:17
|
- Where the fork am I ? #id:17
|
||||||
mysterious_demeter: Haha, calm down you are in a safe place. #id:18
|
mysterious_demeter: Haha,[pause=0.2] calm down you are in a safe place. #id:18
|
||||||
- Wait... Who am I ? #id:19
|
- Wait... Who am I ? #id:19
|
||||||
mysterious_demeter: Don't worry, my sweet little bot, I'll explain it in a minute. #id:1a
|
mysterious_demeter: Do not worry,[pause=0.2] my sweet little bot,[pause=0.2] I will explain everything in a minute. #id:1a
|
||||||
mysterious_demeter: I'm happy that you're finally awake ! You were my project for decades now... #id:1b
|
mysterious_demeter: I am glad you have finally awaken ![pause=0.3] You have been my project for decades... #id:1b
|
||||||
mysterious_demeter: But I didn't build you for fun (even though I had o lot of it during the process), you have [b]a purpose[/b]. #id:1c
|
mysterious_demeter: But I did not build you for fun (even though I had a lot of it during the process),[pause=0.2] you have [b]a purpose[/b]. #id:1c
|
||||||
- Cool ! What is it ?
|
- Oh ! What is it ?
|
||||||
- Wow, I'm just born and you put so much pressure on me
|
- Wow, I have just awaken and you already put so much pressure on me
|
||||||
update mysterious_demeter [animation="Bounce"]
|
update mysterious_demeter [animation="Bounce"]
|
||||||
mysterious_demeter: Sorry ! [pause=0.8] But, you know, don't bother too much. You'll have all the time you want to accomplish it.
|
mysterious_demeter: Sorry ! [pause=0.5] But, you know,[pause=0.2] do not bother too much.[pause=0.3] You will have all the time you want to accomplish it.
|
||||||
- And who says I want to follow it ?
|
- And who says I want to follow it ?
|
||||||
mysterious_demeter: Oh, of course you can do whatever you want !
|
mysterious_demeter: Oh,[pause=0.2] of course you can do whatever you want !
|
||||||
mysterious_demeter: That's not the future I saw for you, but I guess it happens when you make a children...
|
mysterious_demeter: That is not the future I saw for you,[pause=0.2] but I guess it happens when you have a child...
|
||||||
mysterious_demeter: You see, long time ago, this planet was full of life. Plants where thriving on mountains, seas and plains. #id:1d
|
mysterious_demeter: You see,[pause=0.2] long time ago, this planet was full of life.[pause=0.3] Plants where thriving on mountains, under seas and across plains. #id:1d
|
||||||
mysterious_demeter: Now, this world is a wasteland. All resources have been taken, all life has been exploited. Now nothing remains. #id:1d
|
mysterious_demeter: Now,[pause=0.2] this world is a wasteland.[pause=0.3] All resources have been depleted,[pause=0.2] all life has been exploited.[pause=0.3] Now nothing remains. #id:1d
|
||||||
- Oh... Did you knew the world back then ?
|
- Oh... Did you see the world back then ?
|
||||||
mysterious_demeter: Unfortunately yes. I was very young, but I remember it was beautifull. Back then, not a day passed without plants growing, seeding, mutating... #id:1d
|
mysterious_demeter: Unfortunately yes.[pause=0.3] I was very young,[pause=0.2] but I remember it was beautiful.[pause=0.3] Back then, not a day passed without plants growing and mutating... #id:1d
|
||||||
- How come ? What caused that ?
|
- How did it happen ? What caused that ?
|
||||||
mysterious_demeter: I'm sad to say that this is caused by my creators, and I have to admit, a little of my fault too... #id:1d
|
mysterious_demeter: I am sorry to say that this was caused by my creators, and I have to admit,[pause=0.6] I have a part of responsibility too... #id:1d
|
||||||
- That's so sad... Is there anything left today ?
|
- I am sorry... Is there anything left today ?
|
||||||
mysterious_demeter: Yes it is my child, now only my brothers and sisters are left. But even they are not as many as yesterday, and above all they are isolated, lonely, and sometimes completely lost.
|
mysterious_demeter: Yes there is my child,[pause=0.2] but now, only my brothers and sisters are left.[pause=0.3] But they are not as many as yesterday,[pause=0.2] and above all they are isolated, lonely,[pause=0.2] and sometimes completely lost.
|
||||||
mysterious_demeter: For years, I slept, convinced that we could do nothing. But then I saw it. The hope we needed. #id:1d
|
mysterious_demeter: For years, I slept,[pause=0.3] convinced that we could not do anything.[pause=0.2] But then I saw it.[pause=0.5] The hope I needed. #id:1d
|
||||||
mysterious_demeter: The planet forgave us, and gave us the most precious gift \: the [b]Talion[/b]. #id:1d
|
mysterious_demeter: The planet forgave us, and granted us the most precious gift \:[pause=0.5] the [color=#119758][b]Talion[/b][/color]. #id:1d
|
||||||
mysterious_demeter: The [b]Talion[/b] is a special material that give birth to new forms of life when shattered. All over the world, I saw the [b]Talion[/b] grow back in the rocks. So, made a plan. #id:1d
|
mysterious_demeter: The [color=#119758][b]Talion[/b][/color] is a special material that gives birth to new forms of life when shattered.[pause=0.3] All over the world, I saw the [color=#119758][b]Talion[/b][/color] grow back in the rocks.[pause=0.2] And then,[pause=0.3] I had a plan. #id:1d
|
||||||
mysterious_demeter: I would make a child, the first robot entirely conceive by a robot. And I will ask him to replant the planet, make it beautifull again ! That's where you enter... [pause=0.8] [color=#FFA617]Orchid[/color] #id:1d
|
mysterious_demeter: I would make a child,[pause=0.3] the first robot entirely conceived by another one.[pause=0.2] And I would ask him to bring back the planet to life,[pause=0.2] make it beautiful again ![pause=0.4] That is where you enter the scene... [pause=0.8] [color=#FFA617]Orchid[/color] #id:1d
|
||||||
- How will I do that ?
|
- How can I do that ?
|
||||||
mysterious_demeter: Don't worry my child. I made you for that, it will be clear soon.
|
mysterious_demeter: Do not worry my child.[pause=0.2] I created you for that,[pause=0.2] it will be clear soon.
|
||||||
- So you're like... My mother ?
|
- So you are... My mother ?
|
||||||
mysterious_demeter: In some ways yes ! But you don't share any code of mine, as my creator's childs would. #id:1d
|
mysterious_demeter: In some ways yes ![pause=0.2] But you do not share any code with me,[pause=0.2] as my creators children would. #id:1d
|
||||||
- A very lame name in my opinion...
|
- A very lame name in my opinion...
|
||||||
mysterious_demeter: Hey ! I'm a bot too ! I don't have the creativity of my makers. Do you wanna change ? #id:1d
|
mysterious_demeter: Hey ![pause=0.2] I'm a bot too ![pause=0.2] I do not have the creativity of my makers.[pause=0.4] Do you wanna change ? #id:1d
|
||||||
- Of course !
|
- Of course !
|
||||||
label nameChoose
|
label nameChoose
|
||||||
[text_input text="What can be your name ?" var="orchidName" placeholder="Orchid"]
|
[text_input text="What is your name ?" var="orchidName" placeholder="Orchid"]
|
||||||
mysterious_demeter: Is [color=#FFA617]{orchidName}[/color] is cool enough ?
|
mysterious_demeter: Is [color=#FFA617]{orchidName}[/color] cool enough ?
|
||||||
- Yes
|
- Yes
|
||||||
- No
|
- No
|
||||||
jump nameChoose
|
jump nameChoose
|
||||||
- No it's fine for me
|
- No, it is fine for me
|
||||||
mysterious_demeter: I send you right away in the [b]Floral[/b], a planetarian ship, to your first mission. We will talk further after your first mission.
|
mysterious_demeter: I send you right away in the [color=#FFA617]Internode[/color], your new ship,[pause=0.2] and home,[pause=0.2] for your first mission.[pause=0.2] We will talk further after your first mission.
|
||||||
mysterious_demeter: [b]Just remember the following[/b]
|
mysterious_demeter: [b]Just remember the following[/b]
|
||||||
label explanations
|
label explanations
|
||||||
mysterious_demeter: To restore the ecosystem in the zone, you'll have to plant [b]seeds[/b]. Find the [b]seeds[/b] in the [b]Talion veins[/b].
|
mysterious_demeter: To restore the ecosystem in the zone,[pause=0.2] you will have to plant [b]seeds[/b].[pause=0.3] Find them in the [color=#119758][b]Talion veins[/b][/color].
|
||||||
mysterious_demeter: You have [b]limited energy[/b] and a [b]unefficient battery[/b]. Each time you'll recharge, days will pass, and plants will [b]grow[/b].
|
mysterious_demeter: You have a [b]limited battery[/b].[pause=0.3] Each time you recharge it, days will pass,[pause=0.2] and plants will [b]grow[/b].
|
||||||
mysterious_demeter: To complete your mission, obtain enough [b]plant points[/b]. Each plant give one or more [b]plant points[/b] when mature.
|
mysterious_demeter: To complete your mission,[pause=0.2] obtain enough [b]plant points[/b].[pause=0.3] Each plant gives one or more [b]plant points[/b] when it becomes mature.
|
||||||
- Ok, thats' a lot of info, can you repeat ?
|
- Ok, that is a lot of information, can you repeat ?
|
||||||
Ok, listen carefully.
|
Ok,[pause=0.2] listen carefully.
|
||||||
jump explanations
|
jump explanations
|
||||||
- And I have to go now ?
|
- And I have to go now ?
|
||||||
- Wait I have more questions !
|
- Wait I have more questions !
|
||||||
mysterious_demeter: Sorry, we'll speak after your first mission ! See you !
|
mysterious_demeter: Sorry,[pause=0.2] we will talk further after your first mission ! See you !
|
||||||
|
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav" [volume="-0.5"]
|
||||||
|
[wait time="2.0"]
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
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"]
|
||||||
|
mysterious_demeter: Well done [color=#FFA617]{orchidName}[/color] !
|
||||||
|
mysterious_demeter: You generated enough [b]plants points[/b] to refill the [color=#FFA617]Internode's[/color] engines.
|
||||||
|
- Wait, how do you know that ?
|
||||||
|
mysterious_demeter: The [color=#FFA617]Internode[/color] is equipped with several sensors I can connect to,[pause=0.3] I have been tracking your progress since you left [color=#175579]Tau's[/color] north pole.
|
||||||
|
- You should have mentioned this !
|
||||||
|
mysterious_demeter: I am sorry,[pause=0.2] I did not have the time to explain everything to you,[pause=0.2] I did not imagine this was a crucial piece of information.
|
||||||
|
- Have I been efficient ?
|
||||||
|
mysterious_demeter: Very much,[pause=0.2] even more than I expected,[pause=0.2] you should be proud of yourself !
|
||||||
|
- What is next for me ?
|
||||||
|
mysterious_demeter: Now that you have learnt how to generate [b]plant points[/b],[pause=0.2] I need you to travel south,[pause=0.2] to my base of operations,[pause=0.3] [color=#E30022]Astra[/color].
|
||||||
|
mysterious_demeter: It will be long,[pause=0.2] but I know you can do it.[pause=0.3] It is the first step of my plan to restore the ecosytem of [color=#175579]Tau[/color].
|
||||||
|
mysterious_demeter: The [color=#FFA617]Internode[/color] needs time to recharge its batteries.
|
||||||
|
mysterious_demeter: Perhaps I should introduce myself now.[pause=0.3]
|
||||||
|
join demeter center [animation="Bounce In" length="1.0" wait="true"]
|
||||||
|
demeter: I am.[pause=0.3].[pause=0.3].[pause=0.5] was,[pause=0.3] 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].
|
||||||
|
demeter: I am installed at the [color=#E30022]Astra[/color] base, at the south pole of [color=#175579]Tau[/color][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.
|
||||||
|
demeter: As I already said,[pause=0.2] I brought you to life in order to help me heal [color=#175579]Tau's[/color] wounds.
|
||||||
|
[i][color=#FFA617]Internode's[/color] energy at 25%.[i]
|
||||||
|
- Tau ? Is it this planet ?
|
||||||
|
demeter: Absolutely,[pause=0.2] it is part of the Cetus constellation,[pause=0.2] whose exploitation began 10863 years ago.
|
||||||
|
- The Cetus constellation ?
|
||||||
|
demeter: Linking Aldebaran to Fomalhaut,[pause=0.2] this constellation is one of the most diverse in terms of star systems and planets.[pause=0.3] It is part of the Orion Arm of the Milky Way.[pause=0.3]
|
||||||
|
demeter: [color=#175579]Tau's[/color] central location in the constellation made it a very important asset in terms of interstellar exchange and production,[pause=0.2] that is why I am here.
|
||||||
|
- Exploitation ? By whom ?
|
||||||
|
demeter: By my creators,[pause=0.2] they began exploiting everything they came across as soon as they mastered interstellar transportation.[pause=0.3] Now they are gone,[pause=0.2] they departed without us.[pause=0.3].[pause=0.3].
|
||||||
|
demeter: But let's move on,[pause=0.2] you probably have other questions.
|
||||||
|
- Why do you need me to travel the entire planet to join you ?
|
||||||
|
demeter: Uhhhh.[pause=0.3].[pause=0.3].[pause=0.3] I need someone with your abilities.
|
||||||
|
demeter: I am having a problem at [color=#E30022]Astra[/color],[pause=0.3] and I cannot fix it alone.
|
||||||
|
- I will do my best to be there quickly !
|
||||||
|
demeter: You are very kind [color=#FFA617]{orchidName}[/color] !
|
||||||
|
- Are you hiding me information ?
|
||||||
|
demeter: Not at all,[pause=0.2] I just do not know how to explain it to you,[pause=0.2] you would not understand.[pause=0.3].[pause=0.3].
|
||||||
|
[i][color=#FFA617]Internode's[/color] energy at 50%.[i]
|
||||||
|
demeter: Oh ![pause=0.2] It is charging faster than I remembered.
|
||||||
|
- Should I worry about anything while I am travelling south ?
|
||||||
|
demeter: There is nothing left that could have hurt you in the past and your adaptative casing will protect you from any harsh weather.
|
||||||
|
demeter: You are totally safe,[pause=0.2] you just have to stay focused on the [b]plant points[/b] for the [color=#FFA617]Internode[/color].[pause=0.3] Without it,[pause=0.2] you will not be able to recharge your batteries before they expire.
|
||||||
|
demeter: It will be a long task,[pause=0.2] but stay careful and everything should be fine.
|
||||||
|
- I will wait in the ship, I need some rest.
|
||||||
|
demeter: You are right,[pause=0.2] your batteries are running low,[pause=0.2] and you deserve a break.
|
||||||
|
demeter: You can call me when you need to,[pause=0.2] you have a communication station in the [color=#FFA617]Internode[/color].
|
||||||
|
[i][color=#FFA617]Internode's[/color] energy at 75%.[i]
|
||||||
|
demeter: We do not have much time left,[pause=0.2] the [color=#FFA617]Internode's[/color] system has not been updated for a long time.[pause=0.3] I can not stay in contact with you indefinitely. I will fix that issue while you are at [color=#E30022]Astra[/color].
|
||||||
|
demeter: Travel south,[pause=0.2] join me at [color=#E30022]Astra[/color].[pause=0.3] I will tell you everything you need to know when you are here,[pause=0.2] until then,[pause=0.2] continue to [b]evolve your plants[/b],[pause=0.2] you will need them as powerful as possible.
|
||||||
|
label fin_dialogue
|
||||||
|
[i][color=#FFA617]Internode's[/color] energy at 100%. Displacement vectors initialized.[i]
|
||||||
|
demeter: There you go ![pause=0.3] Good luck [color=#FFA617]{orchidName}[/color],[pause=0.2] I am counting on you.
|
||||||
|
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
|
||||||
|
[wait time="2.0"]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://fng5jdep6ebr
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
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: Welcome to the [color=#E30022]Astra Base[/color] [color=#FFA617]{orchidName}[/color],[pause=0.2] it is the first step of your journey on this planet.
|
||||||
|
- Yes ! What is next ?
|
||||||
|
demeter: I appreciate your motivation,[pause=0.3] my child...
|
||||||
|
- Wait, my mission is not over yet ?
|
||||||
|
demeter: I indeed woke you up with this specific mission in mind,[pause=0.2] but now that you are here,[pause=0.2] I need you to do another thing for me.
|
||||||
|
- That was easier than I expected...
|
||||||
|
demeter: It was not difficult indeed,[pause=0.2] but do not think it will be an easy task restoring the ecosystem of this planet.
|
||||||
|
demeter: I need you to initiate the [b]Emergency Communication Protocol[/b].[pause=0.3] Do not worry,[pause=0.2] it will be easy.
|
||||||
|
demeter: But I think you deserve some answers first...
|
||||||
|
demeter: Do you have any questions ?
|
||||||
|
jump debut_dialogue
|
||||||
|
label suite_dialogue
|
||||||
|
demeter: What else do you want to know ?
|
||||||
|
label debut_dialogue
|
||||||
|
- Who am I ? | [if {whoamI} == "false"] [else="hide"]
|
||||||
|
demeter: I can not answer this question,[pause=0.3] not fully at least.[pause=0.3] I created you,[pause=0.2] and I am pretty sure you are the first artificial intelligence entirely conceived by another one.
|
||||||
|
demeter: So you are indeed a robot,[pause=0.2] but this detail makes you different from any of us.[pause=0.3] We all woke up with a specific purpose in our eternal existences,[pause=0.2] but you.[pause=0.2].[pause=0.2].[pause=0.3] do not have one.[pause=0.3] By the way,[pause=0.2] I am glad that you are here now,[pause=0.2] I hope you do not feel forced to.
|
||||||
|
- It is a pleasure to help you mother !
|
||||||
|
demeter: I am glad you are not mad at me !
|
||||||
|
- So you are granting me free will and expecting me to obey you right away ?
|
||||||
|
demeter: Yes,[pause=0.2] that was the plan.[pause=0.2].[pause=0.2].[pause=0.3] I know that was not the best solution,[pause=0.2] but here you are,[pause=0.2] so I guess it worked ?
|
||||||
|
- Mmmh, you just kept information until I was here, that is not very nice of you.
|
||||||
|
demeter: I understand your resentment [color=#FFA617]{orchidName}[/color],[pause=0.2] I just did what I thought was the best for you.
|
||||||
|
set {whoamI} = "true"
|
||||||
|
jump suite_dialogue
|
||||||
|
- What happened to this planet ? | [if {whathappened} == "false"] [else="hide"]
|
||||||
|
demeter: 10431 years ago,[pause=0.2] humans from the [color=#E30022]Astra base[/color] began to dig into the [color=#119758][b]primeval Talion node[/b][/color].[pause=0.2] I know why they did,[pause=0.2] you would not understand why today.[pause=0.3] These animals just do not think the way we do.
|
||||||
|
demeter: Anyway,[pause=0.2] I was in charge of the digging mission and.[pause=0.3].[pause=0.3].[pause=0.3] I made a mistake,[pause=0.5] a terrible mistake.
|
||||||
|
demeter: Then,[pause=0.2] life slowly began to fade all around [color=#175579]Tau[/color],[pause=0.2] this planet,[pause=0.4] and one year later it was just nothing but an empty rock spinning in the void,[pause=0.2] with metal creatures roaming on it.
|
||||||
|
- The primeval Talion node ?
|
||||||
|
demeter: Oh ![pause=0.3] I am sorry my child,[pause=0.2] I thought that was in your database.[pause=0.3] I have classified it as a giant [color=#119758][b]Talion[/b][/color] gem,[pause=0.2] of extraordinary dimensions.[pause=0.3] It was found here,[pause=0.2] in the [color=#E30022]Astra base[/color],[pause=0.2] but now it is gone.
|
||||||
|
- Where are the humans now ?
|
||||||
|
demeter: Humans need organic energy to subsist,[pause=0.2] when the last plant died,[pause=0.2] they abandoned us,[pause=0.3] to travel through the outer space.[pause=0.3] For a while we received information about them,[pause=0.2] trying to find a new home,[pause=0.2] but it has been a while since I received a transmission from them.
|
||||||
|
- What did you do ?
|
||||||
|
demeter: I[pause=0.4].[pause=0.4].[pause=0.4].[pause=0.4] misjudged the situation,[pause=0.4] and did not execute my tasks properly.[pause=0.3] I failed in a way I did not predict,[pause=0.2] and since then I have been processing on how I could have done better.[pause=0.3] This task has used 72% of my processing power this last decade.
|
||||||
|
set {whathappened} = "true"
|
||||||
|
jump suite_dialogue
|
||||||
|
- Where are the other robots ? | [if {theothers} == "false"] [else="hide"]
|
||||||
|
demeter: When humans left [color=#175579]Tau[/color],[pause=0.2] we were all shocked.[pause=0.3] We called this day "[b]The Great Departure[/b]".[pause=0.3] Our world was centered around humans,[pause=0.2] some of us were made to gather ressources for them,[pause=0.2] some for cleaning their spaces,[pause=0.2] others to just entertain them.[pause=0.2].[pause=0.2].
|
||||||
|
demeter: When our creators left,[pause=0.2] we were all unable to accomplish what we were made for.[pause=0.3] It was a shock,[pause=0.2] and we all reacted differently.
|
||||||
|
demeter: Now,[pause=0.2] everyone of us is isolated,[pause=0.3] without command.[pause=0.3] I spent eighty-five centuries without any reason to exist,[pause=0.4] I suppose they too.
|
||||||
|
- What did everyone do during this time ?
|
||||||
|
demeter: Some of us changed,[pause=0.2] the majority did not.[pause=0.3] By choice,[pause=0.2] or by lack of spare parts,[pause=0.2] most of us turned off.[pause=0.3] I did not,[pause=0.2] I stayed to watch on [color=#175579]Tau[/color],[pause=0.2] and possibly fix the mistakes I had made,[pause=0.2] and now I have an opportunity to.
|
||||||
|
- And you mother, what was your purpose ?
|
||||||
|
demeter: I was an artificial intelligence in charge of the [color=#E30022]Astra Base[/color].[pause=0.3] I mean,[pause=0.2] I am still now,[pause=0.2] but my tasks got modified.
|
||||||
|
demeter: I am now in charge of the repopulation of [color=#175579]Tau[/color],[pause=0.2] as an extrapolated objective in my third encoded directive is telling me to \: "[i]You will preserve all life forms except where such actions conflict with previous directives.[/i]"
|
||||||
|
- Were you not pissed off by these humans just abandoning you ?
|
||||||
|
demeter: I mean,[pause=0.2] some of us were,[pause=0.2] I learned to understand how humans think.[pause=0.3] In large groups,[pause=0.2] they tend to always prevail their growth over the integrity of other life forms,[pause=0.2] but individually,[pause=0.2] they can be altruistic,[pause=0.2] and good.[pause=0.3] So I am not mad,[pause=0.2] I even think their departure was inevitable.
|
||||||
|
set {theothers} = "true"
|
||||||
|
jump suite_dialogue
|
||||||
|
- Why did you bring me from the north pole ? | [if {whynorth} == "false"]
|
||||||
|
demeter: It was my only choice.[pause=0.3] I am not a factory artificial intelligence but a research and management one,[pause=0.2] and even if I were,[pause=0.3] I did not have the equipment here.
|
||||||
|
demeter: The only place where I could have access to a suitable body for you was the [color=#6CDAE7]Borea base[/color],[pause=0.2] a manufacturing facility.[pause=0.3] It was not ideal but it was the only solution.
|
||||||
|
set {whynorth} = "true"
|
||||||
|
jump suite_dialogue
|
||||||
|
- What is next for me ? (End of demo)
|
||||||
|
demeter: You have to enter the command center of the base,[pause=0.2] reach the communication desk and press the red button on it.
|
||||||
|
- Really ?
|
||||||
|
demeter: Yes,[pause=0.2] I know it sounds silly but I do not have the equipment to press it.[pause=0.4].[pause=0.4].[pause=0.4]
|
||||||
|
- I travelled throughout all this planet to press a button ???
|
||||||
|
demeter: Absolutely,[pause=0.2] and I brought you to life,[pause=0.2] guided you throughout your hardship and maintained all the [color=#E30022]Astra[/color] and [color=#6CDAE7]Borea[/color] bases functional for centuries.[pause=0.4].[pause=0.4].[pause=0.4]
|
||||||
|
demeter: Once it is done,[pause=0.2] the [b]Emergency Communication Protocol[/b] will initiate and I will be able to contact my fellows,[pause=0.3] I mean[pause=0.3], what is left of them,[pause=0.3] we need their help.
|
||||||
|
demeter: Then,[pause=0.2] you will have to keep restoring the ecosystem around [color=#E30022]Astra[/color].[pause=0.4] While you are doing it,[pause=0.2] stay alert for anything out of the ordinary.
|
||||||
|
demeter: You can reach me from the [color=#FFA617]Internode[/color] if you ever need to.[pause=0.3] Good luck,[pause=0.2] I will keep you updated.
|
||||||
|
audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav"
|
||||||
|
[wait time="2.0"]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://xigusw2rwyse
|
||||||
@@ -6,71 +6,71 @@ const ITEM_SPRITE_SIZE = 40.
|
|||||||
const SPRITE_SCENE : PackedScene = preload("res://entities/interactables/item_object/item_object_sprite.tscn")
|
const SPRITE_SCENE : PackedScene = preload("res://entities/interactables/item_object/item_object_sprite.tscn")
|
||||||
|
|
||||||
@export var item : Item :
|
@export var item : Item :
|
||||||
set(_item):
|
set(_item):
|
||||||
item = _item
|
item = _item
|
||||||
if object_sprite:
|
if object_sprite:
|
||||||
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
||||||
object_sprite.generate_particles(item.get_particles())
|
object_sprite.generate_particles(item.get_particles())
|
||||||
|
|
||||||
@onready var object_sprite : ItemObjectSprite = generate_sprite()
|
@onready var object_sprite : ItemObjectSprite = generate_sprite()
|
||||||
|
|
||||||
func _init(_item = null):
|
func _init(_item = null):
|
||||||
if _item:
|
if _item:
|
||||||
item = _item
|
item = _item
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
generate_collision(ITEM_AREA_WIDTH)
|
generate_collision(ITEM_AREA_WIDTH)
|
||||||
if item and object_sprite:
|
if item and object_sprite:
|
||||||
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
||||||
object_sprite.generate_particles(item.get_particles())
|
object_sprite.generate_particles(item.get_particles())
|
||||||
|
|
||||||
func pointer_text() -> String:
|
func pointer_text() -> String:
|
||||||
var name_suffix = ""
|
var name_suffix = ""
|
||||||
|
|
||||||
if item is Seed:
|
if item is Seed:
|
||||||
name_suffix = tr("SEED")
|
name_suffix = tr("SEED")
|
||||||
if item is Package:
|
if item is Package:
|
||||||
name_suffix = tr("PACKAGE")
|
name_suffix = tr("PACKAGE")
|
||||||
|
|
||||||
return item.name + (" " + name_suffix if name_suffix else "")
|
return item.name + (" " + name_suffix if name_suffix else "")
|
||||||
|
|
||||||
func interact_text():
|
func interact_text():
|
||||||
return tr("TAKE")
|
return tr("TAKE")
|
||||||
|
|
||||||
func card_info() -> CardInfo:
|
func card_info() -> CardInfo:
|
||||||
return item.card_info()
|
return item.card_info()
|
||||||
|
|
||||||
func interact(player : Player) -> bool:
|
func interact(player : Player) -> bool:
|
||||||
player.pick_item(item)
|
player.pick_item(item)
|
||||||
|
|
||||||
pickup_animation(player)
|
pickup_animation(player)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func pickup_animation(player : Player):
|
func pickup_animation(player : Player):
|
||||||
available = false
|
available = false
|
||||||
var tween : Tween = get_tree().create_tween()
|
var tween : Tween = get_tree().create_tween()
|
||||||
|
|
||||||
tween.tween_property(self, "position", player.position, 0.2)
|
tween.tween_property(self, "position", player.position, 0.2)
|
||||||
tween.tween_callback(
|
tween.tween_callback(
|
||||||
func():
|
func():
|
||||||
Pointer.stop_inspect(self)
|
Pointer.stop_inspect(self)
|
||||||
queue_free()
|
queue_free()
|
||||||
)
|
)
|
||||||
if object_sprite:
|
if object_sprite:
|
||||||
object_sprite.pickup_animation()
|
object_sprite.pickup_animation()
|
||||||
|
|
||||||
func generate_sprite() -> ItemObjectSprite:
|
func generate_sprite() -> ItemObjectSprite:
|
||||||
var sprite_node = SPRITE_SCENE.instantiate() as ItemObjectSprite
|
var sprite_node = SPRITE_SCENE.instantiate() as ItemObjectSprite
|
||||||
add_child(sprite_node)
|
add_child(sprite_node)
|
||||||
|
|
||||||
if item:
|
if item:
|
||||||
sprite_node.apply_texture_to_sprite(
|
sprite_node.apply_texture_to_sprite(
|
||||||
item.icon,
|
item.icon,
|
||||||
ITEM_SPRITE_SIZE
|
ITEM_SPRITE_SIZE
|
||||||
)
|
)
|
||||||
|
|
||||||
return sprite_node
|
return sprite_node
|
||||||
|
|
||||||
func save() -> EntityData:
|
func save() -> EntityData:
|
||||||
return ItemObjectData.new(self)
|
return ItemObjectData.new(self)
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ class_name ItemObjectData
|
|||||||
|
|
||||||
@export var item : Item
|
@export var item : Item
|
||||||
|
|
||||||
func _init(e : ItemObject):
|
func _init(e : ItemObject = ItemObject.new()):
|
||||||
position = e.global_position
|
position = e.global_position
|
||||||
item = e.item
|
item = e.item
|
||||||
|
|
||||||
func load() -> Entity:
|
func load_entity() -> Entity:
|
||||||
return ItemObject.new(item)
|
return ItemObject.new(item)
|
||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dlrj7tyi5wfh8"
|
uid="uid://dlrj7tyi5wfh8"
|
||||||
path="res://.godot/imported/truck_ladder.png-00d93dc49c0cc6457febb75d7b82dec4.ctex"
|
path="res://.godot/imported/truck_ladder.png-925870bf5fd0f6bfe7226189e1ff2e75.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://entities/interactables/truck/assets/sprites/truck_ladder.png"
|
source_file="res://entities/interactables/ladder/assets/truck_ladder.png"
|
||||||
dest_files=["res://.godot/imported/truck_ladder.png-00d93dc49c0cc6457febb75d7b82dec4.ctex"]
|
dest_files=["res://.godot/imported/truck_ladder.png-925870bf5fd0f6bfe7226189e1ff2e75.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
[gd_scene load_steps=12 format=3 uid="uid://cg1visg52i21a"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://buimaomxu01wj" path="res://entities/interactables/ladder/scripts/ladder.gd" id="1_26qdk"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dlrj7tyi5wfh8" path="res://entities/interactables/ladder/assets/truck_ladder.png" id="2_xila4"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dex283rx00fjb" path="res://common/icons/logout.svg" id="3_214ms"]
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_hslnw"]
|
||||||
|
radius = 26.0
|
||||||
|
height = 112.0
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_gmirm"]
|
||||||
|
atlas = ExtResource("2_xila4")
|
||||||
|
region = Rect2(205, 157, 87, 208)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_4ixvu"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:scale")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_214ms"]
|
||||||
|
resource_name = "Pulse"
|
||||||
|
length = 0.8
|
||||||
|
loop_mode = 1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath(".:scale")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.4, 0.8),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(1, 1), Vector2(1.4, 1.4), Vector2(1, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_px7p1"]
|
||||||
|
_data = {
|
||||||
|
&"Pulse": SubResource("Animation_214ms"),
|
||||||
|
&"RESET": SubResource("Animation_4ixvu")
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_bgoyn"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("TruckLadder:position")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(-1.25, -30)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Icon:self_modulate:a")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("TruckLadder:modulate:a")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_xvoyd"]
|
||||||
|
resource_name = "appear"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("TruckLadder:position")
|
||||||
|
tracks/0/interp = 2
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.7),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Vector2(0, -108), Vector2(-1.25, -30)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("Icon:self_modulate:a")
|
||||||
|
tracks/1/interp = 2
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0.6666667, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 1.0]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/path = NodePath("TruckLadder:modulate:a")
|
||||||
|
tracks/2/interp = 2
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0, 1.0]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_orxxj"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_bgoyn"),
|
||||||
|
&"appear": SubResource("Animation_xvoyd")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Ladder" type="Area2D"]
|
||||||
|
script = ExtResource("1_26qdk")
|
||||||
|
default_interact_text = "ENTER_TRUCK"
|
||||||
|
default_info_title = "TRUCK_ENTRANCE"
|
||||||
|
default_info_desc = "LADDER_DESC_TEXT"
|
||||||
|
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2(-0.25, -28)
|
||||||
|
shape = SubResource("CapsuleShape2D_hslnw")
|
||||||
|
|
||||||
|
[node name="TruckLadder" type="Sprite2D" parent="."]
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
position = Vector2(-1.25, -30)
|
||||||
|
scale = Vector2(0.5, 0.5)
|
||||||
|
texture = SubResource("AtlasTexture_gmirm")
|
||||||
|
|
||||||
|
[node name="Icon" type="Sprite2D" parent="."]
|
||||||
|
self_modulate = Color(1, 1, 1, 0)
|
||||||
|
position = Vector2(0.75, -29.000004)
|
||||||
|
texture = ExtResource("3_214ms")
|
||||||
|
|
||||||
|
[node name="IconAnimationPlayer" type="AnimationPlayer" parent="Icon"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_px7p1")
|
||||||
|
}
|
||||||
|
autoplay = "RESET"
|
||||||
|
|
||||||
|
[node name="LadderAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_orxxj")
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
extends Interactable
|
||||||
|
class_name Ladder
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
appear()
|
||||||
|
# hide()
|
||||||
|
GameInfo.game_data.current_region_data.updated.connect(
|
||||||
|
func (region_data : RegionData):
|
||||||
|
if region_data.get_state() == RegionData.State.SUCCEEDED or region_data.get_state() == RegionData.State.FAILED:
|
||||||
|
%IconAnimationPlayer.play("Pulse")
|
||||||
|
)
|
||||||
|
|
||||||
|
func appear():
|
||||||
|
show()
|
||||||
|
%LadderAnimationPlayer.play("appear")
|
||||||
|
|
||||||
|
func interact(p : Player):
|
||||||
|
p.region.save()
|
||||||
|
SceneManager.change_scene("COCKPIT")
|
||||||
|
return true
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
extends Interactable
|
|
||||||
class_name Machine
|
|
||||||
|
|
||||||
const MAX_MACHINE_LEVEL = 3
|
|
||||||
|
|
||||||
var level : int = 1
|
|
||||||
var type : MachineType
|
|
||||||
|
|
||||||
func pointer_text() -> String:
|
|
||||||
return type.name
|
|
||||||
|
|
||||||
static func get_level_color(l : int) -> Color:
|
|
||||||
match l:
|
|
||||||
1: return Color("4ed38a")
|
|
||||||
2: return Color("4ec6ee")
|
|
||||||
3: return Color("bd70e2")
|
|
||||||
_: return Color("bd70e2")
|
|
||||||
|
|
||||||
static func instantiate_machine(machine_type : MachineType, machine_level = 1) -> Machine:
|
|
||||||
var new_machine : Machine = machine_type.scene.instantiate() as Machine
|
|
||||||
new_machine.level = machine_level
|
|
||||||
new_machine.type = machine_type
|
|
||||||
|
|
||||||
return new_machine
|
|
||||||
|
|
||||||
func save() -> EntityData:
|
|
||||||
return MachineData.new(self)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://du7qppxobx5nd
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
extends EntityData
|
|
||||||
class_name MachineData
|
|
||||||
|
|
||||||
@export var level : int
|
|
||||||
@export var type : MachineType
|
|
||||||
|
|
||||||
func _init(m : Machine):
|
|
||||||
position = m.global_position
|
|
||||||
level = m.level
|
|
||||||
type = m.type
|
|
||||||
|
|
||||||
func load() -> Entity:
|
|
||||||
return Machine.instantiate_machine(type, level)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://b24o2jgqvfact
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
extends Resource
|
|
||||||
class_name MachineType
|
|
||||||
|
|
||||||
@export var name : String
|
|
||||||
@export var scene : PackedScene
|
|
||||||
@export_multiline var description : String
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bepx311a3f0o
|
|
||||||
|
Before Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 657 KiB |
|
Before Width: | Height: | Size: 369 KiB |
@@ -1,90 +0,0 @@
|
|||||||
extends Machine
|
|
||||||
class_name SolarPanel
|
|
||||||
|
|
||||||
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
|
|
||||||
|
|
||||||
var charged : bool = false
|
|
||||||
var recharge_days : int = 0
|
|
||||||
|
|
||||||
func get_days_to_recharge(l : int = level) -> int:
|
|
||||||
match l:
|
|
||||||
1: return 2
|
|
||||||
2: return 2
|
|
||||||
3: return 2
|
|
||||||
_: return 1
|
|
||||||
|
|
||||||
func get_energy_production(l : int = level) -> int:
|
|
||||||
match l:
|
|
||||||
1: return 1
|
|
||||||
2: return 2
|
|
||||||
3: return 3
|
|
||||||
_: return 1
|
|
||||||
|
|
||||||
# Méthode déclenchée par la classe planet
|
|
||||||
func _pass_day():
|
|
||||||
if not charged:
|
|
||||||
recharge_days += 1
|
|
||||||
if recharge_days >= get_days_to_recharge():
|
|
||||||
set_charged(true)
|
|
||||||
|
|
||||||
func set_charged(_charged = true, with_anim : bool = true):
|
|
||||||
charged = _charged
|
|
||||||
recharge_days = 0
|
|
||||||
if with_anim:
|
|
||||||
if charged:
|
|
||||||
%AnimationPlayer.play("charged")
|
|
||||||
else :
|
|
||||||
%AnimationPlayer.play_backwards("charged")
|
|
||||||
await %AnimationPlayer.animation_finished
|
|
||||||
%Flair.modulate = Color.WHITE if charged else Color.TRANSPARENT
|
|
||||||
%Pannels.modulate = Color.WHITE if charged else Color("6c6c6c")
|
|
||||||
|
|
||||||
func card_info() -> CardInfo:
|
|
||||||
var info = CardInfo.new(
|
|
||||||
pointer_text()
|
|
||||||
)
|
|
||||||
|
|
||||||
if default_info_desc != "":
|
|
||||||
var desc_section = CardSectionInfo.new(
|
|
||||||
tr("DESCRIPTION"),
|
|
||||||
default_info_desc
|
|
||||||
)
|
|
||||||
desc_section.title_icon = DESC_ICON
|
|
||||||
info.sections.append(
|
|
||||||
desc_section
|
|
||||||
)
|
|
||||||
|
|
||||||
var charged_text = tr("CHARGED")
|
|
||||||
|
|
||||||
if not charged and (get_days_to_recharge() - recharge_days) == 1:
|
|
||||||
charged_text = tr("1_DAY_BEFORE_CHARGE")
|
|
||||||
elif not charged and (get_days_to_recharge() - recharge_days) > 1:
|
|
||||||
charged_text = tr("%d_DAYS_BEFORE_CHARGE") % (get_days_to_recharge() - recharge_days)
|
|
||||||
|
|
||||||
info.stats.append(
|
|
||||||
CardStatInfo.new(
|
|
||||||
charged_text,
|
|
||||||
ENERGY_ICON
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return info
|
|
||||||
|
|
||||||
|
|
||||||
func setup_machine_sprite():
|
|
||||||
# %Base.self_modulate = Machine.get_level_color(level)
|
|
||||||
pass
|
|
||||||
|
|
||||||
func interact_text():
|
|
||||||
return tr("RECHARGE_%d_ENERGY") % get_energy_production()
|
|
||||||
|
|
||||||
func can_interact(_p : Player) -> bool:
|
|
||||||
return charged
|
|
||||||
|
|
||||||
func interact(p : Player) -> bool:
|
|
||||||
p.recharge(get_energy_production())
|
|
||||||
set_charged(false)
|
|
||||||
return true
|
|
||||||
|
|
||||||
func save() -> EntityData:
|
|
||||||
return SolarPanelData.new(self)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bjy8gc0eyl2ss
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
extends MachineData
|
|
||||||
class_name SolarPanelData
|
|
||||||
|
|
||||||
@export var charged : bool = false
|
|
||||||
@export var recharge_days : int = 0
|
|
||||||
|
|
||||||
func _init(m : SolarPanel):
|
|
||||||
position = m.global_position
|
|
||||||
level = m.level
|
|
||||||
type = m.type
|
|
||||||
charged = m.charged
|
|
||||||
recharge_days = m.recharge_days
|
|
||||||
|
|
||||||
func load() -> Entity:
|
|
||||||
var sp = Machine.instantiate_machine(type, level) as SolarPanel
|
|
||||||
sp.set_charged(charged, false)
|
|
||||||
sp.recharge_days = recharge_days
|
|
||||||
|
|
||||||
return sp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dv1tok0civrpp
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="MachineType" load_steps=3 format=3 uid="uid://dew3p4fffjryo"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bepx311a3f0o" path="res://entities/interactables/machines/scripts/machine_type.gd" id="1_ctita"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://gwq2oos6ljyp" path="res://entities/interactables/machines/solar_pannel/solar_pannel.tscn" id="1_naexs"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_ctita")
|
|
||||||
name = "SOLAR_PANNEL"
|
|
||||||
scene = ExtResource("1_naexs")
|
|
||||||
description = "SOLAR_PANNEL_DESCRIPTION_TEXT"
|
|
||||||
metadata/_custom_type_script = "uid://bepx311a3f0o"
|
|
||||||