Files
Super-Mario-Bros.-Remastere…/Scripts/Parts/PipeCutscene.gd
KirbyKidJ 84a34ff3b9 Miscellaneous Bugfixes From My Multiplayer Branch
This is just a bunch of bugfixes I did while I was working on the Multiplayer Support PR. I know I should've kept them separate, but then I'd also be dealing with said bugs. So this PR adds most of the bugfixes I did while working on Multiplayer.

- De-globalized Pipe SFX from Pipe Cutscene (helps with lowering audio)
- De-globalized 1-up SFX for Players
- Removed an error log spam with the `ResourceSetter`s (involving connecting already connected signals)
- Made sure to insert "BaseAssets" folder into the FIRST slot in the Resource Packs array.
- Replaced `"BaseAssets"` for the above fix with `Godot.ROM_PACK_NAME`
- Removed unused `"character"` setting from `SettingsManager`
- Reset P-Switch timer when `Global.reset_values()` is called. Fixes bug when pressing a P-Switch and immediately restarting the level.
- Added Skid SFX to `AudioManager`
- Added slightly longer delay for when pausing with a controller (it can easily unpause before you press the button again)
- Null check if LevelBG is in the level or not (for added for test levels)
2025-10-05 12:12:39 -07:00

31 lines
717 B
GDScript

class_name PipeCutscene
extends Level
static var seen_cutscene := false
func _enter_tree() -> void:
Global.game_paused = false
theme = WORLD_THEMES[Global.current_campaign][Global.world_num]
if Global.world_num > 4 and Global.world_num <= 8:
theme_time = "Night"
else:
theme_time = "Day"
Global.level_theme = theme
Global.theme_time = theme_time
func _ready() -> void:
Global.current_level = null
seen_cutscene = true
first_load = true
$Music.play()
func update_next_level_info() -> void:
pass
func go_to_level() -> void:
first_load = true
Global.transition_to_scene(LevelTransition.level_to_transition_to)
func play_pipe_sfx() -> void:
AudioManager.play_sfx("pipe", $Player1.global_position)