mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] Some ZAS tweaks and minor optimizations (#9544)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0473c33bcc
commit
a7e4ef7dad
@@ -36,11 +36,11 @@
|
|||||||
if(!partner)
|
if(!partner)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(!air_master || air_master.current_cycle <= update_cycle)
|
if(!SSair || SSair.current_cycle <= update_cycle)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
update_cycle = air_master.current_cycle
|
update_cycle = SSair.current_cycle
|
||||||
partner.update_cycle = air_master.current_cycle
|
partner.update_cycle = SSair.current_cycle
|
||||||
|
|
||||||
var/air_heat_capacity = air_contents.heat_capacity()
|
var/air_heat_capacity = air_contents.heat_capacity()
|
||||||
var/other_air_heat_capacity = partner.air_contents.heat_capacity()
|
var/other_air_heat_capacity = partner.air_contents.heat_capacity()
|
||||||
|
|||||||
@@ -36,11 +36,11 @@
|
|||||||
|
|
||||||
//Convenience function for atoms to update turfs they occupy
|
//Convenience function for atoms to update turfs they occupy
|
||||||
/atom/movable/proc/update_nearby_tiles(need_rebuild)
|
/atom/movable/proc/update_nearby_tiles(need_rebuild)
|
||||||
if(!air_master)
|
if(!SSair)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
for(var/turf/simulated/turf in locs)
|
for(var/turf/simulated/turf in locs)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
Overview:
|
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:
|
Class Vars:
|
||||||
A - Always a simulated turf.
|
A - Always a simulated turf.
|
||||||
@@ -60,19 +60,19 @@ Class Procs:
|
|||||||
|
|
||||||
/connection/New(turf/simulated/A, turf/simulated/B)
|
/connection/New(turf/simulated/A, turf/simulated/B)
|
||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
ASSERT(air_master.has_valid_zone(A))
|
ASSERT(HAS_VALID_ZONE(A))
|
||||||
//ASSERT(air_master.has_valid_zone(B))
|
//ASSERT(HAS_VALID_ZONE(B))
|
||||||
#endif
|
#endif
|
||||||
src.A = A
|
src.A = A
|
||||||
src.B = B
|
src.B = B
|
||||||
zoneA = A.zone
|
zoneA = A.zone
|
||||||
if(!istype(B))
|
if(!istype(B))
|
||||||
mark_space()
|
mark_space()
|
||||||
edge = air_master.get_edge(A.zone,B)
|
edge = SSair.get_edge(A.zone,B)
|
||||||
edge.add_connection(src)
|
edge.add_connection(src)
|
||||||
else
|
else
|
||||||
zoneB = B.zone
|
zoneB = B.zone
|
||||||
edge = air_master.get_edge(A.zone,B.zone)
|
edge = SSair.get_edge(A.zone,B.zone)
|
||||||
edge.add_connection(src)
|
edge.add_connection(src)
|
||||||
|
|
||||||
/connection/proc/mark_direct()
|
/connection/proc/mark_direct()
|
||||||
@@ -108,7 +108,7 @@ Class Procs:
|
|||||||
erase()
|
erase()
|
||||||
return
|
return
|
||||||
|
|
||||||
var/block_status = air_master.air_blocked(A,B)
|
var/block_status = SSair.air_blocked(A,B)
|
||||||
if(block_status & AIR_BLOCKED)
|
if(block_status & AIR_BLOCKED)
|
||||||
//to_world("Blocked connection.")
|
//to_world("Blocked connection.")
|
||||||
erase()
|
erase()
|
||||||
@@ -133,7 +133,7 @@ Class Procs:
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
edge.remove_connection(src)
|
edge.remove_connection(src)
|
||||||
edge = air_master.get_edge(A.zone, B)
|
edge = SSair.get_edge(A.zone, B)
|
||||||
edge.add_connection(src)
|
edge.add_connection(src)
|
||||||
zoneA = A.zone
|
zoneA = A.zone
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ Class Procs:
|
|||||||
//to_world("Zones changed, \...")
|
//to_world("Zones changed, \...")
|
||||||
if(A.zone && B.zone)
|
if(A.zone && B.zone)
|
||||||
edge.remove_connection(src)
|
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)
|
edge.add_connection(src)
|
||||||
zoneA = A.zone
|
zoneA = A.zone
|
||||||
zoneB = B.zone
|
zoneB = B.zone
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Overview:
|
Overview:
|
||||||
These are what handle gas transfers between zones and into space.
|
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.
|
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.
|
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.
|
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/contains_zone(zone/Z)
|
||||||
|
|
||||||
/connection_edge/proc/erase()
|
/connection_edge/proc/erase()
|
||||||
air_master.remove_edge(src)
|
SSair.remove_edge(src)
|
||||||
//to_world("[type] Erased.")
|
//to_world("[type] Erased.")
|
||||||
|
|
||||||
/connection_edge/proc/tick()
|
/connection_edge/proc/tick()
|
||||||
@@ -169,19 +169,19 @@ Class Procs:
|
|||||||
if(equiv)
|
if(equiv)
|
||||||
if(direct)
|
if(direct)
|
||||||
erase()
|
erase()
|
||||||
air_master.merge(A, B)
|
SSair.merge(A, B)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
A.air.equalize(B.air)
|
A.air.equalize(B.air)
|
||||||
air_master.mark_edge_sleeping(src)
|
SSair.mark_edge_sleeping(src)
|
||||||
|
|
||||||
air_master.mark_zone_update(A)
|
SSair.mark_zone_update(A)
|
||||||
air_master.mark_zone_update(B)
|
SSair.mark_zone_update(B)
|
||||||
|
|
||||||
/connection_edge/zone/recheck()
|
/connection_edge/zone/recheck()
|
||||||
// Edges with only one side being vacuum need processing no matter how close.
|
// Edges with only one side being vacuum need processing no matter how close.
|
||||||
if(!A.air.compare(B.air, vacuum_exception = 1))
|
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.
|
//Helper proc to get connections for a zone.
|
||||||
/connection_edge/zone/proc/get_connected_zone(zone/from)
|
/connection_edge/zone/proc/get_connected_zone(zone/from)
|
||||||
@@ -233,16 +233,16 @@ Class Procs:
|
|||||||
|
|
||||||
if(equiv)
|
if(equiv)
|
||||||
A.air.copy_from(air)
|
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()
|
/connection_edge/unsimulated/recheck()
|
||||||
// Edges with only one side being vacuum need processing no matter how close.
|
// 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
|
// 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.
|
// 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))
|
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)
|
/proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)
|
||||||
//This implements a simplistic version of the Stefan-Boltzmann law.
|
//This implements a simplistic version of the Stefan-Boltzmann law.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Class Procs:
|
|||||||
Preferable to accessing the connection directly because it checks validity.
|
Preferable to accessing the connection directly because it checks validity.
|
||||||
|
|
||||||
place(connection/c, d)
|
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()
|
update_all()
|
||||||
Called after turf/update_air_properties(). Updates the validity of all connections on this turf.
|
Called after turf/update_air_properties(). Updates the validity of all connections on this turf.
|
||||||
|
|||||||
@@ -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)
|
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
/*
|
/*
|
||||||
if(!check_rights(R_DEBUG)) return
|
if(!check_rights(R_DEBUG)) return
|
||||||
|
|
||||||
var/result = air_master.Tick()
|
var/result = SSair.Tick()
|
||||||
if(result)
|
if(result)
|
||||||
to_chat(src, "Successfully Processed.")
|
to_chat(src, "Successfully Processed.")
|
||||||
|
|
||||||
else
|
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)
|
/client/proc/Zone_Info(turf/T as null|turf)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
|
|||||||
fuel_objs.Cut()
|
fuel_objs.Cut()
|
||||||
|
|
||||||
if(!fire_tiles.len)
|
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)
|
/zone/proc/remove_liquidfuel(var/used_liquid_fuel, var/remove_fire=0)
|
||||||
if(!fuel_objs.len)
|
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
|
return 1
|
||||||
|
|
||||||
fire = new(src, fl)
|
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
|
var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in src
|
||||||
zone.fire_tiles |= 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)
|
set_light(3, 1, color)
|
||||||
|
|
||||||
firelevel = fl
|
firelevel = fl
|
||||||
air_master.active_hotspots.Add(src)
|
SSair.active_hotspots.Add(src)
|
||||||
|
|
||||||
/obj/fire/proc/fire_color(var/env_temperature)
|
/obj/fire/proc/fire_color(var/env_temperature)
|
||||||
var/temperature = max(4000*sqrt(firelevel/vsc.fire_firelevel_multiplier), 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
|
T.fire = null
|
||||||
loc = 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.
|
/turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
|
||||||
|
|||||||
@@ -41,9 +41,8 @@
|
|||||||
if(istype(unsim, /turf/simulated))
|
if(istype(unsim, /turf/simulated))
|
||||||
|
|
||||||
var/turf/simulated/sim = unsim
|
var/turf/simulated/sim = unsim
|
||||||
if(air_master.has_valid_zone(sim))
|
if(HAS_VALID_ZONE(sim))
|
||||||
|
SSair.connect(sim, src)
|
||||||
air_master.connect(sim, src)
|
|
||||||
|
|
||||||
// CHOMPAdd
|
// CHOMPAdd
|
||||||
#define GET_ZONE_NEIGHBOURS(T, ret) \
|
#define GET_ZONE_NEIGHBOURS(T, ret) \
|
||||||
@@ -240,7 +239,7 @@
|
|||||||
if(verbose) to_world("Connecting to [sim.zone]")
|
if(verbose) to_world("Connecting to [sim.zone]")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SSair.connect(src, sim) // CHOMPEdit
|
SSair.connect(src, sim)
|
||||||
|
|
||||||
|
|
||||||
#ifdef ZASDBG
|
#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.
|
//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)
|
for(var/turf/T in postponed)
|
||||||
SSair.connect(src, T) // CHOMPEdit
|
SSair.connect(src, T)
|
||||||
|
|
||||||
/turf/proc/post_update_air_properties()
|
/turf/proc/post_update_air_properties()
|
||||||
if(connections) connections.update_all()
|
if(connections) connections.update_all()
|
||||||
@@ -324,7 +323,7 @@
|
|||||||
/turf/simulated/return_air()
|
/turf/simulated/return_air()
|
||||||
if(zone)
|
if(zone)
|
||||||
if(!zone.invalid)
|
if(!zone.invalid)
|
||||||
air_master.mark_zone_update(zone)
|
SSair.mark_zone_update(zone)
|
||||||
return zone.air
|
return zone.air
|
||||||
else
|
else
|
||||||
if(!air)
|
if(!air)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Class Procs:
|
|||||||
/zone/var/list/graphic_remove = list()
|
/zone/var/list/graphic_remove = list()
|
||||||
|
|
||||||
/zone/New()
|
/zone/New()
|
||||||
air_master.add_zone(src)
|
SSair.add_zone(src)
|
||||||
air.temperature = TCMB
|
air.temperature = TCMB
|
||||||
air.group_multiplier = 1
|
air.group_multiplier = 1
|
||||||
air.volume = CELL_VOLUME
|
air.volume = CELL_VOLUME
|
||||||
@@ -65,7 +65,7 @@ Class Procs:
|
|||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
ASSERT(!invalid)
|
ASSERT(!invalid)
|
||||||
ASSERT(istype(T))
|
ASSERT(istype(T))
|
||||||
ASSERT(!air_master.has_valid_zone(T))
|
ASSERT(!HAS_VALID_ZONE(T))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var/datum/gas_mixture/turf_air = T.return_air()
|
var/datum/gas_mixture/turf_air = T.return_air()
|
||||||
@@ -75,7 +75,7 @@ Class Procs:
|
|||||||
if(T.fire)
|
if(T.fire)
|
||||||
var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in T
|
var/obj/effect/decal/cleanable/liquid_fuel/fuel = locate() in T
|
||||||
fire_tiles.Add(T)
|
fire_tiles.Add(T)
|
||||||
air_master.active_fire_zones |= src
|
SSair.active_fire_zones |= src
|
||||||
if(fuel) fuel_objs += fuel
|
if(fuel) fuel_objs += fuel
|
||||||
if(air.graphic)
|
if(air.graphic)
|
||||||
T.update_graphic(air.graphic)
|
T.update_graphic(air.graphic)
|
||||||
@@ -122,11 +122,11 @@ Class Procs:
|
|||||||
if(E.contains_zone(into))
|
if(E.contains_zone(into))
|
||||||
continue //don't need to rebuild this edge
|
continue //don't need to rebuild this edge
|
||||||
for(var/turf/T in E.connecting_turfs)
|
for(var/turf/T in E.connecting_turfs)
|
||||||
air_master.mark_for_update(T)
|
SSair.mark_for_update(T)
|
||||||
|
|
||||||
/zone/proc/c_invalidate()
|
/zone/proc/c_invalidate()
|
||||||
invalid = 1
|
invalid = 1
|
||||||
air_master.remove_zone(src)
|
SSair.remove_zone(src)
|
||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
for(var/turf/simulated/T in contents)
|
for(var/turf/simulated/T in contents)
|
||||||
T.dbg(invalid_zone)
|
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.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.dbg(invalid_zone)
|
||||||
T.needs_air_update = 0 //Reset the marker so that it will be added to the list.
|
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)
|
/zone/proc/add_tile_air(datum/gas_mixture/tile_air)
|
||||||
//air.volume += CELL_VOLUME
|
//air.volume += CELL_VOLUME
|
||||||
@@ -152,7 +152,7 @@ Class Procs:
|
|||||||
air.group_multiplier = contents.len+1
|
air.group_multiplier = contents.len+1
|
||||||
|
|
||||||
/zone/proc/tick()
|
/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)
|
var/turf/T = pick(contents)
|
||||||
if(istype(T))
|
if(istype(T))
|
||||||
T.create_fire(vsc.fire_firelevel_multiplier)
|
T.create_fire(vsc.fire_firelevel_multiplier)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Every air tick:
|
|||||||
|
|
||||||
Important Functions:
|
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
|
When stuff happens, call this. It works on everything. You basically don't need to worry about any other
|
||||||
functions besides CanPass().
|
functions besides CanPass().
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#define ATMOS_PASS_DENSITY 3 // Blocks air and zones if density = TRUE, allows both if density = FALSE
|
#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 ATMOS_PASS_PROC 4 // Call CanZASPass() using c_airblock
|
||||||
|
|
||||||
|
#define HAS_VALID_ZONE(T) (T.zone && !T.zone.invalid)
|
||||||
|
|
||||||
// CHOMPAdd Start
|
// CHOMPAdd Start
|
||||||
|
|
||||||
#define NORTHUP (NORTH|UP)
|
#define NORTHUP (NORTH|UP)
|
||||||
|
|||||||
@@ -1008,7 +1008,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
|||||||
|
|
||||||
if(toupdate.len)
|
if(toupdate.len)
|
||||||
for(var/turf/simulated/T1 in toupdate)
|
for(var/turf/simulated/T1 in toupdate)
|
||||||
air_master.mark_for_update(T1)
|
SSair.mark_for_update(T1)
|
||||||
|
|
||||||
return copiedobjs
|
return copiedobjs
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ var/global/datum/controller/game_controller/master_controller //Set in world.New
|
|||||||
var/global/controller_iteration = 0
|
var/global/controller_iteration = 0
|
||||||
var/global/last_tick_duration = 0
|
var/global/last_tick_duration = 0
|
||||||
|
|
||||||
var/global/pipe_processing_killed = 0
|
|
||||||
|
|
||||||
/datum/controller/game_controller
|
/datum/controller/game_controller
|
||||||
var/list/shuttle_list // For debugging and VV
|
var/list/shuttle_list // For debugging and VV
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// Air update stages
|
||||||
#define SSAIR_TURFS 1
|
#define SSAIR_TURFS 1
|
||||||
#define SSAIR_EDGES 2
|
#define SSAIR_EDGES 2
|
||||||
@@ -30,8 +87,19 @@ SUBSYSTEM_DEF(air)
|
|||||||
// This is used to tell CI WHERE the edges are.
|
// This is used to tell CI WHERE the edges are.
|
||||||
var/list/startup_active_edge_log = list()
|
var/list/startup_active_edge_log = list()
|
||||||
|
|
||||||
/datum/controller/subsystem/air/PreInit()
|
//Geometry lists
|
||||||
air_master = src
|
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
|
/datum/controller/subsystem/air/Initialize() // CHOMPEdit
|
||||||
var/start_timeofday = REALTIMEOFDAY // 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]")
|
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
|
resumed = TRUE
|
||||||
else
|
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
|
current_step = SSAIR_TURFS // Start with Step 1 of course
|
||||||
|
|
||||||
INTERNAL_PROCESS_STEP(SSAIR_TURFS, TRUE, process_tiles_to_update, cost_turfs, SSAIR_EDGES)
|
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_HOTSPOTS, FALSE, process_active_hotspots, cost_hotspots, SSAIR_ZONES)
|
||||||
INTERNAL_PROCESS_STEP(SSAIR_ZONES, FALSE, process_zones_to_update, cost_zones, SSAIR_DONE)
|
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)
|
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.")
|
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
|
else
|
||||||
@@ -307,9 +375,162 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
|||||||
next_fire = world.time + wait
|
next_fire = world.time + wait
|
||||||
can_fire = TRUE // Unpause
|
can_fire = TRUE // Unpause
|
||||||
|
|
||||||
//
|
/datum/controller/subsystem/air/proc/add_zone(zone/z)
|
||||||
// The procs from the ZAS Air Controller are in ZAS/Controller.dm
|
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_TURFS
|
||||||
#undef SSAIR_EDGES
|
#undef SSAIR_EDGES
|
||||||
|
|||||||
@@ -89,7 +89,6 @@
|
|||||||
|
|
||||||
//Goon PS stuff, and other yet-to-be-subsystem things.
|
//Goon PS stuff, and other yet-to-be-subsystem things.
|
||||||
options["LEGACY: master_controller"] = master_controller
|
options["LEGACY: master_controller"] = master_controller
|
||||||
options["LEGACY: air_master"] = air_master
|
|
||||||
options["LEGACY: job_master"] = job_master
|
options["LEGACY: job_master"] = job_master
|
||||||
options["LEGACY: radio_controller"] = radio_controller
|
options["LEGACY: radio_controller"] = radio_controller
|
||||||
options["LEGACY: emergency_shuttle"] = emergency_shuttle
|
options["LEGACY: emergency_shuttle"] = emergency_shuttle
|
||||||
|
|||||||
@@ -438,12 +438,12 @@
|
|||||||
return ..(M)
|
return ..(M)
|
||||||
|
|
||||||
/obj/machinery/door/update_nearby_tiles(need_rebuild)
|
/obj/machinery/door/update_nearby_tiles(need_rebuild)
|
||||||
if(!air_master)
|
if(!SSair)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
for(var/turf/simulated/turf in locs)
|
for(var/turf/simulated/turf in locs)
|
||||||
update_heat_protection(turf)
|
update_heat_protection(turf)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -503,15 +503,15 @@
|
|||||||
|
|
||||||
|
|
||||||
update_nearby_tiles(need_rebuild)
|
update_nearby_tiles(need_rebuild)
|
||||||
if(!air_master) return 0
|
if(!SSair) return 0
|
||||||
|
|
||||||
var/turf/simulated/source = loc
|
var/turf/simulated/source = loc
|
||||||
var/turf/simulated/destination = get_step(source,dir)
|
var/turf/simulated/destination = get_step(source,dir)
|
||||||
|
|
||||||
update_heat_protection(loc)
|
update_heat_protection(loc)
|
||||||
|
|
||||||
if(istype(source)) air_master.tiles_to_update += source
|
if(istype(source)) SSair.tiles_to_update += source
|
||||||
if(istype(destination)) air_master.tiles_to_update += destination
|
if(istype(destination)) SSair.tiles_to_update += destination
|
||||||
return 1
|
return 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
// Special case to prevent us from being part of a zone during the first air master tick.
|
// 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
|
// 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?
|
// 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)
|
spawn(1)
|
||||||
air_master.mark_for_update(get_turf(src))
|
SSair.mark_for_update(get_turf(src))
|
||||||
return FALSE
|
return FALSE
|
||||||
return is_zone ? FALSE : TRUE // Anything except zones can pass
|
return is_zone ? FALSE : TRUE // Anything except zones can pass
|
||||||
|
|||||||
@@ -258,9 +258,9 @@
|
|||||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||||
continue
|
continue
|
||||||
// We ask ZAS to determine if its airtight. Thats what matters anyway right?
|
// 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
|
// 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
|
found += NT // So we include walls/doors not already in any area
|
||||||
continue
|
continue
|
||||||
if (istype(NT, /turf/space))
|
if (istype(NT, /turf/space))
|
||||||
|
|||||||
@@ -678,9 +678,9 @@
|
|||||||
if(!visual && forbiddenAreas[NT.loc.type])
|
if(!visual && forbiddenAreas[NT.loc.type])
|
||||||
return ROOM_ERR_FORBIDDEN
|
return ROOM_ERR_FORBIDDEN
|
||||||
// We ask ZAS to determine if its airtight. Thats what matters anyway right?
|
// 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
|
// 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
|
found += NT // So we include walls/doors not already in any area
|
||||||
continue
|
continue
|
||||||
if (istype(NT, /turf/space))
|
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.
|
if(!get_new_area_type(NT.loc) == 1) //The contains somewhere that is NOT a buildable area.
|
||||||
return 3 //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
|
// 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
|
found += NT // So we include walls/doors not already in any area
|
||||||
continue
|
continue
|
||||||
if (istype(NT, /turf/space))
|
if (istype(NT, /turf/space))
|
||||||
|
|||||||
@@ -101,10 +101,6 @@
|
|||||||
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
dirtoverlay.alpha = min((dirt - 50) * 5, 255)
|
||||||
|
|
||||||
/turf/simulated/Entered(atom/A, atom/OL)
|
/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))
|
if (istype(A,/mob/living))
|
||||||
var/dirtslip = FALSE //CHOMPEdit
|
var/dirtslip = FALSE //CHOMPEdit
|
||||||
var/mob/living/M = A
|
var/mob/living/M = A
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
src.blocks_air = 0
|
src.blocks_air = 0
|
||||||
set_opacity(0)
|
set_opacity(0)
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
else
|
else
|
||||||
can_open = WALL_OPENING
|
can_open = WALL_OPENING
|
||||||
//flick("[material.icon_base]fwall_closing", src)
|
//flick("[material.icon_base]fwall_closing", src)
|
||||||
@@ -29,18 +29,18 @@
|
|||||||
src.blocks_air = 1
|
src.blocks_air = 1
|
||||||
set_opacity(1)
|
set_opacity(1)
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
|
|
||||||
can_open = WALL_CAN_OPEN
|
can_open = WALL_CAN_OPEN
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/turf/simulated/wall/proc/update_air()
|
/turf/simulated/wall/proc/update_air()
|
||||||
if(!air_master)
|
if(!SSair)
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
update_thermal(turf)
|
update_thermal(turf)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
|
|
||||||
|
|
||||||
/turf/simulated/wall/proc/update_thermal(var/turf/simulated/source)
|
/turf/simulated/wall/proc/update_thermal(var/turf/simulated/source)
|
||||||
|
|||||||
@@ -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
|
//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)
|
/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 ..()
|
// Do not call ..()
|
||||||
// Byond's default turf/Enter() doesn't have the behaviour we want with Bump()
|
// 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
|
// By default byond will call Bump() on the first dense object in contents
|
||||||
|
|||||||
@@ -21,6 +21,11 @@
|
|||||||
if(istype(below))
|
if(istype(below))
|
||||||
below.update_icon() // To add or remove the 'ceiling-less' overlay.
|
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
|
//Creates a new turf
|
||||||
/turf/proc/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0, var/preserve_outdoors = FALSE)
|
/turf/proc/ChangeTurf(var/turf/N, var/tell_universe=1, var/force_lighting_update = 0, var/preserve_outdoors = FALSE)
|
||||||
if (!N)
|
if (!N)
|
||||||
@@ -28,7 +33,8 @@
|
|||||||
|
|
||||||
if(N == /turf/space)
|
if(N == /turf/space)
|
||||||
var/turf/below = GetBelow(src)
|
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
|
N = /turf/simulated/open
|
||||||
|
|
||||||
var/obj/fire/old_fire = fire
|
var/obj/fire/old_fire = fire
|
||||||
@@ -93,8 +99,8 @@
|
|||||||
if(tell_universe)
|
if(tell_universe)
|
||||||
universe.OnTurfChange(W)
|
universe.OnTurfChange(W)
|
||||||
|
|
||||||
if(air_master)
|
if(SSair)
|
||||||
air_master.mark_for_update(src) //handle the addition of the new turf.
|
SSair.mark_for_update(src) //handle the addition of the new turf.
|
||||||
|
|
||||||
for(var/turf/space/S in range(W,1))
|
for(var/turf/space/S in range(W,1))
|
||||||
S.update_starlight()
|
S.update_starlight()
|
||||||
@@ -123,8 +129,8 @@
|
|||||||
if(tell_universe)
|
if(tell_universe)
|
||||||
universe.OnTurfChange(W)
|
universe.OnTurfChange(W)
|
||||||
|
|
||||||
if(air_master)
|
if(SSair)
|
||||||
air_master.mark_for_update(src)
|
SSair.mark_for_update(src)
|
||||||
|
|
||||||
for(var/turf/space/S in range(W,1))
|
for(var/turf/space/S in range(W,1))
|
||||||
S.update_starlight()
|
S.update_starlight()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
// Force ZAS to reconsider our connections because our temperature has changed
|
// Force ZAS to reconsider our connections because our temperature has changed
|
||||||
if(connections)
|
if(connections)
|
||||||
connections.erase_all()
|
connections.erase_all()
|
||||||
air_master.mark_for_update(src)
|
SSair.mark_for_update(src)
|
||||||
|
|
||||||
// Normal station/earth air.
|
// Normal station/earth air.
|
||||||
/turf/unsimulated/wall/planetary/normal
|
/turf/unsimulated/wall/planetary/normal
|
||||||
|
|||||||
@@ -638,10 +638,6 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Adminhelp"
|
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
|
//handle muting and automuting
|
||||||
if(prefs.muted & MUTE_ADMINHELP)
|
if(prefs.muted & MUTE_ADMINHELP)
|
||||||
to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted)."))
|
to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted)."))
|
||||||
|
|||||||
@@ -831,9 +831,9 @@ CHOMP Remove end */
|
|||||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||||
continue
|
continue
|
||||||
// We ask ZAS to determine if its airtight. Thats what matters anyway right?
|
// 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
|
// 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
|
found += NT // So we include walls/doors not already in any area
|
||||||
continue
|
continue
|
||||||
if (istype(NT, /turf/space))
|
if (istype(NT, /turf/space))
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
set category = "Debug.Investigate"
|
set category = "Debug.Investigate"
|
||||||
set name = "Show Air Report"
|
set name = "Show Air Report"
|
||||||
|
|
||||||
if(!master_controller || !air_master)
|
if(!master_controller || !SSair)
|
||||||
tgui_alert_async(usr,"Master_controller or air_master not found.","Air Report")
|
tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report")
|
||||||
return
|
return
|
||||||
|
|
||||||
var/active_groups = air_master.active_zones
|
var/active_groups = SSair.active_zones
|
||||||
var/inactive_groups = air_master.zones.len - active_groups
|
var/inactive_groups = SSair.zones.len - active_groups
|
||||||
|
|
||||||
var/hotspots = 0
|
var/hotspots = 0
|
||||||
for(var/obj/fire/hotspot in world)
|
for(var/obj/fire/hotspot in world)
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
var/active_on_main_station = 0
|
var/active_on_main_station = 0
|
||||||
var/inactive_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
|
var/turf/simulated/turf = locate() in zone.contents
|
||||||
if(turf?.z in using_map.station_levels)
|
if(turf?.z in using_map.station_levels)
|
||||||
if(zone.needs_update)
|
if(zone.needs_update)
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
|
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
|
||||||
<B>General Processing Data</B><BR>
|
<B>General Processing Data</B><BR>
|
||||||
Cycle: [air_master.current_cycle]<br>
|
Cycle: [SSair.current_cycle]<br>
|
||||||
Groups: [air_master.zones.len]<BR>
|
Groups: [SSair.zones.len]<BR>
|
||||||
---- <I>Active:</I> [active_groups]<BR>
|
---- <I>Active:</I> [active_groups]<BR>
|
||||||
---- <I>Inactive:</I> [inactive_groups]<BR><br>
|
---- <I>Inactive:</I> [inactive_groups]<BR><br>
|
||||||
---- <I>Active on station:</i> [active_on_main_station]<br>
|
---- <I>Active on station:</i> [active_on_main_station]<br>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
Hotspot Processing: [hotspots]<BR>
|
Hotspot Processing: [hotspots]<BR>
|
||||||
<br>
|
<br>
|
||||||
<B>Geometry Processing Data</B><BR>
|
<B>Geometry Processing Data</B><BR>
|
||||||
Tile Update: [air_master.tiles_to_update.len]<BR>
|
Tile Update: [SSair.tiles_to_update.len]<BR>
|
||||||
"}
|
"}
|
||||||
|
|
||||||
usr << browse(output,"window=airreport")
|
usr << browse(output,"window=airreport")
|
||||||
@@ -127,11 +127,11 @@
|
|||||||
to_chat(src, "Only administrators may use this command.")
|
to_chat(src, "Only administrators may use this command.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!air_master)
|
if(!SSair)
|
||||||
to_chat(usr, "Cannot find air_system")
|
to_chat(usr, "Cannot find air_system")
|
||||||
return
|
return
|
||||||
var/datum/air_group/dead_groups = list()
|
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)
|
if (!group.group_processing)
|
||||||
dead_groups += group
|
dead_groups += group
|
||||||
var/datum/air_group/dest_group = pick(dead_groups)
|
var/datum/air_group/dest_group = pick(dead_groups)
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
to_chat(src, "Only administrators may use this command.")
|
to_chat(src, "Only administrators may use this command.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!air_master)
|
if(!SSair)
|
||||||
to_chat(usr, "Cannot find air_system")
|
to_chat(usr, "Cannot find air_system")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -146,12 +146,6 @@ var/list/debug_verbs = list (
|
|||||||
,/client/proc/print_jobban_old
|
,/client/proc/print_jobban_old
|
||||||
,/client/proc/print_jobban_old_filter
|
,/client/proc/print_jobban_old_filter
|
||||||
,/client/proc/forceEvent
|
,/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/Zone_Info
|
||||||
,/client/proc/Test_ZAS_Connection
|
,/client/proc/Test_ZAS_Connection
|
||||||
,/client/proc/ZoneTick
|
,/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")
|
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!
|
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.")*/
|
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
set category = "IC.Game"
|
set category = "IC.Game"
|
||||||
set name = "Pray"
|
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))
|
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
|
if(!raw_msg) return
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ var/list/overminds = list()
|
|||||||
if(client)
|
if(client)
|
||||||
if(message)
|
if(message)
|
||||||
client.handle_spam_prevention(MUTE_IC)
|
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)."))
|
to_chat(src, span_warning("You cannot speak in IC (Muted)."))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
set name = "OOC"
|
set name = "OOC"
|
||||||
set category = "OOC.Chat"
|
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(!mob) return
|
||||||
if(IsGuestKey(key))
|
if(IsGuestKey(key))
|
||||||
@@ -86,10 +83,6 @@
|
|||||||
set desc = "Local OOC, seen only by those in view."
|
set desc = "Local OOC, seen only by those in view."
|
||||||
set category = "OOC.Chat"
|
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)
|
if(!mob)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -254,11 +254,11 @@
|
|||||||
var/no_los
|
var/no_los
|
||||||
var/turf/last_turf = origin_turf
|
var/turf/last_turf = origin_turf
|
||||||
for(var/turf/target_turf in getline(origin_turf,neighbor))
|
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
|
no_los = 1
|
||||||
break
|
break
|
||||||
last_turf = target_turf
|
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
|
no_los = 1
|
||||||
if(no_los)
|
if(no_los)
|
||||||
closed_turfs |= neighbor
|
closed_turfs |= neighbor
|
||||||
|
|||||||
@@ -420,10 +420,6 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Mentorhelp"
|
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
|
//handle muting and automuting
|
||||||
if(prefs.muted & MUTE_ADMINHELP)
|
if(prefs.muted & MUTE_ADMINHELP)
|
||||||
to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted)."))
|
to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted)."))
|
||||||
|
|||||||
@@ -182,8 +182,8 @@ var/list/mining_overlay_cache = list()
|
|||||||
recalculate_directional_opacity()
|
recalculate_directional_opacity()
|
||||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||||
reconsider_lights()
|
reconsider_lights()
|
||||||
if(air_master)
|
if(SSair)
|
||||||
air_master.mark_for_update(src)
|
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)
|
/turf/simulated/mineral/proc/get_cached_border(var/cache_id, var/direction, var/icon_file, var/icon_state, var/offset = 32)
|
||||||
//Cache miss
|
//Cache miss
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
//Start of a breath chain, calls breathe()
|
//Start of a breath chain, calls breathe()
|
||||||
/mob/living/carbon/handle_breathing()
|
/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()
|
breathe()
|
||||||
|
|
||||||
/mob/living/carbon/proc/breathe()
|
/mob/living/carbon/proc/breathe()
|
||||||
|
|||||||
@@ -1853,7 +1853,7 @@
|
|||||||
stomach_contents.Remove(M)
|
stomach_contents.Remove(M)
|
||||||
qdel(M)
|
qdel(M)
|
||||||
continue
|
continue
|
||||||
if(air_master.current_cycle%3==1)
|
if(SSair.current_cycle%3==1)
|
||||||
if(!(M.status_flags & GODMODE))
|
if(!(M.status_flags & GODMODE))
|
||||||
M.adjustBruteLoss(5)
|
M.adjustBruteLoss(5)
|
||||||
adjust_nutrition(10)
|
adjust_nutrition(10)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ var/list/channel_to_radio_key = new
|
|||||||
if(client)
|
if(client)
|
||||||
if(message)
|
if(message)
|
||||||
client.handle_spam_prevention(MUTE_IC)
|
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)."))
|
to_chat(src, span_warning("You cannot speak in IC (Muted)."))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -586,7 +586,7 @@
|
|||||||
'sound/vore/digest12.ogg')
|
'sound/vore/digest12.ogg')
|
||||||
playsound(src, churnsound, vol = 100, vary = 1, falloff = 0.1, ignore_walls = TRUE, preference = /datum/preference/toggle/digestion_noises)
|
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 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
|
//Burn all the mobs or add them to the exclusion list
|
||||||
var/volume = 0 //CHOMPAdd
|
var/volume = 0 //CHOMPAdd
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ var/global/list/grub_machine_overlays = list()
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(istype(loc, /obj/machinery))
|
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)
|
for(var/mob/M in player_list)
|
||||||
M << machine_effect
|
M << machine_effect
|
||||||
if(prob(10))
|
if(prob(10))
|
||||||
|
|||||||
@@ -34,9 +34,6 @@
|
|||||||
set desc = "Emote to nearby people (and your pred/prey)"
|
set desc = "Emote to nearby people (and your pred/prey)"
|
||||||
set hidden = 1
|
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
|
//VOREStation Addition Start
|
||||||
if(forced_psay)
|
if(forced_psay)
|
||||||
pme(message)
|
pme(message)
|
||||||
@@ -58,10 +55,6 @@
|
|||||||
usr.emote(message)
|
usr.emote(message)
|
||||||
|
|
||||||
/mob/proc/say_dead(var/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)
|
if(!client)
|
||||||
return // Clientless mobs shouldn't be trying to talk in deadchat.
|
return // Clientless mobs shouldn't be trying to talk in deadchat.
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,6 @@
|
|||||||
set desc = "Emote to nearby people (and your pred/prey)"
|
set desc = "Emote to nearby people (and your pred/prey)"
|
||||||
set hidden = 1
|
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)
|
if(forced_psay)
|
||||||
pme(message)
|
pme(message)
|
||||||
return
|
return
|
||||||
@@ -28,9 +25,6 @@
|
|||||||
set name = "Subtle (Custom)"
|
set name = "Subtle (Custom)"
|
||||||
set desc = "Emote to nearby people, with ability to choose which specific portion of people you wish to target."
|
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)
|
if(forced_psay)
|
||||||
pme(message)
|
pme(message)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -148,10 +148,10 @@
|
|||||||
|
|
||||||
/datum/unit_test/active_edges/start_test()
|
/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()
|
var/list/edge_log = list()
|
||||||
if(active_edges)
|
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_temp = E.A.air.temperature
|
||||||
var/a_moles = E.A.air.total_moles
|
var/a_moles = E.A.air.total_moles
|
||||||
var/a_vol = E.A.air.volume
|
var/a_vol = E.A.air.volume
|
||||||
|
|||||||
@@ -6,10 +6,6 @@
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Mentorhelp"
|
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
|
//handle muting and automuting
|
||||||
if(prefs.muted & MUTE_ADMINHELP)
|
if(prefs.muted & MUTE_ADMINHELP)
|
||||||
to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted)."))
|
to_chat(src, span_danger("Error: Mentor-PM: You cannot send adminhelps (Muted)."))
|
||||||
@@ -77,10 +73,6 @@
|
|||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Adminhelp"
|
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
|
//handle muting and automuting
|
||||||
if(prefs.muted & MUTE_ADMINHELP)
|
if(prefs.muted & MUTE_ADMINHELP)
|
||||||
to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted)."))
|
to_chat(src, span_danger("Error: Admin-PM: You cannot send adminhelps (Muted)."))
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
src.blocks_air = 0
|
src.blocks_air = 0
|
||||||
set_opacity(0)
|
set_opacity(0)
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
else
|
else
|
||||||
can_open = WALL_OPENING
|
can_open = WALL_OPENING
|
||||||
//flick("[material.icon_base]fwall_closing", src)
|
//flick("[material.icon_base]fwall_closing", src)
|
||||||
@@ -29,18 +29,18 @@
|
|||||||
src.blocks_air = 1
|
src.blocks_air = 1
|
||||||
set_opacity(1)
|
set_opacity(1)
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
|
|
||||||
can_open = WALL_CAN_OPEN
|
can_open = WALL_CAN_OPEN
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/turf/simulated/shuttlewalls/proc/update_air()
|
/turf/simulated/shuttlewalls/proc/update_air()
|
||||||
if(!air_master)
|
if(!SSair)
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/turf/simulated/turf in loc)
|
for(var/turf/simulated/turf in loc)
|
||||||
update_thermal(turf)
|
update_thermal(turf)
|
||||||
air_master.mark_for_update(turf)
|
SSair.mark_for_update(turf)
|
||||||
|
|
||||||
|
|
||||||
/turf/simulated/shuttlewalls/proc/update_thermal(var/turf/simulated/source)
|
/turf/simulated/shuttlewalls/proc/update_thermal(var/turf/simulated/source)
|
||||||
|
|||||||
@@ -4722,7 +4722,6 @@
|
|||||||
#include "code\ZAS\Connection.dm"
|
#include "code\ZAS\Connection.dm"
|
||||||
#include "code\ZAS\ConnectionGroup.dm"
|
#include "code\ZAS\ConnectionGroup.dm"
|
||||||
#include "code\ZAS\ConnectionManager.dm"
|
#include "code\ZAS\ConnectionManager.dm"
|
||||||
#include "code\ZAS\Controller.dm"
|
|
||||||
#include "code\ZAS\Debug.dm"
|
#include "code\ZAS\Debug.dm"
|
||||||
#include "code\ZAS\Diagnostic.dm"
|
#include "code\ZAS\Diagnostic.dm"
|
||||||
#include "code\ZAS\Fire.dm"
|
#include "code\ZAS\Fire.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user