mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-29 18:18:18 +01:00
94deb1ab18
* Fixes survival pods being affected by gravity events in some cases * applies to admeme event as well! * perhaps this is better logic actually * Wait, it's probably a lot better to do this with flags... * Whoops, thought I saved this change!
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
/datum/event2/meta/gravity
|
|
name = "gravity failure"
|
|
departments = list(DEPARTMENT_EVERYONE)
|
|
chaos = 20
|
|
chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT
|
|
reusable = TRUE
|
|
event_type = /datum/event2/event/gravity
|
|
|
|
/datum/event2/meta/gravity/get_weight()
|
|
return (20 + (GLOB.metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5)) / (times_ran + 1)
|
|
|
|
|
|
|
|
|
|
/datum/event2/event/gravity
|
|
length_lower_bound = 4 MINUTES
|
|
length_upper_bound = 8 MINUTES
|
|
|
|
/datum/event2/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/event2/event/gravity/start()
|
|
for(var/area/A in world)
|
|
if(!(A.flags & AREA_ALWAYS_HAS_GRAVITY) && A.z in get_location_z_levels(space_only = TRUE))
|
|
A.gravitychange(FALSE)
|
|
|
|
/datum/event2/event/gravity/end()
|
|
for(var/area/A in world)
|
|
if(!(A.flags & AREA_ALWAYS_HAS_GRAVITY) && A.z in get_location_z_levels(space_only = TRUE))
|
|
A.gravitychange(TRUE)
|
|
|
|
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|