mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Station Traits * Update positive_traits.dm * Test * Revert "Test" This reverts commitc99e3e9db5. * Update sound.dm * Update code/datums/station_traits/positive_traits.dm Co-authored-by: Redmoogle <dakotamew@gmail.com> * Update code/__HELPERS/priority_announce.dm Co-authored-by: Redmoogle <dakotamew@gmail.com> * Update ai_laws.dm * Update traits.dm * Update neutral_traits.dm * Update negative_traits.dm * Negative bot trait * Update negative_traits.dm * Adds an admin log hpoefully * Update station.dm * Update station.dm * Update station.dm * Update station.dm * Update station.dm * Update station.dm * Update station.dm * Removes custom alert message for now * Update station.dm * Update game_mode.dm * Update extended.dm * Update game_mode.dm * Update dynamic.dm * Update dynamic.dm * Update extended.dm * Update game_mode.dm * Update dynamic.dm * Update game_mode.dm * Update dynamic.dm * Update extended.dm * Revert "Update extended.dm" This reverts commit2235319bb3. * Revert "Update dynamic.dm" This reverts commit6af1fbaf60. * Revert "Update game_mode.dm" This reverts commitdd84d504dc. * Try again * Update game_mode.dm * Let's test making them more common * Medbot update * Update negative_traits.dm * Update negative_traits.dm * tHNE great f * Update traits.dm * Update job.dm * Update negative_traits.dm Co-authored-by: Redmoogle <dakotamew@gmail.com>
67 lines
2.1 KiB
Plaintext
67 lines
2.1 KiB
Plaintext
/proc/power_failure()
|
|
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", ANNOUNCER_POWEROFF)
|
|
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
|
if(istype(get_area(S), /area/ai_monitored/turret_protected) || !is_station_level(S.z))
|
|
continue
|
|
S.charge = 0
|
|
S.output_level = 0
|
|
S.output_attempt = FALSE
|
|
S.update_icon()
|
|
S.power_change()
|
|
|
|
for(var/area/A in GLOB.the_station_areas)
|
|
if(!A.requires_power || A.always_unpowered )
|
|
continue
|
|
if(GLOB.typecache_powerfailure_safe_areas[A.type])
|
|
continue
|
|
|
|
A.power_light = FALSE
|
|
A.power_equip = FALSE
|
|
A.power_environ = FALSE
|
|
A.power_change()
|
|
|
|
for(var/obj/machinery/power/apc/C in GLOB.apcs_list)
|
|
if(C.cell && is_station_level(C.z))
|
|
var/area/A = C.area
|
|
if(GLOB.typecache_powerfailure_safe_areas[A.type])
|
|
continue
|
|
|
|
C.cell.charge = 0
|
|
|
|
/proc/power_restore()
|
|
|
|
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", ANNOUNCER_POWERON)
|
|
for(var/obj/machinery/power/apc/C in GLOB.machines)
|
|
if(C.cell && is_station_level(C.z))
|
|
C.cell.charge = C.cell.maxcharge
|
|
C.failure_timer = 0
|
|
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
|
if(!is_station_level(S.z))
|
|
continue
|
|
S.charge = S.capacity
|
|
S.output_level = S.output_level_max
|
|
S.output_attempt = TRUE
|
|
S.update_icon()
|
|
S.power_change()
|
|
for(var/area/A in GLOB.the_station_areas)
|
|
if(!A.requires_power || A.always_unpowered)
|
|
continue
|
|
if(!istype(A, /area/shuttle))
|
|
A.power_light = TRUE
|
|
A.power_equip = TRUE
|
|
A.power_environ = TRUE
|
|
A.power_change()
|
|
|
|
/proc/power_restore_quick()
|
|
|
|
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", ANNOUNCER_POWERON)
|
|
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
|
if(!is_station_level(S.z))
|
|
continue
|
|
S.charge = S.capacity
|
|
S.output_level = S.output_level_max
|
|
S.output_attempt = TRUE
|
|
S.update_icon()
|
|
S.power_change()
|
|
|