mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Refactors floating and magboot checks. Fixes #10256
This commit is contained in:
+4
-15
@@ -227,7 +227,7 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
var/area/oldarea = L.lastarea
|
||||
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
thunk(L)
|
||||
L.make_floating(0)
|
||||
L.update_floating( L.Check_Dense_Object() )
|
||||
|
||||
L.lastarea = newarea
|
||||
play_ambience(L)
|
||||
@@ -260,21 +260,10 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
|
||||
A.has_gravity = gravitystate
|
||||
|
||||
if(gravitystate)
|
||||
for(var/mob/living/carbon/human/M in A)
|
||||
for(var/mob/M in A)
|
||||
if(has_gravity)
|
||||
thunk(M)
|
||||
for(var/mob/M1 in A)
|
||||
M1.make_floating(0)
|
||||
else
|
||||
for(var/mob/M in A)
|
||||
if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
|
||||
H.make_floating(0)
|
||||
else
|
||||
H.make_floating(1)
|
||||
else
|
||||
M.make_floating(1)
|
||||
M.update_floating( M.Check_Dense_Object() )
|
||||
|
||||
/area/proc/thunk(mob)
|
||||
if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing.
|
||||
|
||||
Reference in New Issue
Block a user