mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Refactors gravity checking (#4591)
Removes a lot of duplicated or redundant code from areas when checking gravity.
This commit is contained in:
@@ -237,7 +237,7 @@
|
||||
loadProgram(current_map.holodeck_programs["turnoff"], 0)
|
||||
|
||||
if(!linkedholodeck.has_gravity)
|
||||
linkedholodeck.gravitychange(1,linkedholodeck)
|
||||
linkedholodeck.gravitychange(TRUE)
|
||||
|
||||
active = 0
|
||||
use_power = 1
|
||||
@@ -333,17 +333,17 @@
|
||||
active = 1
|
||||
use_power = 1
|
||||
|
||||
if(A.has_gravity)
|
||||
A.gravitychange(0,A)
|
||||
if(A.has_gravity())
|
||||
A.gravitychange(FALSE)
|
||||
else
|
||||
A.gravitychange(1,A)
|
||||
A.gravitychange(TRUE)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/proc/emergencyShutdown()
|
||||
//Turn it back to the regular non-holographic room
|
||||
loadProgram(current_map.holodeck_programs["turnoff"], 0)
|
||||
|
||||
if(!linkedholodeck.has_gravity)
|
||||
linkedholodeck.gravitychange(1,linkedholodeck)
|
||||
linkedholodeck.gravitychange(TRUE)
|
||||
|
||||
active = 0
|
||||
use_power = 1
|
||||
|
||||
Reference in New Issue
Block a user