mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
Prevent Gravity Failure event from disabling gravity on planet z levels.
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
/datum/event/gravity
|
||||
announceWhen = 5
|
||||
var/list/zLevels
|
||||
|
||||
/datum/event/gravity/setup()
|
||||
endWhen = rand(15, 60)
|
||||
// Setup which levels we will disrupt gravit on.
|
||||
zLevels = using_map.station_levels.Copy()
|
||||
if (planet_controller)
|
||||
for(var/datum/planet/P in planet_controller.planets)
|
||||
zLevels -= P.expected_z_levels
|
||||
|
||||
/datum/event/gravity/announce()
|
||||
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system \
|
||||
@@ -11,7 +17,7 @@
|
||||
/datum/event/gravity/start()
|
||||
gravity_is_on = 0
|
||||
for(var/area/A in world)
|
||||
if(A.z in using_map.station_levels)
|
||||
if(A.z in zLevels)
|
||||
A.gravitychange(gravity_is_on, A)
|
||||
|
||||
/datum/event/gravity/end()
|
||||
@@ -19,7 +25,7 @@
|
||||
gravity_is_on = 1
|
||||
|
||||
for(var/area/A in world)
|
||||
if(A.z in using_map.station_levels)
|
||||
if(A.z in zLevels)
|
||||
A.gravitychange(gravity_is_on, A)
|
||||
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
|
||||
Reference in New Issue
Block a user