diff --git a/Assets/Audio/SFX/BowserFireAlt.wav.import b/Assets/Audio/SFX/BowserFireAlt.wav.import index 73e77478..8e145d30 100644 --- a/Assets/Audio/SFX/BowserFireAlt.wav.import +++ b/Assets/Audio/SFX/BowserFireAlt.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/BreakBlock.wav.import b/Assets/Audio/SFX/BreakBlock.wav.import index 709ae53a..66114658 100644 --- a/Assets/Audio/SFX/BreakBlock.wav.import +++ b/Assets/Audio/SFX/BreakBlock.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Cannon.wav.import b/Assets/Audio/SFX/Cannon.wav.import index c15ea6a7..8399da34 100644 --- a/Assets/Audio/SFX/Cannon.wav.import +++ b/Assets/Audio/SFX/Cannon.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/CannonFast.wav.import b/Assets/Audio/SFX/CannonFast.wav.import index c29db331..9106f905 100644 --- a/Assets/Audio/SFX/CannonFast.wav.import +++ b/Assets/Audio/SFX/CannonFast.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/CastleClear.wav.import b/Assets/Audio/SFX/CastleClear.wav.import index a8cda5e7..04f81712 100644 --- a/Assets/Audio/SFX/CastleClear.wav.import +++ b/Assets/Audio/SFX/CastleClear.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/ClockGet.wav.import b/Assets/Audio/SFX/ClockGet.wav.import index 01ac9ff2..36954919 100644 --- a/Assets/Audio/SFX/ClockGet.wav.import +++ b/Assets/Audio/SFX/ClockGet.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/ClownCarStrongFire.wav.import b/Assets/Audio/SFX/ClownCarStrongFire.wav.import index 354dba0b..fa890e64 100644 --- a/Assets/Audio/SFX/ClownCarStrongFire.wav.import +++ b/Assets/Audio/SFX/ClownCarStrongFire.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Coin.wav.import b/Assets/Audio/SFX/Coin.wav.import index 95f281f9..e3d19a8c 100644 --- a/Assets/Audio/SFX/Coin.wav.import +++ b/Assets/Audio/SFX/Coin.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/CourseClear.wav.import b/Assets/Audio/SFX/CourseClear.wav.import index 60620017..53170496 100644 --- a/Assets/Audio/SFX/CourseClear.wav.import +++ b/Assets/Audio/SFX/CourseClear.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Damage.wav.import b/Assets/Audio/SFX/Damage.wav.import index 8e741e7a..99ec647d 100644 --- a/Assets/Audio/SFX/Damage.wav.import +++ b/Assets/Audio/SFX/Damage.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/DryBonesCrumble.wav.import b/Assets/Audio/SFX/DryBonesCrumble.wav.import index 671d40c8..9d4747b9 100644 --- a/Assets/Audio/SFX/DryBonesCrumble.wav.import +++ b/Assets/Audio/SFX/DryBonesCrumble.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Firework.wav.import b/Assets/Audio/SFX/Firework.wav.import index baa63a9e..0fadc6be 100644 --- a/Assets/Audio/SFX/Firework.wav.import +++ b/Assets/Audio/SFX/Firework.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/HitGoalBoxMMPlaceholder.wav.import b/Assets/Audio/SFX/HitGoalBoxMMPlaceholder.wav.import index e9c208ac..9330d7a2 100644 --- a/Assets/Audio/SFX/HitGoalBoxMMPlaceholder.wav.import +++ b/Assets/Audio/SFX/HitGoalBoxMMPlaceholder.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/IceBallShoot.wav.import b/Assets/Audio/SFX/IceBallShoot.wav.import index e640a558..553cfd3e 100644 --- a/Assets/Audio/SFX/IceBallShoot.wav.import +++ b/Assets/Audio/SFX/IceBallShoot.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/IcicleCrash.wav.import b/Assets/Audio/SFX/IcicleCrash.wav.import index db6e7507..5d31ed13 100644 --- a/Assets/Audio/SFX/IcicleCrash.wav.import +++ b/Assets/Audio/SFX/IcicleCrash.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/IcicleFall.wav.import b/Assets/Audio/SFX/IcicleFall.wav.import index d0c0f6b8..8dedac10 100644 --- a/Assets/Audio/SFX/IcicleFall.wav.import +++ b/Assets/Audio/SFX/IcicleFall.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/ItemAppear.wav.import b/Assets/Audio/SFX/ItemAppear.wav.import index dc3744e2..254a49a6 100644 --- a/Assets/Audio/SFX/ItemAppear.wav.import +++ b/Assets/Audio/SFX/ItemAppear.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Kick.wav.import b/Assets/Audio/SFX/Kick.wav.import index 9c1d5d29..950ae086 100644 --- a/Assets/Audio/SFX/Kick.wav.import +++ b/Assets/Audio/SFX/Kick.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Magic.wav.import b/Assets/Audio/SFX/Magic.wav.import index 663f8232..341a6573 100644 --- a/Assets/Audio/SFX/Magic.wav.import +++ b/Assets/Audio/SFX/Magic.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Pipe.wav.import b/Assets/Audio/SFX/Pipe.wav.import index 6096020d..6139dbdb 100644 --- a/Assets/Audio/SFX/Pipe.wav.import +++ b/Assets/Audio/SFX/Pipe.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Powerup.wav.import b/Assets/Audio/SFX/Powerup.wav.import index 62339e65..9cfa0d04 100644 --- a/Assets/Audio/SFX/Powerup.wav.import +++ b/Assets/Audio/SFX/Powerup.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/RedCoin2.wav.import b/Assets/Audio/SFX/RedCoin2.wav.import index 5a75f1ce..c6fc79a6 100644 --- a/Assets/Audio/SFX/RedCoin2.wav.import +++ b/Assets/Audio/SFX/RedCoin2.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/RedCoin4.wav.import b/Assets/Audio/SFX/RedCoin4.wav.import index 5db83c8a..c9851b80 100644 --- a/Assets/Audio/SFX/RedCoin4.wav.import +++ b/Assets/Audio/SFX/RedCoin4.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Silent.wav.import b/Assets/Audio/SFX/Silent.wav.import index a635deaf..b5946a3b 100644 --- a/Assets/Audio/SFX/Silent.wav.import +++ b/Assets/Audio/SFX/Silent.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/SmallJump.wav.import b/Assets/Audio/SFX/SmallJump.wav.import index 743eb812..8e5c0449 100644 --- a/Assets/Audio/SFX/SmallJump.wav.import +++ b/Assets/Audio/SFX/SmallJump.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Speaking.wav.import b/Assets/Audio/SFX/Speaking.wav.import index 06f207d2..882168f3 100644 --- a/Assets/Audio/SFX/Speaking.wav.import +++ b/Assets/Audio/SFX/Speaking.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Stomp.wav.import b/Assets/Audio/SFX/Stomp.wav.import index 45f4c112..97c993fd 100644 --- a/Assets/Audio/SFX/Stomp.wav.import +++ b/Assets/Audio/SFX/Stomp.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Swim.wav.import b/Assets/Audio/SFX/Swim.wav.import index a712a03c..7a343525 100644 --- a/Assets/Audio/SFX/Swim.wav.import +++ b/Assets/Audio/SFX/Swim.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Switch.wav.import b/Assets/Audio/SFX/Switch.wav.import index a1c5a56b..1af33323 100644 --- a/Assets/Audio/SFX/Switch.wav.import +++ b/Assets/Audio/SFX/Switch.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/VineAppear.wav.import b/Assets/Audio/SFX/VineAppear.wav.import index 849d2f0b..312f6aad 100644 --- a/Assets/Audio/SFX/VineAppear.wav.import +++ b/Assets/Audio/SFX/VineAppear.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/Yoshi.wav.import b/Assets/Audio/SFX/Yoshi.wav.import index 8cb76b31..10f3402d 100644 --- a/Assets/Audio/SFX/Yoshi.wav.import +++ b/Assets/Audio/SFX/Yoshi.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Assets/Audio/SFX/YoshiEgg.wav.import b/Assets/Audio/SFX/YoshiEgg.wav.import index 09fc3c1f..1af90192 100644 --- a/Assets/Audio/SFX/YoshiEgg.wav.import +++ b/Assets/Audio/SFX/YoshiEgg.wav.import @@ -21,4 +21,4 @@ edit/normalize=false edit/loop_mode=0 edit/loop_begin=0 edit/loop_end=-1 -compress/mode=2 +compress/mode=0 diff --git a/Scenes/Prefabs/Particles/LakituCloudBurst.tscn b/Scenes/Prefabs/Particles/LakituCloudBurst.tscn index c10ae2dd..e122dd7b 100644 --- a/Scenes/Prefabs/Particles/LakituCloudBurst.tscn +++ b/Scenes/Prefabs/Particles/LakituCloudBurst.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3 uid="uid://dybfmrawthall"] +[gd_scene load_steps=9 format=3 uid="uid://dybfmrawthall"] [ext_resource type="Texture2D" uid="uid://boongcly3e2cl" path="res://Assets/Sprites/Particles/LakituCloudBurst.png" id="1_3jvpp"] [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="2_cic8a"] @@ -40,20 +40,12 @@ animations = [{ "speed": 10.0 }] -[sub_resource type="GDScript" id="GDScript_3jvpp"] -script/source = "extends AnimatedSprite2D - -func _ready() -> void: - pass -" - [node name="LakituCloudBurst" type="AnimatedSprite2D"] z_index = 5 sprite_frames = SubResource("SpriteFrames_xs1ui") autoplay = "default" frame = 3 frame_progress = 1.0 -script = SubResource("GDScript_3jvpp") [node name="Timer" type="Timer" parent="."] wait_time = 10.0 diff --git a/Scenes/Prefabs/UI/SettingsMenu.tscn b/Scenes/Prefabs/UI/SettingsMenu.tscn index b4c1205f..9ac7c565 100644 --- a/Scenes/Prefabs/UI/SettingsMenu.tscn +++ b/Scenes/Prefabs/UI/SettingsMenu.tscn @@ -562,6 +562,7 @@ title = "RESOURCE_REFRESH" [node name="SelectableOptionNode3" parent="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks" instance=ExtResource("9_t6b48")] layout_mode = 2 title = "RESOURCE_PACK_CREATE" +press_sfx = "" [node name="ResourcePackLoader" type="Node" parent="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks"] script = ExtResource("9_2qqpf") @@ -1019,6 +1020,7 @@ script = ExtResource("19_k6yev") [connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/ResourcePackLoader" method="open_folder"] [connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode2" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/ResourcePackLoader" method="get_resource_packs"] [connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" to="ResourcePackTemplateCreator" method="create_template"] +[connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" method="set_title" binds= ["Creating Resource Pack..."]] [connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DamageStyle" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="damage_style_changed"] [connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/Checkpoints" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="checkpoint_changed"] [connection signal="value_changed" from="PanelContainer/MarginContainer/VBoxContainer/Difficulty/ExtraCheckpoints" to="PanelContainer/MarginContainer/VBoxContainer/Difficulty/DifficultySetter" method="extra_checkpoints_changed"] @@ -1036,6 +1038,8 @@ script = ExtResource("19_k6yev") [connection signal="deleted" from="PanelContainer/MarginContainer/VBoxContainer/Data/AchievementData" to="PanelContainer/MarginContainer/VBoxContainer/Data/DataDeletion" method="delete_achievement"] [connection signal="deleted" from="PanelContainer/MarginContainer/VBoxContainer/Data/Everything" to="PanelContainer/MarginContainer/VBoxContainer/Data/DataDeletion" method="delete_everything"] [connection signal="button_pressed" from="PanelContainer/MarginContainer/VBoxContainer/Data/RegenROM" to="PanelContainer/MarginContainer/VBoxContainer/Data/DataDeletion" method="regen_rom"] +[connection signal="pack_created" from="ResourcePackTemplateCreator" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" method="set_title" binds= ["RESOURCE_PACK_CREATE"]] +[connection signal="pack_created" from="ResourcePackTemplateCreator" to="PanelContainer/MarginContainer/VBoxContainer/ResourcePacks/SelectableOptionNode3" method="play_sfx" binds= ["correct"]] [editable path="PanelContainer/MarginContainer/VBoxContainer/Video/Language"] [editable path="PanelContainer/MarginContainer/VBoxContainer/Audio/SelectableOptionNode"] diff --git a/Scripts/Classes/Singletons/Global.gd b/Scripts/Classes/Singletons/Global.gd index 43195a2c..69e1e8ad 100644 --- a/Scripts/Classes/Singletons/Global.gd +++ b/Scripts/Classes/Singletons/Global.gd @@ -59,8 +59,8 @@ signal text_shadow_changed var debugged_in := true -var score_tween = create_tween() -var time_tween = create_tween() +var score_tween = null +var time_tween = null var total_deaths := 0 diff --git a/Scripts/Parts/ResourcePackTemplateCreator.gd b/Scripts/Parts/ResourcePackTemplateCreator.gd index c6fe6932..a9f377e3 100644 --- a/Scripts/Parts/ResourcePackTemplateCreator.gd +++ b/Scripts/Parts/ResourcePackTemplateCreator.gd @@ -7,13 +7,19 @@ signal fnt_file_downloaded(text: String) var downloaded_fnt_text := [] +signal pack_created + const base_info_json := { "name": "New Pack", "description": "Template, give me a description!", - "author": "Me, until you change it" + "author": "Me, until you change it", + "version": "1.0" } + +const disallowed_files := ["bgm","ctex","json","fnt", "svg"] func create_template() -> void: + await get_tree().process_frame get_directories("res://Assets", files, directories) for i in directories: DirAccess.make_dir_recursive_absolute(i.replace("res://Assets", Global.config_path.path_join("resource_packs/new_pack"))) @@ -29,20 +35,44 @@ func create_template() -> void: ## Imagine being one of the best open source game engines, yet not able to get the FUCKING CONTENTS ## OF AN FNT FILE SO INSTEAD YOU HAVE TO WRITE THE MOST BULLSHIT CODE TO DOWNLOAD THE FUCKING FILE ## FROM THE FUCKING GITHUB REPO. WHY? BECAUSE GODOT IS SHIT. FUCK GODOT. - elif i.contains(".bgm") == false and i.contains(".ctex") == false and i.contains(".json") == false and i.contains("res://") and i.contains(".fnt") == false: + elif i.contains(".svg"): + ## DON'T import SVGs + continue + elif disallowed_files.has(i.get_extension()) == false and i.contains("res://"): var resource = load(i) if resource is Texture: + if OS.is_debug_build(): print("texture:" + i) data = resource.get_image().save_png_to_buffer() elif resource is AudioStream: - data = resource.get_data() + match i.get_extension(): + "mp3": + if OS.is_debug_build(): print("mp3:" + i) + data = resource.get_data() + "wav": + ## guzlad: CAN NOT BE format FORMAT_IMA_ADPCM or FORMAT_QOA as they don't support the save function + ## guzlad: Should be FORMAT_16_BITS like most of our other .wav files + if OS.is_debug_build(): print("wav:" + i) + var wav_file: AudioStreamWAV = load(i) + if !OS.is_debug_build(): + wav_file.save_to_wav(destination) + else: + print(error_string(wav_file.save_to_wav(destination))) + ## guzlad: No OGG yet + _: + data = resource.get_data() else: + if OS.is_debug_build(): print("else:" + i) var old_file = FileAccess.open(i, FileAccess.READ) data = old_file.get_buffer(old_file.get_length()) + if OS.is_debug_build(): print("else error: " + error_string(old_file.get_error())) old_file.close() - var new_file = FileAccess.open(destination, FileAccess.WRITE) - new_file.store_buffer(data) - new_file.close() + if !data.is_empty(): + if OS.is_debug_build(): print("saving:" + i) + var new_file = FileAccess.open(destination, FileAccess.WRITE) + new_file.store_buffer(data) + if OS.is_debug_build(): print("saving error: " + error_string(new_file.get_error())) + new_file.close() var pack_info_path = Global.config_path.path_join("resource_packs/new_pack/pack_info.json") DirAccess.make_dir_recursive_absolute(pack_info_path.get_base_dir()) @@ -50,6 +80,7 @@ func create_template() -> void: file.store_string(JSON.stringify(base_info_json, "\t")) file.close() print("Done") + pack_created.emit() func download_fnt_text(file_path := "") -> PackedByteArray: var http = HTTPRequest.new() @@ -77,7 +108,7 @@ func get_files(base_dir := "", files := []) -> void: for i in DirAccess.get_files_at(base_dir): if base_dir.contains("LevelGuides") == false: i = i.replace(".import", "") - print(i) + #print(i) var target_path = base_dir + "/" + i var rom_assets_path = target_path.replace("res://Assets", Global.config_path.path_join("resource_packs/BaseAssets")) if FileAccess.file_exists(rom_assets_path): diff --git a/Scripts/UI/SelectableOptionButton.gd b/Scripts/UI/SelectableOptionButton.gd index 6be81434..5084ae2f 100644 --- a/Scripts/UI/SelectableOptionButton.gd +++ b/Scripts/UI/SelectableOptionButton.gd @@ -19,4 +19,11 @@ func handle_inputs() -> void: if Input.is_action_just_pressed("ui_accept"): button_pressed.emit() if press_sfx != "": - AudioManager.play_global_sfx(press_sfx) + play_sfx() + +func play_sfx(sfx := press_sfx) -> void: + await get_tree().process_frame + AudioManager.play_global_sfx(sfx) + +func set_title(text := "") -> void: + title = text diff --git a/Scripts/UI/WindowChanger.gd b/Scripts/UI/WindowChanger.gd index 240b8eca..05ec2eb1 100644 --- a/Scripts/UI/WindowChanger.gd +++ b/Scripts/UI/WindowChanger.gd @@ -56,7 +56,7 @@ func frame_limit_changed(new_value := 0) -> void: 3: new_framerate = 144 4: new_framerate = 240 - Engine.max_fps = new_framerate + Engine.set_max_fps(new_framerate) Settings.file.video.frame_limit = new_value func set_window_size(value := []) -> void: