mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 23:14:18 +01:00
Refactors gravity checking (#4591)
Removes a lot of duplicated or redundant code from areas when checking gravity.
This commit is contained in:
@@ -90,7 +90,7 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
var/turf/turf = get_turf(src)
|
||||
if(!istype(turf,/turf/space))
|
||||
var/area/A = turf.loc
|
||||
if(istype(A) && A.has_gravity)
|
||||
if(istype(A) && A.has_gravity())
|
||||
make_floating(0)
|
||||
return
|
||||
else if (Check_Shoegrip())
|
||||
|
||||
@@ -327,7 +327,7 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
if(!src.lastarea)
|
||||
src.lastarea = get_area(src.loc)
|
||||
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
|
||||
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity() == 0))
|
||||
src.inertia_dir = get_dir(target, src)
|
||||
step(src, inertia_dir)
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ default behaviour is:
|
||||
|
||||
if(!istype(M.loc, /turf/space))
|
||||
var/area/A = get_area(M)
|
||||
if(A.has_gravity)
|
||||
if(A.has_gravity())
|
||||
//this is the gay blood on floor shit -- Added back -- Skie
|
||||
if (M.lying && (prob(M.getBruteLoss() / 6)))
|
||||
var/turf/location = M.loc
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
|
||||
if(!lastarea)
|
||||
lastarea = get_area(loc)
|
||||
if(!lastarea.has_gravity)
|
||||
if(!lastarea.has_gravity())
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -451,7 +451,7 @@
|
||||
return 1
|
||||
else
|
||||
var/area/A = T.loc
|
||||
if(A.has_gravity || shoegrip)
|
||||
if(A.has_gravity() || shoegrip)
|
||||
return 1
|
||||
|
||||
for(var/obj/O in orange(1, src))
|
||||
|
||||
Reference in New Issue
Block a user