mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Fixed walking up stairs.
* Now they won't try and bump you up to the next z on the "lower" step of the stairway. They also don't directly set `loc` Therefore pulling objects up/down actually works. * Sets their layer so they won't appear above actual objects and mobs.
This commit is contained in:
@@ -129,6 +129,7 @@
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
layer = 2.4 // Above turf, but they're sort of the floor, so below objects.
|
||||
|
||||
/obj/structure/stairs/initialize()
|
||||
for(var/turf/turf in locs)
|
||||
@@ -140,13 +141,12 @@
|
||||
above.ChangeTurf(/turf/simulated/open)
|
||||
|
||||
/obj/structure/stairs/Uncross(atom/movable/A)
|
||||
if(A.dir == dir)
|
||||
if(A.dir == dir && upperStep(A.loc))
|
||||
// This is hackish but whatever.
|
||||
var/turf/target = get_step(GetAbove(A), dir)
|
||||
var/turf/source = A.loc
|
||||
if(target.Enter(A, source))
|
||||
A.loc = target
|
||||
target.Entered(A, source)
|
||||
A.forceMove(target)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.pulling)
|
||||
@@ -154,6 +154,9 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/stairs/proc/upperStep(var/turf/T)
|
||||
return (T == loc)
|
||||
|
||||
/obj/structure/stairs/CanPass(obj/mover, turf/source, height, airflow)
|
||||
return airflow || !density
|
||||
|
||||
|
||||
Reference in New Issue
Block a user