mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-28 05:45:10 -06:00
actually fix the ladders
This commit is contained in:
parent
3cc9e8e8c8
commit
c578434b81
1 changed files with 9 additions and 18 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue