mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Ports /vg/ get_turf
Gotta go faster. Possibly undocumented behaviour of get_step?
This commit is contained in:
@@ -1037,12 +1037,6 @@ proc/get_mob_with_client_list()
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else return zone
|
||||
|
||||
//gets the turf the atom is located in (or itself, if it is a turf).
|
||||
//returns null if the atom is not in a turf.
|
||||
/proc/get_turf(atom/movable/A)
|
||||
if(isturf(A)) return A
|
||||
if(A && A.locs.len) return A.locs[1]
|
||||
|
||||
/proc/get(atom/loc, type)
|
||||
while(loc)
|
||||
if(istype(loc, type))
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
|
||||
#define CLAMP01(x) (Clamp(x, 0, 1))
|
||||
|
||||
#define get_turf(A) get_step(A,0)
|
||||
|
||||
#define isAI(A) istype(A, /mob/living/silicon/ai)
|
||||
|
||||
#define isalien(A) istype(A, /mob/living/carbon/alien)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
else if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now securing the girder...</span>"
|
||||
if(get_turf(user, 40))
|
||||
if(do_after(user, 40,src))
|
||||
user << "<span class='notice'>You secured the girder!</span>"
|
||||
reset_girder()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user