actually fix the ladders

This commit is contained in:
aidan 2026-07-26 12:12:18 -05:00
parent 3cc9e8e8c8
commit c578434b81

View file

@ -724,35 +724,26 @@ class EW2Listeners : InteractionListener {
}
// stairs in the main level of the workshop
on(intArrayOf(Scenery.DOOR_18702, Scenery.STAIRS_18610, Scenery.STAIRS_18611), IntType.SCENERY, "climb-up", "climb-down") { player, node ->
on(intArrayOf(Scenery.DOOR_18702, Scenery.STAIRS_18610, Scenery.STAIRS_18611), IntType.SCENERY, "climb-up", "climb-down") { player, _ ->
// locations
val playerLoc = toInstance(player, player.location)
val northTop = toInstance(player, Location.create(1959, 5159, 3))
val northBottom = toInstance(player, Location.create(1957, 5159, 2))
val southTop = toInstance(player, Location.create(1948, 5149, 3))
val southBottom = toInstance(player, Location.create(1950, 5149, 2))
// handlers
// handler options
val climb = Animation(Animations.HUMAN_CLIMB_STAIRS_828)
val up = "You climb up the stairs."
val down = "You climb down the stairs."
when(node.id) {
// up
Scenery.STAIRS_18610 -> {
when(playerLoc) {
northBottom -> ClimbActionHandler.climb(player, climb, northTop, up)
southBottom -> ClimbActionHandler.climb(player, climb, southTop, up)
}
}
// down
Scenery.STAIRS_18611 -> {
when(playerLoc) {
northTop -> ClimbActionHandler.climb(player, climb, northBottom, down)
southTop -> ClimbActionHandler.climb(player, climb, southBottom, down)
}
}
// get destination
when(player.location) {
northBottom -> ClimbActionHandler.climb(player, climb, northTop, up)
southBottom -> ClimbActionHandler.climb(player, climb, southTop, up)
northTop -> ClimbActionHandler.climb(player, climb, northBottom, down)
southTop -> ClimbActionHandler.climb(player, climb, southBottom, down)
}
return@on true
}