mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'release' of https://github.com/VOREStation/VOREStation into izac-voreupdate
All conflicts resolved Signed-off-by: izac112 <izac10@live.com>
This commit is contained in:
38
code/modules/events/gravity_vr.dm
Normal file
38
code/modules/events/gravity_vr.dm
Normal file
@@ -0,0 +1,38 @@
|
||||
/datum/event/gravity
|
||||
announceWhen = 5
|
||||
var/list/zLevels
|
||||
var/list/generators = list()
|
||||
|
||||
/datum/event/gravity/setup()
|
||||
endWhen = rand(5 MINUTES, 20 MINUTES)
|
||||
// Setup which levels we will disrupt gravit on.
|
||||
zLevels = using_map.station_levels.Copy()
|
||||
for(var/datum/planet/P in SSplanets.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. Please wait for the system to reinitialize, or contact your engineering department.", "Gravity Failure")
|
||||
|
||||
/datum/event/gravity/start()
|
||||
gravity_is_on = 0
|
||||
|
||||
for(var/obj/machinery/gravity_generator/main/GG in machines)
|
||||
if((GG.z in zLevels) && GG.on)
|
||||
generators += GG
|
||||
GG.breaker = FALSE
|
||||
GG.set_power()
|
||||
GG.charge_count = 10
|
||||
|
||||
/datum/event/gravity/end()
|
||||
gravity_is_on = 1
|
||||
|
||||
var/did_anything = FALSE
|
||||
for(var/obj/machinery/gravity_generator/main/GG in generators)
|
||||
if(!GG.on)
|
||||
GG.breaker = TRUE
|
||||
GG.set_power()
|
||||
GG.charge_count = 90
|
||||
did_anything = TRUE
|
||||
|
||||
if(did_anything)
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
@@ -4,8 +4,8 @@
|
||||
endWhen = 3
|
||||
|
||||
/datum/event/ianstorm/announce()
|
||||
command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
|
||||
spawn(rand(50, 300))
|
||||
command_announcement.Announce("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert", 'sound/AI/ian_storm.ogg')
|
||||
spawn(7 SECONDS)
|
||||
command_announcement.Announce("Wait. No, thats wrong. The station passed through an IAN storm!.", "Ian Alert")
|
||||
|
||||
/datum/event/ianstorm/start()
|
||||
|
||||
Reference in New Issue
Block a user