mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Made firelocks work right with ZAS.
This commit is contained in:
@@ -205,10 +205,10 @@ turf
|
||||
if(zone)
|
||||
zone.rebuild = 1
|
||||
continue
|
||||
else if(!CanPass(null, src, 1.5, 1) && CanPass(null, src, 0, 0)) //I normally block air, but am permitting it.
|
||||
else if(!(T.CanPass(null, src, 1.5, 1) && CanPass(null, T, 1.5, 1)) && (CanPass(null, T, 0, 0) || T.CanPass(null, src, 0, 0))) //I normally block air, but am permitting it.
|
||||
if(zone) //Either open or no doors, air can flow.
|
||||
ZConnect(src,T) //Connect 'em.
|
||||
else if(!CanPass(null, src, 1.5, 1)) //If I block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
else if(!(T.CanPass(null, src, 1.5, 1) && CanPass(null, T, 1.5, 1))) //If I block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
if(T.zone && !T.zone.rebuild)
|
||||
for(var/direction2 in cardinal - direction) //Check all other directions for air that might be connected.
|
||||
var/turf/simulated/NT = get_step(src, direction2)
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
layer = 3.1 //Above most items if closed
|
||||
else
|
||||
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
if(world.time < 10)
|
||||
spawn(10)
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
else
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -91,15 +91,29 @@
|
||||
//border_only fire doors are special when it comes to air groups
|
||||
/obj/machinery/door/firedoor/border_only
|
||||
|
||||
New()
|
||||
..()
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/T = get_step(source,dir)
|
||||
if(!source.CanPass(null, T, 0, 0) || !locate(/obj/machinery/door/firedoor/border_only) in T)
|
||||
var/obj/machinery/door/firedoor/F = new(source)
|
||||
F.name = name
|
||||
F.desc = desc
|
||||
F.dir = dir
|
||||
spawn(0)
|
||||
del src
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group)
|
||||
var/direction = get_dir(src,target)
|
||||
return (dir != direction)
|
||||
if(direction)
|
||||
return (dir != direction)
|
||||
return 1 //It will break the zone when it actually drops, otherwise let it work normally.
|
||||
else if(density)
|
||||
if(!height)
|
||||
var/direction = get_dir(src,target)
|
||||
return (dir != direction)
|
||||
else
|
||||
if(direction)
|
||||
return (dir != direction)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -107,9 +121,9 @@
|
||||
update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/destination = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(destination)) air_master.tiles_to_update += destination
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(destination)) air_master.tiles_to_update |= destination
|
||||
return 1
|
||||
@@ -14,11 +14,11 @@
|
||||
/obj/machinery/door/window/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(target)) air_master.tiles_to_update += target
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1044,17 +1044,17 @@ steam.start() -- spawns the effect
|
||||
proc/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/north = get_step(source,NORTH)
|
||||
var/turf/simulated/south = get_step(source,SOUTH)
|
||||
var/turf/simulated/east = get_step(source,EAST)
|
||||
var/turf/simulated/west = get_step(source,WEST)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(north)) air_master.tiles_to_update += north
|
||||
if(istype(south)) air_master.tiles_to_update += south
|
||||
if(istype(east)) air_master.tiles_to_update += east
|
||||
if(istype(west)) air_master.tiles_to_update += west
|
||||
if(istype(source)) air_master.tiles_to_update |= source
|
||||
if(istype(north)) air_master.tiles_to_update |= north
|
||||
if(istype(south)) air_master.tiles_to_update |= south
|
||||
if(istype(east)) air_master.tiles_to_update |= east
|
||||
if(istype(west)) air_master.tiles_to_update |= west
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user