mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Updates the zone-sleeping code to account for turf changes.
This commit is contained in:
@@ -6,9 +6,6 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
|||||||
#define CONNECTION_INDIRECT 1
|
#define CONNECTION_INDIRECT 1
|
||||||
#define CONNECTION_CLOSED 0
|
#define CONNECTION_CLOSED 0
|
||||||
|
|
||||||
#define ZONE_ACTIVE 1
|
|
||||||
#define ZONE_SLEEPING 0
|
|
||||||
|
|
||||||
/connection
|
/connection
|
||||||
var/turf/simulated/A
|
var/turf/simulated/A
|
||||||
var/turf/simulated/B
|
var/turf/simulated/B
|
||||||
|
|||||||
@@ -50,12 +50,8 @@ Important Procedures
|
|||||||
air_master.process()
|
air_master.process()
|
||||||
This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations
|
This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ZONE_ACTIVE 1
|
|
||||||
#define ZONE_SLEEPING 0
|
|
||||||
|
|
||||||
var/tick_multiplier = 2
|
var/tick_multiplier = 2
|
||||||
|
|
||||||
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||||
|
|||||||
@@ -326,6 +326,9 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
|
|||||||
archived_air.copy_from(air)
|
archived_air.copy_from(air)
|
||||||
|
|
||||||
|
|
||||||
|
/zone/proc/CheckStatus()
|
||||||
|
return status
|
||||||
|
|
||||||
/zone/proc/assume_air(var/datum/gas_mixture/giver)
|
/zone/proc/assume_air(var/datum/gas_mixture/giver)
|
||||||
if(status == ZONE_ACTIVE)
|
if(status == ZONE_ACTIVE)
|
||||||
return air.merge(giver)
|
return air.merge(giver)
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
|
|
||||||
if(ispath(N, /turf/simulated/floor))
|
if(ispath(N, /turf/simulated/floor))
|
||||||
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()
|
||||||
|
|
||||||
W.lighting_lumcount += old_lumcount
|
W.lighting_lumcount += old_lumcount
|
||||||
if(old_lumcount != W.lighting_lumcount)
|
if(old_lumcount != W.lighting_lumcount)
|
||||||
@@ -226,30 +226,29 @@
|
|||||||
W.RemoveLattice()
|
W.RemoveLattice()
|
||||||
|
|
||||||
//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
|
||||||
if(src.zone)
|
//Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf.
|
||||||
src.zone.RemoveTurf(src)
|
if(zone)
|
||||||
W.zone = src.zone
|
zone.RemoveTurf(src)
|
||||||
W.zone.AddTurf(W)
|
if(!zone.CheckStatus())
|
||||||
|
zone.SetStatus(ZONE_ACTIVE)
|
||||||
|
|
||||||
if(air_master)
|
if(air_master)
|
||||||
air_master.AddTurfToUpdate(src)
|
air_master.AddTurfToUpdate(src)
|
||||||
|
|
||||||
W.levelupdate()
|
W.levelupdate()
|
||||||
return W
|
return W
|
||||||
else
|
|
||||||
/*if(istype(src, /turf/simulated) && src.zone)
|
|
||||||
src.zone.rebuild = 1*/
|
|
||||||
|
|
||||||
|
else
|
||||||
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
|
||||||
if(old_lumcount != W.lighting_lumcount)
|
if(old_lumcount != W.lighting_lumcount)
|
||||||
W.lighting_changed = 1
|
W.lighting_changed = 1
|
||||||
lighting_controller.changed_turfs += W
|
lighting_controller.changed_turfs += W
|
||||||
|
|
||||||
if(src.zone)
|
if(zone)
|
||||||
src.zone.RemoveTurf(src)
|
zone.RemoveTurf(src)
|
||||||
W.zone = src.zone
|
if(!zone.CheckStatus())
|
||||||
W.zone.AddTurf(W)
|
zone.SetStatus(ZONE_ACTIVE)
|
||||||
|
|
||||||
if(air_master)
|
if(air_master)
|
||||||
air_master.AddTurfToUpdate(src)
|
air_master.AddTurfToUpdate(src)
|
||||||
@@ -257,7 +256,13 @@
|
|||||||
W.levelupdate()
|
W.levelupdate()
|
||||||
return W
|
return W
|
||||||
|
|
||||||
|
|
||||||
|
//Commented out by SkyMarshal 5/10/13 - If you are patching up space, it should be vacuum.
|
||||||
|
// If you are replacing a wall, you have increased the volume of the room without increasing the amount of gas in it.
|
||||||
|
// As such, this will no longer be used.
|
||||||
|
|
||||||
//////Assimilate Air//////
|
//////Assimilate Air//////
|
||||||
|
/*
|
||||||
/turf/simulated/proc/Assimilate_Air()
|
/turf/simulated/proc/Assimilate_Air()
|
||||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||||
var/anitro = 0
|
var/anitro = 0
|
||||||
@@ -301,6 +306,8 @@
|
|||||||
S.air.toxins = air.toxins
|
S.air.toxins = air.toxins
|
||||||
S.air.temperature = air.temperature
|
S.air.temperature = air.temperature
|
||||||
S.air.update_values()
|
S.air.update_values()
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/turf/proc/ReplaceWithLattice()
|
/turf/proc/ReplaceWithLattice()
|
||||||
src.ChangeTurf(/turf/space)
|
src.ChangeTurf(/turf/space)
|
||||||
|
|||||||
@@ -728,3 +728,7 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
|
|||||||
//Language flags.
|
//Language flags.
|
||||||
#define WHITELISTED 1 // Language is available if the speaker is whitelisted.
|
#define WHITELISTED 1 // Language is available if the speaker is whitelisted.
|
||||||
#define RESTRICTED 2 // Language can only be accquired by spawning or an admin.
|
#define RESTRICTED 2 // Language can only be accquired by spawning or an admin.
|
||||||
|
|
||||||
|
//Flags for zone sleeping
|
||||||
|
#define ZONE_ACTIVE 1
|
||||||
|
#define ZONE_SLEEPING 0
|
||||||
Reference in New Issue
Block a user