mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Merge pull request #4882 from Fox-McCloud/fast-get-turf
Faster Get Turf from VG
This commit is contained in:
@@ -157,6 +157,8 @@
|
||||
for(type in view(range, dview_mob))
|
||||
#define END_FOR_DVIEW dview_mob.loc = null
|
||||
|
||||
#define get_turf(A) (get_step(A, 0))
|
||||
|
||||
#define MIN_SUPPLIED_LAW_NUMBER 15
|
||||
#define MAX_SUPPLIED_LAW_NUMBER 50
|
||||
|
||||
|
||||
@@ -1010,13 +1010,6 @@ proc/get_mob_with_client_list()
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else return zone
|
||||
|
||||
|
||||
/proc/get_turf(atom/A)
|
||||
if (!istype(A))
|
||||
return
|
||||
for(A, A && !isturf(A), A=A.loc); //semicolon is for the empty statement
|
||||
return A
|
||||
|
||||
//Finds the distance between two atoms, in pixels
|
||||
//centered = 0 counts from turf edge to edge
|
||||
//centered = 1 counts from turf center to turf center
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
else if(!anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
to_chat(user, "\blue Now securing the girder")
|
||||
if(get_turf(user, 40))
|
||||
if(do_after(user, 40, target = src))
|
||||
to_chat(user, "\blue You secured the girder!")
|
||||
new/obj/structure/girder( src.loc )
|
||||
qdel(src)
|
||||
|
||||
Reference in New Issue
Block a user