Fix Extra Checkpoint option not doing anything + other checkpoint fixes (#649)

* Fix Extra Checkpoint option not doing anything + other checkpoint fixes

* Remove redundancy
This commit is contained in:
John Cooper McDonald
2025-10-22 13:51:22 -05:00
committed by GitHub
parent b54c4b5913
commit 1e2d4d9404
5 changed files with 3 additions and 12 deletions

View File

@@ -253,13 +253,8 @@ position = Vector2(2624, -32)
pipe_id = 3
exit_only = true
[node name="Checkpoint2" parent="." instance=ExtResource("10_q2h2g")]
position = Vector2(1296, 0)
optional = true
[node name="CheckpointFlag" parent="." instance=ExtResource("24_v8ufo")]
position = Vector2(1296, 0)
optional = true
[connection signal="block_destroyed" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active_2"]
[connection signal="block_emptied" from="Tiles/BrickBlock" to="Tiles/BrickBlock/LevelPersistance" method="set_as_active"]

View File

@@ -204,6 +204,7 @@ position = Vector2(2200, -136)
[node name="CheckpointFlag" parent="." node_paths=PackedStringArray("nodes_to_delete") instance=ExtResource("22_686wu")]
position = Vector2(1328, 0)
nodes_to_delete = [NodePath("../Enemies/Blooper6")]
optional = true
[node name="EntityGenerator" parent="." instance=ExtResource("22_lnx6r")]
position = Vector2(-72, -176)

View File

@@ -236,6 +236,7 @@ position = Vector2(3432, -120)
[node name="CheckpointFlag" parent="." instance=ExtResource("24_osugw")]
position = Vector2(2056, -64)
optional = true
[node name="BrickBlock" parent="." instance=ExtResource("21_u54v8")]
position = Vector2(2040, -120)

View File

@@ -6,9 +6,6 @@ static var character_save := "Mario"
func _ready() -> void:
activated.get_node("ResourceSetterNew").resource_json = load(get_character_sprite_path(0))
if Settings.file.difficulty.checkpoint_style == 0 and (Global.current_game_mode != Global.GameMode.LEVEL_EDITOR and Global.current_game_mode != Global.GameMode.CUSTOM_LEVEL) or Global.current_campaign == "SMBANN":
owner.queue_free()
return
owner.show()
if owner.passed:
sprite.hide()

View File

@@ -27,7 +27,7 @@ func _enter_tree() -> void:
LevelPersistance.active_nodes = old_state.duplicate(true)
func _ready() -> void:
if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN":
if [Global.GameMode.CHALLENGE, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) or Global.current_campaign == "SMBANN" or (Settings.file.difficulty.extra_checkpoints == 0 and optional):
queue_free()
return
if has_meta("is_flag") == false:
@@ -71,6 +71,3 @@ func get_id() -> String:
return str(Global.level_editor.sub_level_id) + "," + str(Vector2i(global_position)) + "," + get_parent().name
else:
return Global.current_level.scene_file_path + "," + str(Vector2i(global_position)) + "," + get_parent().name
func on_tree_exiting() -> void:
pass # Replace with function body.