Files
Polaris/code/modules/admin/verbs/grief_fixers.dm
Leshana 5a2162a264 Preliminary implementation of ZAS as a StonedMC subsystem.
* Creates the SSair subsystem which replaces the Setup, Start(), and Tick() procs of air_master.
* It may be best to have SSair completely replace air_master, but for now we are having them work together.   It does completely replace the old processScheduer air ticker however.
* Remove the obsolete Setup and Tick procs.
* Adjust admin and debug verbs that dealt with some ZAS internals to work with the new implementation.
2018-01-30 12:28:45 -05:00

51 lines
1.8 KiB
Plaintext

/client/proc/fixatmos()
set category = "Admin"
set name = "Fix Atmospherics Grief"
if(!check_rights(R_ADMIN|R_DEBUG)) return
if(alert("WARNING: Executing this command will perform a full reset of atmosphere. All pipelines will lose any gas that may be in them, and all zones will be reset to contain air mix as on roundstart. The supermatter engine will also be stopped (to prevent overheat due to removal of coolant). Do not use unless the station is suffering serious atmospheric issues due to grief or bug.", "Full Atmosphere Reboot", "No", "Yes") == "No")
return
feedback_add_details("admin_verb","FA")
log_and_message_admins("Full atmosphere reset initiated by [usr].")
world << "<span class = 'danger'>Initiating restart of atmosphere. The server may lag a bit.</span>"
sleep(10)
var/current_time = world.timeofday
// Depower the supermatter, as it would quickly blow up once we remove all gases from the pipes.
for(var/obj/machinery/power/supermatter/S in machines)
S.power = 0
usr << "\[1/5\] - Supermatter depowered"
// Remove all gases from all pipenets
for(var/datum/pipe_network/PN in pipe_networks)
for(var/datum/gas_mixture/G in PN.gases)
G.gas = list()
G.update_values()
usr << "\[2/5\] - All pipenets purged of gas."
// Delete all zones.
for(var/zone/Z in world)
Z.c_invalidate()
usr << "\[3/5\] - All ZAS Zones removed."
var/list/unsorted_overlays = list()
for(var/id in gas_data.tile_overlay)
unsorted_overlays |= gas_data.tile_overlay[id]
for(var/turf/simulated/T in world)
T.air = null
T.overlays.Remove(unsorted_overlays)
T.zone = null
usr << "\[4/5\] - All turfs reset to roundstart values."
SSair.RebootZAS()
usr << "\[5/5\] - ZAS Rebooted"
world << "<span class = 'danger'>Atmosphere restart completed in <b>[(world.timeofday - current_time)/10]</b> seconds.</span>"