mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
[QoL] Noclip can be toggled, works w/o debug in leveltesting, some convenience functions. (#621)
* Some state machine functions to make code tidier in the future * Added a function to Global to check if we're playtesting, for convenience * Only allow noclip w/o debug in leveltesting, toggling added, kept jump key to exit
This commit is contained in:
@@ -454,6 +454,12 @@ func log_comment(msg := "") -> void:
|
||||
await get_tree().create_timer(2, false).timeout
|
||||
error_message.queue_free()
|
||||
|
||||
func level_editor_is_playtesting() -> bool:
|
||||
if Global.current_game_mode == Global.GameMode.LEVEL_EDITOR:
|
||||
if Global.level_editor.current_state == LevelEditor.EditorState.PLAYTESTING:
|
||||
return true
|
||||
return false
|
||||
|
||||
func unlock_achievement(achievement_id := AchievementID.SMB1_CLEAR) -> void:
|
||||
achievements[achievement_id] = "1"
|
||||
if achievement_id != AchievementID.COMPLETIONIST:
|
||||
|
Reference in New Issue
Block a user