From 2b50a648f72d99d5e40157a00ac4465d9d0aa3bf Mon Sep 17 00:00:00 2001 From: JHDev2006 Date: Mon, 27 Oct 2025 09:42:22 +0000 Subject: [PATCH] have tested all levels in the contest with this new fork, all ran great, pretty happy to merge this after a bit of a tidy up --- Scenes/Levels/LevelTransition.tscn | 24 +++++++++++++++++++-- Scripts/Classes/Entities/Enemies/Podoboo.gd | 4 ---- Scripts/Classes/LevelClass.gd | 3 ++- Scripts/Parts/LevelTransition.gd | 4 ++++ 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/Scenes/Levels/LevelTransition.tscn b/Scenes/Levels/LevelTransition.tscn index 73cb0b2..3a875e4 100644 --- a/Scenes/Levels/LevelTransition.tscn +++ b/Scenes/Levels/LevelTransition.tscn @@ -279,18 +279,38 @@ region_rect = Rect2(8, 0, 8, 8) script = ExtResource("6_abjth") metadata/_custom_type_script = "uid://364rywt44hy6" +[node name="Loading" type="Label" parent="BG"] +unique_name_in_owner = true +process_thread_group = 2 +process_thread_group_order = 0 +process_thread_messages = 0 +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -96.0 +offset_top = 8.0 +offset_right = 96.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "BUILDING LEVEL..." +horizontal_alignment = 1 + [node name="Timer" type="Timer" parent="."] wait_time = 3.0 one_shot = true [node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")] script = ExtResource("8_ehrek") -labels = [NodePath("../BG/Control/World"), NodePath("../BG/Control/LivesCount"), NodePath("../BG/Control/MarathonPB"), NodePath("../BG/Control/WorldNum"), NodePath("../BG/Control/CustomLevelName"), NodePath("../BG/Control/CustomLevelAuthor"), NodePath("../BG/Control/ChallengeScore"), NodePath("../BG/Control/ChallengeScoreText"), NodePath("../BG/Control/ChallengeScoreText/Target"), NodePath("../BG/Control/ChallengeCoins2")] +labels = [NodePath("../BG/Control/World"), NodePath("../BG/Control/LivesCount"), NodePath("../BG/Control/MarathonPB"), NodePath("../BG/Control/WorldNum"), NodePath("../BG/Control/CustomLevelName"), NodePath("../BG/Control/CustomLevelAuthor"), NodePath("../BG/Control/ChallengeScore"), NodePath("../BG/Control/ChallengeScoreText"), NodePath("../BG/Control/ChallengeScoreText/Target"), NodePath("../BG/Control/ChallengeCoins2"), NodePath("../BG/Loading")] metadata/_custom_type_script = "uid://co6tjg3w6qpd8" [node name="TextShadowColourChanger" type="Node" parent="." node_paths=PackedStringArray("labels", "shadow_node")] script = ExtResource("10_abjth") -labels = [NodePath("../BG/Control/World"), NodePath("../BG/Control/LivesCount"), NodePath("../BG/Control/MarathonPB"), NodePath("../BG/Control/WorldNum"), NodePath("../BG/Control/CustomLevelName"), NodePath("../BG/Control/CustomLevelAuthor"), NodePath("../BG/Control/ChallengeScoreText"), NodePath("../BG/Control/ChallengeScore"), NodePath("../BG/Control/ChallengeScoreText/Target"), NodePath("../BG/Control/ChallengeCoins2")] +labels = [NodePath("../BG/Control/World"), NodePath("../BG/Control/LivesCount"), NodePath("../BG/Control/MarathonPB"), NodePath("../BG/Control/WorldNum"), NodePath("../BG/Control/CustomLevelName"), NodePath("../BG/Control/CustomLevelAuthor"), NodePath("../BG/Control/ChallengeScoreText"), NodePath("../BG/Control/ChallengeScore"), NodePath("../BG/Control/ChallengeScoreText/Target"), NodePath("../BG/Control/ChallengeCoins2"), NodePath("../BG/Loading")] shadow_node = NodePath("../BG/Control/ChallengeCoins/1/Shadow") metadata/_custom_type_script = "uid://dt2p68xl462v2" diff --git a/Scripts/Classes/Entities/Enemies/Podoboo.gd b/Scripts/Classes/Entities/Enemies/Podoboo.gd index 7d45988..c100844 100644 --- a/Scripts/Classes/Entities/Enemies/Podoboo.gd +++ b/Scripts/Classes/Entities/Enemies/Podoboo.gd @@ -12,10 +12,6 @@ signal killed const BASE_LINE := 48 -func _ready() -> void: - if Global.current_game_mode != Global.GameMode.LEVEL_EDITOR and global_position.y > -32: - Global.log_warning("Podoboo is too low! Forgot to update!") - func _physics_process(delta: float) -> void: velocity += (5 / delta) * delta velocity = clamp(velocity, -INF, 280) diff --git a/Scripts/Classes/LevelClass.gd b/Scripts/Classes/LevelClass.gd index 06c47f3..e9c48f3 100644 --- a/Scripts/Classes/LevelClass.gd +++ b/Scripts/Classes/LevelClass.gd @@ -84,7 +84,8 @@ static var can_set_time := true func _enter_tree() -> void: Global.current_level = self - update_theme() + if is_inside_tree(): + update_theme() SpeedrunHandler.timer_active = true SpeedrunHandler.ghost_active = true if can_set_time: diff --git a/Scripts/Parts/LevelTransition.gd b/Scripts/Parts/LevelTransition.gd index 0d55e1f..9b1648a 100644 --- a/Scripts/Parts/LevelTransition.gd +++ b/Scripts/Parts/LevelTransition.gd @@ -40,6 +40,7 @@ func _ready() -> void: Level.in_vine_level = false Global.p_switch_active = false Lakitu.present = false + Door.exiting_door_id = -1 Global.p_switch_timer = -1 if Checkpoint.passed_checkpoints.is_empty() == false: Door.unlocked_doors = Checkpoint.unlocked_doors.duplicate() @@ -103,6 +104,8 @@ func _ready() -> void: Global.clear_saved_values() Global.reset_values() wait_for_build_completion() + %Loading.show() + await get_tree().create_timer(0.1, false).timeout NewLevelBuilder.load_level(LevelEditor.level_file) else: await get_tree().create_timer(0.1, false).timeout @@ -111,6 +114,7 @@ func _ready() -> void: func wait_for_build_completion() -> void: await NewLevelBuilder.level_building_complete can_transition = true + %Loading.hide() func handle_challenge_mode_transition() -> void: $BG/Control/LivesCount.hide()