mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-09 00:43:07 +00:00
Fix for ChangeTurf and update_air_properties not handling geometry changes correctly.
Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
@@ -125,7 +125,6 @@
|
||||
return ..()
|
||||
|
||||
/turf/simulated/proc/update_air_properties()
|
||||
var/air_directions_archived = air_check_directions
|
||||
air_check_directions = 0
|
||||
|
||||
for(var/direction in cardinal)
|
||||
@@ -165,14 +164,12 @@
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
|
||||
//I can connect to air in this direction
|
||||
if(air_check_directions & direction && !(air_directions_archived & direction))
|
||||
|
||||
if(air_check_directions & direction)
|
||||
ZConnect(src,T)
|
||||
|
||||
//Something like a wall was built, changing the geometry.
|
||||
else if(!(air_check_directions & direction) && air_directions_archived & direction)
|
||||
else if(!(air_check_directions & direction))
|
||||
var/turf/NT = get_step(T, direction)
|
||||
|
||||
//If the tile is in our own zone, and we cannot connect to it, better rebuild.
|
||||
|
||||
@@ -214,6 +214,13 @@
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
|
||||
if(ispath(N, /turf/simulated/floor))
|
||||
//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.
|
||||
if(zone)
|
||||
zone.RemoveTurf(src)
|
||||
if(!zone.CheckStatus())
|
||||
zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||
//W.Assimilate_Air()
|
||||
|
||||
@@ -225,13 +232,6 @@
|
||||
if (istype(W,/turf/simulated/floor))
|
||||
W.RemoveLattice()
|
||||
|
||||
//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.
|
||||
if(zone)
|
||||
zone.RemoveTurf(src)
|
||||
if(!zone.CheckStatus())
|
||||
zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
if(air_master)
|
||||
air_master.AddTurfToUpdate(src)
|
||||
|
||||
@@ -239,17 +239,17 @@
|
||||
return W
|
||||
|
||||
else
|
||||
if(zone)
|
||||
zone.RemoveTurf(src)
|
||||
if(!zone.CheckStatus())
|
||||
zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
if(zone)
|
||||
zone.RemoveTurf(src)
|
||||
if(!zone.CheckStatus())
|
||||
zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
if(air_master)
|
||||
air_master.AddTurfToUpdate(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user