Merge branch 'musique_et_son_2' of https://git.zacharie-guet.fr/zacharie/seeding-planets into musique_et_son_2
@@ -12,8 +12,14 @@ dest_files=["res://.godot/imported/ship_music.ogg-a35a322e3a6a4adafae0f2adcaf212
|
||||
|
||||
[params]
|
||||
|
||||
<<<<<<< HEAD
|
||||
loop=true
|
||||
loop_offset=0.0
|
||||
bpm=0.0
|
||||
=======
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
|
||||
@@ -18,7 +18,7 @@ force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_mode=2
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=2
|
||||
|
||||
BIN
common/audio_manager/assets/sfx/signal/signal.mp3
Normal file
19
common/audio_manager/assets/sfx/signal/signal.mp3.import
Normal file
@@ -0,0 +1,19 @@
|
||||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://c5y70k3codtn"
|
||||
path="res://.godot/imported/signal.mp3-2f41c9334233d52845bfe384d47f2a96.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/audio_manager/assets/sfx/signal/signal.mp3"
|
||||
dest_files=["res://.godot/imported/signal.mp3-2f41c9334233d52845bfe384d47f2a96.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
@@ -5,6 +5,7 @@
|
||||
[ext_resource type="AudioStream" uid="uid://bm0tdi6bd2e65" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_2.ogg" id="3_7uv4r"]
|
||||
[ext_resource type="AudioStream" uid="uid://b1hut6lc1jevh" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_2.ogg" id="4_2fduo"]
|
||||
[ext_resource type="AudioStream" uid="uid://dftxjfdqgsbd3" path="res://common/audio_manager/assets/ambiance/niveau/ambiance_phase_3.ogg" id="4_tuvql"]
|
||||
<<<<<<< HEAD
|
||||
[ext_resource type="AudioStream" uid="uid://dyv128cll6e15" path="res://common/audio_manager/assets/ambiance/astra/ambiance_astra.ogg" id="5_8204s"]
|
||||
[ext_resource type="AudioStream" uid="uid://dcbuhtc085q2x" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_1.ogg" id="5_ajci6"]
|
||||
[ext_resource type="AudioStream" uid="uid://cwu71o0sl2vto" path="res://common/audio_manager/assets/ambiance/dialogues/ambiance_Demeter.ogg" id="6_8204s"]
|
||||
@@ -12,13 +13,22 @@
|
||||
[ext_resource type="AudioStream" uid="uid://bpf6witukorka" path="res://common/audio_manager/assets/morceaux/menu/main_menu.ogg" id="7_tuvql"]
|
||||
[ext_resource type="AudioStream" uid="uid://dadg6o6dl2k6t" path="res://common/audio_manager/assets/ambiance/vaisseau/ship_music.ogg" id="8_tuvql"]
|
||||
[ext_resource type="AudioStream" uid="uid://dsphn6dbbd55a" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_1.ogg" id="9_am7i4"]
|
||||
=======
|
||||
[ext_resource type="AudioStream" uid="uid://dcbuhtc085q2x" path="res://common/audio_manager/assets/morceaux/niveau/mines_phase_1.ogg" id="5_ajci6"]
|
||||
[ext_resource type="AudioStream" uid="uid://bpf6witukorka" path="res://common/audio_manager/assets/morceaux/menu/main_menu.ogg" id="7_tuvql"]
|
||||
[ext_resource type="AudioStream" uid="uid://dadg6o6dl2k6t" path="res://common/audio_manager/assets/ambiance/vaisseau/ship_music.ogg" id="8_tuvql"]
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
[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://bdxkvaciw4mb3" path="res://common/audio_manager/assets/sfx/dig/dig_2.wav" id="10_n7o7n"]
|
||||
[ext_resource type="AudioStream" uid="uid://ccimypx71o4g6" path="res://common/audio_manager/assets/morceaux/niveau/forest_phase_2.ogg" id="10_tq535"]
|
||||
[ext_resource type="AudioStream" uid="uid://kqbqhwhkv7o3" path="res://common/audio_manager/assets/morceaux/niveau/mines_waiting.ogg" id="11_ngi21"]
|
||||
[ext_resource type="AudioStream" uid="uid://llxrlwfccywb" path="res://common/audio_manager/assets/sfx/dig/dig_3.wav" id="11_wtvls"]
|
||||
[ext_resource type="AudioStream" uid="uid://b8inedx4yjslw" path="res://common/audio_manager/assets/sfx/drop/drop_1.wav" id="12_4hp8f"]
|
||||
<<<<<<< HEAD
|
||||
[ext_resource type="AudioStream" uid="uid://cjbpfnlwcpjh0" path="res://common/audio_manager/assets/morceaux/niveau/forest_waiting.ogg" id="12_xmumj"]
|
||||
=======
|
||||
[ext_resource type="AudioStream" uid="uid://c5y70k3codtn" path="res://common/audio_manager/assets/sfx/signal/signal.mp3" id="12_ajci6"]
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
[ext_resource type="AudioStream" uid="uid://8nmr5vifkt1f" path="res://common/audio_manager/assets/sfx/harvest/harvest_1.wav" id="13_xoaox"]
|
||||
[ext_resource type="AudioStream" uid="uid://dgkdcq4j6fe3o" path="res://common/audio_manager/assets/sfx/harvest/harvest_2.wav" id="14_b5bgj"]
|
||||
[ext_resource type="AudioStream" uid="uid://eh3dbuxu5qtw" path="res://common/audio_manager/assets/sfx/harvest/harvest_3.wav" id="15_ynvb4"]
|
||||
@@ -29,6 +39,7 @@
|
||||
[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://ccq04ahrwr3bv" path="res://common/audio_manager/assets/sfx/alarm/alarm.wav" id="23_fwu3w"]
|
||||
<<<<<<< HEAD
|
||||
[ext_resource type="AudioStream" uid="uid://b4jx8rflw7dss" path="res://common/audio_manager/assets/sfx/phone/phone_ringing_Astra.wav" id="27_0rjel"]
|
||||
[ext_resource type="AudioStream" uid="uid://ocm1dkkhv7ls" path="res://common/audio_manager/assets/sfx/phone/phone_ringing.wav" id="28_3dfjn"]
|
||||
[ext_resource type="AudioStream" uid="uid://8juy5ev3rdfh" path="res://common/audio_manager/assets/sfx/plant_points/plant_point_1.wav" id="29_ngi21"]
|
||||
@@ -40,6 +51,12 @@
|
||||
[ext_resource type="AudioStream" uid="uid://cad0erjq0us08" path="res://common/audio_manager/assets/sfx/plant_points/plant_point_7.wav" id="35_rk2e0"]
|
||||
[ext_resource type="AudioStream" uid="uid://c6pl2fjg558j3" path="res://common/audio_manager/assets/sfx/plant_points/plant_point_8.wav" id="36_4sa2t"]
|
||||
[ext_resource type="AudioStream" uid="uid://b6lb4kwk7vmr" path="res://common/audio_manager/assets/sfx/ship_reveal/jingle_vaisseau.ogg" id="37_3dfjn"]
|
||||
=======
|
||||
[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"]
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_8204s"]
|
||||
stream_count = 3
|
||||
@@ -51,10 +68,13 @@ stream_2 = ExtResource("4_tuvql")
|
||||
stream_count = 6
|
||||
stream_0 = ExtResource("5_ajci6")
|
||||
stream_1 = ExtResource("4_2fduo")
|
||||
<<<<<<< HEAD
|
||||
stream_2 = ExtResource("11_ngi21")
|
||||
stream_3 = ExtResource("9_am7i4")
|
||||
stream_4 = ExtResource("10_tq535")
|
||||
stream_5 = ExtResource("12_xmumj")
|
||||
=======
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_kfbah"]
|
||||
streams_count = 3
|
||||
@@ -62,6 +82,11 @@ stream_0/stream = ExtResource("9_gv65y")
|
||||
stream_1/stream = ExtResource("10_n7o7n")
|
||||
stream_2/stream = ExtResource("11_wtvls")
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_8204s"]
|
||||
random_pitch = 1.0594631
|
||||
streams_count = 1
|
||||
stream_0/stream = ExtResource("12_ajci6")
|
||||
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_1w04j"]
|
||||
random_pitch = 1.2
|
||||
streams_count = 1
|
||||
@@ -82,6 +107,7 @@ streams_count = 2
|
||||
stream_0/stream = ExtResource("20_pu6t4")
|
||||
stream_1/stream = ExtResource("21_dk5s6")
|
||||
|
||||
<<<<<<< HEAD
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_qog4c"]
|
||||
random_pitch = 1.2599211
|
||||
streams_count = 8
|
||||
@@ -93,11 +119,19 @@ stream_4/stream = ExtResource("33_w2elg")
|
||||
stream_5/stream = ExtResource("34_em3o8")
|
||||
stream_6/stream = ExtResource("35_rk2e0")
|
||||
stream_7/stream = ExtResource("36_4sa2t")
|
||||
=======
|
||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_dhq5t"]
|
||||
random_pitch = 1.0594631
|
||||
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")
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
[node name="AudioManager" type="Node" unique_id=1871137180]
|
||||
process_mode = 3
|
||||
script = ExtResource("1_0tvca")
|
||||
default_fade_time = 2.0
|
||||
|
||||
[node name="Ambiance" type="Node" parent="." unique_id=1989991562]
|
||||
unique_name_in_owner = true
|
||||
@@ -105,6 +139,7 @@ unique_name_in_owner = true
|
||||
[node name="Exterior" type="AudioStreamPlayer" parent="Ambiance" unique_id=1405716780]
|
||||
unique_name_in_owner = true
|
||||
stream = SubResource("AudioStreamPlaylist_8204s")
|
||||
<<<<<<< HEAD
|
||||
|
||||
[node name="Astra" type="AudioStreamPlayer" parent="Ambiance" unique_id=1244577212]
|
||||
unique_name_in_owner = true
|
||||
@@ -117,6 +152,8 @@ stream = ExtResource("6_8204s")
|
||||
[node name="Borea" type="AudioStreamPlayer" parent="Ambiance" unique_id=1857904648]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("7_spekb")
|
||||
=======
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
[node name="Musics" type="Node" parent="." unique_id=1450527710]
|
||||
unique_name_in_owner = true
|
||||
@@ -128,6 +165,7 @@ stream = SubResource("AudioStreamPlaylist_ajci6")
|
||||
[node name="Title" type="AudioStreamPlayer" parent="Musics" unique_id=2105759422]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("7_tuvql")
|
||||
bus = &"Music"
|
||||
|
||||
[node name="Ship" type="AudioStreamPlayer" parent="Musics" unique_id=1165150318]
|
||||
unique_name_in_owner = true
|
||||
@@ -140,6 +178,9 @@ unique_name_in_owner = true
|
||||
[node name="Dig" type="AudioStreamPlayer" parent="Sfx" unique_id=486042600]
|
||||
stream = SubResource("AudioStreamRandomizer_kfbah")
|
||||
|
||||
[node name="Signal" type="AudioStreamPlayer" parent="Sfx" unique_id=641246368]
|
||||
stream = SubResource("AudioStreamRandomizer_8204s")
|
||||
|
||||
[node name="Drop" type="AudioStreamPlayer" parent="Sfx" unique_id=1391500830]
|
||||
stream = SubResource("AudioStreamRandomizer_1w04j")
|
||||
|
||||
@@ -157,6 +198,7 @@ volume_db = 8.627
|
||||
[node name="Alarm" type="AudioStreamPlayer" parent="Sfx" unique_id=689347925]
|
||||
stream = ExtResource("23_fwu3w")
|
||||
|
||||
<<<<<<< HEAD
|
||||
[node name="Astra_phone_call" type="AudioStreamPlayer" parent="Sfx" unique_id=721344636]
|
||||
stream = ExtResource("27_0rjel")
|
||||
|
||||
@@ -169,3 +211,7 @@ stream = SubResource("AudioStreamRandomizer_qog4c")
|
||||
[node name="Ship_reveal" type="AudioStreamPlayer" parent="Sfx" unique_id=1121632306]
|
||||
stream = ExtResource("37_3dfjn")
|
||||
volume_db = -10.0
|
||||
=======
|
||||
[node name="Pickaxe" type="AudioStreamPlayer" parent="Sfx" unique_id=996309145]
|
||||
stream = SubResource("AudioStreamRandomizer_dhq5t")
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
@@ -3,16 +3,20 @@ extends Node
|
||||
const MIN_VOLUME = -60.
|
||||
const MAX_VOLUME = 24.
|
||||
|
||||
const DEFAULT_FADE_TIME : float = 0.5
|
||||
|
||||
@onready var settings : SettingsData = GameInfo.settings_data
|
||||
|
||||
@export var default_fade_time = 0.5
|
||||
|
||||
@export var playing_music : AudioStreamPlayer = null
|
||||
@export var playing_ambiance : AudioStreamPlayer = null
|
||||
var music_action : AudioAction
|
||||
var ambiance_action : AudioAction
|
||||
var playing_music : AudioStreamPlayer = null
|
||||
var playing_ambiance : AudioStreamPlayer = null
|
||||
|
||||
var default_volumes := {}
|
||||
|
||||
func _ready():
|
||||
<<<<<<< HEAD
|
||||
for player in get_all_players():
|
||||
player.stop()
|
||||
|
||||
@@ -55,6 +59,117 @@ func _on_timeline_started():
|
||||
play_ambiance("Demeter")
|
||||
# Timeline name et le nom du fichier de timeline, par exemple demeter_intro
|
||||
# Amuse toi Niels ;)
|
||||
=======
|
||||
for player in get_all_players():
|
||||
player.stop()
|
||||
|
||||
fetch_default_volumes()
|
||||
# setup_players_bus()
|
||||
settings.sound_changed.connect(
|
||||
func(_s) : setup_players_bus()
|
||||
)
|
||||
SceneManager.scene_loaded.connect(_on_change_scene)
|
||||
Dialogic.timeline_started.connect(_on_timeline_started)
|
||||
Dialogic.timeline_ended.connect(_on_timeline_ended)
|
||||
|
||||
func _process(_d):
|
||||
if music_action:
|
||||
playing_music = process_audio_action(
|
||||
music_action,
|
||||
%Musics,
|
||||
playing_music
|
||||
)
|
||||
music_action = null
|
||||
|
||||
if ambiance_action:
|
||||
playing_ambiance = process_audio_action(
|
||||
ambiance_action,
|
||||
%Ambiance,
|
||||
playing_ambiance
|
||||
)
|
||||
ambiance_action = null
|
||||
|
||||
func process_audio_action(
|
||||
audio_action : AudioAction,
|
||||
player_search_node: Node,
|
||||
current_player: AudioStreamPlayer = null
|
||||
) -> AudioStreamPlayer:
|
||||
if audio_action is AudioLaunch:
|
||||
return process_audio_launch(audio_action, player_search_node, current_player)
|
||||
elif audio_action is AudioStop and current_player and current_player.playing:
|
||||
stop_player(current_player)
|
||||
|
||||
return null
|
||||
|
||||
func process_audio_launch(
|
||||
audio_launch : AudioLaunch,
|
||||
player_search_node: Node,
|
||||
current_player: AudioStreamPlayer = null,
|
||||
) -> AudioStreamPlayer:
|
||||
var player = player_search_node.find_child(audio_launch.player_name)
|
||||
if not player:
|
||||
printerr("Player %s not found in category %s" % [audio_launch.player_name, player_search_node.name])
|
||||
return null
|
||||
if current_player and current_player.playing and current_player.name == audio_launch.player_name:
|
||||
return current_player
|
||||
elif current_player:
|
||||
stop_player(current_player)
|
||||
|
||||
start_player(player, audio_launch.from_random_time, audio_launch.fade_time)
|
||||
return player
|
||||
|
||||
func _on_change_scene(scene : Scene):
|
||||
stop_ambiance()
|
||||
|
||||
match scene.scene_id:
|
||||
"TITLE":
|
||||
play_music("Title", false, 0.0)
|
||||
"REGION":
|
||||
play_music("Region", true)
|
||||
play_ambiance("Exterior", true)
|
||||
"COCKPIT":
|
||||
play_music("Ship")
|
||||
|
||||
func _on_timeline_started():
|
||||
var timeline_name = Dialogic.current_timeline.resource_path.split("/")[-1].trim_suffix(".dtl")
|
||||
play_ambiance()
|
||||
|
||||
match timeline_name:
|
||||
"demeter_intro":
|
||||
play_ambiance("Demeter")
|
||||
"demeter_introV2":
|
||||
play_ambiance("Demeter")
|
||||
"demeter_midrun":
|
||||
play_ambiance("Demeter")
|
||||
"demeter_outro":
|
||||
play_ambiance("Demeter")
|
||||
"failure":
|
||||
play_ambiance("Demeter")
|
||||
|
||||
func _on_timeline_ended():
|
||||
if SceneManager.actual_scene:
|
||||
_on_change_scene(SceneManager.actual_scene)
|
||||
|
||||
func play_music(player_name : String = "", from_random_time := false, fade_time := DEFAULT_FADE_TIME):
|
||||
music_action = AudioLaunch.new(
|
||||
player_name,
|
||||
from_random_time,
|
||||
fade_time
|
||||
)
|
||||
|
||||
func stop_music():
|
||||
music_action = AudioStop.new()
|
||||
|
||||
func play_ambiance(player_name : String = "", from_random_time := false, fade_time := DEFAULT_FADE_TIME):
|
||||
ambiance_action = AudioLaunch.new(
|
||||
player_name,
|
||||
from_random_time,
|
||||
fade_time
|
||||
)
|
||||
|
||||
func stop_ambiance():
|
||||
ambiance_action = AudioStop.new()
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
func fetch_default_volumes():
|
||||
var all_players := get_all_players()
|
||||
@@ -62,6 +177,7 @@ func fetch_default_volumes():
|
||||
for player in all_players:
|
||||
default_volumes[player] = player.volume_db
|
||||
|
||||
<<<<<<< HEAD
|
||||
func setup_volume():
|
||||
for player in get_all_players():
|
||||
player.volume_db = get_volume_from_parent(player)
|
||||
@@ -77,6 +193,19 @@ func get_volume_from_parent(player : AudioStreamPlayer) -> float:
|
||||
settings_volume = settings.music_volume
|
||||
|
||||
return default_volumes[player] + lerp(MIN_VOLUME, MAX_VOLUME, settings_volume)
|
||||
=======
|
||||
func setup_players_bus():
|
||||
for player in get_all_players():
|
||||
if player.get_parent() == %Musics:
|
||||
player.bus = (AudioServer.get_bus_name(SettingsData.MUSIC_BUS_ID))
|
||||
elif player.get_parent() == %Sfx:
|
||||
player.bus = (AudioServer.get_bus_name(SettingsData.SFX_BUS_ID))
|
||||
elif player.get_parent() == %Ambiance:
|
||||
player.bus = (AudioServer.get_bus_name(SettingsData.AMBIANCE_BUS_ID))
|
||||
|
||||
func get_volume(player : AudioStreamPlayer) -> float:
|
||||
return default_volumes[player]
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
func get_all_players() -> Array[AudioStreamPlayer]:
|
||||
var players : Array[AudioStreamPlayer] = []
|
||||
@@ -94,15 +223,41 @@ func get_players_from_node(node : Node) -> Array[AudioStreamPlayer]:
|
||||
streams.append(c)
|
||||
return streams
|
||||
|
||||
<<<<<<< HEAD
|
||||
func set_volume(player : AudioStreamPlayer, to : float, fade_time = default_fade_time) -> Tween:
|
||||
var fade_tween : Tween = get_tree().create_tween()
|
||||
=======
|
||||
func set_volume(player : AudioStreamPlayer, to : float, fade_time := 0.0) -> Tween:
|
||||
var fade_tween : Tween = get_tree().create_tween()
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
fade_tween.tween_property(player, "volume_db", to, fade_time)
|
||||
|
||||
return fade_tween
|
||||
|
||||
func start_player(player: AudioStreamPlayer, from_random_time = false, fade_time = DEFAULT_FADE_TIME):
|
||||
if player and not player.playing:
|
||||
player.play(
|
||||
0.0 if not from_random_time
|
||||
else randf_range(0.0, player.stream.get_length())
|
||||
)
|
||||
if fade_time > 0.0:
|
||||
player.volume_db = MIN_VOLUME
|
||||
await set_volume(player, get_volume(player), fade_time).finished
|
||||
|
||||
func stop_player(player : AudioStreamPlayer, fade_time = DEFAULT_FADE_TIME):
|
||||
if player and player.playing:
|
||||
if fade_time > 0.0:
|
||||
await set_volume(player, MIN_VOLUME, fade_time).finished
|
||||
player.stop()
|
||||
player.volume_db = get_volume(player)
|
||||
|
||||
func reset_volume(player : AudioStreamPlayer):
|
||||
<<<<<<< HEAD
|
||||
player.volume_db = get_volume_from_parent(player)
|
||||
=======
|
||||
player.volume_db = get_volume(player)
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
func play_sfx(sfx_name : String):
|
||||
var player := %Sfx.find_child(sfx_name) as AudioStreamPlayer
|
||||
@@ -111,6 +266,7 @@ func play_sfx(sfx_name : String):
|
||||
else:
|
||||
printerr("Sfx %s not found" % sfx_name)
|
||||
|
||||
<<<<<<< HEAD
|
||||
func play_music(music_name : String = ""):
|
||||
var old_music = playing_music
|
||||
playing_music = null
|
||||
@@ -144,3 +300,25 @@ func play_ambiance(ambiance_name : String = ""):
|
||||
set_volume(player, get_volume_from_parent(player))
|
||||
else:
|
||||
printerr("Ambiance %s not found" % ambiance_name)
|
||||
=======
|
||||
class AudioAction:
|
||||
pass
|
||||
|
||||
class AudioLaunch extends AudioAction:
|
||||
var player_name : String
|
||||
var from_random_time : bool
|
||||
var fade_time : float
|
||||
|
||||
func _init(
|
||||
_player_name : String,
|
||||
_from_random_time := false,
|
||||
_fade_time := DEFAULT_FADE_TIME,
|
||||
):
|
||||
player_name = _player_name
|
||||
from_random_time = _from_random_time
|
||||
fade_time = _fade_time
|
||||
|
||||
|
||||
class AudioStop extends AudioAction:
|
||||
pass
|
||||
>>>>>>> 65645d976a98b5bfd030770764e72893cb8d9ccd
|
||||
|
||||
@@ -11,12 +11,18 @@ signal current_region_data_updated(p : RegionData)
|
||||
|
||||
@export var max_mutations_by_plant : int = 2
|
||||
|
||||
@export var dialogs_done : Array[String] = []
|
||||
@export var last_game_scene : Scene = null
|
||||
|
||||
@export var actual_scene : Scene = null
|
||||
@export var ship_in_space = false
|
||||
|
||||
@export var tutorial_done = false
|
||||
|
||||
@export var incubator_used = []
|
||||
|
||||
@export var dialogs_done : Array[String] = [] #Chemin des dialogues démarrés
|
||||
|
||||
func start_run():
|
||||
player_data.inventory.clear()
|
||||
player_data.inventory.clear_items()
|
||||
current_run = RunData.new()
|
||||
current_run.current_run_point_changed.connect(
|
||||
func(rp : RunPoint):
|
||||
@@ -34,3 +40,19 @@ func start_region(region_param : RegionParameter):
|
||||
current_region_data = RegionData.new(region_param)
|
||||
current_region_data_updated.emit(current_region_data)
|
||||
GameInfo.save_game_data()
|
||||
|
||||
func give_up():
|
||||
current_region_data = null
|
||||
current_run = null
|
||||
|
||||
func start_tutorial():
|
||||
current_region_data = RegionData.new(
|
||||
RegionParameter.new(
|
||||
10,
|
||||
3,
|
||||
tr("TUTORIAL"),
|
||||
["tutorial"],
|
||||
0,
|
||||
randi()
|
||||
)
|
||||
)
|
||||
@@ -4,9 +4,9 @@ class_name RunData
|
||||
enum State {STARTED, IN_PROGRESS, FINISHED}
|
||||
|
||||
const RUN_POINT_POSITION_DERIVATION = 100
|
||||
const DIFFICULTY_INCREASE_BY_LEVEL = 1
|
||||
const RUN_POINTS_NEXT_NUMBER :Array[int] = [2,3]
|
||||
const RUN_POINT_MAX_LEVEL = 10
|
||||
const DIFFICULTY_INCREASE_BY_LEVEL = 3
|
||||
const RUN_POINTS_NEXT_NUMBER :Array[int] = [2]
|
||||
const RUN_POINT_MAX_LEVEL = 0 # TODO
|
||||
|
||||
signal current_run_point_changed
|
||||
|
||||
@@ -41,9 +41,14 @@ func generate_next_run_points(run_point : RunPoint) -> Array[RunPoint]:
|
||||
|
||||
|
||||
func generate_next_run_point(run_point : RunPoint) -> RunPoint:
|
||||
var level = run_point.level + 1
|
||||
var region_parameter = RegionParameter.new()
|
||||
region_parameter.level = level
|
||||
region_parameter.flags = get_region_flags(region_parameter)
|
||||
|
||||
return RunPoint.new(
|
||||
run_point.level + 1,
|
||||
generate_difficulty_increased_region_parameter(run_point.region_parameter, DIFFICULTY_INCREASE_BY_LEVEL),
|
||||
level,
|
||||
generate_difficulty_increased_region_parameter(region_parameter, DIFFICULTY_INCREASE_BY_LEVEL * level),
|
||||
(run_point.position + randi_range(-RUN_POINT_POSITION_DERIVATION, RUN_POINT_POSITION_DERIVATION)) % 360
|
||||
)
|
||||
|
||||
@@ -56,6 +61,7 @@ func generate_difficulty_increased_region_parameter(
|
||||
region_parameter.charges,
|
||||
region_parameter.objective
|
||||
)
|
||||
|
||||
while i_diff > 0:
|
||||
|
||||
var available_difficulty_modifier = [
|
||||
@@ -96,6 +102,15 @@ func choose_next_run_point(run_point : RunPoint) -> RunPoint:
|
||||
next_run_points = generate_next_run_points(current_run_point)
|
||||
return current_run_point
|
||||
|
||||
func get_region_flags(region_parameter : RegionParameter) -> Array[String]:
|
||||
var flags : Array[String] = []
|
||||
|
||||
print(region_parameter.level)
|
||||
if region_parameter.level == RUN_POINT_MAX_LEVEL:
|
||||
flags.append("borea")
|
||||
|
||||
return flags
|
||||
|
||||
class DifficultyModifier:
|
||||
func modify(_region_parameter : RegionParameter):
|
||||
pass
|
||||
|
||||
@@ -20,6 +20,7 @@ func _init(
|
||||
):
|
||||
level = _level
|
||||
region_parameter = _region_parameter
|
||||
region_parameter.level = level
|
||||
position = _position
|
||||
|
||||
func card_info() -> CardInfo:
|
||||
@@ -34,4 +35,4 @@ func card_info() -> CardInfo:
|
||||
CardStatInfo.new(str(region_parameter.charges), CHARGE_ICON),
|
||||
])
|
||||
|
||||
return info
|
||||
return info
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
extends Resource
|
||||
class_name SettingsData
|
||||
|
||||
const MUSIC_BUS_ID = 1
|
||||
const SFX_BUS_ID = 2
|
||||
const AMBIANCE_BUS_ID = 3
|
||||
|
||||
signal language_changed(settings : SettingsData)
|
||||
signal sound_changed(settings : SettingsData)
|
||||
signal video_changed(settings : SettingsData)
|
||||
@@ -40,7 +44,7 @@ const AVAILABLE_LANGUAGES_LABEL = [
|
||||
|
||||
#region ------------------ Video ------------------
|
||||
|
||||
@export var full_screen : bool = false :
|
||||
@export var full_screen : bool = true :
|
||||
set(v):
|
||||
full_screen = v
|
||||
video_changed.emit(self)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
extends Node
|
||||
|
||||
const SAVE_GAME_LOCATION = "res://stw_demo_save.tres"
|
||||
const SAVE_SETTINGS_LOCATION = "res://stw_settings.tres"
|
||||
const SAVE_GAME_LOCATION = "user://stw_demo_save.tres"
|
||||
const SAVE_SETTINGS_LOCATION = "user://stw_settings.tres"
|
||||
|
||||
var game_loaded = false
|
||||
|
||||
@@ -52,6 +52,10 @@ func _init():
|
||||
update_video_settings()
|
||||
settings_data.language_changed.connect(_on_settings_language_changed)
|
||||
settings_data.video_changed.connect(_on_settings_video_changed)
|
||||
settings_data.sound_changed.connect(_on_settings_sound_changed)
|
||||
|
||||
func _ready():
|
||||
Dialogic.timeline_started.connect(_on_timeline_started)
|
||||
|
||||
func _on_settings_video_changed(s : SettingsData):
|
||||
update_video_settings(s)
|
||||
@@ -59,6 +63,17 @@ func _on_settings_video_changed(s : SettingsData):
|
||||
func _on_settings_language_changed(s : SettingsData):
|
||||
update_language_settings(s)
|
||||
|
||||
func _on_settings_sound_changed(s : SettingsData):
|
||||
AudioServer.set_bus_volume_db(SettingsData.MUSIC_BUS_ID, linear_to_db(s.music_volume))
|
||||
AudioServer.set_bus_volume_db(SettingsData.SFX_BUS_ID, linear_to_db(s.sfx_volume))
|
||||
AudioServer.set_bus_volume_db(SettingsData.AMBIANCE_BUS_ID, linear_to_db(s.ambiance_volume))
|
||||
|
||||
func _on_timeline_started():
|
||||
var dialog_path = Dialogic.current_timeline.resource_path
|
||||
if not dialog_path in game_data.dialogs_done:
|
||||
game_data.dialogs_done.append(dialog_path)
|
||||
save_game_data()
|
||||
|
||||
func update_language_settings(s : SettingsData = settings_data):
|
||||
TranslationServer.set_locale(s.language)
|
||||
|
||||
|
||||
@@ -3,19 +3,20 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://eug5icp6t1h3"
|
||||
path="res://.godot/imported/arrow-narrow-up.svg-3e96282c2af955cf23507b48c4348810.ctex"
|
||||
path.s3tc="res://.godot/imported/arrow-narrow-up.svg-3e96282c2af955cf23507b48c4348810.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/arrow-narrow-up.svg"
|
||||
dest_files=["res://.godot/imported/arrow-narrow-up.svg-3e96282c2af955cf23507b48c4348810.ctex"]
|
||||
dest_files=["res://.godot/imported/arrow-narrow-up.svg-3e96282c2af955cf23507b48c4348810.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,7 +38,7 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
BIN
common/icons/bar.png
Normal file
|
After Width: | Height: | Size: 427 B |
40
common/icons/bar.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dw80a4c5iekir"
|
||||
path="res://.godot/imported/bar.png-623df5fbea38f9d862a997485a02d36c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/bar.png"
|
||||
dest_files=["res://.godot/imported/bar.png-623df5fbea38f9d862a997485a02d36c.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
|
||||
@@ -3,19 +3,20 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dcgnamu7sb3ov"
|
||||
path="res://.godot/imported/bolt.svg-a559d5e701996c7d105fc68102331434.ctex"
|
||||
path.s3tc="res://.godot/imported/bolt.svg-a559d5e701996c7d105fc68102331434.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/bolt.svg"
|
||||
dest_files=["res://.godot/imported/bolt.svg-a559d5e701996c7d105fc68102331434.ctex"]
|
||||
dest_files=["res://.godot/imported/bolt.svg-a559d5e701996c7d105fc68102331434.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,7 +38,7 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
1
common/icons/brand-instagram.svg
Normal file
@@ -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-brand-instagram"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4l0 -8" /><path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" /><path d="M16.5 7.5v.01" /></svg>
|
||||
|
After Width: | Height: | Size: 469 B |
43
common/icons/brand-instagram.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dh1jaup4y1f6q"
|
||||
path="res://.godot/imported/brand-instagram.svg-93b67e1c651e77c13169000f3fa1764f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/brand-instagram.svg"
|
||||
dest_files=["res://.godot/imported/brand-instagram.svg-93b67e1c651e77c13169000f3fa1764f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
1
common/icons/brand-steam.svg
Normal file
@@ -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-brand-steam"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M16.5 5a4.5 4.5 0 1 1 -.653 8.953l-4.347 3.009l0 .038a3 3 0 0 1 -2.824 3l-.176 0a3 3 0 0 1 -2.94 -2.402l-2.56 -1.098v-3.5l3.51 1.755a2.989 2.989 0 0 1 2.834 -.635l2.727 -3.818a4.5 4.5 0 0 1 4.429 -5.302" /><path d="M15.5 9.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" fill="#ffffff" /></svg>
|
||||
|
After Width: | Height: | Size: 584 B |
43
common/icons/brand-steam.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpkye7t28ragp"
|
||||
path="res://.godot/imported/brand-steam.svg-9dbbdc409ded6b7066179206cac90cca.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/brand-steam.svg"
|
||||
dest_files=["res://.godot/imported/brand-steam.svg-9dbbdc409ded6b7066179206cac90cca.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
1
common/icons/broadcast.svg
Normal file
@@ -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-broadcast"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18.364 19.364a9 9 0 1 0 -12.728 0" /><path d="M15.536 16.536a5 5 0 1 0 -7.072 0" /><path d="M11 13a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>
|
||||
|
After Width: | Height: | Size: 442 B |
43
common/icons/broadcast.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://qshtr3peinak"
|
||||
path="res://.godot/imported/broadcast.svg-d7376e52ecc5b74fcdaea71ccbe04a97.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/broadcast.svg"
|
||||
dest_files=["res://.godot/imported/broadcast.svg-d7376e52ecc5b74fcdaea71ccbe04a97.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
1
common/icons/circle-check.svg
Normal file
@@ -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-circle-check"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" /></svg>
|
||||
|
After Width: | Height: | Size: 522 B |
43
common/icons/circle-check.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dk7j4cmn2avor"
|
||||
path="res://.godot/imported/circle-check.svg-a4b2a081fcd49aa81b3d471e5cf96154.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/circle-check.svg"
|
||||
dest_files=["res://.godot/imported/circle-check.svg-a4b2a081fcd49aa81b3d471e5cf96154.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
1
common/icons/circle-dotted.svg
Normal file
@@ -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-circle-dotted"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7.5 4.21l0 .01" /><path d="M4.21 7.5l0 .01" /><path d="M3 12l0 .01" /><path d="M4.21 16.5l0 .01" /><path d="M7.5 19.79l0 .01" /><path d="M12 21l0 .01" /><path d="M16.5 19.79l0 .01" /><path d="M19.79 16.5l0 .01" /><path d="M21 12l0 .01" /><path d="M19.79 7.5l0 .01" /><path d="M16.5 4.21l0 .01" /><path d="M12 3l0 .01" /></svg>
|
||||
|
After Width: | Height: | Size: 635 B |
43
common/icons/circle-dotted.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://p7417vydlndb"
|
||||
path="res://.godot/imported/circle-dotted.svg-66d6de56bbd4e5cdc1d212f761ee2b4a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/circle-dotted.svg"
|
||||
dest_files=["res://.godot/imported/circle-dotted.svg-66d6de56bbd4e5cdc1d212f761ee2b4a.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"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://baaujfw8piywi"
|
||||
path="res://.godot/imported/dna.svg-0d37cb06a607035637eb8d87826b10a6.ctex"
|
||||
path.s3tc="res://.godot/imported/dna.svg-0d37cb06a607035637eb8d87826b10a6.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/dna.svg"
|
||||
dest_files=["res://.godot/imported/dna.svg-0d37cb06a607035637eb8d87826b10a6.ctex"]
|
||||
dest_files=["res://.godot/imported/dna.svg-0d37cb06a607035637eb8d87826b10a6.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,7 +38,7 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
1
common/icons/rocket.svg
Normal file
@@ -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-rocket"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 13a8 8 0 0 1 7 7a6 6 0 0 0 3 -5a9 9 0 0 0 6 -8a3 3 0 0 0 -3 -3a9 9 0 0 0 -8 6a6 6 0 0 0 -5 3" /><path d="M7 14a6 6 0 0 0 -3 6a6 6 0 0 0 6 -3" /><path d="M14 9a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>
|
||||
|
After Width: | Height: | Size: 501 B |
43
common/icons/rocket.svg.import
Normal file
@@ -0,0 +1,43 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://1ynlp05wj0hm"
|
||||
path="res://.godot/imported/rocket.svg-179ed4d17d5fad3feb8d3bb0242a9308.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/rocket.svg"
|
||||
dest_files=["res://.godot/imported/rocket.svg-179ed4d17d5fad3feb8d3bb0242a9308.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"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b43thuq8piv18"
|
||||
path="res://.godot/imported/skull.svg-1f3a01497295060c28293df722ed0ddd.ctex"
|
||||
path.s3tc="res://.godot/imported/skull.svg-1f3a01497295060c28293df722ed0ddd.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/skull.svg"
|
||||
dest_files=["res://.godot/imported/skull.svg-1f3a01497295060c28293df722ed0ddd.ctex"]
|
||||
dest_files=["res://.godot/imported/skull.svg-1f3a01497295060c28293df722ed0ddd.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,7 +38,7 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
@@ -3,19 +3,20 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b6dwhn0uotdgu"
|
||||
path="res://.godot/imported/square-rounded-nofill.svg-3b394b5967765acc26d391129de152eb.ctex"
|
||||
path.s3tc="res://.godot/imported/square-rounded-nofill.svg-3b394b5967765acc26d391129de152eb.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/square-rounded-nofill.svg"
|
||||
dest_files=["res://.godot/imported/square-rounded-nofill.svg-3b394b5967765acc26d391129de152eb.ctex"]
|
||||
dest_files=["res://.godot/imported/square-rounded-nofill.svg-3b394b5967765acc26d391129de152eb.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,7 +38,7 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
@@ -3,19 +3,20 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://rdrhi3r11ey6"
|
||||
path="res://.godot/imported/square-rounded.svg-4eece25055f2b80264664150c832a797.ctex"
|
||||
path.s3tc="res://.godot/imported/square-rounded.svg-4eece25055f2b80264664150c832a797.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://common/icons/square-rounded.svg"
|
||||
dest_files=["res://.godot/imported/square-rounded.svg-4eece25055f2b80264664150c832a797.ctex"]
|
||||
dest_files=["res://.godot/imported/square-rounded.svg-4eece25055f2b80264664150c832a797.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,7 +38,7 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
svg/scale=2.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
||||
105
common/plant_texture_builder/plant_texture_builder.tscn
Normal file
@@ -0,0 +1,105 @@
|
||||
[gd_scene format=3 uid="uid://b8gqdgabrjaml"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dt2ip3pw2cboy" path="res://entities/plants/scripts/texture_builder/plant_texture_builder.gd" id="1_s8rsj"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/plant_part.gd" id="2_cfiqo"]
|
||||
[ext_resource type="Resource" uid="uid://bfyafiewcrjln" path="res://entities/plants/resources/plant_parts/Base1.tres" id="3_coupj"]
|
||||
[ext_resource type="Resource" uid="uid://d2vdf2sth2xjm" path="res://entities/plants/resources/plant_parts/Base3.tres" id="4_coupj"]
|
||||
[ext_resource type="Resource" uid="uid://7hrdkl6bf3o4" path="res://entities/plants/resources/plant_parts/Branch1.tres" id="4_ggud5"]
|
||||
[ext_resource type="Resource" uid="uid://clruuysx80pnn" path="res://entities/plants/resources/plant_parts/Base4.tres" id="5_ggud5"]
|
||||
[ext_resource type="Resource" uid="uid://ceisi5yyie7to" path="res://entities/plants/resources/plant_parts/Branch2.tres" id="5_ufbqh"]
|
||||
[ext_resource type="Resource" uid="uid://cxiu8frk04b5i" path="res://entities/plants/resources/plant_parts/Branch3.tres" id="6_jbu3q"]
|
||||
[ext_resource type="Resource" uid="uid://53p5g07e3pb4" path="res://entities/plants/resources/plant_parts/Branch4.tres" id="7_21cjy"]
|
||||
[ext_resource type="Resource" uid="uid://d2y7o2hc6ffei" path="res://entities/plants/resources/plant_parts/Branch11.tres" id="8_rs2ow"]
|
||||
[ext_resource type="Resource" uid="uid://civ4gr1c2pq7g" path="res://entities/plants/resources/plant_parts/Branch12.tres" id="9_5job5"]
|
||||
[ext_resource type="Resource" uid="uid://bqfocs6f0iypo" path="res://entities/plants/resources/plant_parts/Branch13.tres" id="10_cynqk"]
|
||||
[ext_resource type="Resource" uid="uid://drml5dm8i3j3a" path="res://entities/plants/resources/plant_parts/Branch14.tres" id="11_b21au"]
|
||||
[ext_resource type="Resource" uid="uid://b1t5nfwcln5vo" path="res://entities/plants/resources/plant_parts/Branch15.tres" id="12_17ac3"]
|
||||
[ext_resource type="Resource" uid="uid://b4s58a600q2rn" path="res://entities/plants/resources/plant_parts/Branch16.tres" id="13_fuh2b"]
|
||||
[ext_resource type="Resource" uid="uid://dspugxsjw2aea" path="res://entities/plants/resources/plant_parts/Branch17.tres" id="14_28gvc"]
|
||||
[ext_resource type="Resource" uid="uid://cnt38l2fmg8d7" path="res://entities/plants/resources/plant_parts/Branch18.tres" id="15_1cwvj"]
|
||||
[ext_resource type="Script" path="res://entities/plants/scripts/texture_builder/part_mutation_association.gd" id="16_c3tk3"]
|
||||
[ext_resource type="Resource" uid="uid://wxqxm6d5twdh" path="res://entities/plants/resources/plant_parts/Leaf8.tres" id="17_q0jli"]
|
||||
[ext_resource type="Resource" uid="uid://uoikjpno37bi" path="res://entities/plants/resources/plant_parts/Leaf9.tres" id="18_rplk6"]
|
||||
[ext_resource type="Resource" uid="uid://c5gqwck2p5h5n" path="res://entities/plants/resources/plant_parts/Leaf10.tres" id="19_mcckl"]
|
||||
[ext_resource type="Resource" uid="uid://c5fj1cw0f4mu6" path="res://entities/plants/resources/plant_parts/Leaf11.tres" id="20_3hcun"]
|
||||
[ext_resource type="Resource" uid="uid://dce788f0adauv" path="res://entities/plants/resources/plant_parts/Leaf12.tres" id="21_kvmj5"]
|
||||
[ext_resource type="Resource" uid="uid://dd34dikqoynp3" path="res://entities/plants/resources/plant_parts/Leaf13.tres" id="22_ocu7e"]
|
||||
[ext_resource type="Resource" uid="uid://bynje6g2wvuvl" path="res://entities/plants/resources/plant_parts/Leaf14.tres" id="23_q771y"]
|
||||
[ext_resource type="Resource" uid="uid://bd2op6q1masjt" path="res://entities/plants/resources/plant_parts/Leaf15.tres" id="24_5fbyu"]
|
||||
[ext_resource type="Resource" uid="uid://bvajuw0r47edw" path="res://entities/plants/resources/plant_parts/Leaf16.tres" id="25_2plsj"]
|
||||
[ext_resource type="Resource" uid="uid://cxgw1vgket0fw" path="res://entities/plants/resources/plant_parts/Leaf1.tres" id="26_yjh7s"]
|
||||
[ext_resource type="Resource" uid="uid://qb6bftgq0n6y" path="res://entities/plants/resources/plant_parts/Leaf2.tres" id="27_abtbh"]
|
||||
[ext_resource type="Resource" uid="uid://ft112n57di0e" path="res://entities/plants/resources/plant_parts/Leaf3.tres" id="28_j5s6w"]
|
||||
[ext_resource type="Resource" uid="uid://dwjj6qmcjhn68" path="res://entities/plants/resources/plant_parts/Leaf4.tres" id="29_p21mk"]
|
||||
[ext_resource type="Resource" uid="uid://bkr70mstyf8pp" path="res://entities/plants/resources/plant_parts/Leaf5.tres" id="30_wmcor"]
|
||||
[ext_resource type="Resource" uid="uid://dcuwupmqt34ju" path="res://entities/plants/resources/plant_parts/Leaf6.tres" id="31_dx2ud"]
|
||||
[ext_resource type="Resource" uid="uid://djmidq7yq452i" path="res://entities/plants/resources/plant_parts/Leaf7.tres" id="32_fpktn"]
|
||||
[ext_resource type="Resource" uid="uid://crmvc77bqax1y" path="res://entities/plants/resources/plant_parts/Flower1.tres" id="33_7b70u"]
|
||||
[ext_resource type="Resource" uid="uid://c0hr7icfkjkoi" path="res://entities/plants/resources/plant_parts/Flower2.tres" id="34_q8uyx"]
|
||||
[ext_resource type="Resource" uid="uid://clkoc1iccts2w" path="res://entities/plants/resources/plant_parts/Flower3.tres" id="35_r166b"]
|
||||
[ext_resource type="Resource" uid="uid://bd8yapi1pokj6" path="res://entities/plants/resources/plant_parts/Flower4.tres" id="36_78dq1"]
|
||||
[ext_resource type="Resource" uid="uid://brmd6d3l8trqs" path="res://entities/plants/resources/plant_parts/BottomLeaf1.tres" id="37_kyre2"]
|
||||
[ext_resource type="Resource" uid="uid://cfr33014u7ig5" path="res://entities/plants/resources/plant_parts/BottomLeaf2.tres" id="38_hwp0s"]
|
||||
[ext_resource type="Resource" uid="uid://cf70m1us8mfqp" path="res://entities/plants/resources/plant_parts/BottomLeaf3.tres" id="39_wjthp"]
|
||||
[ext_resource type="Resource" uid="uid://ctlmah4ohqp25" path="res://entities/plants/resources/plant_parts/BottomLeaf4.tres" id="40_rf72b"]
|
||||
[ext_resource type="Resource" uid="uid://b8o4q0hsm84ov" path="res://entities/plants/resources/plant_parts/BottomLeaf5.tres" id="41_fnybh"]
|
||||
[ext_resource type="Resource" uid="uid://bb33v756anesy" path="res://entities/plants/resources/plant_parts/BottomLeaf6.tres" id="42_6o0xq"]
|
||||
[ext_resource type="Resource" uid="uid://cbqrl72y0d1yg" path="res://entities/plants/resources/plant_parts/BottomLeaf7.tres" id="43_h02jx"]
|
||||
[ext_resource type="Resource" uid="uid://dwppani7gyjl5" path="res://entities/plants/resources/plant_parts/BottomLeaf8.tres" id="44_1v1v5"]
|
||||
[ext_resource type="Resource" uid="uid://dkta1u1u0efxk" path="res://entities/plants/resources/plant_parts/BottomLeaf9.tres" id="45_yha2t"]
|
||||
[ext_resource type="Script" uid="uid://hs3i48clok85" path="res://entities/plants/scripts/texture_builder/seed_texture_set.gd" id="48_cynqk"]
|
||||
[ext_resource type="Texture2D" uid="uid://cq2f308itghq7" path="res://entities/plants/assets/sprites/seeds/haricot/color_1.png" id="49_b21au"]
|
||||
[ext_resource type="Texture2D" uid="uid://b3apxg55cjoow" path="res://entities/plants/assets/sprites/seeds/haricot/color_2.png" id="50_17ac3"]
|
||||
[ext_resource type="Texture2D" uid="uid://0ayiumcnqyc1" path="res://entities/plants/assets/sprites/seeds/haricot/outline.png" id="51_fuh2b"]
|
||||
[ext_resource type="Texture2D" uid="uid://cuqocuhfpdful" path="res://entities/plants/assets/sprites/seeds/pick-sphere/color_1.png" id="52_28gvc"]
|
||||
[ext_resource type="Texture2D" uid="uid://tcjcq04akuns" path="res://entities/plants/assets/sprites/seeds/pick-sphere/color_2.png" id="53_1cwvj"]
|
||||
[ext_resource type="Texture2D" uid="uid://cu1dajkls18x0" path="res://entities/plants/assets/sprites/seeds/pick-sphere/line.png" id="54_c3tk3"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_x75j3"]
|
||||
script = ExtResource("16_c3tk3")
|
||||
parts = Array[ExtResource("2_cfiqo")]([ExtResource("17_q0jli"), ExtResource("18_rplk6"), ExtResource("19_mcckl"), ExtResource("20_3hcun"), ExtResource("21_kvmj5"), ExtResource("22_ocu7e"), ExtResource("23_q771y"), ExtResource("24_5fbyu"), ExtResource("25_2plsj")])
|
||||
part_amount = 2
|
||||
metadata/_custom_type_script = "uid://cfjd8jelpm8dt"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_setyo"]
|
||||
script = ExtResource("16_c3tk3")
|
||||
parts = Array[ExtResource("2_cfiqo")]([ExtResource("26_yjh7s"), ExtResource("27_abtbh"), ExtResource("28_j5s6w"), ExtResource("29_p21mk"), ExtResource("30_wmcor"), ExtResource("31_dx2ud"), ExtResource("32_fpktn")])
|
||||
part_amount = 2
|
||||
metadata/_custom_type_script = "uid://cfjd8jelpm8dt"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_n40r1"]
|
||||
script = ExtResource("16_c3tk3")
|
||||
parts = Array[ExtResource("2_cfiqo")]([ExtResource("33_7b70u"), ExtResource("34_q8uyx"), ExtResource("35_r166b"), ExtResource("36_78dq1")])
|
||||
part_amount = 2
|
||||
metadata/_custom_type_script = "uid://cfjd8jelpm8dt"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pw6ot"]
|
||||
script = ExtResource("16_c3tk3")
|
||||
parts = Array[ExtResource("2_cfiqo")]([ExtResource("37_kyre2"), ExtResource("38_hwp0s"), ExtResource("39_wjthp"), ExtResource("40_rf72b"), ExtResource("41_fnybh"), ExtResource("42_6o0xq"), ExtResource("43_h02jx"), ExtResource("44_1v1v5"), ExtResource("45_yha2t")])
|
||||
part_amount = 2
|
||||
metadata/_custom_type_script = "uid://cfjd8jelpm8dt"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_q0jli"]
|
||||
script = ExtResource("48_cynqk")
|
||||
color_textures = Array[Texture]([ExtResource("49_b21au"), ExtResource("50_17ac3")])
|
||||
outline_texture = ExtResource("51_fuh2b")
|
||||
metadata/_custom_type_script = "uid://hs3i48clok85"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rplk6"]
|
||||
script = ExtResource("48_cynqk")
|
||||
color_textures = Array[Texture]([ExtResource("52_28gvc"), ExtResource("53_1cwvj")])
|
||||
outline_texture = ExtResource("54_c3tk3")
|
||||
metadata/_custom_type_script = "uid://hs3i48clok85"
|
||||
|
||||
[node name="TextureBuilder" type="Node" unique_id=79184097]
|
||||
script = ExtResource("1_s8rsj")
|
||||
bases = Array[ExtResource("2_cfiqo")]([ExtResource("3_coupj")])
|
||||
baby_bases = Array[ExtResource("2_cfiqo")]([ExtResource("4_coupj"), ExtResource("5_ggud5")])
|
||||
branches = Array[ExtResource("2_cfiqo")]([ExtResource("4_ggud5"), ExtResource("5_ufbqh"), ExtResource("6_jbu3q"), ExtResource("7_21cjy"), ExtResource("8_rs2ow"), ExtResource("9_5job5"), ExtResource("10_cynqk"), ExtResource("11_b21au"), ExtResource("12_17ac3"), ExtResource("13_fuh2b"), ExtResource("14_28gvc"), ExtResource("15_1cwvj")])
|
||||
parts_mutation_associations = Dictionary[String, ExtResource("16_c3tk3")]({
|
||||
"ANCIENT": SubResource("Resource_x75j3"),
|
||||
"PRECOCIOUS": SubResource("Resource_setyo"),
|
||||
"QUALITY": SubResource("Resource_n40r1"),
|
||||
"QUICK": SubResource("Resource_pw6ot")
|
||||
})
|
||||
seed_texture_sets = Array[ExtResource("48_cynqk")]([SubResource("Resource_q0jli"), SubResource("Resource_rplk6")])
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dac5wte80dwj0"]
|
||||
[gd_scene 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"]
|
||||
@@ -7,7 +7,10 @@
|
||||
[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"]
|
||||
[ext_resource type="Resource" uid="uid://jegdqnd2sqi2" path="res://common/scene_manager/scenes/astra.tres" id="8_e28ni"]
|
||||
[ext_resource type="Resource" uid="uid://b3ebbo88ptrrc" path="res://common/scene_manager/scenes/garage.tres" id="9_msho1"]
|
||||
[ext_resource type="Resource" uid="uid://cvrs6qsq7mpa5" path="res://common/scene_manager/scenes/borea.tres" id="10_ytog4"]
|
||||
|
||||
[node name="SceneManager" type="Node"]
|
||||
[node name="SceneManager" type="Node" unique_id=1630600782]
|
||||
script = ExtResource("1_1c0qu")
|
||||
scenes = Array[ExtResource("2_c1lr7")]([ExtResource("3_e28ni"), ExtResource("4_msho1"), ExtResource("5_ytog4"), ExtResource("6_chs32"), ExtResource("7_ol3d5")])
|
||||
scenes = Array[ExtResource("2_c1lr7")]([ExtResource("3_e28ni"), ExtResource("4_msho1"), ExtResource("5_ytog4"), ExtResource("6_chs32"), ExtResource("7_ol3d5"), ExtResource("8_e28ni"), ExtResource("9_msho1"), ExtResource("10_ytog4")])
|
||||
|
||||
10
common/scene_manager/scenes/astra.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Scene" format=3 uid="uid://jegdqnd2sqi2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_114vb"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_114vb")
|
||||
scene_id = "ASTRA"
|
||||
scene_path = "res://stages/3d_scenes/astra_base/astra_base.tscn"
|
||||
mouse_captured = true
|
||||
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||
10
common/scene_manager/scenes/borea.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Scene" format=3 uid="uid://cvrs6qsq7mpa5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_7m46k"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_7m46k")
|
||||
scene_id = "BOREA"
|
||||
scene_path = "res://stages/3d_scenes/borea_base/borea_base.tscn"
|
||||
mouse_captured = true
|
||||
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://bvksiaiocwob5"]
|
||||
[gd_resource type="Resource" script_class="Scene" 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"
|
||||
scene_path = "res://stages/3d_scenes/cockpit_scene/cockpit_scene.tscn"
|
||||
mouse_captured = true
|
||||
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||
|
||||
10
common/scene_manager/scenes/garage.tres
Normal file
@@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Scene" format=3 uid="uid://b3ebbo88ptrrc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_v8prw"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_v8prw")
|
||||
scene_id = "GARAGE"
|
||||
scene_path = "res://stages/3d_scenes/ship_garage/ship_garage.tscn"
|
||||
mouse_captured = true
|
||||
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_resource type="Resource" script_class="Scene" load_steps=2 format=3 uid="uid://diro74w272onp"]
|
||||
[gd_resource type="Resource" script_class="Scene" format=3 uid="uid://diro74w272onp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://1ejbvr3431ac" path="res://common/scene_manager/scripts/scene.gd" id="1_48g2j"]
|
||||
|
||||
@@ -6,4 +6,5 @@
|
||||
script = ExtResource("1_48g2j")
|
||||
scene_id = "TITLE"
|
||||
scene_path = "res://stages/title_screen/title_screen.tscn"
|
||||
need_to_be_saved = false
|
||||
metadata/_custom_type_script = "uid://1ejbvr3431ac"
|
||||
|
||||
@@ -4,4 +4,5 @@ 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
|
||||
@export var need_terrain_generated := false
|
||||
@export var need_to_be_saved = true
|
||||
@@ -5,6 +5,7 @@ extends Node
|
||||
signal scene_loaded(scene : Scene)
|
||||
signal scene_node_ready(scene : Scene)
|
||||
|
||||
var actual_scene = null
|
||||
var loading_scene = false
|
||||
var generating_node = false
|
||||
var next_scene_node : Node
|
||||
@@ -20,16 +21,21 @@ func search_scenes(scene_id : String) -> Scene:
|
||||
else :
|
||||
return scenes[scene_pos]
|
||||
|
||||
func change_scene(scene_id : String, with_loading = true):
|
||||
|
||||
if loading_scene or generating_node:
|
||||
await scene_node_ready
|
||||
|
||||
func change_to_scene_id(scene_id : String, with_loading = true):
|
||||
var scene = search_scenes(scene_id)
|
||||
|
||||
if not scene:
|
||||
printerr("Scene %s not found" % scene_id)
|
||||
return
|
||||
GameInfo.game_data.actual_scene = scene
|
||||
|
||||
change_to_scene(scene, with_loading)
|
||||
|
||||
func change_to_scene(scene : Scene, with_loading = true):
|
||||
if loading_scene or generating_node:
|
||||
await scene_node_ready
|
||||
|
||||
|
||||
actual_scene = scene
|
||||
loading_scene = true
|
||||
var scene_path_to_load = scene.scene_path
|
||||
ResourceLoader.load_threaded_request(scene_path_to_load)
|
||||
@@ -64,17 +70,21 @@ func change_scene(scene_id : String, with_loading = true):
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED if scene.mouse_captured else Input.MOUSE_MODE_VISIBLE
|
||||
GameInfo.update_inputs()
|
||||
|
||||
if actual_scene.need_to_be_saved:
|
||||
GameInfo.game_data.last_game_scene = scene
|
||||
GameInfo.save_game_data()
|
||||
|
||||
if with_loading:
|
||||
LoadingScreen.hide_loading_screen()
|
||||
|
||||
func _process(_delta):
|
||||
if loading_scene:
|
||||
var progress = []
|
||||
var load_status := ResourceLoader.load_threaded_get_status(GameInfo.game_data.actual_scene.scene_path, progress)
|
||||
var load_status := ResourceLoader.load_threaded_get_status(actual_scene.scene_path, progress)
|
||||
LoadingScreen.loading_value = progress[0]
|
||||
if load_status == ResourceLoader.THREAD_LOAD_LOADED:
|
||||
loading_scene = false
|
||||
scene_loaded.emit(GameInfo.game_data.actual_scene)
|
||||
scene_loaded.emit(actual_scene)
|
||||
if load_status == ResourceLoader.THREAD_LOAD_FAILED or load_status == ResourceLoader.THREAD_LOAD_INVALID_RESOURCE:
|
||||
printerr()
|
||||
elif generating_node:
|
||||
@@ -85,4 +95,4 @@ func _process(_delta):
|
||||
scene_node_ready.emit()
|
||||
elif next_scene_node.is_node_ready():
|
||||
generating_node = false
|
||||
scene_node_ready.emit(GameInfo.game_data.actual_scene)
|
||||
scene_node_ready.emit(actual_scene)
|
||||
|
||||