fix: Enforce rooms to be located at (0,0) (#576)
Co-authored-by: Balloonpopper <balloonpopper@git.com>
This commit is contained in:
@@ -178,6 +178,17 @@ func init_room(room: ESCRoom) -> void:
|
|||||||
if escoria.main.current_scene == null:
|
if escoria.main.current_scene == null:
|
||||||
escoria.main.set_scene(room)
|
escoria.main.set_scene(room)
|
||||||
|
|
||||||
|
# If the room node isn't at (0,0), the walk_stop function will offset the
|
||||||
|
# player by the same number of pixels when they're at the terrain edge and
|
||||||
|
# move them when it shouldn't.
|
||||||
|
if room.position != Vector2(0,0):
|
||||||
|
escoria.logger.report_errors(
|
||||||
|
"ESCRoomManager.init_room: Room node not at (0,0)",
|
||||||
|
[
|
||||||
|
"The room node's coordinates must be (0,0) instead of %s." % room.position
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
_perform_script_events(room)
|
_perform_script_events(room)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,6 @@ tracks/3/keys = {
|
|||||||
[sub_resource type="CapsuleShape2D" id=8]
|
[sub_resource type="CapsuleShape2D" id=8]
|
||||||
|
|
||||||
[node name="room2" type="Node2D"]
|
[node name="room2" type="Node2D"]
|
||||||
position = Vector2( -2, 0 )
|
|
||||||
script = ExtResource( 6 )
|
script = ExtResource( 6 )
|
||||||
global_id = "room2"
|
global_id = "room2"
|
||||||
esc_script = "res://game/rooms/room02/esc/room02_bridge.esc"
|
esc_script = "res://game/rooms/room02/esc/room02_bridge.esc"
|
||||||
|
|||||||
Reference in New Issue
Block a user