Merge remote-tracking branch 'upstream/master' into hopefullythefinalhardsync

This commit is contained in:
deathride58
2018-07-05 00:17:44 -04:00
18 changed files with 99 additions and 25 deletions
+19 -2
View File
@@ -114,6 +114,23 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
return W
/turf/open/ChangeTurf(path, list/new_baseturfs, flags)
if ((flags & CHANGETURF_INHERIT_AIR) && ispath(path, /turf/open))
SSair.remove_from_active(src)
var/stashed_air = air
air = null // so that it doesn't get deleted
. = ..()
if (!. || . == src) // changeturf failed or didn't do anything
air = stashed_air
return
var/turf/open/newTurf = .
if (!istype(newTurf.air, /datum/gas_mixture/immutable/space))
QDEL_NULL(newTurf.air)
newTurf.air = stashed_air
SSair.add_to_active(newTurf)
else
return ..()
// Take off the top layer turf and replace it with the next baseturf down
/turf/proc/ScrapeAway(amount=1, flags)
if(!amount)
@@ -251,7 +268,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
/turf/open/AfterChange(flags)
..()
RemoveLattice()
if(!(flags & CHANGETURF_IGNORE_AIR))
if(!(flags & (CHANGETURF_IGNORE_AIR | CHANGETURF_INHERIT_AIR)))
Assimilate_Air()
//////Assimilate Air//////
@@ -284,4 +301,4 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
/turf/proc/ReplaceWithLattice()
ScrapeAway()
new /obj/structure/lattice(locate(x, y, z))
new /obj/structure/lattice(locate(x, y, z))