diff --git a/Scenes/Levels/SMB1/World2/2-1.tscn b/Scenes/Levels/SMB1/World2/2-1.tscn index 964aaea6..f6179480 100644 --- a/Scenes/Levels/SMB1/World2/2-1.tscn +++ b/Scenes/Levels/SMB1/World2/2-1.tscn @@ -238,7 +238,7 @@ metadata/_custom_type_script = "uid://pfwgmuchergf" [node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")] script = ExtResource("27_nvjju") -nodes_to_delete = [NodePath("../Blocks/QuestionBlock2"), null, NodePath("../Blocks/BrickBlock7")] +nodes_to_delete = [NodePath("../Blocks/QuestionBlock2"), NodePath("../Blocks/BrickBlock7")] metadata/_custom_type_script = "uid://cgm3opb5qudc1" [node name="RedCoin" parent="ChallengeNodes" instance=ExtResource("28_t63mw")] diff --git a/Scenes/Levels/SMB1/World3/3-2.tscn b/Scenes/Levels/SMB1/World3/3-2.tscn index 9609a666..dce9f771 100644 --- a/Scenes/Levels/SMB1/World3/3-2.tscn +++ b/Scenes/Levels/SMB1/World3/3-2.tscn @@ -164,9 +164,8 @@ position = Vector2(3192, 0) [node name="Checkpoint" parent="." instance=ExtResource("20_xv2tb")] position = Vector2(1328, 0) -[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")] +[node name="ChallengeNodes" type="Node" parent="."] script = ExtResource("21_8rqg6") -nodes_to_delete = [null] metadata/_custom_type_script = "uid://cgm3opb5qudc1" [node name="RedCoin" parent="ChallengeNodes" instance=ExtResource("22_cxldk")] diff --git a/Scenes/Levels/SMB1/World4/4-1.tscn b/Scenes/Levels/SMB1/World4/4-1.tscn index 29bfc19f..ce135419 100644 --- a/Scenes/Levels/SMB1/World4/4-1.tscn +++ b/Scenes/Levels/SMB1/World4/4-1.tscn @@ -112,7 +112,7 @@ tile_map_data = PackedByteArray("AAD7////AAAAAAAAAAD8////AAABAAAAAAD+////AAABAAA [node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")] script = ExtResource("21_f001g") -nodes_to_delete = [NodePath("../Blocks/QuestionBlock3"), NodePath("../Coin"), null, NodePath("../Blocks/QuestionBlock4")] +nodes_to_delete = [NodePath("../Blocks/QuestionBlock3"), NodePath("../Coin"), NodePath("../Blocks/QuestionBlock4")] metadata/_custom_type_script = "uid://cgm3opb5qudc1" [node name="QuestionBlock" parent="ChallengeNodes" instance=ExtResource("9_vtupl")] diff --git a/Scenes/Levels/SMB1/World7/7-3.tscn b/Scenes/Levels/SMB1/World7/7-3.tscn index d729705d..cb3fde45 100644 --- a/Scenes/Levels/SMB1/World7/7-3.tscn +++ b/Scenes/Levels/SMB1/World7/7-3.tscn @@ -1054,7 +1054,7 @@ position = Vector2(2976, -96) [node name="InvisibleQuestionBlock" parent="ChallengeNodes" index="5"] position = Vector2(504, -104) -[node name="InvisibleQuestionBlock2" parent="ChallengeNodes" index="6" instance=ExtResource("3_dfskb")] +[node name="InvisibleQuestionBlock3" parent="ChallengeNodes" index="6" instance=ExtResource("3_dfskb")] position = Vector2(1176, -104) [node name="Enemies" type="Node" parent="." index="13"] diff --git a/Scenes/Levels/SMB1/World8/8-2.tscn b/Scenes/Levels/SMB1/World8/8-2.tscn index b4531c98..04f1185d 100644 --- a/Scenes/Levels/SMB1/World8/8-2.tscn +++ b/Scenes/Levels/SMB1/World8/8-2.tscn @@ -185,7 +185,7 @@ optional = true [node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")] script = ExtResource("20_8cbri") -nodes_to_delete = [NodePath("../Enemies/Lakitu"), NodePath("../DecoTiles"), NodePath("../Blocks")] +nodes_to_delete = [NodePath("../Blocks")] force_on = true metadata/_custom_type_script = "uid://cgm3opb5qudc1" diff --git a/Scenes/Prefabs/UI/SettingsMenu.tscn b/Scenes/Prefabs/UI/SettingsMenu.tscn index 414cae3c..b4c1205f 100644 --- a/Scenes/Prefabs/UI/SettingsMenu.tscn +++ b/Scenes/Prefabs/UI/SettingsMenu.tscn @@ -447,7 +447,7 @@ size_flags_vertical = 3 theme_override_constants/separation = -4 script = ExtResource("4_avtty") category_name = "SETTINGS_VISUALS" -options = [NodePath("ParallaxStyle"), NodePath("BGParticles"), NodePath("HUDStyle"), NodePath("RainbowEffect"), NodePath("TransformationEffect"), NodePath("TextShadows"), NodePath("BridgeDestructionAnimation"), NodePath("VisibleTimers"), NodePath("TransitionAnimation"), NodePath(""), NodePath("ColourfulPipes"), NodePath("FirebarStyle"), NodePath("ExtraParticles")] +options = [NodePath("ParallaxStyle"), NodePath("BGParticles"), NodePath("HUDStyle"), NodePath("RainbowEffect"), NodePath("TransformationEffect"), NodePath("TextShadows"), NodePath("BridgeDestructionAnimation"), NodePath("VisibleTimers"), NodePath("TransitionAnimation"), null, NodePath("ColourfulPipes"), NodePath("FirebarStyle"), NodePath("ExtraParticles")] [node name="Control" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer/Visuals"] custom_minimum_size = Vector2(0, 4) diff --git a/Scripts/Classes/Entities/Objects/Bumper.gd b/Scripts/Classes/Entities/Objects/Bumper.gd index 5cf6296a..a94c91e6 100644 --- a/Scripts/Classes/Entities/Objects/Bumper.gd +++ b/Scripts/Classes/Entities/Objects/Bumper.gd @@ -32,7 +32,7 @@ func bounce_player(player: Player) -> void: $Sprite.play("Idle") func refresh_hitbox() -> void: - $Hitbox/CollisionShape2D.set_deferred("disabled", true) + $PlayerDetection/CollisionShape2D.set_deferred("disabled", true) await get_tree().physics_frame - $Hitbox/CollisionShape2D.set_deferred("disabled", false) + $PlayerDetection/CollisionShape2D.set_deferred("disabled", false) diff --git a/Scripts/Parts/ResourcePackTemplateCreator.gd b/Scripts/Parts/ResourcePackTemplateCreator.gd index e568e429..c6fe6932 100644 --- a/Scripts/Parts/ResourcePackTemplateCreator.gd +++ b/Scripts/Parts/ResourcePackTemplateCreator.gd @@ -3,6 +3,10 @@ extends Node var files := [] var directories := [] +signal fnt_file_downloaded(text: String) + +var downloaded_fnt_text := [] + const base_info_json := { "name": "New Pack", "description": "Template, give me a description!", @@ -19,14 +23,26 @@ func create_template() -> void: destination = i.replace("res://Assets", Global.config_path.path_join("resource_packs/new_pack")) else: destination = i.replace(Global.config_path.path_join("resource_packs/BaseAssets"), Global.config_path.path_join("resource_packs/new_pack")) - print("Copying '" + i + "' to: '" + destination) - var old_file = FileAccess.open(i, FileAccess.READ) - if old_file != null: - var new_file = FileAccess.open(destination, FileAccess.WRITE) - new_file.store_buffer(old_file.get_buffer(old_file.get_length())) + var data = [] + if i.contains(".fnt"): + data = await download_fnt_text(i) + ## 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: + var resource = load(i) + if resource is Texture: + data = resource.get_image().save_png_to_buffer() + elif resource is AudioStream: + data = resource.get_data() + else: + var old_file = FileAccess.open(i, FileAccess.READ) + data = old_file.get_buffer(old_file.get_length()) old_file.close() - new_file.close() - + + var new_file = FileAccess.open(destination, FileAccess.WRITE) + new_file.store_buffer(data) + 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()) @@ -35,9 +51,24 @@ func create_template() -> void: file.close() print("Done") +func download_fnt_text(file_path := "") -> PackedByteArray: + var http = HTTPRequest.new() + const GITHUB_URL = "https://raw.githubusercontent.com/JHDev2006/Super-Mario-Bros.-Remastered-Public/refs/heads/main/" + var url = GITHUB_URL + file_path.replace("res://", "") + add_child(http) + http.request_completed.connect(file_downloaded) + http.request(url, [], HTTPClient.METHOD_GET) + await fnt_file_downloaded + http.queue_free() + return downloaded_fnt_text + +func file_downloaded(result: int, response_code: int, headers: PackedStringArray, body: PackedByteArray) -> void: + downloaded_fnt_text = body + fnt_file_downloaded.emit(downloaded_fnt_text) + func get_directories(base_dir := "", files := [], directories := []) -> void: for i in DirAccess.get_directories_at(base_dir): - if base_dir.contains("LevelGuides") == false: + if base_dir.contains("LevelGuides") == false and base_dir.contains(".godot") == false: directories.append(base_dir + "/" + i) get_directories(base_dir + "/" + i, files, directories) get_files(base_dir + "/" + i, files)