diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm index 7b6a5621eb..078c97af8a 100644 --- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm @@ -36,11 +36,11 @@ if(!partner) return 0 - if(!air_master || air_master.current_cycle <= update_cycle) + if(!SSair || SSair.current_cycle <= update_cycle) return 0 - update_cycle = air_master.current_cycle - partner.update_cycle = air_master.current_cycle + update_cycle = SSair.current_cycle + partner.update_cycle = SSair.current_cycle var/air_heat_capacity = air_contents.heat_capacity() var/other_air_heat_capacity = partner.air_contents.heat_capacity() diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index bfe6fa2ad4..eeb01b4249 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -36,11 +36,11 @@ //Convenience function for atoms to update turfs they occupy /atom/movable/proc/update_nearby_tiles(need_rebuild) - if(!air_master) + if(!SSair) return 0 for(var/turf/simulated/turf in locs) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) return 1 diff --git a/code/ZAS/Connection.dm b/code/ZAS/Connection.dm index 21be29d25e..688eb12992 100644 --- a/code/ZAS/Connection.dm +++ b/code/ZAS/Connection.dm @@ -5,7 +5,7 @@ /* Overview: - Connections are made between turfs by air_master.connect(). They represent a single point where two zones converge. + Connections are made between turfs by SSair.connect(). They represent a single point where two zones converge. Class Vars: A - Always a simulated turf. @@ -60,19 +60,19 @@ Class Procs: /connection/New(turf/simulated/A, turf/simulated/B) #ifdef ZASDBG - ASSERT(air_master.has_valid_zone(A)) - //ASSERT(air_master.has_valid_zone(B)) + ASSERT(HAS_VALID_ZONE(A)) + //ASSERT(HAS_VALID_ZONE(B)) #endif src.A = A src.B = B zoneA = A.zone if(!istype(B)) mark_space() - edge = air_master.get_edge(A.zone,B) + edge = SSair.get_edge(A.zone,B) edge.add_connection(src) else zoneB = B.zone - edge = air_master.get_edge(A.zone,B.zone) + edge = SSair.get_edge(A.zone,B.zone) edge.add_connection(src) /connection/proc/mark_direct() @@ -108,7 +108,7 @@ Class Procs: erase() return - var/block_status = air_master.air_blocked(A,B) + var/block_status = SSair.air_blocked(A,B) if(block_status & AIR_BLOCKED) //to_world("Blocked connection.") erase() @@ -133,7 +133,7 @@ Class Procs: return else edge.remove_connection(src) - edge = air_master.get_edge(A.zone, B) + edge = SSair.get_edge(A.zone, B) edge.add_connection(src) zoneA = A.zone @@ -155,7 +155,7 @@ Class Procs: //to_world("Zones changed, \...") if(A.zone && B.zone) edge.remove_connection(src) - edge = air_master.get_edge(A.zone, B.zone) + edge = SSair.get_edge(A.zone, B.zone) edge.add_connection(src) zoneA = A.zone zoneB = B.zone diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm index 0be44bb358..85b2545d36 100644 --- a/code/ZAS/ConnectionGroup.dm +++ b/code/ZAS/ConnectionGroup.dm @@ -2,7 +2,7 @@ Overview: These are what handle gas transfers between zones and into space. - They are found in a zone's edges list and in air_master.edges. + They are found in a zone's edges list and in SSair.edges. Each edge updates every air tick due to their role in gas transfer. They come in two flavors, /connection_edge/zone and /connection_edge/unsimulated. As the type names might suggest, they handle inter-zone and spacelike connections respectively. @@ -82,7 +82,7 @@ Class Procs: /connection_edge/proc/contains_zone(zone/Z) /connection_edge/proc/erase() - air_master.remove_edge(src) + SSair.remove_edge(src) //to_world("[type] Erased.") /connection_edge/proc/tick() @@ -169,19 +169,19 @@ Class Procs: if(equiv) if(direct) erase() - air_master.merge(A, B) + SSair.merge(A, B) return else A.air.equalize(B.air) - air_master.mark_edge_sleeping(src) + SSair.mark_edge_sleeping(src) - air_master.mark_zone_update(A) - air_master.mark_zone_update(B) + SSair.mark_zone_update(A) + SSair.mark_zone_update(B) /connection_edge/zone/recheck() // Edges with only one side being vacuum need processing no matter how close. if(!A.air.compare(B.air, vacuum_exception = 1)) - air_master.mark_edge_active(src) + SSair.mark_edge_active(src) //Helper proc to get connections for a zone. /connection_edge/zone/proc/get_connected_zone(zone/from) @@ -233,16 +233,16 @@ Class Procs: if(equiv) A.air.copy_from(air) - air_master.mark_edge_sleeping(src) + SSair.mark_edge_sleeping(src) - air_master.mark_zone_update(A) + SSair.mark_zone_update(A) /connection_edge/unsimulated/recheck() // Edges with only one side being vacuum need processing no matter how close. // Note: This handles the glaring flaw of a room holding pressure while exposed to space, but // does not specially handle the less common case of a simulated room exposed to an unsimulated pressurized turf. if(!A.air.compare(air, vacuum_exception = 1)) - air_master.mark_edge_active(src) + SSair.mark_edge_active(src) /proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles) //This implements a simplistic version of the Stefan-Boltzmann law. diff --git a/code/ZAS/ConnectionManager.dm b/code/ZAS/ConnectionManager.dm index 3890cd85f5..8d7e270cde 100644 --- a/code/ZAS/ConnectionManager.dm +++ b/code/ZAS/ConnectionManager.dm @@ -16,7 +16,7 @@ Class Procs: Preferable to accessing the connection directly because it checks validity. place(connection/c, d) - Called by air_master.connect(). Sets the connection in the specified direction to c. + Called by SSair.connect(). Sets the connection in the specified direction to c. update_all() Called after turf/update_air_properties(). Updates the validity of all connections on this turf. diff --git a/code/ZAS/Controller.dm b/code/ZAS/Controller.dm deleted file mode 100644 index 7f7b575246..0000000000 --- a/code/ZAS/Controller.dm +++ /dev/null @@ -1,231 +0,0 @@ -var/datum/controller/subsystem/air/air_master - -var/tick_multiplier = 2 - -/* - -Overview: - The air controller does everything. There are tons of procs in here. - -Class Vars: - zones - All zones currently holding one or more turfs. - edges - All processing edges. - - tiles_to_update - Tiles scheduled to update next tick. - zones_to_update - Zones which have had their air changed and need air archival. - active_hotspots - All processing fire objects. - - active_zones - The number of zones which were archived last tick. Used in debug verbs. - next_id - The next UID to be applied to a zone. Mostly useful for debugging purposes as zones do not need UIDs to function. - -Class Procs: - - mark_for_update(turf/T) - Adds the turf to the update list. When updated, update_air_properties() will be called. - When stuff changes that might affect airflow, call this. It's basically the only thing you need. - - add_zone(zone/Z) and remove_zone(zone/Z) - Adds zones to the zones list. Does not mark them for update. - - air_blocked(turf/A, turf/B) - Returns a bitflag consisting of: - AIR_BLOCKED - The connection between turfs is physically blocked. No air can pass. - ZONE_BLOCKED - There is a door between the turfs, so zones cannot cross. Air may or may not be permeable. - - has_valid_zone(turf/T) - Checks the presence and validity of T's zone. - May be called on unsimulated turfs, returning 0. - - merge(zone/A, zone/B) - Called when zones have a direct connection and equivalent pressure and temperature. - Merges the zones to create a single zone. - - connect(turf/simulated/A, turf/B) - Called by turf/update_air_properties(). The first argument must be simulated. - Creates a connection between A and B. - - mark_zone_update(zone/Z) - Adds zone to the update list. Unlike mark_for_update(), this one is called automatically whenever - air is returned from a simulated turf. - - equivalent_pressure(zone/A, zone/B) - Currently identical to A.air.compare(B.air). Returns 1 when directly connected zones are ready to be merged. - - get_edge(zone/A, zone/B) - get_edge(zone/A, turf/B) - Gets a valid connection_edge between A and B, creating a new one if necessary. - - has_same_air(turf/A, turf/B) - Used to determine if an unsimulated edge represents a specific turf. - Simulated edges use connection_edge/contains_zone() for the same purpose. - Returns 1 if A has identical gases and temperature to B. - - remove_edge(connection_edge/edge) - Called when an edge is erased. Removes it from processing. - -*/ - -// -// The rest of the air subsystem is defined in air.dm -// - -/datum/controller/subsystem/air - //Geometry lists - var/list/zones = list() - var/list/edges = list() - //Geometry updates lists - var/list/tiles_to_update = list() - var/list/zones_to_update = list() - var/list/active_fire_zones = list() - var/list/active_hotspots = list() - var/list/active_edges = list() - - var/active_zones = 0 - var/current_cycle = 0 - var/next_id = 1 //Used to keep track of zone UIDs. - -/datum/controller/subsystem/air/proc/add_zone(zone/z) - zones.Add(z) - z.name = "Zone [next_id++]" - mark_zone_update(z) - -/datum/controller/subsystem/air/proc/remove_zone(zone/z) - zones.Remove(z) - zones_to_update.Remove(z) - -/datum/controller/subsystem/air/proc/air_blocked(turf/A, turf/B) - #ifdef ZASDBG - ASSERT(isturf(A)) - ASSERT(isturf(B)) - #endif - var/ablock = A.c_airblock(B) - if(ablock == BLOCKED) return BLOCKED - return ablock | B.c_airblock(A) - -/datum/controller/subsystem/air/proc/has_valid_zone(turf/simulated/T) - #ifdef ZASDBG - ASSERT(istype(T)) - #endif - return istype(T) && T.zone && !T.zone.invalid - -/datum/controller/subsystem/air/proc/merge(zone/A, zone/B) - #ifdef ZASDBG - ASSERT(istype(A)) - ASSERT(istype(B)) - ASSERT(!A.invalid) - ASSERT(!B.invalid) - ASSERT(A != B) - #endif - if(A.contents.len < B.contents.len) - A.c_merge(B) - mark_zone_update(B) - else - B.c_merge(A) - mark_zone_update(A) - -/datum/controller/subsystem/air/proc/connect(turf/simulated/A, turf/simulated/B) - #ifdef ZASDBG - ASSERT(istype(A)) - ASSERT(isturf(B)) - ASSERT(A.zone) - ASSERT(!A.zone.invalid) - //ASSERT(B.zone) - ASSERT(A != B) - #endif - - var/block = air_master.air_blocked(A,B) - if(block & AIR_BLOCKED) return - - var/direct = !(block & ZONE_BLOCKED) - var/space = !istype(B) - - if(!space) - if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0))) - merge(A.zone,B.zone) - return - - var/a_to_b = get_dir(A,B) - var/b_to_a = get_dir(B,A) - - if(!A.connections) A.connections = new - if(!B.connections) B.connections = new - - if(A.connections.get(a_to_b)) return - if(B.connections.get(b_to_a)) return - if(!space) - if(A.zone == B.zone) return - - - var/connection/c = new /connection(A,B) - - A.connections.place(c, a_to_b) - B.connections.place(c, b_to_a) - - if(direct) c.mark_direct() - -/datum/controller/subsystem/air/proc/mark_for_update(turf/T) - #ifdef ZASDBG - ASSERT(isturf(T)) - #endif - if(T.needs_air_update) return - tiles_to_update |= T - #ifdef ZASDBG - T.add_overlay(mark) - #endif - T.needs_air_update = 1 - -/datum/controller/subsystem/air/proc/mark_zone_update(zone/Z) - #ifdef ZASDBG - ASSERT(istype(Z)) - #endif - if(Z.needs_update) return - zones_to_update.Add(Z) - Z.needs_update = 1 - -/datum/controller/subsystem/air/proc/mark_edge_sleeping(connection_edge/E) - #ifdef ZASDBG - ASSERT(istype(E)) - #endif - if(E.sleeping) return - active_edges.Remove(E) - E.sleeping = 1 - -/datum/controller/subsystem/air/proc/mark_edge_active(connection_edge/E) - #ifdef ZASDBG - ASSERT(istype(E)) - #endif - if(!E.sleeping) return - active_edges.Add(E) - E.sleeping = 0 - -/datum/controller/subsystem/air/proc/equivalent_pressure(zone/A, zone/B) - return A.air.compare(B.air) - -/datum/controller/subsystem/air/proc/get_edge(zone/A, zone/B) - - if(istype(B)) - for(var/connection_edge/zone/edge in A.edges) - if(edge.contains_zone(B)) return edge - var/connection_edge/edge = new/connection_edge/zone(A,B) - edges.Add(edge) - edge.recheck() - return edge - else - for(var/connection_edge/unsimulated/edge in A.edges) - if(has_same_air(edge.B,B)) return edge - var/connection_edge/edge = new/connection_edge/unsimulated(A,B) - edges.Add(edge) - edge.recheck() - return edge - -/datum/controller/subsystem/air/proc/has_same_air(turf/A, turf/B) - if(A.oxygen != B.oxygen) return 0 - if(A.nitrogen != B.nitrogen) return 0 - if(A.phoron != B.phoron) return 0 - if(A.carbon_dioxide != B.carbon_dioxide) return 0 - if(A.temperature != B.temperature) return 0 - return 1 - -/datum/controller/subsystem/air/proc/remove_edge(connection_edge/E) - edges.Remove(E) - if(!E.sleeping) active_edges.Remove(E) diff --git a/code/ZAS/Diagnostic.dm b/code/ZAS/Diagnostic.dm index 7126588a30..15fcd89347 100644 --- a/code/ZAS/Diagnostic.dm +++ b/code/ZAS/Diagnostic.dm @@ -8,12 +8,12 @@ /* if(!check_rights(R_DEBUG)) return - var/result = air_master.Tick() + var/result = SSair.Tick() if(result) to_chat(src, "Successfully Processed.") else - to_chat(src, "Failed to process! ([air_master.tick_progress])") + to_chat(src, "Failed to process! ([SSair.tick_progress])") */ /client/proc/Zone_Info(turf/T as null|turf) diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index d2ab9eb8d8..df24e78e66 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -58,7 +58,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin fuel_objs.Cut() if(!fire_tiles.len) - air_master.active_fire_zones.Remove(src) + SSair.active_fire_zones.Remove(src) /zone/proc/remove_liquidfuel(var/used_liquid_fuel, var/remove_fire=0) if(!fuel_objs.len) @@ -94,7 +94,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin return 1 fire = new(src, fl) - air_master.active_fire_zones |= zone + SSair.active_fire_zones |= zone var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in src zone.fire_tiles |= src @@ -191,7 +191,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin set_light(3, 1, color) firelevel = fl - air_master.active_hotspots.Add(src) + SSair.active_hotspots.Add(src) /obj/fire/proc/fire_color(var/env_temperature) var/temperature = max(4000*sqrt(firelevel/vsc.fire_firelevel_multiplier), env_temperature) @@ -209,7 +209,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin T.fire = null loc = null - air_master.active_hotspots.Remove(src) + SSair.active_hotspots.Remove(src) /turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again. diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm index 66d0747bdb..9ae03bc13b 100644 --- a/code/ZAS/Turf.dm +++ b/code/ZAS/Turf.dm @@ -41,9 +41,8 @@ if(istype(unsim, /turf/simulated)) var/turf/simulated/sim = unsim - if(air_master.has_valid_zone(sim)) - - air_master.connect(sim, src) + if(HAS_VALID_ZONE(sim)) + SSair.connect(sim, src) // CHOMPAdd #define GET_ZONE_NEIGHBOURS(T, ret) \ @@ -240,7 +239,7 @@ if(verbose) to_world("Connecting to [sim.zone]") #endif - SSair.connect(src, sim) // CHOMPEdit + SSair.connect(src, sim) #ifdef ZASDBG @@ -268,7 +267,7 @@ //At this point, a zone should have happened. If it hasn't, don't add more checks, fix the bug. for(var/turf/T in postponed) - SSair.connect(src, T) // CHOMPEdit + SSair.connect(src, T) /turf/proc/post_update_air_properties() if(connections) connections.update_all() @@ -324,7 +323,7 @@ /turf/simulated/return_air() if(zone) if(!zone.invalid) - air_master.mark_zone_update(zone) + SSair.mark_zone_update(zone) return zone.air else if(!air) diff --git a/code/ZAS/Zone.dm b/code/ZAS/Zone.dm index 658eb317c5..f3dbb2b858 100644 --- a/code/ZAS/Zone.dm +++ b/code/ZAS/Zone.dm @@ -56,7 +56,7 @@ Class Procs: /zone/var/list/graphic_remove = list() /zone/New() - air_master.add_zone(src) + SSair.add_zone(src) air.temperature = TCMB air.group_multiplier = 1 air.volume = CELL_VOLUME @@ -65,7 +65,7 @@ Class Procs: #ifdef ZASDBG ASSERT(!invalid) ASSERT(istype(T)) - ASSERT(!air_master.has_valid_zone(T)) + ASSERT(!HAS_VALID_ZONE(T)) #endif var/datum/gas_mixture/turf_air = T.return_air() @@ -75,7 +75,7 @@ Class Procs: if(T.fire) var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in T fire_tiles.Add(T) - air_master.active_fire_zones |= src + SSair.active_fire_zones |= src if(fuel) fuel_objs += fuel if(air.graphic) T.update_graphic(air.graphic) @@ -122,11 +122,11 @@ Class Procs: if(E.contains_zone(into)) continue //don't need to rebuild this edge for(var/turf/T in E.connecting_turfs) - air_master.mark_for_update(T) + SSair.mark_for_update(T) /zone/proc/c_invalidate() invalid = 1 - air_master.remove_zone(src) + SSair.remove_zone(src) #ifdef ZASDBG for(var/turf/simulated/T in contents) T.dbg(invalid_zone) @@ -141,7 +141,7 @@ Class Procs: T.update_graphic(graphic_remove = air_graphic) //we need to remove the overlays so they're not doubled when the zone is rebuilt //T.dbg(invalid_zone) T.needs_air_update = 0 //Reset the marker so that it will be added to the list. - air_master.mark_for_update(T) + SSair.mark_for_update(T) /zone/proc/add_tile_air(datum/gas_mixture/tile_air) //air.volume += CELL_VOLUME @@ -152,7 +152,7 @@ Class Procs: air.group_multiplier = contents.len+1 /zone/proc/tick() - if(air.temperature >= PHORON_FLASHPOINT && !(src in air_master.active_fire_zones) && air.check_combustability() && contents.len) + if(air.temperature >= PHORON_FLASHPOINT && !(src in SSair.active_fire_zones) && air.check_combustability() && contents.len) var/turf/T = pick(contents) if(istype(T)) T.create_fire(vsc.fire_firelevel_multiplier) diff --git a/code/ZAS/_docs.dm b/code/ZAS/_docs.dm index 382f1f0abb..822c8ac7b2 100644 --- a/code/ZAS/_docs.dm +++ b/code/ZAS/_docs.dm @@ -15,7 +15,7 @@ Every air tick: Important Functions: -air_master.mark_for_update(turf) +SSair.mark_for_update(turf) When stuff happens, call this. It works on everything. You basically don't need to worry about any other functions besides CanPass(). diff --git a/code/__defines/ZAS.dm b/code/__defines/ZAS.dm index f20d449997..0a9d1dbaf6 100644 --- a/code/__defines/ZAS.dm +++ b/code/__defines/ZAS.dm @@ -12,6 +12,8 @@ #define ATMOS_PASS_DENSITY 3 // Blocks air and zones if density = TRUE, allows both if density = FALSE #define ATMOS_PASS_PROC 4 // Call CanZASPass() using c_airblock +#define HAS_VALID_ZONE(T) (T.zone && !T.zone.invalid) + // CHOMPAdd Start #define NORTHUP (NORTH|UP) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 7e63f79ae4..2f63f8e904 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1008,7 +1008,7 @@ Turf and target are seperate in case you want to teleport some distance from a t if(toupdate.len) for(var/turf/simulated/T1 in toupdate) - air_master.mark_for_update(T1) + SSair.mark_for_update(T1) return copiedobjs diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 857ce225f6..2955d9d721 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -11,8 +11,6 @@ var/global/datum/controller/game_controller/master_controller //Set in world.New var/global/controller_iteration = 0 var/global/last_tick_duration = 0 -var/global/pipe_processing_killed = 0 - /datum/controller/game_controller var/list/shuttle_list // For debugging and VV diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm index c5e3f7c391..ed821c9178 100644 --- a/code/controllers/subsystems/air.dm +++ b/code/controllers/subsystems/air.dm @@ -1,3 +1,60 @@ +/* +Overview: + SSair does everything. There are tons of procs in here. + +Class Vars: + zones - All zones currently holding one or more turfs. + edges - All processing edges. + + tiles_to_update - Tiles scheduled to update next tick. + zones_to_update - Zones which have had their air changed and need air archival. + active_hotspots - All processing fire objects. + + active_zones - The number of zones which were archived last tick. Used in debug verbs. + next_id - The next UID to be applied to a zone. Mostly useful for debugging purposes as zones do not need UIDs to function. + +Class Procs: + + mark_for_update(turf/T) + Adds the turf to the update list. When updated, update_air_properties() will be called. + When stuff changes that might affect airflow, call this. It's basically the only thing you need. + + add_zone(zone/Z) and remove_zone(zone/Z) + Adds zones to the zones list. Does not mark them for update. + + air_blocked(turf/A, turf/B) + Returns a bitflag consisting of: + AIR_BLOCKED - The connection between turfs is physically blocked. No air can pass. + ZONE_BLOCKED - There is a door between the turfs, so zones cannot cross. Air may or may not be permeable. + + merge(zone/A, zone/B) + Called when zones have a direct connection and equivalent pressure and temperature. + Merges the zones to create a single zone. + + connect(turf/simulated/A, turf/B) + Called by turf/update_air_properties(). The first argument must be simulated. + Creates a connection between A and B. + + mark_zone_update(zone/Z) + Adds zone to the update list. Unlike mark_for_update(), this one is called automatically whenever + air is returned from a simulated turf. + + equivalent_pressure(zone/A, zone/B) + Currently identical to A.air.compare(B.air). Returns 1 when directly connected zones are ready to be merged. + + get_edge(zone/A, zone/B) + get_edge(zone/A, turf/B) + Gets a valid connection_edge between A and B, creating a new one if necessary. + + has_same_air(turf/A, turf/B) + Used to determine if an unsimulated edge represents a specific turf. + Simulated edges use connection_edge/contains_zone() for the same purpose. + Returns 1 if A has identical gases and temperature to B. + + remove_edge(connection_edge/edge) + Called when an edge is erased. Removes it from processing. +*/ + // Air update stages #define SSAIR_TURFS 1 #define SSAIR_EDGES 2 @@ -30,8 +87,19 @@ SUBSYSTEM_DEF(air) // This is used to tell CI WHERE the edges are. var/list/startup_active_edge_log = list() -/datum/controller/subsystem/air/PreInit() - air_master = src + //Geometry lists + var/list/zones = list() + var/list/edges = list() + //Geometry updates lists + var/list/tiles_to_update = list() + var/list/zones_to_update = list() + var/list/active_fire_zones = list() + var/list/active_hotspots = list() + var/list/active_edges = list() + + var/active_zones = 0 + var/current_cycle = 0 + var/next_id = 1 //Used to keep track of zone UIDs. /datum/controller/subsystem/air/Initialize() // CHOMPEdit var/start_timeofday = REALTIMEOFDAY // CHOMPEdit @@ -111,7 +179,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun log_and_message_admins("SSair: Was told to start a new run, but the previous run wasn't finished! currentrun.len=[currentrun.len], current_step=[current_step]") resumed = TRUE else - current_cycle++ // Begin a new air_master cycle! + current_cycle++ // Begin a new SSair cycle! current_step = SSAIR_TURFS // Start with Step 1 of course INTERNAL_PROCESS_STEP(SSAIR_TURFS, TRUE, process_tiles_to_update, cost_turfs, SSAIR_EDGES) @@ -120,7 +188,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun INTERNAL_PROCESS_STEP(SSAIR_HOTSPOTS, FALSE, process_active_hotspots, cost_hotspots, SSAIR_ZONES) INTERNAL_PROCESS_STEP(SSAIR_ZONES, FALSE, process_zones_to_update, cost_zones, SSAIR_DONE) - // Okay, we're done! Woo! Got thru a whole air_master cycle! + // Okay, we're done! Woo! Got thru a whole SSair cycle! if(LAZYLEN(currentrun) || current_step != SSAIR_DONE) log_and_message_admins("SSair: Was not able to complete a full air cycle despite reaching the end of fire(). This shouldn't happen.") else @@ -307,9 +375,162 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun next_fire = world.time + wait can_fire = TRUE // Unpause -// -// The procs from the ZAS Air Controller are in ZAS/Controller.dm -// +/datum/controller/subsystem/air/proc/add_zone(zone/z) + zones.Add(z) + z.name = "Zone [next_id++]" + mark_zone_update(z) + +/datum/controller/subsystem/air/proc/remove_zone(zone/z) + zones.Remove(z) + zones_to_update.Remove(z) + +/datum/controller/subsystem/air/proc/air_blocked(turf/A, turf/B) + #ifdef ZASDBG + ASSERT(isturf(A)) + ASSERT(isturf(B)) + #endif + var/ablock = A.c_airblock(B) + if(ablock == BLOCKED) + return BLOCKED + return ablock | B.c_airblock(A) + +/datum/controller/subsystem/air/proc/merge(zone/A, zone/B) + #ifdef ZASDBG + ASSERT(istype(A)) + ASSERT(istype(B)) + ASSERT(!A.invalid) + ASSERT(!B.invalid) + ASSERT(A != B) + #endif + if(A.contents.len < B.contents.len) + A.c_merge(B) + mark_zone_update(B) + else + B.c_merge(A) + mark_zone_update(A) + +/datum/controller/subsystem/air/proc/connect(turf/simulated/A, turf/simulated/B) + #ifdef ZASDBG + ASSERT(istype(A)) + ASSERT(isturf(B)) + ASSERT(A.zone) + ASSERT(!A.zone.invalid) + //ASSERT(B.zone) + ASSERT(A != B) + #endif + + var/block = SSair.air_blocked(A,B) + if(block & AIR_BLOCKED) return + + var/direct = !(block & ZONE_BLOCKED) + var/space = !istype(B) + + if(!space) + if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0))) + merge(A.zone,B.zone) + return + + var/a_to_b = get_dir(A,B) + var/b_to_a = get_dir(B,A) + + if(!A.connections) + A.connections = new + if(!B.connections) + B.connections = new + + if(A.connections.get(a_to_b)) + return + if(B.connections.get(b_to_a)) + return + if(!space) + if(A.zone == B.zone) + return + + + var/connection/c = new /connection(A,B) + + A.connections.place(c, a_to_b) + B.connections.place(c, b_to_a) + + if(direct) c.mark_direct() + +/datum/controller/subsystem/air/proc/mark_for_update(turf/T) + #ifdef ZASDBG + ASSERT(isturf(T)) + #endif + if(T.needs_air_update) + return + tiles_to_update |= T + #ifdef ZASDBG + T.add_overlay(mark) + #endif + T.needs_air_update = 1 + +/datum/controller/subsystem/air/proc/mark_zone_update(zone/Z) + #ifdef ZASDBG + ASSERT(istype(Z)) + #endif + if(Z.needs_update) + return + zones_to_update.Add(Z) + Z.needs_update = 1 + +/datum/controller/subsystem/air/proc/mark_edge_sleeping(connection_edge/E) + #ifdef ZASDBG + ASSERT(istype(E)) + #endif + if(E.sleeping) + return + active_edges.Remove(E) + E.sleeping = 1 + +/datum/controller/subsystem/air/proc/mark_edge_active(connection_edge/E) + #ifdef ZASDBG + ASSERT(istype(E)) + #endif + if(!E.sleeping) + return + active_edges.Add(E) + E.sleeping = 0 + +/datum/controller/subsystem/air/proc/equivalent_pressure(zone/A, zone/B) + return A.air.compare(B.air) + +/datum/controller/subsystem/air/proc/get_edge(zone/A, zone/B) + if(istype(B)) + for(var/connection_edge/zone/edge in A.edges) + if(edge.contains_zone(B)) + return edge + var/connection_edge/edge = new /connection_edge/zone(A,B) + edges.Add(edge) + edge.recheck() + return edge + else + for(var/connection_edge/unsimulated/edge in A.edges) + if(has_same_air(edge.B,B)) + return edge + var/connection_edge/edge = new /connection_edge/unsimulated(A,B) + edges.Add(edge) + edge.recheck() + return edge + +/datum/controller/subsystem/air/proc/has_same_air(turf/A, turf/B) + if(A.oxygen != B.oxygen) + return FALSE + if(A.nitrogen != B.nitrogen) + return FALSE + if(A.phoron != B.phoron) + return FALSE + if(A.carbon_dioxide != B.carbon_dioxide) + return FALSE + if(A.temperature != B.temperature) + return FALSE + return TRUE + +/datum/controller/subsystem/air/proc/remove_edge(connection_edge/E) + edges.Remove(E) + if(!E.sleeping) + active_edges.Remove(E) #undef SSAIR_TURFS #undef SSAIR_EDGES diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 702dbfddae..165748c64b 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -89,7 +89,6 @@ //Goon PS stuff, and other yet-to-be-subsystem things. options["LEGACY: master_controller"] = master_controller - options["LEGACY: air_master"] = air_master options["LEGACY: job_master"] = job_master options["LEGACY: radio_controller"] = radio_controller options["LEGACY: emergency_shuttle"] = emergency_shuttle diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 38c8dacea6..958b304fae 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -438,12 +438,12 @@ return ..(M) /obj/machinery/door/update_nearby_tiles(need_rebuild) - if(!air_master) + if(!SSair) return 0 for(var/turf/simulated/turf in locs) update_heat_protection(turf) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) return 1 diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 46a28b5666..47aa777175 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -503,15 +503,15 @@ update_nearby_tiles(need_rebuild) - if(!air_master) return 0 + if(!SSair) return 0 var/turf/simulated/source = loc var/turf/simulated/destination = get_step(source,dir) update_heat_protection(loc) - if(istype(source)) air_master.tiles_to_update += source - if(istype(destination)) air_master.tiles_to_update += destination + if(istype(source)) SSair.tiles_to_update += source + if(istype(destination)) SSair.tiles_to_update += destination return 1 */ diff --git a/code/game/objects/effects/zone_divider.dm b/code/game/objects/effects/zone_divider.dm index fa2ea82531..3638219b20 100644 --- a/code/game/objects/effects/zone_divider.dm +++ b/code/game/objects/effects/zone_divider.dm @@ -13,8 +13,8 @@ // Special case to prevent us from being part of a zone during the first air master tick. // We must merge ourselves into a zone on next tick. This will cause a bit of lag on // startup, but it can't really be helped you know? - if(air_master && air_master.current_cycle == 0) + if(SSair && SSair.current_cycle == 0) spawn(1) - air_master.mark_for_update(get_turf(src)) + SSair.mark_for_update(get_turf(src)) return FALSE return is_zone ? FALSE : TRUE // Anything except zones can pass diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 802d3b1d22..2632cdbd18 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -258,9 +258,9 @@ if (!isturf(NT) || (NT in found) || (NT in pending)) continue // We ask ZAS to determine if its airtight. Thats what matters anyway right? - if(air_master.air_blocked(T, NT)) + if(SSair.air_blocked(T, NT)) // Okay thats the edge of the room - if(get_area_type(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT)) + if(get_area_type(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm index f4db7bdab9..4546922f99 100644 --- a/code/game/objects/items/blueprints_vr.dm +++ b/code/game/objects/items/blueprints_vr.dm @@ -678,9 +678,9 @@ if(!visual && forbiddenAreas[NT.loc.type]) return ROOM_ERR_FORBIDDEN // We ask ZAS to determine if its airtight. Thats what matters anyway right? - if(air_master.air_blocked(T, NT)) + if(SSair.air_blocked(T, NT)) // Okay thats the edge of the room - if(get_area_type(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT)) + if(get_area_type(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) @@ -835,9 +835,9 @@ if(!get_new_area_type(NT.loc) == 1) //The contains somewhere that is NOT a buildable area. return 3 //NOT A BUILDABLE AREA - if(air_master.air_blocked(T, NT)) //Is the room airtight? + if(SSair.air_blocked(T, NT)) //Is the room airtight? // Okay thats the edge of the room - if(get_new_area_type(NT.loc) == 1 && air_master.air_blocked(NT, NT)) + if(get_new_area_type(NT.loc) == 1 && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index f28335536f..578ebb9289 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -101,10 +101,6 @@ dirtoverlay.alpha = min((dirt - 50) * 5, 255) /turf/simulated/Entered(atom/A, atom/OL) - if(movement_disabled && usr.ckey != movement_disabled_exception) - to_chat(usr, span_danger("Movement is admin-disabled.")) //This is to identify lag problems - return - if (istype(A,/mob/living)) var/dirtslip = FALSE //CHOMPEdit var/mob/living/M = A diff --git a/code/game/turfs/simulated/wall_attacks.dm b/code/game/turfs/simulated/wall_attacks.dm index 57f7bab526..f34a959b3e 100644 --- a/code/game/turfs/simulated/wall_attacks.dm +++ b/code/game/turfs/simulated/wall_attacks.dm @@ -17,7 +17,7 @@ src.blocks_air = 0 set_opacity(0) for(var/turf/simulated/turf in loc) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) else can_open = WALL_OPENING //flick("[material.icon_base]fwall_closing", src) @@ -29,18 +29,18 @@ src.blocks_air = 1 set_opacity(1) for(var/turf/simulated/turf in loc) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) can_open = WALL_CAN_OPEN update_icon() /turf/simulated/wall/proc/update_air() - if(!air_master) + if(!SSair) return for(var/turf/simulated/turf in loc) update_thermal(turf) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) /turf/simulated/wall/proc/update_thermal(var/turf/simulated/source) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index c8fb59ce2e..a29d8ff0e8 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -195,9 +195,6 @@ //There's a lot of QDELETED() calls here if someone can figure out how to optimize this but not runtime when something gets deleted by a Bump/CanPass/Cross call, lemme know or go ahead and fix this mess - kevinz000 /turf/Enter(atom/movable/mover, atom/oldloc) - if(movement_disabled && usr.ckey != movement_disabled_exception) - to_chat(usr, span_warning("Movement is admin-disabled.")) //This is to identify lag problems - return // Do not call ..() // Byond's default turf/Enter() doesn't have the behaviour we want with Bump() // By default byond will call Bump() on the first dense object in contents diff --git a/code/game/turfs/turf_changing.dm b/code/game/turfs/turf_changing.dm index 465cb7bf9b..d51fddedb0 100644 --- a/code/game/turfs/turf_changing.dm +++ b/code/game/turfs/turf_changing.dm @@ -21,6 +21,11 @@ if(istype(below)) below.update_icon() // To add or remove the 'ceiling-less' overlay. +/proc/has_valid_ZAS_zone(turf/simulated/T) + if(!istype(T)) + return FALSE + return HAS_VALID_ZONE(T) + //Creates a new turf /turf/proc/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0, var/preserve_outdoors = FALSE) if (!N) @@ -28,7 +33,8 @@ if(N == /turf/space) var/turf/below = GetBelow(src) - if(istype(below) && (air_master.has_valid_zone(below) || air_master.has_valid_zone(src)) && !(src.z in using_map.below_blocked_levels) && (!istype(below, /turf/unsimulated/wall) && !istype(below, /turf/simulated/sky))) // VOREStation Edit: Weird open space + var/zones_present = has_valid_ZAS_zone(below) || has_valid_ZAS_zone(src) + if(istype(below) && zones_present && !(src.z in using_map.below_blocked_levels) && (!istype(below, /turf/unsimulated/wall) && !istype(below, /turf/simulated/sky))) // VOREStation Edit: Weird open space N = /turf/simulated/open var/obj/fire/old_fire = fire @@ -93,8 +99,8 @@ if(tell_universe) universe.OnTurfChange(W) - if(air_master) - air_master.mark_for_update(src) //handle the addition of the new turf. + if(SSair) + SSair.mark_for_update(src) //handle the addition of the new turf. for(var/turf/space/S in range(W,1)) S.update_starlight() @@ -123,8 +129,8 @@ if(tell_universe) universe.OnTurfChange(W) - if(air_master) - air_master.mark_for_update(src) + if(SSair) + SSair.mark_for_update(src) for(var/turf/space/S in range(W,1)) S.update_starlight() diff --git a/code/game/turfs/unsimulated/planetary.dm b/code/game/turfs/unsimulated/planetary.dm index d1b522361c..d73201c166 100644 --- a/code/game/turfs/unsimulated/planetary.dm +++ b/code/game/turfs/unsimulated/planetary.dm @@ -33,7 +33,7 @@ // Force ZAS to reconsider our connections because our temperature has changed if(connections) connections.erase_all() - air_master.mark_for_update(src) + SSair.mark_for_update(src) // Normal station/earth air. /turf/unsimulated/wall/planetary/normal diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 3c9116acde..eaf677ed9c 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -638,10 +638,6 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) set category = "Admin" set name = "Adminhelp" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted).")) diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 885f00cf0d..659d16ecd9 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -831,9 +831,9 @@ CHOMP Remove end */ if (!isturf(NT) || (NT in found) || (NT in pending)) continue // We ask ZAS to determine if its airtight. Thats what matters anyway right? - if(air_master.air_blocked(T, NT)) + if(SSair.air_blocked(T, NT)) // Okay thats the edge of the room - if(get_area_type_buildmode(NT.loc) == AREA_SPACE && air_master.air_blocked(NT, NT)) + if(get_area_type_buildmode(NT.loc) == AREA_SPACE && SSair.air_blocked(NT, NT)) found += NT // So we include walls/doors not already in any area continue if (istype(NT, /turf/space)) diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 63b18ab07b..593be726a6 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -2,12 +2,12 @@ set category = "Debug.Investigate" set name = "Show Air Report" - if(!master_controller || !air_master) - tgui_alert_async(usr,"Master_controller or air_master not found.","Air Report") + if(!master_controller || !SSair) + tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report") return - var/active_groups = air_master.active_zones - var/inactive_groups = air_master.zones.len - active_groups + var/active_groups = SSair.active_zones + var/inactive_groups = SSair.zones.len - active_groups var/hotspots = 0 for(var/obj/fire/hotspot in world) @@ -15,7 +15,7 @@ var/active_on_main_station = 0 var/inactive_on_main_station = 0 - for(var/zone/zone in air_master.zones) + for(var/zone/zone in SSair.zones) var/turf/simulated/turf = locate() in zone.contents if(turf?.z in using_map.station_levels) if(zone.needs_update) @@ -25,8 +25,8 @@ var/output = {"AIR SYSTEMS REPORT
General Processing Data
- Cycle: [air_master.current_cycle]
- Groups: [air_master.zones.len]
+ Cycle: [SSair.current_cycle]
+ Groups: [SSair.zones.len]
---- Active: [active_groups]
---- Inactive: [inactive_groups]

---- Active on station: [active_on_main_station]
@@ -36,7 +36,7 @@ Hotspot Processing: [hotspots]

Geometry Processing Data
- Tile Update: [air_master.tiles_to_update.len]
+ Tile Update: [SSair.tiles_to_update.len]
"} usr << browse(output,"window=airreport") @@ -127,11 +127,11 @@ to_chat(src, "Only administrators may use this command.") return - if(!air_master) + if(!SSair) to_chat(usr, "Cannot find air_system") return var/datum/air_group/dead_groups = list() - for(var/datum/air_group/group in air_master.air_groups) + for(var/datum/air_group/group in SSair.air_groups) if (!group.group_processing) dead_groups += group var/datum/air_group/dest_group = pick(dead_groups) @@ -149,7 +149,7 @@ to_chat(src, "Only administrators may use this command.") return - if(!air_master) + if(!SSair) to_chat(usr, "Cannot find air_system") return diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 48cdbe17fc..c3705df723 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -146,12 +146,6 @@ var/list/debug_verbs = list ( ,/client/proc/print_jobban_old ,/client/proc/print_jobban_old_filter ,/client/proc/forceEvent - ,/client/proc/break_all_air_groups - ,/client/proc/regroup_all_air_groups - ,/client/proc/kill_pipe_processing - ,/client/proc/kill_air_processing - ,/client/proc/disable_communication - ,/client/proc/disable_movement ,/client/proc/Zone_Info ,/client/proc/Test_ZAS_Connection ,/client/proc/ZoneTick @@ -345,80 +339,3 @@ var/list/debug_verbs = list ( to_world("There are [count] objects of type [type_path] in the game world") feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -var/global/prevent_airgroup_regroup = 0 - -/client/proc/break_all_air_groups() - set category = "Mapping" - set name = "Break All Airgroups" - - /*prevent_airgroup_regroup = 1 - for(var/datum/air_group/AG in air_master.air_groups) - AG.suspend_group_processing() - message_admins("[src.ckey] used 'Break All Airgroups'")*/ - -/client/proc/regroup_all_air_groups() - set category = "Mapping" - set name = "Regroup All Airgroups Attempt" - - to_chat(usr, span_red("Proc disabled.")) //Why not.. Delete the procs instead? - - /*prevent_airgroup_regroup = 0 - for(var/datum/air_group/AG in air_master.air_groups) - AG.check_regroup() - message_admins("[src.ckey] used 'Regroup All Airgroups Attempt'")*/ - -/client/proc/kill_pipe_processing() - set category = "Mapping" - set name = "Kill pipe processing" - - to_chat(usr, span_red("Proc disabled.")) - - /*pipe_processing_killed = !pipe_processing_killed - if(pipe_processing_killed) - message_admins("[src.ckey] used 'kill pipe processing', stopping all pipe processing.") - else - message_admins("[src.ckey] used 'kill pipe processing', restoring all pipe processing.")*/ - -/client/proc/kill_air_processing() - set category = "Mapping" - set name = "Kill air processing" - - to_chat(usr, span_red("Proc disabled.")) - - /*air_processing_killed = !air_processing_killed - if(air_processing_killed) - message_admins("[src.ckey] used 'kill air processing', stopping all air processing.") - else - message_admins("[src.ckey] used 'kill air processing', restoring all air processing.")*/ - -//This proc is intended to detect lag problems relating to communication procs -var/global/say_disabled = 0 -/client/proc/disable_communication() - set category = "Mapping" - set name = "Disable all communication verbs" - - to_chat(usr, span_red("Proc disabled.")) - - /*say_disabled = !say_disabled - if(say_disabled) - message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.") - else - message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")*/ - -//This proc is intended to detect lag problems relating to movement -var/global/movement_disabled = 0 -var/global/movement_disabled_exception //This is the client that calls the proc, so he can continue to run around to gauge any change to lag. -/client/proc/disable_movement() - set category = "Mapping" - set name = "Disable all movement" - - to_chat(usr, span_red("Proc disabled.")) - - /*movement_disabled = !movement_disabled - if(movement_disabled) - message_admins("[src.ckey] used 'Disable all movement', killing all movement.") - movement_disabled_exception = usr.ckey - else - message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")*/ diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 9e54ca8065..c8d539fde3 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -2,10 +2,6 @@ set category = "IC.Game" set name = "Pray" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_red("Speech is currently admin-disabled.")) - return - var/raw_msg = sanitize(tgui_input_text(usr, "Prayers are sent to staff but do not open tickets or go to Discord. If you have a technical difficulty or an event/spice idea/hook - please ahelp instead. Thank you!", "Pray", null, MAX_MESSAGE_LEN)) if(!raw_msg) return diff --git a/code/modules/blob2/overmind/overmind.dm b/code/modules/blob2/overmind/overmind.dm index 993a4126ac..73fe9978c5 100644 --- a/code/modules/blob2/overmind/overmind.dm +++ b/code/modules/blob2/overmind/overmind.dm @@ -116,7 +116,7 @@ var/list/overminds = list() if(client) if(message) client.handle_spam_prevention(MUTE_IC) - if((client.prefs.muted & MUTE_IC) || say_disabled) + if((client.prefs.muted & MUTE_IC)) to_chat(src, span_warning("You cannot speak in IC (Muted).")) return diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 86b9faaab5..6e9d270967 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -3,9 +3,6 @@ set name = "OOC" set category = "OOC.Chat" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_warning("Speech is currently admin-disabled.")) - return if(!mob) return if(IsGuestKey(key)) @@ -86,10 +83,6 @@ set desc = "Local OOC, seen only by those in view." set category = "OOC.Chat" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - if(!mob) return diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 9a0e6f0829..0e3b78acde 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -254,11 +254,11 @@ var/no_los var/turf/last_turf = origin_turf for(var/turf/target_turf in getline(origin_turf,neighbor)) - if(air_master.air_blocked(last_turf, target_turf)) + if(SSair.air_blocked(last_turf, target_turf)) no_los = 1 break last_turf = target_turf - if(!no_los && air_master.air_blocked(origin_turf, neighbor)) + if(!no_los && SSair.air_blocked(origin_turf, neighbor)) no_los = 1 if(no_los) closed_turfs |= neighbor diff --git a/code/modules/mentor/mentorhelp.dm b/code/modules/mentor/mentorhelp.dm index 37a007cc65..672f185ee0 100644 --- a/code/modules/mentor/mentorhelp.dm +++ b/code/modules/mentor/mentorhelp.dm @@ -420,10 +420,6 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new) set category = "Admin" set name = "Mentorhelp" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted).")) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 67dca2c116..9382eedb2c 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -182,8 +182,8 @@ var/list/mining_overlay_cache = list() recalculate_directional_opacity() if(ticker && ticker.current_state == GAME_STATE_PLAYING) reconsider_lights() - if(air_master) - air_master.mark_for_update(src) + if(SSair) + SSair.mark_for_update(src) /turf/simulated/mineral/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32) //Cache miss diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index f4d90e9712..009667dbf4 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -2,7 +2,7 @@ //Start of a breath chain, calls breathe() /mob/living/carbon/handle_breathing() - if(air_master.current_cycle%4==2 || failed_last_breath || (health < CONFIG_GET(number/health_threshold_crit))) //First, resolve location and get a breath + if(SSair.current_cycle%4==2 || failed_last_breath || (health < CONFIG_GET(number/health_threshold_crit))) //First, resolve location and get a breath breathe() /mob/living/carbon/proc/breathe() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8817fd3b51..d960fffb93 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1853,7 +1853,7 @@ stomach_contents.Remove(M) qdel(M) continue - if(air_master.current_cycle%3==1) + if(SSair.current_cycle%3==1) if(!(M.status_flags & GODMODE)) M.adjustBruteLoss(5) adjust_nutrition(10) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 268a5e7d09..e622da5001 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -154,7 +154,7 @@ var/list/channel_to_radio_key = new if(client) if(message) client.handle_spam_prevention(MUTE_IC) - if((client.prefs.muted & MUTE_IC) || say_disabled) + if((client.prefs.muted & MUTE_IC)) to_chat(src, span_warning("You cannot speak in IC (Muted).")) return diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 9b5183a90e..23b1f5841c 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -586,7 +586,7 @@ 'sound/vore/digest12.ogg') playsound(src, churnsound, vol = 100, vary = 1, falloff = 0.1, ignore_walls = TRUE, preference = /datum/preference/toggle/digestion_noises) //If the timing is right, and there are items to be touched - if(air_master.current_cycle%3==1 && length(touchable_items)) + if(SSair.current_cycle%3==1 && length(touchable_items)) //Burn all the mobs or add them to the exclusion list var/volume = 0 //CHOMPAdd diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm index 4deb9c5b89..e9e33ebf65 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/solargrub_larva.dm @@ -88,7 +88,7 @@ var/global/list/grub_machine_overlays = list() return if(istype(loc, /obj/machinery)) - if(machine_effect && air_master.current_cycle%30) + if(machine_effect && SSair.current_cycle%30) for(var/mob/M in player_list) M << machine_effect if(prob(10)) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 7bb9d1b667..a57a2daa98 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -34,9 +34,6 @@ set desc = "Emote to nearby people (and your pred/prey)" set hidden = 1 - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_red("Speech is currently admin-disabled.")) - return //VOREStation Addition Start if(forced_psay) pme(message) @@ -58,10 +55,6 @@ usr.emote(message) /mob/proc/say_dead(var/message) - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - if(!client) return // Clientless mobs shouldn't be trying to talk in deadchat. diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 9fd74b9867..67d58b7667 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -7,9 +7,6 @@ set desc = "Emote to nearby people (and your pred/prey)" set hidden = 1 - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return if(forced_psay) pme(message) return @@ -28,9 +25,6 @@ set name = "Subtle (Custom)" set desc = "Emote to nearby people, with ability to choose which specific portion of people you wish to target." - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return if(forced_psay) pme(message) return diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index a68865dda2..97ec582da3 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -148,10 +148,10 @@ /datum/unit_test/active_edges/start_test() - var/active_edges = air_master.active_edges.len + var/active_edges = SSair.active_edges.len var/list/edge_log = list() if(active_edges) - for(var/connection_edge/E in air_master.active_edges) + for(var/connection_edge/E in SSair.active_edges) var/a_temp = E.A.air.temperature var/a_moles = E.A.air.total_moles var/a_vol = E.A.air.volume diff --git a/modular_chomp/code/modules/tickets/procs.dm b/modular_chomp/code/modules/tickets/procs.dm index fcb235f758..fcc7c1c308 100644 --- a/modular_chomp/code/modules/tickets/procs.dm +++ b/modular_chomp/code/modules/tickets/procs.dm @@ -6,10 +6,6 @@ set category = "Admin" set name = "Mentorhelp" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted).")) @@ -77,10 +73,6 @@ set category = "Admin" set name = "Adminhelp" - if(say_disabled) //This is here to try to identify lag problems - to_chat(usr, span_danger("Speech is currently admin-disabled.")) - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted).")) diff --git a/modular_chomp/game/turfs/shuttlewalls_attacks.dm b/modular_chomp/game/turfs/shuttlewalls_attacks.dm index e22fbeb53f..31d300971c 100644 --- a/modular_chomp/game/turfs/shuttlewalls_attacks.dm +++ b/modular_chomp/game/turfs/shuttlewalls_attacks.dm @@ -17,7 +17,7 @@ src.blocks_air = 0 set_opacity(0) for(var/turf/simulated/turf in loc) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) else can_open = WALL_OPENING //flick("[material.icon_base]fwall_closing", src) @@ -29,18 +29,18 @@ src.blocks_air = 1 set_opacity(1) for(var/turf/simulated/turf in loc) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) can_open = WALL_CAN_OPEN update_icon() /turf/simulated/shuttlewalls/proc/update_air() - if(!air_master) + if(!SSair) return for(var/turf/simulated/turf in loc) update_thermal(turf) - air_master.mark_for_update(turf) + SSair.mark_for_update(turf) /turf/simulated/shuttlewalls/proc/update_thermal(var/turf/simulated/source) diff --git a/vorestation.dme b/vorestation.dme index 20d9ef263a..8ed5eca9f8 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -4722,7 +4722,6 @@ #include "code\ZAS\Connection.dm" #include "code\ZAS\ConnectionGroup.dm" #include "code\ZAS\ConnectionManager.dm" -#include "code\ZAS\Controller.dm" #include "code\ZAS\Debug.dm" #include "code\ZAS\Diagnostic.dm" #include "code\ZAS\Fire.dm"