diff --git a/scenes/game_elements/characters/enemies/mothsache/Mothsache_test_scene.tscn b/scenes/game_elements/characters/enemies/mothsache/Mothsache_test_scene.tscn index 11c70d6930..4abb7f36ad 100644 --- a/scenes/game_elements/characters/enemies/mothsache/Mothsache_test_scene.tscn +++ b/scenes/game_elements/characters/enemies/mothsache/Mothsache_test_scene.tscn @@ -10,7 +10,7 @@ [ext_resource type="TileSet" uid="uid://dfp36ffpanjq2" path="res://tiles/elevation.tres" id="8_y728v"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="9_gwpnv"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="10_f63i0"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="11_3hf7k"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="11_2s6si"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="12_7utab"] [ext_resource type="SpriteFrames" uid="uid://dtoylirwywk0j" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_blue.tres" id="13_om8go"] [ext_resource type="PackedScene" uid="uid://dy8ohrl7j24qy" path="res://scenes/game_elements/characters/enemies/mothsache/Mothsache.tscn" id="19_bigvs"] @@ -120,14 +120,11 @@ position = Vector2(608, -93) position = Vector2(0, 72) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=175216420] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("11_2s6si")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("11_3hf7k") next_scene = "uid://biwvr6vxj6ykk" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=1246369757] position = Vector2(-1.5, -9.5) diff --git a/scenes/game_elements/characters/player/components/player.gd b/scenes/game_elements/characters/player/components/player.gd index 1822d18faa..9e18b08aac 100644 --- a/scenes/game_elements/characters/player/components/player.gd +++ b/scenes/game_elements/characters/player/components/player.gd @@ -207,7 +207,7 @@ func defeat(falling: bool = false) -> void: # Check if player has lives remaining if GameState.current_lives > 0: # Still have lives - reload current scene/checkpoint - SceneSwitcher.reload_with_transition(Transition.Effect.FADE, Transition.Effect.FADE) + SceneSwitcher.reload_with_transition() else: # Game over - restart from challenge start _handle_game_over() @@ -250,7 +250,7 @@ func _handle_game_over() -> void: # Fallback: reload current scene if no challenge start is defined # Clear spawn point to start from the beginning of the current scene GameState.set_current_spawn_point(^"") - SceneSwitcher.reload_with_transition(Transition.Effect.FADE, Transition.Effect.FADE) + SceneSwitcher.reload_with_transition() else: # Restart from the challenge start scene SceneSwitcher.change_to_file_with_transition( diff --git a/scenes/game_elements/fx/time_and_weather/components/1_time_and_weather_museum.tscn b/scenes/game_elements/fx/time_and_weather/components/1_time_and_weather_museum.tscn index 372a2c9565..6a5132441c 100644 --- a/scenes/game_elements/fx/time_and_weather/components/1_time_and_weather_museum.tscn +++ b/scenes/game_elements/fx/time_and_weather/components/1_time_and_weather_museum.tscn @@ -15,7 +15,7 @@ [ext_resource type="Texture2D" uid="uid://b5ooaiyxdrp6a" path="res://scenes/game_elements/components/light_texture_256x256.tres" id="12_g3km8"] [ext_resource type="Script" uid="uid://bk52qjv58locq" path="res://scenes/game_logic/light2d_behaviors/artificial_light_behavior.gd" id="13_e4f0h"] [ext_resource type="PackedScene" uid="uid://d0c4l7ev6ca3c" path="res://scenes/game_elements/props/spawn_point/spawn_point.tscn" id="14_s7qaw"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="16_d01n5"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="16_d01n5"] [ext_resource type="PackedScene" uid="uid://daqd67aro1o1m" path="res://scenes/game_elements/fx/time_and_weather/time_and_weather.tscn" id="16_qvyuv"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_stvbe"] @@ -121,11 +121,11 @@ metadata/_custom_type_script = "uid://bk52qjv58locq" position = Vector2(1348, 253) look_at_side_on_spawn = -1 -[node name="Teleporter" type="Area2D" parent="." unique_id=812046722] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("16_d01n5")] position = Vector2(1401, 201) -collision_layer = 4 -script = ExtResource("16_d01n5") next_scene = "uid://co2wxwlojq08k" +enter_transition = 1 +exit_transition = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=1238931458] position = Vector2(45, 51.5) diff --git a/scenes/game_elements/fx/time_and_weather/components/2_time_and_weather_museum.tscn b/scenes/game_elements/fx/time_and_weather/components/2_time_and_weather_museum.tscn index e073b9891b..14d85975cd 100644 --- a/scenes/game_elements/fx/time_and_weather/components/2_time_and_weather_museum.tscn +++ b/scenes/game_elements/fx/time_and_weather/components/2_time_and_weather_museum.tscn @@ -17,7 +17,7 @@ [ext_resource type="Script" uid="uid://du8wfijr35r35" path="res://scenes/game_elements/props/interact_area/interact_area.gd" id="15_o3luo"] [ext_resource type="PackedScene" uid="uid://d0c4l7ev6ca3c" path="res://scenes/game_elements/props/spawn_point/spawn_point.tscn" id="15_pr1ca"] [ext_resource type="PackedScene" uid="uid://daqd67aro1o1m" path="res://scenes/game_elements/fx/time_and_weather/time_and_weather.tscn" id="17_3d8kk"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="17_o3luo"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="17_o3luo"] [sub_resource type="CircleShape2D" id="CircleShape2D_h3871"] radius = 87.43 @@ -139,14 +139,12 @@ shape = SubResource("CircleShape2D_h3871") position = Vector2(525, 166) look_at_side_on_spawn = -1 -[node name="Teleporter" type="Area2D" parent="." unique_id=812046722] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("17_o3luo")] position = Vector2(-89, 336) -collision_layer = 4 -script = ExtResource("17_o3luo") next_scene = "uid://dep64htv6c4na" spawn_point_path = NodePath("SpawnPoint") enter_transition = 2 -exit_transition = 1 +exit_transition = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=1238931458] position = Vector2(45, 51.5) diff --git a/scenes/game_elements/props/collectible_item/collectible_item.tscn b/scenes/game_elements/props/collectible_item/collectible_item.tscn index b9aece7947..d35de6aefe 100644 --- a/scenes/game_elements/props/collectible_item/collectible_item.tscn +++ b/scenes/game_elements/props/collectible_item/collectible_item.tscn @@ -300,6 +300,8 @@ height = 28.0 [node name="CollectibleItem" type="Node2D" unique_id=327991066] script = ExtResource("1_7ff3m") +enter_transition = 0 +exit_transition = 0 [node name="InteractArea" type="Area2D" parent="." unique_id=1327503985 node_paths=PackedStringArray("marker")] collision_layer = 32 diff --git a/scenes/game_elements/props/collectible_item/components/collectible_item.gd b/scenes/game_elements/props/collectible_item/components/collectible_item.gd index 31807142be..4ce437106f 100644 --- a/scenes/game_elements/props/collectible_item/components/collectible_item.gd +++ b/scenes/game_elements/props/collectible_item/components/collectible_item.gd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: The Threadbare Authors # SPDX-License-Identifier: MPL-2.0 @tool -class_name CollectibleItem extends Node2D +class_name CollectibleItem +extends SceneLink ## Overworld collectible that can be interacted with. When a player interacts ## with it, an [InventoryItem] is added to the [Inventory] @@ -14,9 +15,6 @@ class_name CollectibleItem extends Node2D revealed = new_value _update_based_on_revealed() -## If provided, switch to this scene after collecting and possibly displaying a dialogue. -@export_file("*.tscn") var next_scene: String - ## [InventoryItem] provided by this collectible when interacted with. @export var item: InventoryItem: set = _set_item @@ -40,6 +38,7 @@ class_name CollectibleItem extends Node2D func _validate_property(property: Dictionary) -> void: + super._validate_property(property) match property.name: "dialogue_title": if not collected_dialogue: @@ -47,9 +46,10 @@ func _validate_property(property: Dictionary) -> void: func _get_configuration_warnings() -> PackedStringArray: + var warnings := super._get_configuration_warnings() if not item: - return ["item property must be set"] - return [] + warnings.append("item property must be set") + return warnings func _set_item(new_value: InventoryItem) -> void: @@ -65,6 +65,8 @@ func _set_item(new_value: InventoryItem) -> void: func _ready() -> void: + super._ready() + _set_item(item) _update_based_on_revealed() sprite_2d.modulate = Color.WHITE if revealed else Color.TRANSPARENT @@ -102,7 +104,7 @@ func _on_interacted(player: Player, _from_right: bool) -> void: if next_scene: GameState.set_challenge_start_scene(next_scene) - SceneSwitcher.change_to_file_with_transition(next_scene) + switch() func _update_based_on_revealed() -> void: diff --git a/scenes/game_elements/props/teleporter/teleporter.gd.uid b/scenes/game_elements/props/teleporter/teleporter.gd.uid deleted file mode 100644 index 065669c47a..0000000000 --- a/scenes/game_elements/props/teleporter/teleporter.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://hqdquinbimce diff --git a/scenes/game_elements/props/teleporter/teleporter.tscn b/scenes/game_elements/props/teleporter/teleporter.tscn new file mode 100644 index 0000000000..0d5c1347ea --- /dev/null +++ b/scenes/game_elements/props/teleporter/teleporter.tscn @@ -0,0 +1,16 @@ +[gd_scene format=3 uid="uid://0ull24fvmhwk"] + +[ext_resource type="Script" uid="uid://d2vp62mjrf6gn" path="res://scenes/globals/scene_switcher/scene_link.gd" id="1_2wkov"] +[ext_resource type="Script" uid="uid://0gr6vi3gxhcp" path="res://scenes/game_elements/props/teleporter/teleporter_logic.gd" id="2_2wkov"] + +[node name="Teleporter" type="Area2D" unique_id=1779636661] +editor_description = "The player entering this area triggers either a scene switch to \"Next Scene\", or teleports the player within the current scene. + +Add a collision shape, and set the destination." +collision_layer = 4 +script = ExtResource("1_2wkov") + +[node name="TeleporterLogic" type="Node" parent="." unique_id=713140263 node_paths=PackedStringArray("teleport_area", "scene_link")] +script = ExtResource("2_2wkov") +teleport_area = NodePath("..") +scene_link = NodePath("..") diff --git a/scenes/game_elements/props/teleporter/teleporter_logic.gd b/scenes/game_elements/props/teleporter/teleporter_logic.gd new file mode 100644 index 0000000000..4a7460004a --- /dev/null +++ b/scenes/game_elements/props/teleporter/teleporter_logic.gd @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: The Threadbare Authors +# SPDX-License-Identifier: MPL-2.0 +extends Node +# The Teleporter component needs to be an Area2D so that collision shapes can be +# added as children in each scene using it. But it also needs to be a SceneLink, +# which does not extend Area2D. +# +# In GDScript, if you have a node of type U (e.g. Area2D) which extends T (e.g. +# Node2D), you can attach a script which extends T (in this case SceneLink) to +# it. So then the only missing piece is to connect the Area2D's signals to the +# SceneLink.switch() method, and that's where this script comes in. +# +# If Godot supported traits, or re-exported properties of child nodes, we +# wouldn't need this weird workaround. + +@export var teleport_area: Area2D +@export var scene_link: SceneLink + + +func _connect() -> void: + # ONE_SHOT to avoid triggering the same teleporter while the transition is running. + # DEFERRED because otherwise if use_transition is false, switching scene + # would delete Area2D during a physics callback - bad! + var flags := CONNECT_ONE_SHOT | CONNECT_DEFERRED + teleport_area.body_entered.connect(_on_teleport_area_body_entered, flags) + + +func _on_teleport_area_body_entered(_body: Node2D) -> void: + await scene_link.switch() + if not scene_link.next_scene: + # We didn't change scene - re-enable the teleporter + _connect() + + +func _ready() -> void: + _connect() diff --git a/scenes/game_elements/props/teleporter/teleporter_logic.gd.uid b/scenes/game_elements/props/teleporter/teleporter_logic.gd.uid new file mode 100644 index 0000000000..ae54f21707 --- /dev/null +++ b/scenes/game_elements/props/teleporter/teleporter_logic.gd.uid @@ -0,0 +1 @@ +uid://0gr6vi3gxhcp diff --git a/scenes/game_elements/props/teleporter/teleporter.gd b/scenes/globals/scene_switcher/scene_link.gd similarity index 76% rename from scenes/game_elements/props/teleporter/teleporter.gd rename to scenes/globals/scene_switcher/scene_link.gd index 271b85fa51..0cefe485fb 100644 --- a/scenes/game_elements/props/teleporter/teleporter.gd +++ b/scenes/globals/scene_switcher/scene_link.gd @@ -1,8 +1,12 @@ # SPDX-FileCopyrightText: The Threadbare Authors # SPDX-License-Identifier: MPL-2.0 @tool -class_name Teleporter -extends Area2D +class_name SceneLink +extends Node2D +## Represents a potential transition to another scene. +## +## This can be used directly, but acts primarily a base class for other +## components: [Cinematic], [CollectibleItem], and the Teleporter scene. const SPAWN_POINT_GROUP_NAME: String = "spawn_point" @@ -13,7 +17,6 @@ const SPAWN_POINT_GROUP_NAME: String = "spawn_point" set(new_value): next_scene = new_value _update_available_spawn_points() - notify_property_list_changed() ## Which SpawnPoint in [member next_scene] the player character should start at; ## or blank/NONE to start at the default position in the scene. @@ -23,46 +26,38 @@ const SPAWN_POINT_GROUP_NAME: String = "spawn_point" spawn_point_path = ^"" else: spawn_point_path = new_val + update_configuration_warnings() @export_group("Transition") -## Whether to use a visual transition effect when the player enters the teleporter. +## Whether to use a visual transition effect when switching to the target scene. @export var use_transition: bool = true: set(new_val): use_transition = new_val notify_property_list_changed() -## Transition to use when the player enters this teleport. -@export var enter_transition: Transition.Effect = Transition.Effect.LEFT_TO_RIGHT_WIPE +## Transition to use at the start of the switch to [member next_scene]. +@export var enter_transition: Transition.Effect = Transition.Effect.FADE -## Transition to use when the player leaves this teleport. -@export var exit_transition: Transition.Effect = Transition.Effect.RIGHT_TO_LEFT_WIPE +## Transition to use at the end of the switch to [member next_scene]. +@export var exit_transition: Transition.Effect = Transition.Effect.FADE var _available_spawn_points: Array[NodePath] = [] func _ready() -> void: - collision_layer = 0 - collision_mask = 0 - set_collision_layer_value(3, true) - set_collision_mask_value(1, true) - if Engine.is_editor_hint(): _update_available_spawn_points() - notify_property_list_changed() return - self.body_entered.connect(_on_body_entered, CONNECT_ONE_SHOT) - -func _on_body_entered(_body: PhysicsBody2D) -> void: +## Trigger the scene-switch or teleport described by [member next_scene] and +## [member spawn_point_path], with the configured transition. +func switch() -> void: var next_scene_path := _get_next_scene_path() if next_scene_path and next_scene_path != get_tree().current_scene.scene_file_path: - # We are using call_deferred here because removing nodes with - # collisions during a callback caused by a collision might cause - # undesired behavior. if use_transition: - SceneSwitcher.change_to_file_with_transition.call_deferred( + SceneSwitcher.change_to_file_with_transition( next_scene, spawn_point_path, enter_transition, exit_transition ) else: @@ -72,7 +67,7 @@ func _on_body_entered(_body: PhysicsBody2D) -> void: if is_instance_valid(spawn_point): if use_transition: - Transitions.do_transition( + await Transitions.do_transition( self._teleport_to_spawn_point.bind(spawn_point), enter_transition, exit_transition @@ -83,7 +78,6 @@ func _on_body_entered(_body: PhysicsBody2D) -> void: func _teleport_to_spawn_point(spawn_point: SpawnPoint) -> void: spawn_point.move_player_to_self_position(true) - self.body_entered.connect(_on_body_entered, CONNECT_ONE_SHOT) func _get_next_scene_path() -> String: @@ -119,6 +113,9 @@ func _update_available_spawn_points() -> void: _available_spawn_points = paths + notify_property_list_changed() + update_configuration_warnings() + func _validate_property(property: Dictionary) -> void: match property.name: @@ -132,3 +129,10 @@ func _validate_property(property: Dictionary) -> void: "exit_transition": if not use_transition: property.usage |= PROPERTY_USAGE_READ_ONLY + + +func _get_configuration_warnings() -> PackedStringArray: + var warnings: PackedStringArray + if spawn_point_path and spawn_point_path not in _available_spawn_points: + warnings.append("Spawn point '%s' does not exist" % [spawn_point_path]) + return warnings diff --git a/scenes/globals/scene_switcher/scene_link.gd.uid b/scenes/globals/scene_switcher/scene_link.gd.uid new file mode 100644 index 0000000000..d82c10fb1f --- /dev/null +++ b/scenes/globals/scene_switcher/scene_link.gd.uid @@ -0,0 +1 @@ +uid://d2vp62mjrf6gn diff --git a/scenes/globals/scene_switcher/scene_switcher.gd b/scenes/globals/scene_switcher/scene_switcher.gd index b8fa931581..6c48f3d30e 100644 --- a/scenes/globals/scene_switcher/scene_switcher.gd +++ b/scenes/globals/scene_switcher/scene_switcher.gd @@ -104,7 +104,7 @@ func _on_hash_changed(args: Array) -> void: func change_to_file_with_transition( scene_path: String, spawn_point: NodePath = ^"", - enter_transition: Transition.Effect = Transition.Effect.RIGHT_TO_LEFT_WIPE, + enter_transition: Transition.Effect = Transition.Effect.LEFT_TO_RIGHT_WIPE, exit_transition: Transition.Effect = Transition.Effect.LEFT_TO_RIGHT_WIPE ) -> void: assert(scene_path != "") @@ -124,7 +124,7 @@ func change_to_file_with_transition( func change_to_packed_with_transition( scene: PackedScene, spawn_point: NodePath = ^"", - enter_transition: Transition.Effect = Transition.Effect.RIGHT_TO_LEFT_WIPE, + enter_transition: Transition.Effect = Transition.Effect.LEFT_TO_RIGHT_WIPE, exit_transition: Transition.Effect = Transition.Effect.LEFT_TO_RIGHT_WIPE ) -> void: assert(scene != null) @@ -135,8 +135,8 @@ func change_to_packed_with_transition( func reload_with_transition( - enter_transition: Transition.Effect = Transition.Effect.RIGHT_TO_LEFT_WIPE, - exit_transition: Transition.Effect = Transition.Effect.LEFT_TO_RIGHT_WIPE + enter_transition: Transition.Effect = Transition.Effect.FADE, + exit_transition: Transition.Effect = Transition.Effect.FADE, ) -> void: Transitions.do_transition(get_tree().reload_current_scene, enter_transition, exit_transition) diff --git a/scenes/globals/scene_switcher/transitions/transitions.gd b/scenes/globals/scene_switcher/transitions/transitions.gd index 5bf48b78f0..16da0631bf 100644 --- a/scenes/globals/scene_switcher/transitions/transitions.gd +++ b/scenes/globals/scene_switcher/transitions/transitions.gd @@ -9,7 +9,19 @@ signal started signal finished enum Effect { - FADE, LEFT_TO_RIGHT_WIPE, RIGHT_TO_LEFT_WIPE, RADIAL, TOP_TO_BOTTOM_WIPE, BOTTOM_TO_TOP_WIPE + ## Fade the whole screen to/from black at once + FADE, + ## Fade to/from black starting from the left of the screen and moving right + LEFT_TO_RIGHT_WIPE, + ## Fade to/from black starting from the right of the screen and moving left + RIGHT_TO_LEFT_WIPE, + ## Fade to black from the edges of the screen to a circle in the middle; + ## fade from black starting at the middle and working outwards. + RADIAL, + ## Fade to/from black starting from the top of the screen and moving down + TOP_TO_BOTTOM_WIPE, + ## Fade to/from black starting from the bottom of the screen and moving up + BOTTOM_TO_TOP_WIPE, } const FADE_TEXTURE: Texture = preload("uid://cpvc4xmg7at7r") @@ -24,6 +36,20 @@ var _current_tween: Tween @onready var transition_mask: ColorRect = $TransitionMask +static func _invert(effect: Effect) -> Effect: + match effect: + Effect.LEFT_TO_RIGHT_WIPE: + return Effect.RIGHT_TO_LEFT_WIPE + Effect.RIGHT_TO_LEFT_WIPE: + return Effect.LEFT_TO_RIGHT_WIPE + Effect.TOP_TO_BOTTOM_WIPE: + return Effect.BOTTOM_TO_TOP_WIPE + Effect.BOTTOM_TO_TOP_WIPE: + return Effect.TOP_TO_BOTTOM_WIPE + _: + return effect + + func _input(_event: InputEvent) -> void: if visible: get_viewport().set_input_as_handled() @@ -64,21 +90,21 @@ func _do_tween( func _leave_scene( - _transition_effect: Effect = Effect.FADE, + transition_effect: Effect = Effect.FADE, duration: float = 1.0, easing: Tween.EaseType = Tween.EaseType.EASE_OUT, transition_type: Tween.TransitionType = Tween.TransitionType.TRANS_QUAD ) -> void: - await _do_tween(0.0, _transition_effect, duration, easing, transition_type) + await _do_tween(0.0, _invert(transition_effect), duration, easing, transition_type) func _introduce_scene( - _transition_effect: Effect = Effect.FADE, + transition_effect: Effect = Effect.FADE, duration: float = 1.0, easing: Tween.EaseType = Tween.EaseType.EASE_IN, transition_type: Tween.TransitionType = Tween.TransitionType.TRANS_QUAD ) -> void: - await _do_tween(1.0, _transition_effect, duration, easing, transition_type) + await _do_tween(1.0, transition_effect, duration, easing, transition_type) func do_transition( diff --git a/scenes/menus/splash/components/splash.gd b/scenes/menus/splash/components/splash.gd index 20a0751e3f..dc6a7cbc98 100644 --- a/scenes/menus/splash/components/splash.gd +++ b/scenes/menus/splash/components/splash.gd @@ -2,15 +2,14 @@ # SPDX-License-Identifier: MPL-2.0 extends Control -@export_file("*.tscn") var next_scene: String - @onready var logo_stitcher: LogoStitcher = %LogoStitcher @onready var scene_switch_timer: Timer = %SceneSwitchTimer +@onready var scene_link: SceneLink = %SceneLink func _ready() -> void: if ProjectSettings.get_setting(ThreadbareProjectSettings.SKIP_SPLASH): - SceneSwitcher.change_to_file.call_deferred(next_scene) + SceneSwitcher.change_to_file.call_deferred(scene_link.next_scene) return logo_stitcher.finished.connect(scene_switch_timer.start) scene_switch_timer.timeout.connect(switch_to_intro) @@ -28,6 +27,4 @@ func _unhandled_input(event: InputEvent) -> void: func switch_to_intro() -> void: scene_switch_timer.timeout.disconnect(switch_to_intro) - SceneSwitcher.change_to_file_with_transition( - next_scene, ^"", Transition.Effect.FADE, Transition.Effect.FADE - ) + scene_link.switch() diff --git a/scenes/menus/splash/splash.tscn b/scenes/menus/splash/splash.tscn index 1c59d2d7f0..61bacc2e3a 100644 --- a/scenes/menus/splash/splash.tscn +++ b/scenes/menus/splash/splash.tscn @@ -5,6 +5,7 @@ [ext_resource type="Script" uid="uid://bcc0gc6fkr2m4" path="res://scenes/menus/splash/components/logo_stitcher.gd" id="3_m61hw"] [ext_resource type="Texture2D" uid="uid://lg5dl13njsg3" path="res://assets/first_party/tiles/Grass_And_Sand_Tiles.png" id="3_unn6g"] [ext_resource type="AudioStream" uid="uid://dwkbxxoh57hht" path="res://assets/third_party/sewing-machine/746897__kzarkses__machantq_sewing-machine-running_cp_none_mke600.ogg" id="4_xtuk2"] +[ext_resource type="Script" uid="uid://d2vp62mjrf6gn" path="res://scenes/globals/scene_switcher/scene_link.gd" id="6_lp5r8"] [sub_resource type="Curve" id="Curve_7hvf5"] bake_resolution = 400 @@ -26,7 +27,6 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_a6n0j") -next_scene = "uid://stdqc6ttomff" [node name="FabricBackground" type="NinePatchRect" parent="." unique_id=757888685] modulate = Color(0.345098, 0.215686, 0.929412, 1) @@ -90,3 +90,8 @@ bus = &"SFX" unique_name_in_owner = true wait_time = 5.0 one_shot = true + +[node name="SceneLink" type="Node2D" parent="." unique_id=2122954713] +unique_name_in_owner = true +script = ExtResource("6_lp5r8") +next_scene = "uid://stdqc6ttomff" diff --git a/scenes/quests/lore_quests/quest_000/1_ruined_village/tutorial_ruined_village.tscn b/scenes/quests/lore_quests/quest_000/1_ruined_village/tutorial_ruined_village.tscn index 9feaf08751..a0c5b4c8e8 100644 --- a/scenes/quests/lore_quests/quest_000/1_ruined_village/tutorial_ruined_village.tscn +++ b/scenes/quests/lore_quests/quest_000/1_ruined_village/tutorial_ruined_village.tscn @@ -25,9 +25,9 @@ [ext_resource type="Texture2D" uid="uid://cfkb8gpxylplg" path="res://scenes/game_elements/props/buildings/house/components/House_Patches_Red_Stage3.png" id="25_i7hju"] [ext_resource type="SpriteFrames" uid="uid://b81ibkdhsfthe" path="res://scenes/game_elements/props/decoration/butterfly/components/butterfly_flower_loop_1_red.tres" id="25_jpujn"] [ext_resource type="PackedScene" uid="uid://cfvr32bp2achm" path="res://scenes/game_elements/props/decoration/rock/fabric_rock.tscn" id="25_tweot"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="26_3knxh"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="26_jpujn"] [ext_resource type="SpriteFrames" uid="uid://bgckvdkxuxrgh" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_red_large.tres" id="27_tweot"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="28_357gc"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_sxarn"] size = Vector2(64, 64) @@ -292,14 +292,11 @@ shape = SubResource("RectangleShape2D_sxarn") [node name="TownieBridgePath" type="Path2D" parent="." unique_id=1835002713] curve = SubResource("Curve2D_iy1ja") -[node name="Teleporter" type="Area2D" parent="." unique_id=92829269] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("28_357gc")] position = Vector2(2739, 160) -collision_layer = 4 -script = ExtResource("26_3knxh") next_scene = "uid://durvgybueqayn" -enter_transition = 2 +enter_transition = 1 exit_transition = 1 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=72600342] shape = SubResource("RectangleShape2D_iy1ja") diff --git a/scenes/quests/lore_quests/quest_000/2_stealth/tutorial_stealth.tscn b/scenes/quests/lore_quests/quest_000/2_stealth/tutorial_stealth.tscn index 7f158b61b3..8158f2cce2 100644 --- a/scenes/quests/lore_quests/quest_000/2_stealth/tutorial_stealth.tscn +++ b/scenes/quests/lore_quests/quest_000/2_stealth/tutorial_stealth.tscn @@ -259,8 +259,9 @@ debug_color = Color(0, 0, 0, 0.42) unique_name_in_owner = true position = Vector2(2881, 254) revealed = false -next_scene = "uid://c2cdgfy31u86r" item = SubResource("Resource_rl5ft") +next_scene = "uid://c2cdgfy31u86r" +exit_transition = 5 [node name="Tree" parent="OnTheGround" unique_id=1182216860 instance=ExtResource("30_06hgc")] position = Vector2(2783, 34) diff --git a/scenes/quests/lore_quests/quest_000/3_sequence_puzzle/tutorial_sequence_puzzle.tscn b/scenes/quests/lore_quests/quest_000/3_sequence_puzzle/tutorial_sequence_puzzle.tscn index 37b73fdb1f..096c051cee 100644 --- a/scenes/quests/lore_quests/quest_000/3_sequence_puzzle/tutorial_sequence_puzzle.tscn +++ b/scenes/quests/lore_quests/quest_000/3_sequence_puzzle/tutorial_sequence_puzzle.tscn @@ -34,7 +34,7 @@ [ext_resource type="Script" uid="uid://x1mxt6bmei2o" path="res://scenes/ui_elements/cinematic/cinematic.gd" id="29_2be51"] [ext_resource type="Resource" uid="uid://bevp181alogxl" path="res://scenes/quests/lore_quests/quest_000/3_sequence_puzzle/components/tutorial_sequence_puzzle.dialogue" id="30_ypup5"] [ext_resource type="PackedScene" uid="uid://c4vbokn408f2c" path="res://scenes/game_elements/props/decoration/sheep/sheep.tscn" id="32_orron"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="34_2be51"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="36_44bhx"] [ext_resource type="PackedScene" uid="uid://dv4f232y8w8dv" path="res://scenes/game_elements/props/decoration/water_rock/water_rock.tscn" id="37_545ss"] [sub_resource type="Curve2D" id="Curve2D_ewpk3"] @@ -238,14 +238,11 @@ metadata/_custom_type_script = "uid://x1mxt6bmei2o" position = Vector2(-347, 289) curve = SubResource("Curve2D_ewpk3") -[node name="Teleporter" type="Area2D" parent="." unique_id=409163531] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("36_44bhx")] position = Vector2(927, -63) -collision_layer = 4 -script = ExtResource("34_2be51") next_scene = "uid://bk7lmd8tmkdql" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=261368868] shape = SubResource("RectangleShape2D_ypup5") diff --git a/scenes/quests/lore_quests/quest_000/4_ink_combat/tutorial_ink_combat.tscn b/scenes/quests/lore_quests/quest_000/4_ink_combat/tutorial_ink_combat.tscn index 1a1ec766f9..7f19ad6084 100644 --- a/scenes/quests/lore_quests/quest_000/4_ink_combat/tutorial_ink_combat.tscn +++ b/scenes/quests/lore_quests/quest_000/4_ink_combat/tutorial_ink_combat.tscn @@ -14,13 +14,13 @@ [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="11_sty8l"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="12_dcclj"] [ext_resource type="TileSet" uid="uid://b778cuoftt88r" path="res://tiles/elevation_2.tres" id="13_cqudy"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="13_eis6y"] [ext_resource type="TileSet" uid="uid://do0ffypatd77h" path="res://tiles/bridges.tres" id="13_nw4ve"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="14_culag"] [ext_resource type="SpriteFrames" uid="uid://dtoylirwywk0j" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_blue.tres" id="15_2vr3v"] [ext_resource type="SpriteFrames" uid="uid://7yx2vrxg6ytx" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_blue_large.tres" id="15_6c68c"] [ext_resource type="PackedScene" uid="uid://b82nsrh332syj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/throwing_enemy.tscn" id="16_cmppr"] [ext_resource type="SpriteFrames" uid="uid://b3r84ksew5djp" path="res://scenes/game_elements/characters/enemies/throwing_enemy/components/ink_drinker_frames_purple.tres" id="17_laquw"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="17_sgtky"] [ext_resource type="AudioStream" uid="uid://qf2d38rabx8o" path="res://assets/third_party/sounds/characters/enemies/throwing_enemy/Wings.ogg" id="18_0816u"] [ext_resource type="AudioStream" uid="uid://bbnj2fog3rdy8" path="res://assets/first_party/sounds/throwing_enemy/Spray.wav" id="19_bex1y"] [ext_resource type="PackedScene" uid="uid://c5jedlvvnnbi0" path="res://scenes/game_elements/props/projectile/ink_blob_projectile.tscn" id="20_t8fi2"] @@ -182,15 +182,12 @@ position = Vector2(416, 0) position = Vector2(0, 72) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=650526093] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("17_sgtky")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("13_eis6y") next_scene = "uid://cb7tqsakwhpgk" spawn_point_path = NodePath("SpawnPointAfterIntro") -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=1082155385] position = Vector2(-1.5, -9.5) diff --git a/scenes/quests/lore_quests/quest_001/2_ink_combat/ink_combat_round_2.tscn b/scenes/quests/lore_quests/quest_001/2_ink_combat/ink_combat_round_2.tscn index 2ec0a92ccd..db74ffc42e 100644 --- a/scenes/quests/lore_quests/quest_001/2_ink_combat/ink_combat_round_2.tscn +++ b/scenes/quests/lore_quests/quest_001/2_ink_combat/ink_combat_round_2.tscn @@ -18,9 +18,9 @@ [ext_resource type="SpriteFrames" uid="uid://bs0idpewu2plj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/components/ink_drinker_frames_yellow.tres" id="10_0kd4s"] [ext_resource type="PackedScene" uid="uid://cfcgrfvtn04yp" path="res://scenes/ui_elements/hud/hud.tscn" id="10_muw2v"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="10_wqron"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="11_0kd4s"] [ext_resource type="SpriteFrames" uid="uid://dnq8cw1cio2we" path="res://scenes/game_elements/characters/enemies/throwing_enemy/components/ink_drinker_frames_green.tres" id="11_bk6nl"] [ext_resource type="AudioStream" uid="uid://qf2d38rabx8o" path="res://assets/third_party/sounds/characters/enemies/throwing_enemy/Wings.ogg" id="12_btlpg"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="13_14glv"] [ext_resource type="AudioStream" uid="uid://bbnj2fog3rdy8" path="res://assets/first_party/sounds/throwing_enemy/Spray.wav" id="13_i2l34"] [ext_resource type="PackedScene" uid="uid://c5jedlvvnnbi0" path="res://scenes/game_elements/props/projectile/ink_blob_projectile.tscn" id="14_oigmj"] @@ -117,14 +117,11 @@ position = Vector2(416, 0) position = Vector2(0, 82) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=853032262] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("13_14glv")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("11_0kd4s") next_scene = "uid://bo6qfusag3fae" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=1924290223] position = Vector2(-1.5, -9.5) diff --git a/scenes/quests/lore_quests/quest_001/4_closing_transition/closing_transition.tscn b/scenes/quests/lore_quests/quest_001/4_closing_transition/closing_transition.tscn index 83e590ba00..bda16ca577 100644 --- a/scenes/quests/lore_quests/quest_001/4_closing_transition/closing_transition.tscn +++ b/scenes/quests/lore_quests/quest_001/4_closing_transition/closing_transition.tscn @@ -384,6 +384,8 @@ script = ExtResource("4_3dlh8") dialogue = ExtResource("5_offe2") animation_player = NodePath("AnimationPlayer") next_scene = "uid://cufkthb25mpxy" +enter_transition = 0 +exit_transition = 0 [node name="AnimationPlayer" type="AnimationPlayer" parent="ClosingTransitionCinematic" unique_id=744023009] libraries/ = SubResource("AnimationLibrary_gyhjf") diff --git a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_needles.tscn b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_needles.tscn index f4c9ae457f..ec25d3134d 100644 --- a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_needles.tscn +++ b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_needles.tscn @@ -22,11 +22,11 @@ [ext_resource type="PackedScene" uid="uid://cfcgrfvtn04yp" path="res://scenes/ui_elements/hud/hud.tscn" id="14_bxmjx"] [ext_resource type="PackedScene" uid="uid://covsdqqsd6rsy" path="res://scenes/game_elements/props/sign/sign.tscn" id="14_omyxq"] [ext_resource type="Script" uid="uid://dagrhfrj0f33i" path="res://scenes/game_logic/camera_behaviors/frame_camera_behavior.gd" id="15_dwcg4"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="15_mg68y"] [ext_resource type="PackedScene" uid="uid://b7h2j0j6jmigc" path="res://scenes/game_elements/props/tree/tree_void_affected.tscn" id="22_374sg"] [ext_resource type="PackedScene" uid="uid://v3usqiwy5wpr" path="res://scenes/game_elements/props/decoration/rock/rock.tscn" id="23_p8sis"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="24_7iwrw"] [ext_resource type="SpriteFrames" uid="uid://bapks76u4hipj" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_green_small.tres" id="25_374sg"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="26_bxmjx"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_41yfr"] size = Vector2(140.5, 194.5) @@ -391,24 +391,21 @@ sprite_frames = ExtResource("25_374sg") position = Vector2(1429, 923) sprite_frames = ExtResource("25_374sg") -[node name="TeleporterNext" type="Area2D" parent="." unique_id=1852093842] +[node name="TeleporterNext" parent="." unique_id=1779636661 instance=ExtResource("26_bxmjx")] position = Vector2(1635, 282) -collision_layer = 4 -script = ExtResource("15_mg68y") next_scene = "uid://bk8rjvfmm20b7" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 [node name="CollisionShape2D" type="CollisionShape2D" parent="TeleporterNext" unique_id=89957691] shape = SubResource("RectangleShape2D_41yfr") -[node name="TeleporterBack" type="Area2D" parent="." unique_id=561115967] +[node name="TeleporterBack" parent="." unique_id=1295241363 instance=ExtResource("26_bxmjx")] position = Vector2(152, 454) -collision_layer = 4 -script = ExtResource("15_mg68y") next_scene = "uid://dpv6x7h2p2i3l" spawn_point_path = NodePath("SpawnPointBack") -metadata/_custom_type_script = "uid://hqdquinbimce" +enter_transition = 2 +exit_transition = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="TeleporterBack" unique_id=1443311540] position = Vector2(8, -6) diff --git a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_pins.tscn b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_pins.tscn index 6c599dfd9e..c2e2d2b974 100644 --- a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_pins.tscn +++ b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_pins.tscn @@ -15,7 +15,7 @@ [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="12_sqxkk"] [ext_resource type="SpriteFrames" uid="uid://bapks76u4hipj" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_green_small.tres" id="13_udo54"] [ext_resource type="PackedScene" uid="uid://cfcgrfvtn04yp" path="res://scenes/ui_elements/hud/hud.tscn" id="14_nlj8l"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="16_udo54"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="15_sqxkk"] [ext_resource type="PackedScene" uid="uid://mruqy04d0vl8" path="res://scenes/quests/lore_quests/quest_002/2_grappling_hook/components/buttons_collector.tscn" id="18_udo54"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_drlay"] @@ -323,12 +323,10 @@ sprite_frames = ExtResource("13_udo54") [node name="ButtonsCollector" parent="OnTheGround" unique_id=1634175369 instance=ExtResource("18_udo54")] position = Vector2(2690, 1305) -[node name="TeleporterNext" type="Area2D" parent="." unique_id=1560505035] +[node name="TeleporterNext" parent="." unique_id=1779636661 instance=ExtResource("15_sqxkk")] position = Vector2(3039, 1281) -collision_layer = 4 -script = ExtResource("16_udo54") next_scene = "uid://c3iv8nbog410p" -enter_transition = 2 +enter_transition = 1 exit_transition = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="TeleporterNext" unique_id=875568514] diff --git a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_powerup.tscn b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_powerup.tscn index d781327aaf..449ff991a6 100644 --- a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_powerup.tscn +++ b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_powerup.tscn @@ -26,7 +26,7 @@ [ext_resource type="SpriteFrames" uid="uid://2ek86nvw6y28" path="res://scenes/game_elements/props/tree/components/tree_spriteframes_yellow.tres" id="21_y6p0v"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="22_iu48k"] [ext_resource type="SpriteFrames" uid="uid://bapks76u4hipj" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_green_small.tres" id="23_b7aom"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="25_iu48k"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="26_a36ca"] [sub_resource type="Resource" id="Resource_rlnni"] script = ExtResource("13_vodlh") @@ -347,13 +347,12 @@ sprite_frames = ExtResource("23_b7aom") [node name="Bush20" parent="OnTheGround/Bushes" unique_id=1989757828 instance=ExtResource("22_iu48k")] position = Vector2(1424, 2288) -[node name="Teleporter" type="Area2D" parent="." unique_id=970210635] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("26_a36ca")] position = Vector2(-1881, 1735) -collision_layer = 4 -script = ExtResource("25_iu48k") next_scene = "uid://b8mfigsd8y5qs" spawn_point_path = NodePath("SpawnPointFromPowerup") -exit_transition = 0 +enter_transition = 2 +exit_transition = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=769048811] shape = SubResource("RectangleShape2D_s7yva") diff --git a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_start.tscn b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_start.tscn index 5f39a96363..d3e8ee88a6 100644 --- a/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_start.tscn +++ b/scenes/quests/lore_quests/quest_002/2_grappling_hook/grappling_hook_start.tscn @@ -24,7 +24,7 @@ [ext_resource type="PackedScene" uid="uid://1vunygl4wpj6" path="res://scenes/game_elements/props/button_item/button_item.tscn" id="15_wv4km"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="18_wv4km"] [ext_resource type="SpriteFrames" uid="uid://bapks76u4hipj" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_green_small.tres" id="19_6n4qp"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="20_wv4km"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="23_wv4km"] [sub_resource type="Animation" id="Animation_w67qe"] length = 0.001 @@ -228,8 +228,9 @@ position = Vector2(1132, 1079) [node name="CollectibleItem" parent="OnTheGround" unique_id=317578047 instance=ExtResource("7_upilw")] position = Vector2(1434, 520) -next_scene = "uid://ce7nk8qmi64d2" item = SubResource("Resource_kr8u1") +next_scene = "uid://ce7nk8qmi64d2" +exit_transition = 1 [node name="Sign" parent="OnTheGround" unique_id=516698120 instance=ExtResource("9_vdhd3")] position = Vector2(2552, 1168) @@ -303,12 +304,10 @@ sprite_frames = ExtResource("19_6n4qp") [node name="Bush14" parent="OnTheGround/Bushes" unique_id=391246514 instance=ExtResource("18_wv4km")] position = Vector2(261, 440) -[node name="Teleporter" type="Area2D" parent="." unique_id=579212473] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("23_wv4km")] position = Vector2(2704, 1216) -collision_layer = 4 -script = ExtResource("20_wv4km") next_scene = "uid://dpv6x7h2p2i3l" -enter_transition = 2 +enter_transition = 1 exit_transition = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=1421802846] diff --git a/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling.tscn b/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling.tscn index c3cd19f112..189bbfdc0d 100644 --- a/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling.tscn +++ b/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling.tscn @@ -26,8 +26,8 @@ [ext_resource type="SpriteFrames" uid="uid://7yx2vrxg6ytx" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_blue_large.tres" id="20_5axji"] [ext_resource type="SpriteFrames" uid="uid://k4jucjwkxxhc" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_purple_small.tres" id="21_bmrvw"] [ext_resource type="PackedScene" uid="uid://dv4f232y8w8dv" path="res://scenes/game_elements/props/decoration/water_rock/water_rock.tscn" id="21_c6u7c"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="22_rk3po"] [ext_resource type="PackedScene" uid="uid://dvj15pnuqr2ua" path="res://scenes/game_elements/props/hookable_button_item/hookable_button_item.tscn" id="23_bcye7"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="28_4laor"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_wgn4u"] size = Vector2(256, 128) @@ -667,12 +667,11 @@ navigation_polygon = SubResource("NavigationPolygon_c2723") metadata/_edit_lock_ = true metadata/_edit_group_ = true -[node name="Teleporter" type="Area2D" parent="." unique_id=977506941] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("28_4laor")] position = Vector2(3264, -503) -collision_layer = 4 -script = ExtResource("22_rk3po") next_scene = "uid://bcxwhqdqe7m2y" -metadata/_custom_type_script = "uid://hqdquinbimce" +enter_transition = 1 +exit_transition = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=1861861880] position = Vector2(0, 23) diff --git a/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling_round_2.tscn b/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling_round_2.tscn index 7e1976aa77..963021a368 100644 --- a/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling_round_2.tscn +++ b/scenes/quests/lore_quests/quest_002/3_void_grappling/void_grappling_round_2.tscn @@ -26,10 +26,10 @@ [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="24_wrwcr"] [ext_resource type="PackedScene" uid="uid://cfcgrfvtn04yp" path="res://scenes/ui_elements/hud/hud.tscn" id="25_0h87u"] [ext_resource type="SpriteFrames" uid="uid://b6doys1c3yelx" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_red_small.tres" id="25_bkul7"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="26_ipgsq"] [ext_resource type="SpriteFrames" uid="uid://bgckvdkxuxrgh" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_red_large.tres" id="26_jr6vd"] [ext_resource type="SpriteFrames" uid="uid://ckf0ncgsrnhek" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_purple_large.tres" id="27_jr6vd"] [ext_resource type="SpriteFrames" uid="uid://k4jucjwkxxhc" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_purple_small.tres" id="28_hxopk"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="30_jr6vd"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_grfk2"] size = Vector2(246, 549) @@ -637,12 +637,11 @@ navigation_polygon = SubResource("NavigationPolygon_c2723") metadata/_edit_group_ = true metadata/_edit_lock_ = true -[node name="Teleporter" type="Area2D" parent="." unique_id=900135027] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("30_jr6vd")] position = Vector2(5101, 2383) -collision_layer = 4 -script = ExtResource("26_ipgsq") next_scene = "uid://doalg4wjntiff" -metadata/_custom_type_script = "uid://hqdquinbimce" +enter_transition = 1 +exit_transition = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=1397103573] position = Vector2(0, 23) diff --git a/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_4.tscn b/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_4.tscn index b215d0f771..e915578d04 100644 --- a/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_4.tscn +++ b/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_4.tscn @@ -10,9 +10,9 @@ [ext_resource type="TileSet" uid="uid://dfp36ffpanjq2" path="res://tiles/elevation.tres" id="7_ubp0p"] [ext_resource type="TileSet" uid="uid://bdc7ucso7bx0s" path="res://tiles/shadows.tres" id="8_gteq2"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="8_jgk56"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="9_jqnd2"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="10_qh3g1"] [ext_resource type="SpriteFrames" uid="uid://dtoylirwywk0j" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_blue.tres" id="11_bfcsr"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="11_gteq2"] [ext_resource type="PackedScene" uid="uid://b82nsrh332syj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/throwing_enemy.tscn" id="12_30iwa"] [ext_resource type="SpriteFrames" uid="uid://3ujiuhj7wpm2" path="res://scenes/game_elements/characters/enemies/throwing_enemy/components/ink_drinker_frames_red.tres" id="13_7o6on"] [ext_resource type="PackedScene" uid="uid://c5jedlvvnnbi0" path="res://scenes/game_elements/props/projectile/ink_blob_projectile.tscn" id="14_jgk56"] @@ -114,14 +114,11 @@ position = Vector2(546, -2) position = Vector2(0, 82) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=947160005] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("11_gteq2")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("9_jqnd2") next_scene = "uid://ns43ceodawmb" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=1924538751] position = Vector2(-1.5, -9.5) diff --git a/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_5.tscn b/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_5.tscn index ba02b2dc7c..8add805dcc 100644 --- a/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_5.tscn +++ b/scenes/quests/lore_quests/quest_003/2_ink_drinker_levels/ink_combat_round_5.tscn @@ -14,7 +14,7 @@ [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="8_8bvum"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="9_4cqf2"] [ext_resource type="TileSet" uid="uid://bdc7ucso7bx0s" path="res://tiles/shadows.tres" id="9_xpqp1"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="10_c2wf5"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="13_ifeq7"] [ext_resource type="PackedScene" uid="uid://b82nsrh332syj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/throwing_enemy.tscn" id="13_xpqp1"] [ext_resource type="AudioStream" uid="uid://qf2d38rabx8o" path="res://assets/third_party/sounds/characters/enemies/throwing_enemy/Wings.ogg" id="15_djbws"] [ext_resource type="AudioStream" uid="uid://bbnj2fog3rdy8" path="res://assets/first_party/sounds/throwing_enemy/Spray.wav" id="16_brd5j"] @@ -136,14 +136,11 @@ position = Vector2(608, -93) position = Vector2(0, 72) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=179843338] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("13_ifeq7")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("10_c2wf5") next_scene = "uid://biwvr6vxj6ykk" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=682866884] position = Vector2(-1.5, -9.5) diff --git a/scenes/quests/story_quests/champ/3_stealth/champ_incomplete_character.gd b/scenes/quests/story_quests/champ/3_stealth/champ_incomplete_character.gd index ddeb95193b..e089115642 100644 --- a/scenes/quests/story_quests/champ/3_stealth/champ_incomplete_character.gd +++ b/scenes/quests/story_quests/champ/3_stealth/champ_incomplete_character.gd @@ -132,5 +132,4 @@ func defeat() -> void: await get_tree().create_timer(2.0).timeout # reload current scene/checkpoint - SceneSwitcher.reload_with_transition(Transition.Effect.FADE, Transition.Effect.FADE) - + SceneSwitcher.reload_with_transition() diff --git a/scenes/quests/story_quests/champ/3_stealth/champ_stealth.tscn b/scenes/quests/story_quests/champ/3_stealth/champ_stealth.tscn index a56f389a9c..33ef07a858 100644 --- a/scenes/quests/story_quests/champ/3_stealth/champ_stealth.tscn +++ b/scenes/quests/story_quests/champ/3_stealth/champ_stealth.tscn @@ -58,7 +58,7 @@ [ext_resource type="Texture2D" uid="uid://djen1whwwin1w" path="res://assets/third_party/inputs/atlas_kenney_input_prompts_1.4/keyboard/keyboard_f_outline.tres" id="33_1n21b"] [ext_resource type="Resource" uid="uid://bmharix12w26t" path="res://scenes/quests/story_quests/champ/3_stealth/stealth_components/champ_blink.dialogue" id="34_g76pt"] [ext_resource type="Texture2D" uid="uid://h606ovawbm0x" path="res://scenes/quests/story_quests/champ/3_stealth/stealth_components/BlinkMarker.png" id="44_onp74"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="46_8k5n0"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="46_8k5n0"] [ext_resource type="Resource" uid="uid://cxjgjjb44ssnm" path="res://scenes/quests/story_quests/champ/3_stealth/stealth_components/champ_walking_on_water.dialogue" id="55_rosy4"] [sub_resource type="TileMapPattern" id="TileMapPattern_0wfyh"] @@ -1781,15 +1781,15 @@ text = "Walk on water" [node name="CollectibleItem" parent="." unique_id=1250372978 instance=ExtResource("11_680ig")] position = Vector2(892, -2934) -next_scene = "uid://bbjh0yoqbchuo" item = SubResource("Resource_x1dad") collected_dialogue = ExtResource("13_oswsn") +next_scene = "uid://bbjh0yoqbchuo" [node name="CollectibleItem2" parent="." unique_id=327991066 instance=ExtResource("11_680ig")] position = Vector2(2510, 513) -next_scene = "uid://bbjh0yoqbchuo" item = SubResource("Resource_x1dad") collected_dialogue = ExtResource("13_oswsn") +next_scene = "uid://bbjh0yoqbchuo" [node name="Cinematic" type="Node2D" parent="." unique_id=260237335] script = ExtResource("14_fqjr6") @@ -1872,11 +1872,11 @@ position = Vector2(110, 34) scale = Vector2(0.75, 0.75) texture = ExtResource("44_onp74") -[node name="Teleporter" type="Area2D" parent="." unique_id=1237177419] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("46_8k5n0")] position = Vector2(1676, 519) -collision_layer = 4 -script = ExtResource("46_8k5n0") next_scene = "uid://bbjh0yoqbchuo" +enter_transition = 1 +exit_transition = 1 [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=2026668028] shape = SubResource("CircleShape2D_24qmm") diff --git a/scenes/quests/story_quests/eldrune/1_stealth/stealth_components/eldrune_stealth_game_logic.gd b/scenes/quests/story_quests/eldrune/1_stealth/stealth_components/eldrune_stealth_game_logic.gd index e0fed5f41b..e112574d35 100644 --- a/scenes/quests/story_quests/eldrune/1_stealth/stealth_components/eldrune_stealth_game_logic.gd +++ b/scenes/quests/story_quests/eldrune/1_stealth/stealth_components/eldrune_stealth_game_logic.gd @@ -26,7 +26,7 @@ func _on_player_detected(player: Node2D) -> void: _play_defeat_sequence(player, is_shark_enemy) await get_tree().create_timer(DEFEAT_RELOAD_DELAY).timeout - SceneSwitcher.reload_with_transition(Transition.Effect.FADE, Transition.Effect.FADE) + SceneSwitcher.reload_with_transition() ## Returns the first guard in ALERTED state, or null if none found diff --git a/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_1.tscn b/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_1.tscn index 91a90fec40..c1016188ab 100644 --- a/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_1.tscn +++ b/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_1.tscn @@ -9,8 +9,8 @@ [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="6_ulko6"] [ext_resource type="SpriteFrames" uid="uid://ckf0ncgsrnhek" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_purple_large.tres" id="7_5mbgn"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="7_ilmvt"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="8_gdj00"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="9_d7n4r"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="9_l4apx"] [ext_resource type="PackedScene" uid="uid://b82nsrh332syj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/throwing_enemy.tscn" id="11_28os0"] [ext_resource type="SpriteFrames" uid="uid://oggfoxxcn6ft" path="res://scenes/quests/story_quests/renya_beyond_sorrow/player_components/renya_player_combat.tres" id="11_bl6pj"] [ext_resource type="PackedScene" uid="uid://dbh80jgmf2crw" path="res://scenes/quests/story_quests/renya_beyond_sorrow/1_combat/enemies_components/projectile.tscn" id="13_63j25"] @@ -19,7 +19,7 @@ [ext_resource type="SpriteFrames" uid="uid://lt1fwrvd4a5h" path="res://scenes/quests/story_quests/renya_beyond_sorrow/1_combat/relleno/filling_spriteframes.tres" id="18_l4apx"] [ext_resource type="PackedScene" uid="uid://y8ha8abfyap2" path="res://scenes/game_elements/props/filling_barrel/filling_barrel.tscn" id="20_6urbs"] [ext_resource type="Script" uid="uid://x1mxt6bmei2o" path="res://scenes/ui_elements/cinematic/cinematic.gd" id="20_63j25"] -[ext_resource type="PackedScene" uid="uid://dkx3dgc1br3b4" path="res://scenes/ui_elements/input_hints/repel_hint.tscn" id="22_28yyq"] +[ext_resource type="PackedScene" uid="uid://dkx3dgc1br3b4" path="res://scenes/ui_elements/input_hints/repel_input_hint.tscn" id="22_28yyq"] [ext_resource type="PackedScene" uid="uid://7873qa54birk" path="res://scenes/game_elements/props/tree/tree.tscn" id="22_e8dsv"] [ext_resource type="PackedScene" uid="uid://cfcgrfvtn04yp" path="res://scenes/ui_elements/hud/hud.tscn" id="23_vhod7"] @@ -136,14 +136,11 @@ position = Vector2(350, -949) position = Vector2(0, 72) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=1023548033] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("9_l4apx")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("8_gdj00") next_scene = "uid://buvo0sgtr3qeg" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=1704183019] position = Vector2(-1.5, -9.5) diff --git a/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_2.tscn b/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_2.tscn index 6a4be9e97c..5887f99fcb 100644 --- a/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_2.tscn +++ b/scenes/quests/story_quests/renya_beyond_sorrow/1_combat/renya_combat_round_2.tscn @@ -8,8 +8,8 @@ [ext_resource type="SpriteFrames" uid="uid://ckf0ncgsrnhek" path="res://scenes/game_elements/props/decoration/bush/components/bush_spriteframes_purple_large.tres" id="6_2o143"] [ext_resource type="PackedScene" uid="uid://lgu7aeqa7o3r" path="res://scenes/game_elements/props/door/door.tscn" id="6_tm1ho"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="7_0ow6i"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="7_odyqf"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="8_fhg3o"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="9_rqh7d"] [ext_resource type="PackedScene" uid="uid://b82nsrh332syj" path="res://scenes/game_elements/characters/enemies/throwing_enemy/throwing_enemy.tscn" id="10_krssa"] [ext_resource type="SpriteFrames" uid="uid://oggfoxxcn6ft" path="res://scenes/quests/story_quests/renya_beyond_sorrow/player_components/renya_player_combat.tres" id="11_rqh7d"] [ext_resource type="PackedScene" uid="uid://dbh80jgmf2crw" path="res://scenes/quests/story_quests/renya_beyond_sorrow/1_combat/enemies_components/projectile.tscn" id="13_iaa72"] @@ -116,14 +116,11 @@ position = Vector2(993, 31) position = Vector2(0, 82) play_victory_fanfare_on_open = true -[node name="Teleporter" type="Area2D" parent="OnTheGround/LevelExit" unique_id=1668803933] +[node name="Teleporter" parent="OnTheGround/LevelExit" unique_id=1779636661 instance=ExtResource("9_rqh7d")] position = Vector2(0, -25) -collision_layer = 4 -script = ExtResource("7_odyqf") next_scene = "uid://c2rc2y662wko0" -enter_transition = 4 +enter_transition = 5 exit_transition = 5 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/LevelExit/Teleporter" unique_id=272361307] position = Vector2(-1.5, -9.5) diff --git a/scenes/ui_elements/cinematic/cinematic.gd b/scenes/ui_elements/cinematic/cinematic.gd index 977405692f..d82ea18864 100644 --- a/scenes/ui_elements/cinematic/cinematic.gd +++ b/scenes/ui_elements/cinematic/cinematic.gd @@ -1,7 +1,8 @@ # SPDX-FileCopyrightText: The Threadbare Authors # SPDX-License-Identifier: MPL-2.0 +@tool class_name Cinematic -extends Node2D +extends SceneLink ## Shows a dialogue, then transitions to another scene. ## ## Intended for use in non-interactive cutscenes, such as the intro and outro to a quest. @@ -17,19 +18,13 @@ signal cinematic_finished ## Optional animation player, to be used from [member dialogue] (if needed). @export var animation_player: AnimationPlayer -## Optional scene to switch to once [member dialogue] is complete. -@export_file("*.tscn") var next_scene: String - -## Optional path inside [member next_scene] where the player should appear. -## If blank, player appears at default position in the scene. If in doubt, -## leave this blank. -@export var spawn_point_path: String - ## Wether to automatically start the cinematic. @export var autostart: bool = true func _ready() -> void: + super._ready() + if autostart: start() @@ -41,13 +36,4 @@ func start() -> void: cinematic_finished.emit() GameState.intro_dialogue_shown = true - if next_scene: - ( - SceneSwitcher - . change_to_file_with_transition( - next_scene, - spawn_point_path, - Transition.Effect.FADE, - Transition.Effect.FADE, - ) - ) + switch() diff --git a/scenes/world_map/frays_end.tscn b/scenes/world_map/frays_end.tscn index 7c2ddd3d8d..5a72ccf82b 100644 --- a/scenes/world_map/frays_end.tscn +++ b/scenes/world_map/frays_end.tscn @@ -48,6 +48,7 @@ [ext_resource type="PackedScene" uid="uid://vb5o7hh5an8j" path="res://scenes/game_elements/characters/npcs/elder/template_elder.tscn" id="43_ppslc"] [ext_resource type="PackedScene" uid="uid://c0104ickpm3ru" path="res://scenes/game_elements/props/decoration/flower/flower.tscn" id="45_cjmkx"] [ext_resource type="PackedScene" uid="uid://cr65lmm5b0ueo" path="res://scenes/game_elements/characters/npcs/cat/cat.tscn" id="52_ppslc"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="53_2vvub"] [ext_resource type="PackedScene" uid="uid://dgrrudegturnw" path="res://scenes/game_elements/characters/npcs/townie.tscn" id="54_duxxr"] [ext_resource type="PackedScene" uid="uid://daqd67aro1o1m" path="res://scenes/game_elements/fx/time_and_weather/time_and_weather.tscn" id="55_ojao8"] [ext_resource type="Script" uid="uid://edcifob4jc4s" path="res://scenes/game_logic/talk_behavior.gd" id="56_ojao8"] @@ -55,7 +56,6 @@ [ext_resource type="Script" uid="uid://dts1hwdy3phin" path="res://scenes/menus/storybook/components/quest.gd" id="59_qgpx3"] [ext_resource type="Resource" uid="uid://t50glay2iqhg" path="res://scenes/quests/lore_quests/quest_002/quest.tres" id="60_6b07c"] [ext_resource type="Script" uid="uid://0enyu5v4ra34" path="res://scenes/game_elements/props/spawn_point/components/spawn_point.gd" id="61_6b07c"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="62_t7c6s"] [ext_resource type="PackedScene" uid="uid://covsdqqsd6rsy" path="res://scenes/game_elements/props/sign/sign.tscn" id="64_uxfrp"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_duxxr"] @@ -1097,13 +1097,12 @@ script = ExtResource("61_6b07c") look_at_side_on_spawn = 1 metadata/_custom_type_script = "uid://0enyu5v4ra34" -[node name="Teleporter" type="Area2D" parent="OnTheGround/WestPath" unique_id=39493186] +[node name="Teleporter" parent="OnTheGround/WestPath" unique_id=1779636661 instance=ExtResource("53_2vvub")] position = Vector2(-63, 712) -collision_layer = 4 -script = ExtResource("62_t7c6s") next_scene = "uid://c3pi5sjiy5tlg" spawn_point_path = NodePath("SpawnPoint") -metadata/_custom_type_script = "uid://hqdquinbimce" +enter_transition = 2 +exit_transition = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="OnTheGround/WestPath/Teleporter" unique_id=1827344313] shape = SubResource("RectangleShape2D_ulm71") diff --git a/scenes/world_map/frays_end_west.tscn b/scenes/world_map/frays_end_west.tscn index 8dd3b4088d..e285d3f9fb 100644 --- a/scenes/world_map/frays_end_west.tscn +++ b/scenes/world_map/frays_end_west.tscn @@ -1,11 +1,11 @@ [gd_scene format=4 uid="uid://c3pi5sjiy5tlg"] [ext_resource type="TileSet" uid="uid://b8qnr0owsbhhn" path="res://tiles/exterior_floors.tres" id="1_6wkkr"] +[ext_resource type="PackedScene" uid="uid://0ull24fvmhwk" path="res://scenes/game_elements/props/teleporter/teleporter.tscn" id="1_ovokv"] [ext_resource type="TileSet" uid="uid://b778cuoftt88r" path="res://tiles/elevation_2.tres" id="2_eitnf"] [ext_resource type="PackedScene" uid="uid://iu2q66clupc6" path="res://scenes/game_elements/characters/player/player.tscn" id="3_7dntp"] [ext_resource type="SpriteFrames" uid="uid://dtoylirwywk0j" path="res://scenes/game_elements/characters/components/sprite_frames/storyweaver_blue.tres" id="4_ltemt"] [ext_resource type="PackedScene" uid="uid://dgrrudegturnw" path="res://scenes/game_elements/characters/npcs/townie.tscn" id="5_wf3xu"] -[ext_resource type="Script" uid="uid://hqdquinbimce" path="res://scenes/game_elements/props/teleporter/teleporter.gd" id="6_bp1pg"] [ext_resource type="PackedScene" uid="uid://covsdqqsd6rsy" path="res://scenes/game_elements/props/sign/sign.tscn" id="6_eitnf"] [ext_resource type="TileSet" uid="uid://41pk6xbhypue" path="res://tiles/fence.tres" id="7_2x7c2"] [ext_resource type="PackedScene" uid="uid://crqjcicx0vdu" path="res://scenes/game_elements/props/decoration/bush/bush.tscn" id="7_feqgw"] @@ -38,15 +38,12 @@ size = Vector2(52, 61) metadata/_edit_vertical_guides_ = [1281.0] metadata/_edit_horizontal_guides_ = [772.0] -[node name="Teleporter" type="Area2D" parent="." unique_id=1813334975] +[node name="Teleporter" parent="." unique_id=1779636661 instance=ExtResource("1_ovokv")] position = Vector2(1349, 705) -collision_layer = 4 -script = ExtResource("6_bp1pg") next_scene = "uid://cufkthb25mpxy" spawn_point_path = NodePath("OnTheGround/WestPath/SpawnPointWestPath") -enter_transition = 2 +enter_transition = 1 exit_transition = 1 -metadata/_custom_type_script = "uid://hqdquinbimce" [node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter" unique_id=1496141142] shape = SubResource("RectangleShape2D_8hv4q")