mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Links many map-specific details such as the station name, z-level information, and allowed jobs from global vars to map datum vars, which should help us maintain multiple maps at once in the future, which will be needed for the future Southern Cross. Note that a config change will be needed to change GENERATE_ASTEROID to GENERATE_MAP, otherwise no changes should be required to continue normal map usage. To change to a different map, it's suggested to tick the file that ticks all the other needed files, which for the Northern Star is called northern_star.dm.
26 lines
863 B
Plaintext
26 lines
863 B
Plaintext
/datum/event/gravity
|
|
announceWhen = 5
|
|
|
|
/datum/event/gravity/setup()
|
|
endWhen = rand(15, 60)
|
|
|
|
/datum/event/gravity/announce()
|
|
command_announcement.Announce("Feedback surge detected in mass-distributions systems. Artificial gravity has been disabled whilst the system \
|
|
reinitializes. Please stand by while the gravity system reinitializes.", "Gravity Failure")
|
|
|
|
/datum/event/gravity/start()
|
|
gravity_is_on = 0
|
|
for(var/area/A in world)
|
|
if(A.z in using_map.station_levels)
|
|
A.gravitychange(gravity_is_on, A)
|
|
|
|
/datum/event/gravity/end()
|
|
if(!gravity_is_on)
|
|
gravity_is_on = 1
|
|
|
|
for(var/area/A in world)
|
|
if(A.z in using_map.station_levels)
|
|
A.gravitychange(gravity_is_on, A)
|
|
|
|
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|