diff --git a/Resources/Locale/locale.de.translation b/Resources/Locale/locale.de.translation index 18b458c..de1e076 100644 Binary files a/Resources/Locale/locale.de.translation and b/Resources/Locale/locale.de.translation differ diff --git a/Resources/Locale/locale.en.translation b/Resources/Locale/locale.en.translation index b40f2d2..edf40e3 100644 Binary files a/Resources/Locale/locale.en.translation and b/Resources/Locale/locale.en.translation differ diff --git a/Resources/Locale/locale.es.translation b/Resources/Locale/locale.es.translation index a1a1411..bacabf5 100644 Binary files a/Resources/Locale/locale.es.translation and b/Resources/Locale/locale.es.translation differ diff --git a/Resources/Locale/locale.fil.translation b/Resources/Locale/locale.fil.translation index e967d06..5f3929b 100644 Binary files a/Resources/Locale/locale.fil.translation and b/Resources/Locale/locale.fil.translation differ diff --git a/Resources/Locale/locale.fr.translation b/Resources/Locale/locale.fr.translation index 25763d8..ca7ee01 100644 Binary files a/Resources/Locale/locale.fr.translation and b/Resources/Locale/locale.fr.translation differ diff --git a/Resources/Locale/locale.ga.translation b/Resources/Locale/locale.ga.translation index 20d3e47..1c07e32 100644 Binary files a/Resources/Locale/locale.ga.translation and b/Resources/Locale/locale.ga.translation differ diff --git a/Resources/Locale/locale.id.translation b/Resources/Locale/locale.id.translation index 2a3dea1..79dd13a 100644 Binary files a/Resources/Locale/locale.id.translation and b/Resources/Locale/locale.id.translation differ diff --git a/Resources/Locale/locale.it.translation b/Resources/Locale/locale.it.translation index b437d17..ed66f67 100644 Binary files a/Resources/Locale/locale.it.translation and b/Resources/Locale/locale.it.translation differ diff --git a/Resources/Locale/locale.jp.translation b/Resources/Locale/locale.jp.translation index c88ed96..2ae81b2 100644 Binary files a/Resources/Locale/locale.jp.translation and b/Resources/Locale/locale.jp.translation differ diff --git a/Resources/Locale/locale.pl.translation b/Resources/Locale/locale.pl.translation index d87a318..4bc770e 100644 Binary files a/Resources/Locale/locale.pl.translation and b/Resources/Locale/locale.pl.translation differ diff --git a/Resources/Locale/locale.pt.translation b/Resources/Locale/locale.pt.translation index e4dea5d..f653c5d 100644 Binary files a/Resources/Locale/locale.pt.translation and b/Resources/Locale/locale.pt.translation differ diff --git a/Resources/Locale/locale.ru.translation b/Resources/Locale/locale.ru.translation index 7218dca..f243a40 100644 Binary files a/Resources/Locale/locale.ru.translation and b/Resources/Locale/locale.ru.translation differ diff --git a/Resources/Locale/locale.tr.translation b/Resources/Locale/locale.tr.translation index 623b8b3..a758c42 100644 Binary files a/Resources/Locale/locale.tr.translation and b/Resources/Locale/locale.tr.translation differ diff --git a/Scenes/Prefabs/LevelObjects/HardCameraRightLimit.tscn b/Scenes/Prefabs/LevelObjects/HardCameraRightLimit.tscn index fec2414..872df47 100644 --- a/Scenes/Prefabs/LevelObjects/HardCameraRightLimit.tscn +++ b/Scenes/Prefabs/LevelObjects/HardCameraRightLimit.tscn @@ -8,7 +8,7 @@ [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_bdd7a"] normal = Vector2(-1, 0) -[node name="HardCameraRightLimit" type="Node2D"] +[node name="HardCameraRightLimit" type="Node2D" groups=["CameraLimits"]] script = ExtResource("1_f6lpd") metadata/_custom_type_script = "uid://bdq0373j5n5o0" diff --git a/Scripts/Classes/Entities/Objects/Door.gd b/Scripts/Classes/Entities/Objects/Door.gd index 4a34d22..821bacf 100644 --- a/Scripts/Classes/Entities/Objects/Door.gd +++ b/Scripts/Classes/Entities/Objects/Door.gd @@ -57,6 +57,7 @@ func run_door_check() -> void: if same_scene_exiting_door != null: if same_scene_exiting_door != self and exiting_door_id == door_id: door_found = true + get_tree().call_group("CameraLimits", "return_camera_to_normal") for i in get_tree().get_nodes_in_group("Players"): player_exit(i) return diff --git a/Scripts/Classes/Entities/Player.gd b/Scripts/Classes/Entities/Player.gd index 9ecbcdd..5928fc2 100644 --- a/Scripts/Classes/Entities/Player.gd +++ b/Scripts/Classes/Entities/Player.gd @@ -425,7 +425,7 @@ func add_stomp_combo(award_score := true) -> void: score_note_spawner.spawn_note(10000) else: Global.lives += 1 - AudioManager.play_sfx("1_up", global_position) + AudioManager.play_global_sfx("1_up") score_note_spawner.spawn_one_up_note() else: if award_score: @@ -564,6 +564,8 @@ func die(pit := false) -> void: visible = not pit flight_meter = 0 dead.emit() + Global.p_switch_active = false + Global.p_switch_timer = 0 stop_all_timers() Global.total_deaths += 1 sprite.process_mode = Node.PROCESS_MODE_ALWAYS @@ -590,7 +592,7 @@ func death_load() -> void: Global.death_load = true # Handle lives decrement for CAMPAIGN and MARATHON - if [Global.GameMode.CAMPAIGN, Global.GameMode.MARATHON, Global.GameMode.LEVEL_EDITOR, Global.GameMode.CUSTOM_LEVEL].has(Global.current_game_mode): + if [Global.GameMode.CAMPAIGN, Global.GameMode.MARATHON].has(Global.current_game_mode): if Settings.file.difficulty.inf_lives == 0: Global.lives -= 1 @@ -602,6 +604,7 @@ func death_load() -> void: Global.GameMode.LEVEL_EDITOR: func(): owner.stop_testing(), + Global.GameMode.CHALLENGE: func(): Global.transition_to_scene("res://Scenes/Levels/ChallengeMiss.tscn"), @@ -626,12 +629,12 @@ func death_load() -> void: } # Determine which action to take - if death_actions.has(Global.current_game_mode): - death_actions[Global.current_game_mode].call() if Global.lives <= 0 and Settings.file.difficulty.inf_lives == 0: death_actions["game_over"].call() elif Global.time <= 0: death_actions["time_up"].call() + elif death_actions.has(Global.current_game_mode): + death_actions[Global.current_game_mode].call() else: death_actions["default_reload"].call() @@ -667,11 +670,13 @@ func get_power_up(power_name := "") -> void: await power_up_animation(power_name) else: return - check_for_block() power_state = new_power_state Global.player_power_states[player_id] = str(power_state.get_index()) + handle_power_up_states(0) can_hurt = true refresh_hitbox() + await get_tree().physics_frame + check_for_block() func check_for_block() -> void: if test_move(global_transform, (Vector2.UP * gravity_vector) * 4): @@ -802,6 +807,8 @@ func jump() -> void: gravity = JUMP_GRAVITY AudioManager.play_sfx("small_jump" if power_state.hitbox_size == "Small" else "big_jump", global_position) has_jumped = true + await get_tree().physics_frame + has_jumped = true func calculate_jump_height() -> float: # Thanks wye love you xxx return -(JUMP_HEIGHT + JUMP_INCR * int(abs(velocity.x) / 25)) diff --git a/Scripts/Parts/CameraRightLimit.gd b/Scripts/Parts/CameraRightLimit.gd index 859bb38..699d8a1 100644 --- a/Scripts/Parts/CameraRightLimit.gd +++ b/Scripts/Parts/CameraRightLimit.gd @@ -5,6 +5,7 @@ extends Node2D @export var lock_camera := false func _enter_tree() -> void: + add_to_group("CameraLimits") Player.camera_right_limit = int(global_position.x) func _exit_tree() -> void: @@ -13,6 +14,7 @@ func _exit_tree() -> void: func return_camera_to_normal() -> void: for i in get_tree().get_nodes_in_group("Players"): + Player.camera_right_limit = int(9999999) CameraHandler.cam_locked = false i.reset_camera_to_center() diff --git a/project.godot b/project.godot index 71e8153..5cbecf9 100644 --- a/project.godot +++ b/project.godot @@ -106,6 +106,7 @@ EditorTabs="" Coins="" Doors="" Lakitus="" +CameraLimits="" [gui]