mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Refactors gravity checking (#4591)
Removes a lot of duplicated or redundant code from areas when checking gravity.
This commit is contained in:
@@ -175,9 +175,8 @@
|
||||
/obj/item/projectile/energy/gravitydisabler/on_impact(atom/target)
|
||||
. = ..()
|
||||
var/area/A = get_area(target)
|
||||
if(A && A.has_gravity == 1)
|
||||
A.has_gravity = 0
|
||||
A.gravitychange(A.has_gravity,A)
|
||||
if(A && A.has_gravity())
|
||||
A.gravitychange(FALSE)
|
||||
addtimer(CALLBACK(src, .proc/turnongravity), 150)
|
||||
|
||||
if(istype(target, /obj/machinery/gravity_generator/main))
|
||||
@@ -185,8 +184,7 @@
|
||||
T.eshutoff()
|
||||
|
||||
/obj/item/projectile/energy/gravitydisabler/proc/turnongravity(var/area/A)
|
||||
A.has_gravity = 1
|
||||
A.gravitychange(A.has_gravity,A)
|
||||
A.gravitychange(TRUE)
|
||||
|
||||
/obj/item/projectile/energy/bee
|
||||
name = "bees"
|
||||
|
||||
Reference in New Issue
Block a user