mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Fixed inexplicable reversions.
This commit is contained in:
@@ -1325,14 +1325,20 @@
|
|||||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||||
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
||||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||||
|
#include "code\ZAS\_docs.dm"
|
||||||
|
#include "code\ZAS\_gas_mixture.dm"
|
||||||
#include "code\ZAS\Airflow.dm"
|
#include "code\ZAS\Airflow.dm"
|
||||||
|
#include "code\ZAS\Atom.dm"
|
||||||
#include "code\ZAS\Connection.dm"
|
#include "code\ZAS\Connection.dm"
|
||||||
|
#include "code\ZAS\ConnectionGroup.dm"
|
||||||
|
#include "code\ZAS\Controller.dm"
|
||||||
#include "code\ZAS\Debug.dm"
|
#include "code\ZAS\Debug.dm"
|
||||||
|
#include "code\ZAS\Diagnostic.dm"
|
||||||
#include "code\ZAS\Fire.dm"
|
#include "code\ZAS\Fire.dm"
|
||||||
#include "code\ZAS\Functions.dm"
|
|
||||||
#include "code\ZAS\Plasma.dm"
|
#include "code\ZAS\Plasma.dm"
|
||||||
|
#include "code\ZAS\Turf.dm"
|
||||||
#include "code\ZAS\Variable Settings.dm"
|
#include "code\ZAS\Variable Settings.dm"
|
||||||
#include "code\ZAS\ZAS_Zones.dm"
|
#include "code\ZAS\Zone.dm"
|
||||||
#include "interface\interface.dm"
|
#include "interface\interface.dm"
|
||||||
#include "interface\skin.dmf"
|
#include "interface\skin.dmf"
|
||||||
#include "maps\tgstation2.dmm"
|
#include "maps\tgstation2.dmm"
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
// BEGIN_INTERNALS
|
// BEGIN_INTERNALS
|
||||||
/*
|
/*
|
||||||
MAP_ICON_TYPE: 0
|
MAP_ICON_TYPE: 0
|
||||||
DIR: code
|
WINDOW: code\ZAS\_gas_mixture.dm;code\ZAS\Airflow.dm;code\ZAS\Atom.dm;code\ZAS\Connection.dm;code\ZAS\ConnectionGroup.dm;code\ZAS\Controller.dm;code\ZAS\Debug.dm;code\ZAS\Diagnostic.dm;code\ZAS\Fire.dm;code\ZAS\Plasma.dm;code\ZAS\Turf.dm;code\ZAS\Variable Settings.dm;code\ZAS\Zone.dm;code\ZAS\_docs.dm;code\modules\admin\verbs\mapping.dm;code\game\turfs\turf.dm;code\modules\admin\verbs\diagnostics.dm;code\game\machinery\shieldgen.dm;code\game\machinery\doors\door.dm;code\game\machinery\doors\windowdoor.dm;code\game\objects\effects\effect_system.dm;code\game\objects\structures\mineral_doors.dm;code\game\objects\structures\windoor_assembly.dm;code\game\objects\structures\window.dm
|
||||||
|
DIR: code code\game\machinery code\game\machinery\doors code\game\objects code\game\objects\effects code\game\objects\structures code\modules\admin\verbs code\ZAS
|
||||||
|
FILE: code\ZAS\Zone.dm
|
||||||
AUTO_FILE_DIR: OFF
|
AUTO_FILE_DIR: OFF
|
||||||
*/
|
*/
|
||||||
// END_INTERNALS
|
// END_INTERNALS
|
||||||
|
|||||||
@@ -32,12 +32,6 @@
|
|||||||
if(EAST) E = c
|
if(EAST) E = c
|
||||||
if(WEST) W = c
|
if(WEST) W = c
|
||||||
|
|
||||||
/connection_managerproc/close(d)
|
|
||||||
if(check(N) && (NORTH & d) && !N.direct()) N.erase()
|
|
||||||
if(check(S) && (SOUTH & d) && !S.direct()) S.erase()
|
|
||||||
if(check(E) && (EAST & d) && !E.direct()) E.erase()
|
|
||||||
if(check(W) && (WEST & d) && !W.direct()) W.erase()
|
|
||||||
|
|
||||||
/connection_manager/proc/update_all()
|
/connection_manager/proc/update_all()
|
||||||
if(check(N)) N.update()
|
if(check(N)) N.update()
|
||||||
if(check(S)) S.update()
|
if(check(S)) S.update()
|
||||||
|
|||||||
@@ -2,29 +2,25 @@ var/datum/controller/air_system/air_master
|
|||||||
|
|
||||||
var/tick_multiplier = 2
|
var/tick_multiplier = 2
|
||||||
|
|
||||||
var/tolerance_temp = 1
|
|
||||||
var/tolerance_kpa = 1
|
|
||||||
var/mimic_rate = 2
|
|
||||||
|
|
||||||
/datum/controller/air_system
|
|
||||||
//Geometry lists
|
//Geometry lists
|
||||||
var/list/zones = list()
|
/datum/controller/air_system/var/list/zones = list()
|
||||||
var/list/edges = list()
|
/datum/controller/air_system/var/list/edges = list()
|
||||||
|
|
||||||
//Geometry updates lists
|
//Geometry updates lists
|
||||||
var/list/tiles_to_update = list()
|
/datum/controller/air_system/var/list/tiles_to_update = list()
|
||||||
var/list/zones_to_update = list()
|
/datum/controller/air_system/var/list/zones_to_update = list()
|
||||||
var/list/active_hotspots = list()
|
/datum/controller/air_system/var/list/active_hotspots = list()
|
||||||
|
|
||||||
var/active_zones = 0
|
/datum/controller/air_system/var/active_zones = 0
|
||||||
|
|
||||||
var/current_cycle = 0
|
/datum/controller/air_system/var/current_cycle = 0
|
||||||
var/update_delay = 5 //How long between check should it try to process atmos again.
|
/datum/controller/air_system/var/update_delay = 5 //How long between check should it try to process atmos again.
|
||||||
var/failed_ticks = 0 //How many ticks have runtimed?
|
/datum/controller/air_system/var/failed_ticks = 0 //How many ticks have runtimed?
|
||||||
|
|
||||||
var/tick_progress = 0
|
/datum/controller/air_system/var/tick_progress = 0
|
||||||
|
|
||||||
var/next_id = 1
|
/datum/controller/air_system/var/next_id = 1 //Used to keep track of zone UIDs.
|
||||||
|
|
||||||
/datum/controller/air_system/proc/Setup()
|
/datum/controller/air_system/proc/Setup()
|
||||||
//Purpose: Call this at the start to setup air groups geometry
|
//Purpose: Call this at the start to setup air groups geometry
|
||||||
@@ -148,12 +144,12 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
|||||||
if(.)
|
if(.)
|
||||||
tick_progress = "success"
|
tick_progress = "success"
|
||||||
|
|
||||||
/datum/controller/air_system/proc/new_zone(zone/z)
|
/datum/controller/air_system/proc/add_zone(zone/z)
|
||||||
zones.Add(z)
|
zones.Add(z)
|
||||||
z.name = "Zone [next_id++]"
|
z.name = "Zone [next_id++]"
|
||||||
mark_zone_update(z)
|
mark_zone_update(z)
|
||||||
|
|
||||||
/datum/controller/air_system/proc/invalid_zone(zone/z)
|
/datum/controller/air_system/proc/remove_zone(zone/z)
|
||||||
zones.Remove(z)
|
zones.Remove(z)
|
||||||
|
|
||||||
/datum/controller/air_system/proc/air_blocked(turf/A, turf/B)
|
/datum/controller/air_system/proc/air_blocked(turf/A, turf/B)
|
||||||
@@ -169,7 +165,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
|||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
ASSERT(istype(T))
|
ASSERT(istype(T))
|
||||||
#endif
|
#endif
|
||||||
return T.zone && !T.zone.invalid
|
return istype(T) && T.zone && !T.zone.invalid
|
||||||
|
|
||||||
/datum/controller/air_system/proc/merge(zone/A, zone/B)
|
/datum/controller/air_system/proc/merge(zone/A, zone/B)
|
||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
@@ -240,14 +236,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
|||||||
Z.needs_update = 1
|
Z.needs_update = 1
|
||||||
|
|
||||||
/datum/controller/air_system/proc/equivalent_pressure(zone/A, zone/B)
|
/datum/controller/air_system/proc/equivalent_pressure(zone/A, zone/B)
|
||||||
if(abs(A.air.return_pressure() - B.air.return_pressure()) > tolerance_kpa) return 0
|
return A.air.compare(B.air)
|
||||||
if(abs(A.air.temperature - B.air.temperature) > tolerance_temp) return 0
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/datum/controller/air_system/proc/equalize(zone/A, zone/B)
|
|
||||||
A.air.share(B.air)
|
|
||||||
mark_zone_update(A)
|
|
||||||
mark_zone_update(B)
|
|
||||||
|
|
||||||
/datum/controller/air_system/proc/active_zones()
|
/datum/controller/air_system/proc/active_zones()
|
||||||
return active_zones
|
return active_zones
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
/zone/var/name
|
/zone/var/name
|
||||||
/zone/var/invalid = 0
|
/zone/var/invalid = 0
|
||||||
/zone/var/list/contents = list()
|
/zone/var/list/contents = list()
|
||||||
/zone/var/list/unsimulated_contents = list()
|
|
||||||
|
|
||||||
/zone/var/needs_update = 0
|
/zone/var/needs_update = 0
|
||||||
|
|
||||||
@@ -11,7 +10,7 @@
|
|||||||
/zone/var/datum/gas_mixture/air = new
|
/zone/var/datum/gas_mixture/air = new
|
||||||
|
|
||||||
/zone/New()
|
/zone/New()
|
||||||
air_master.new_zone(src)
|
air_master.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
|
||||||
@@ -29,15 +28,6 @@
|
|||||||
contents.Add(T)
|
contents.Add(T)
|
||||||
T.set_graphic(air.graphic)
|
T.set_graphic(air.graphic)
|
||||||
|
|
||||||
|
|
||||||
/zone/proc/add_unsimulated(turf/T)
|
|
||||||
#ifdef ZASDBG
|
|
||||||
ASSERT(!invalid)
|
|
||||||
ASSERT(istype(T))
|
|
||||||
ASSERT(!istype(T,/turf/simulated))
|
|
||||||
#endif
|
|
||||||
unsimulated_contents |= T
|
|
||||||
|
|
||||||
/zone/proc/remove(turf/simulated/T)
|
/zone/proc/remove(turf/simulated/T)
|
||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
ASSERT(!invalid)
|
ASSERT(!invalid)
|
||||||
@@ -64,11 +54,10 @@
|
|||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
T.dbg(merged)
|
T.dbg(merged)
|
||||||
#endif
|
#endif
|
||||||
into.unsimulated_contents |= unsimulated_contents
|
|
||||||
|
|
||||||
/zone/proc/c_invalidate()
|
/zone/proc/c_invalidate()
|
||||||
invalid = 1
|
invalid = 1
|
||||||
air_master.invalid_zone(src)
|
air_master.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)
|
||||||
|
|||||||
18
code/ZAS/_docs.dm
Normal file
18
code/ZAS/_docs.dm
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Zone Air System:
|
||||||
|
|
||||||
|
This air system divides the station into impermeable areas called zones.
|
||||||
|
When something happens, i.e. a door opening or a wall being taken down,
|
||||||
|
zones equalize and eventually merge. Making an airtight area closes the connection again.
|
||||||
|
|
||||||
|
Important Functions:
|
||||||
|
|
||||||
|
air_master.mark_for_update(turf)
|
||||||
|
When stuff happens, call this. It works on everything.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define AIR_BLOCKED 1
|
||||||
|
#define ZONE_BLOCKED 2
|
||||||
|
#define BLOCKED 3
|
||||||
@@ -268,7 +268,7 @@
|
|||||||
|
|
||||||
for(var/turf/simulated/turf in locs)
|
for(var/turf/simulated/turf in locs)
|
||||||
update_heat_protection(turf)
|
update_heat_protection(turf)
|
||||||
air_master.AddTurfToUpdate(turf)
|
air_master.mark_for_update(turf)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
air_master.AddTurfToUpdate(get_turf(src))
|
air_master.mark_for_update(get_turf(src))
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
air_master.AddTurfToUpdate(get_turf(src))
|
air_master.mark_for_update(get_turf(src))
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -833,7 +833,7 @@ steam.start() -- spawns the effect
|
|||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
air_master.AddTurfToUpdate(get_turf(src))
|
air_master.mark_for_update(get_turf(src))
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
air_master.AddTurfToUpdate(get_turf(src))
|
air_master.mark_for_update(get_turf(src))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/structure/mineral_door/iron
|
/obj/structure/mineral_door/iron
|
||||||
|
|||||||
@@ -297,6 +297,6 @@ obj/structure/windoor_assembly/Del()
|
|||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
air_master.AddTurfToUpdate(loc)
|
air_master.mark_for_update(loc)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -313,7 +313,7 @@
|
|||||||
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
|
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
|
||||||
if(!air_master)
|
if(!air_master)
|
||||||
return 0
|
return 0
|
||||||
air_master.AddTurfToUpdate(get_turf(src))
|
air_master.mark_for_update(get_turf(src))
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -206,7 +206,7 @@
|
|||||||
for(var/obj/effect/landmark/zcontroller/c in controller)
|
for(var/obj/effect/landmark/zcontroller/c in controller)
|
||||||
if(c.down)
|
if(c.down)
|
||||||
var/turf/below = locate(src.x, src.y, c.down_target)
|
var/turf/below = locate(src.x, src.y, c.down_target)
|
||||||
if((below.zone || zone) && !istype(below, /turf/space)) // dont make open space into space, its pointless and makes people drop out of the station
|
if((air_master.has_valid_zone(below) || air_master.has_valid_zone(src)) && !istype(below, /turf/space)) // dont make open space into space, its pointless and makes people drop out of the station
|
||||||
var/turf/W = src.ChangeTurf(/turf/simulated/floor/open)
|
var/turf/W = src.ChangeTurf(/turf/simulated/floor/open)
|
||||||
var/list/temp = list()
|
var/list/temp = list()
|
||||||
temp += W
|
temp += W
|
||||||
@@ -219,10 +219,10 @@
|
|||||||
if(ispath(N, /turf/simulated/floor))
|
if(ispath(N, /turf/simulated/floor))
|
||||||
//if the old turf had a zone, connect the new turf to it as well - Cael
|
//if the old turf had a zone, connect the new turf to it as well - Cael
|
||||||
//Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf.
|
//Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf.
|
||||||
if(zone)
|
//if(zone)
|
||||||
zone.RemoveTurf(src)
|
// zone.RemoveTurf(src)
|
||||||
if(!zone.CheckStatus())
|
// if(!zone.CheckStatus())
|
||||||
zone.SetStatus(ZONE_ACTIVE)
|
// zone.SetStatus(ZONE_ACTIVE)
|
||||||
|
|
||||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||||
//W.Assimilate_Air()
|
//W.Assimilate_Air()
|
||||||
@@ -236,16 +236,16 @@
|
|||||||
W.RemoveLattice()
|
W.RemoveLattice()
|
||||||
|
|
||||||
if(air_master)
|
if(air_master)
|
||||||
air_master.AddTurfToUpdate(src)
|
air_master.mark_for_update(src)
|
||||||
|
|
||||||
W.levelupdate()
|
W.levelupdate()
|
||||||
return W
|
return W
|
||||||
|
|
||||||
else
|
else
|
||||||
if(zone)
|
//if(zone)
|
||||||
zone.RemoveTurf(src)
|
// zone.RemoveTurf(src)
|
||||||
if(!zone.CheckStatus())
|
// if(!zone.CheckStatus())
|
||||||
zone.SetStatus(ZONE_ACTIVE)
|
// zone.SetStatus(ZONE_ACTIVE)
|
||||||
|
|
||||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||||
W.lighting_lumcount += old_lumcount
|
W.lighting_lumcount += old_lumcount
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
lighting_controller.changed_turfs += W
|
lighting_controller.changed_turfs += W
|
||||||
|
|
||||||
if(air_master)
|
if(air_master)
|
||||||
air_master.AddTurfToUpdate(src)
|
air_master.mark_for_update(src)
|
||||||
|
|
||||||
W.levelupdate()
|
W.levelupdate()
|
||||||
return W
|
return W
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
alert(usr,"Master_controller or air_master not found.","Air Report")
|
alert(usr,"Master_controller or air_master not found.","Air Report")
|
||||||
return
|
return
|
||||||
|
|
||||||
var/active_groups = air_master.active_zones.len
|
var/active_groups = air_master.active_zones
|
||||||
var/inactive_groups = air_master.zones.len - active_groups
|
var/inactive_groups = air_master.zones.len - active_groups
|
||||||
|
|
||||||
var/hotspots = 0
|
var/hotspots = 0
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
for(var/zone/zone in air_master.zones)
|
for(var/zone/zone in air_master.zones)
|
||||||
var/turf/simulated/turf = locate() in zone.contents
|
var/turf/simulated/turf = locate() in zone.contents
|
||||||
if(turf && turf.z == 1)
|
if(turf && turf.z == 1)
|
||||||
if(zone.status)
|
if(zone.needs_update)
|
||||||
active_on_main_station++
|
active_on_main_station++
|
||||||
else
|
else
|
||||||
inactive_on_main_station++
|
inactive_on_main_station++
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ var/intercom_range_display_status = 0
|
|||||||
src.verbs += /client/proc/Zone_Info
|
src.verbs += /client/proc/Zone_Info
|
||||||
src.verbs += /client/proc/Test_ZAS_Connection
|
src.verbs += /client/proc/Test_ZAS_Connection
|
||||||
src.verbs += /client/proc/ZoneTick
|
src.verbs += /client/proc/ZoneTick
|
||||||
src.verbs += /client/proc/TestZASRebuild
|
//src.verbs += /client/proc/TestZASRebuild
|
||||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||||
|
|
||||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|||||||
Reference in New Issue
Block a user