mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-21 15:08:12 +00:00
couple fixes
This commit is contained in:
@@ -165,5 +165,3 @@ amount = 1
|
|||||||
texture = ExtResource("7_2yl70")
|
texture = ExtResource("7_2yl70")
|
||||||
randomness = 0.12
|
randomness = 0.12
|
||||||
process_material = SubResource("ParticleProcessMaterial_rls2x")
|
process_material = SubResource("ParticleProcessMaterial_rls2x")
|
||||||
|
|
||||||
[connection signal="player_entered" from="Hitbox" to="." method="collected" unbinds=1]
|
|
||||||
|
@@ -67,7 +67,8 @@ func exit_pipe() -> void:
|
|||||||
can_enter = false
|
can_enter = false
|
||||||
pipe_exited.emit()
|
pipe_exited.emit()
|
||||||
for i in get_tree().get_nodes_in_group("Players"):
|
for i in get_tree().get_nodes_in_group("Players"):
|
||||||
await i.ready
|
if i.is_node_ready() == false:
|
||||||
|
await i.ready
|
||||||
i.go_to_exit_pipe(self)
|
i.go_to_exit_pipe(self)
|
||||||
for i in get_tree().get_nodes_in_group("Players"):
|
for i in get_tree().get_nodes_in_group("Players"):
|
||||||
await get_tree().create_timer(0.5, false).timeout
|
await get_tree().create_timer(0.5, false).timeout
|
||||||
|
@@ -159,7 +159,7 @@ const ANIMATION_FALLBACKS := {
|
|||||||
"WingCrouch": "WaterCrouch",
|
"WingCrouch": "WaterCrouch",
|
||||||
"CrouchFall": "Crouch",
|
"CrouchFall": "Crouch",
|
||||||
"CrouchJump": "Crouch",
|
"CrouchJump": "Crouch",
|
||||||
"CrouchBump": "Bump",
|
"CrouchBump": "Crouch",
|
||||||
"CrouchMove": "Crouch",
|
"CrouchMove": "Crouch",
|
||||||
"IdleAttack": "MoveAttack",
|
"IdleAttack": "MoveAttack",
|
||||||
"CrouchAttack": "IdleAttack",
|
"CrouchAttack": "IdleAttack",
|
||||||
@@ -354,6 +354,7 @@ func camera_make_current() -> void:
|
|||||||
func play_animation(animation_name := "") -> void:
|
func play_animation(animation_name := "") -> void:
|
||||||
if sprite.sprite_frames == null: return
|
if sprite.sprite_frames == null: return
|
||||||
animation_name = get_fallback_animation(animation_name)
|
animation_name = get_fallback_animation(animation_name)
|
||||||
|
print(animation_name)
|
||||||
if sprite.animation != animation_name:
|
if sprite.animation != animation_name:
|
||||||
sprite.play(animation_name)
|
sprite.play(animation_name)
|
||||||
|
|
||||||
@@ -685,10 +686,6 @@ func set_power_state_frame() -> void:
|
|||||||
$ResourceSetterNew.update_resource()
|
$ResourceSetterNew.update_resource()
|
||||||
if %Sprite.sprite_frames != null:
|
if %Sprite.sprite_frames != null:
|
||||||
can_pose = %Sprite.sprite_frames.has_animation("PoseDoor")
|
can_pose = %Sprite.sprite_frames.has_animation("PoseDoor")
|
||||||
can_bump_jump = %Sprite.sprite_frames.has_animation("JumpBump")
|
|
||||||
can_bump_crouch = %Sprite.sprite_frames.has_animation("CrouchBump")
|
|
||||||
can_bump_swim = %Sprite.sprite_frames.has_animation("SwimBump")
|
|
||||||
can_bump_fly = %Sprite.sprite_frames.has_animation("FlyBump")
|
|
||||||
can_kick_anim = %Sprite.sprite_frames.has_animation("Kick")
|
can_kick_anim = %Sprite.sprite_frames.has_animation("Kick")
|
||||||
|
|
||||||
func get_power_up(power_name := "") -> void:
|
func get_power_up(power_name := "") -> void:
|
||||||
|
@@ -212,7 +212,7 @@ func get_animation_name() -> String:
|
|||||||
if player.kicking and player.can_kick_anim:
|
if player.kicking and player.can_kick_anim:
|
||||||
return "Kick"
|
return "Kick"
|
||||||
if player.crouching and not wall_pushing:
|
if player.crouching and not wall_pushing:
|
||||||
if player.bumping and player.can_bump_crouch:
|
if player.bumping:
|
||||||
return "CrouchBump"
|
return "CrouchBump"
|
||||||
elif player.is_on_floor() == false:
|
elif player.is_on_floor() == false:
|
||||||
if player.velocity.y > 0:
|
if player.velocity.y > 0:
|
||||||
|
@@ -20,19 +20,14 @@ func create_template() -> void:
|
|||||||
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)
|
print("Copying '" + i + "' to: '" + destination)
|
||||||
if i.contains(".bgm") or i.contains(".json") or i.contains(Global.config_path):
|
var old_file = FileAccess.open(i, FileAccess.READ)
|
||||||
DirAccess.copy_absolute(i, destination)
|
if old_file != null:
|
||||||
else:
|
var new_file = FileAccess.open(destination, FileAccess.WRITE)
|
||||||
var resource = load(i)
|
new_file.store_buffer(old_file.get_buffer(old_file.get_length()))
|
||||||
if resource is Texture:
|
old_file.close()
|
||||||
resource.get_image().save_png(destination)
|
new_file.close()
|
||||||
elif resource is AudioStreamWAV:
|
|
||||||
resource.save_to_wav(destination)
|
|
||||||
elif resource is AudioStream:
|
|
||||||
var file = FileAccess.open(destination, FileAccess.WRITE)
|
|
||||||
file.store_buffer(resource.data)
|
|
||||||
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())
|
||||||
var file = FileAccess.open(pack_info_path, FileAccess.WRITE)
|
var file = FileAccess.open(pack_info_path, FileAccess.WRITE)
|
||||||
|
@@ -50,14 +50,26 @@ func get_custom_characters() -> void:
|
|||||||
var json = JSON.parse_string(FileAccess.open(char_path.path_join("CharacterInfo.json"), FileAccess.READ).get_as_text())
|
var json = JSON.parse_string(FileAccess.open(char_path.path_join("CharacterInfo.json"), FileAccess.READ).get_as_text())
|
||||||
Player.CHARACTERS.append(i)
|
Player.CHARACTERS.append(i)
|
||||||
Player.CHARACTER_NAMES.append(json.name)
|
Player.CHARACTER_NAMES.append(json.name)
|
||||||
|
|
||||||
if FileAccess.file_exists(char_path.path_join("CharacterColour.json")):
|
if FileAccess.file_exists(char_path.path_join("CharacterColour.json")):
|
||||||
Player.CHARACTER_COLOURS.append(load(char_path.path_join("CharacterColour.json")))
|
Player.CHARACTER_COLOURS.append(load(char_path.path_join("CharacterColour.json")))
|
||||||
|
else:
|
||||||
|
Player.CHARACTER_COLOURS.append(null)
|
||||||
|
|
||||||
if FileAccess.file_exists(char_path.path_join("LifeIcon.json")):
|
if FileAccess.file_exists(char_path.path_join("LifeIcon.json")):
|
||||||
GameHUD.character_icons.append(load(char_path.path_join("LifeIcon.json")))
|
GameHUD.character_icons.append(load(char_path.path_join("LifeIcon.json")))
|
||||||
|
else:
|
||||||
|
GameHUD.character_icons.append(null)
|
||||||
|
|
||||||
if FileAccess.file_exists(char_path.path_join("ColourPalette.json")):
|
if FileAccess.file_exists(char_path.path_join("ColourPalette.json")):
|
||||||
Player.CHARACTER_PALETTES.append(load(char_path.path_join("ColourPalette.json")))
|
Player.CHARACTER_PALETTES.append(load(char_path.path_join("ColourPalette.json")))
|
||||||
|
else:
|
||||||
|
Player.CHARACTER_PALETTES.append(null)
|
||||||
|
|
||||||
if FileAccess.file_exists(char_path.path_join("SFX.json")):
|
if FileAccess.file_exists(char_path.path_join("SFX.json")):
|
||||||
AudioManager.character_sfx_map[i] = JSON.parse_string(FileAccess.open(char_path.path_join("SFX.json"), FileAccess.READ).get_as_text())
|
AudioManager.character_sfx_map[i] = JSON.parse_string(FileAccess.open(char_path.path_join("SFX.json"), FileAccess.READ).get_as_text())
|
||||||
|
else:
|
||||||
|
AudioManager.character_sfx_map[i] = {}
|
||||||
|
|
||||||
func open() -> void:
|
func open() -> void:
|
||||||
get_custom_characters()
|
get_custom_characters()
|
||||||
|
Reference in New Issue
Block a user