mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
Compare commits
3 Commits
d37910a379
...
65718342c6
Author | SHA1 | Date | |
---|---|---|---|
![]() |
65718342c6 | ||
![]() |
f77e1510cf | ||
![]() |
2d0c34ce69 |
@@ -238,7 +238,7 @@ metadata/_custom_type_script = "uid://pfwgmuchergf"
|
|||||||
|
|
||||||
[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")]
|
[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")]
|
||||||
script = ExtResource("27_nvjju")
|
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"
|
metadata/_custom_type_script = "uid://cgm3opb5qudc1"
|
||||||
|
|
||||||
[node name="RedCoin" parent="ChallengeNodes" instance=ExtResource("28_t63mw")]
|
[node name="RedCoin" parent="ChallengeNodes" instance=ExtResource("28_t63mw")]
|
||||||
|
@@ -164,9 +164,8 @@ position = Vector2(3192, 0)
|
|||||||
[node name="Checkpoint" parent="." instance=ExtResource("20_xv2tb")]
|
[node name="Checkpoint" parent="." instance=ExtResource("20_xv2tb")]
|
||||||
position = Vector2(1328, 0)
|
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")
|
script = ExtResource("21_8rqg6")
|
||||||
nodes_to_delete = [null]
|
|
||||||
metadata/_custom_type_script = "uid://cgm3opb5qudc1"
|
metadata/_custom_type_script = "uid://cgm3opb5qudc1"
|
||||||
|
|
||||||
[node name="RedCoin" parent="ChallengeNodes" instance=ExtResource("22_cxldk")]
|
[node name="RedCoin" parent="ChallengeNodes" instance=ExtResource("22_cxldk")]
|
||||||
|
@@ -112,7 +112,7 @@ tile_map_data = PackedByteArray("AAD7////AAAAAAAAAAD8////AAABAAAAAAD+////AAABAAA
|
|||||||
|
|
||||||
[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")]
|
[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")]
|
||||||
script = ExtResource("21_f001g")
|
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"
|
metadata/_custom_type_script = "uid://cgm3opb5qudc1"
|
||||||
|
|
||||||
[node name="QuestionBlock" parent="ChallengeNodes" instance=ExtResource("9_vtupl")]
|
[node name="QuestionBlock" parent="ChallengeNodes" instance=ExtResource("9_vtupl")]
|
||||||
|
@@ -1054,7 +1054,7 @@ position = Vector2(2976, -96)
|
|||||||
[node name="InvisibleQuestionBlock" parent="ChallengeNodes" index="5"]
|
[node name="InvisibleQuestionBlock" parent="ChallengeNodes" index="5"]
|
||||||
position = Vector2(504, -104)
|
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)
|
position = Vector2(1176, -104)
|
||||||
|
|
||||||
[node name="Enemies" type="Node" parent="." index="13"]
|
[node name="Enemies" type="Node" parent="." index="13"]
|
||||||
|
@@ -185,7 +185,7 @@ optional = true
|
|||||||
|
|
||||||
[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")]
|
[node name="ChallengeNodes" type="Node" parent="." node_paths=PackedStringArray("nodes_to_delete")]
|
||||||
script = ExtResource("20_8cbri")
|
script = ExtResource("20_8cbri")
|
||||||
nodes_to_delete = [NodePath("../Enemies/Lakitu"), NodePath("../DecoTiles"), NodePath("../Blocks")]
|
nodes_to_delete = [NodePath("../Blocks")]
|
||||||
force_on = true
|
force_on = true
|
||||||
metadata/_custom_type_script = "uid://cgm3opb5qudc1"
|
metadata/_custom_type_script = "uid://cgm3opb5qudc1"
|
||||||
|
|
||||||
|
@@ -447,7 +447,7 @@ size_flags_vertical = 3
|
|||||||
theme_override_constants/separation = -4
|
theme_override_constants/separation = -4
|
||||||
script = ExtResource("4_avtty")
|
script = ExtResource("4_avtty")
|
||||||
category_name = "SETTINGS_VISUALS"
|
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"]
|
[node name="Control" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer/Visuals"]
|
||||||
custom_minimum_size = Vector2(0, 4)
|
custom_minimum_size = Vector2(0, 4)
|
||||||
|
@@ -32,7 +32,7 @@ func bounce_player(player: Player) -> void:
|
|||||||
$Sprite.play("Idle")
|
$Sprite.play("Idle")
|
||||||
|
|
||||||
func refresh_hitbox() -> void:
|
func refresh_hitbox() -> void:
|
||||||
$Hitbox/CollisionShape2D.set_deferred("disabled", true)
|
$PlayerDetection/CollisionShape2D.set_deferred("disabled", true)
|
||||||
await get_tree().physics_frame
|
await get_tree().physics_frame
|
||||||
$Hitbox/CollisionShape2D.set_deferred("disabled", false)
|
$PlayerDetection/CollisionShape2D.set_deferred("disabled", false)
|
||||||
|
|
||||||
|
@@ -3,6 +3,10 @@ extends Node
|
|||||||
var files := []
|
var files := []
|
||||||
var directories := []
|
var directories := []
|
||||||
|
|
||||||
|
signal fnt_file_downloaded(text: String)
|
||||||
|
|
||||||
|
var downloaded_fnt_text := []
|
||||||
|
|
||||||
const base_info_json := {
|
const base_info_json := {
|
||||||
"name": "New Pack",
|
"name": "New Pack",
|
||||||
"description": "Template, give me a description!",
|
"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"))
|
destination = i.replace("res://Assets", Global.config_path.path_join("resource_packs/new_pack"))
|
||||||
else:
|
else:
|
||||||
destination = i.replace(Global.config_path.path_join("resource_packs/BaseAssets"), Global.config_path.path_join("resource_packs/new_pack"))
|
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 data = []
|
||||||
var old_file = FileAccess.open(i, FileAccess.READ)
|
if i.contains(".fnt"):
|
||||||
if old_file != null:
|
data = await download_fnt_text(i)
|
||||||
var new_file = FileAccess.open(destination, FileAccess.WRITE)
|
## Imagine being one of the best open source game engines, yet not able to get the FUCKING CONTENTS
|
||||||
new_file.store_buffer(old_file.get_buffer(old_file.get_length()))
|
## 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()
|
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")
|
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())
|
DirAccess.make_dir_recursive_absolute(pack_info_path.get_base_dir())
|
||||||
@@ -35,9 +51,24 @@ func create_template() -> void:
|
|||||||
file.close()
|
file.close()
|
||||||
print("Done")
|
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:
|
func get_directories(base_dir := "", files := [], directories := []) -> void:
|
||||||
for i in DirAccess.get_directories_at(base_dir):
|
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)
|
directories.append(base_dir + "/" + i)
|
||||||
get_directories(base_dir + "/" + i, files, directories)
|
get_directories(base_dir + "/" + i, files, directories)
|
||||||
get_files(base_dir + "/" + i, files)
|
get_files(base_dir + "/" + i, files)
|
||||||
|
Reference in New Issue
Block a user