mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
unlocked doors now get saved between checkpoints, correctly,
This commit is contained in:
@@ -25,6 +25,7 @@ destruction_particle_scene = ExtResource("2_x80g6")
|
||||
metadata/_custom_type_script = "uid://b5ejlbl0vp1gm"
|
||||
|
||||
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
||||
process_mode = 1
|
||||
script = ExtResource("3_x80g6")
|
||||
do_offset = false
|
||||
metadata/_custom_type_script = "uid://caq1qiwmy0mox"
|
||||
|
@@ -136,6 +136,7 @@ script = ExtResource("1_gcnju")
|
||||
metadata/_custom_type_script = "uid://bpydbpyjk1mt4"
|
||||
|
||||
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
||||
process_mode = 1
|
||||
sprite_frames = SubResource("SpriteFrames_bcd7j")
|
||||
autoplay = "default"
|
||||
frame_progress = 0.177236
|
||||
|
@@ -51,6 +51,7 @@ metadata/_custom_type_script = "uid://bpydbpyjk1mt4"
|
||||
metadata/block_spawn_offset = Vector2(0, -8)
|
||||
|
||||
[node name="Sprite" type="AnimatedSprite2D" parent="."]
|
||||
process_mode = 1
|
||||
sprite_frames = SubResource("SpriteFrames_6tj01")
|
||||
frame_progress = 0.602985
|
||||
script = ExtResource("2_fcan1")
|
||||
|
@@ -20,6 +20,9 @@ size = Vector2(12, 12)
|
||||
[node name="BuzzyBeetleShell" type="CharacterBody2D" node_paths=PackedStringArray("on_screen_enabler", "score_note_adder") groups=["Enemies"]]
|
||||
collision_layer = 32
|
||||
collision_mask = 6
|
||||
floor_constant_speed = true
|
||||
floor_max_angle = 0.87266463
|
||||
floor_snap_length = 4.0
|
||||
script = ExtResource("1_67hvo")
|
||||
on_screen_enabler = NodePath("VisibleOnScreenEnabler2D")
|
||||
score_note_adder = NodePath("ScoreNoteSpawner")
|
||||
|
@@ -89,4 +89,6 @@ script = SubResource("GDScript_ywjuo")
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
|
||||
[node name="VisibleOnScreenEnabler2D" type="VisibleOnScreenEnabler2D" parent="."]
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="shoot"]
|
||||
|
@@ -266,6 +266,7 @@ func reset_values() -> void:
|
||||
Checkpoint.passed = false
|
||||
Checkpoint.sublevel_id = 0
|
||||
Door.unlocked_doors = []
|
||||
Checkpoint.unlocked_doors = []
|
||||
KeyItem.total_collected = 0
|
||||
Checkpoint.keys_collected = 0
|
||||
Level.start_level_path = Level.get_scene_string(Global.world_num, Global.level_num)
|
||||
|
@@ -14,6 +14,7 @@ static var level := ""
|
||||
static var sublevel_id := 0
|
||||
static var keys_collected := 0
|
||||
static var old_state := [[], []]
|
||||
static var unlocked_doors := []
|
||||
|
||||
func _enter_tree() -> void:
|
||||
if Global.level_editor != null:
|
||||
@@ -51,6 +52,7 @@ func on_area_entered(area: Area2D) -> void:
|
||||
passed = true
|
||||
keys_collected = KeyItem.total_collected
|
||||
old_state = LevelPersistance.active_nodes.duplicate(true)
|
||||
unlocked_doors = Door.unlocked_doors.duplicate()
|
||||
Level.start_level_path = Global.current_level.scene_file_path
|
||||
if Global.current_game_mode == Global.GameMode.LEVEL_EDITOR or Global.current_game_mode == Global.GameMode.CUSTOM_LEVEL:
|
||||
sublevel_id = Global.level_editor.sub_level_id
|
||||
|
@@ -41,6 +41,8 @@ func _ready() -> void:
|
||||
Global.p_switch_active = false
|
||||
Lakitu.present = false
|
||||
Global.p_switch_timer = -1
|
||||
if Checkpoint.passed:
|
||||
Door.unlocked_doors = Checkpoint.unlocked_doors.duplicate()
|
||||
if Global.current_campaign == "SMBANN":
|
||||
DiscoLevel.reset_values()
|
||||
DiscoLevel.first_load = true
|
||||
|
Reference in New Issue
Block a user