ZAS fixes.

This commit is contained in:
SkyMarshal
2012-06-09 00:55:00 -07:00
parent 5c9308d610
commit 92e2cd32de
6 changed files with 24 additions and 14 deletions

View File

@@ -50,17 +50,17 @@ atom/movable/RepelAirflowDest(n)
vs_control/var vs_control/var
airflow_lightest_pressure = 15 airflow_lightest_pressure = 30
airflow_light_pressure = 30 airflow_light_pressure = 45
airflow_medium_pressure = 45 airflow_medium_pressure = 60
airflow_heavy_pressure = 60 airflow_heavy_pressure = 75
airflow_heaviest_pressure = 90 airflow_heaviest_pressure = 90
airflow_damage = 0.3 airflow_damage = 0.3
airflow_stun = 0.15 airflow_stun = 0.15
airflow_speed_decay = 1 airflow_speed_decay = 1
airflow_delay = 25 //Time in deciseconds before they can be moved by airflow again. airflow_delay = 30 //Time in deciseconds before they can be moved by airflow again.
airflow_mob_slowdown = 3 //Time in tenths of a second to add as a delay to each movement by a mob.\ airflow_mob_slowdown = 1 //Time in tenths of a second to add as a delay to each movement by a mob.\
Only active if they are fighting the pull of the airflow. Only active if they are fighting the pull of the airflow.
airflow_stun_cooldown = 10 //How long, in tenths of a second, to wait before stunning them again. airflow_stun_cooldown = 10 //How long, in tenths of a second, to wait before stunning them again.
@@ -390,8 +390,11 @@ mob/living/carbon/human/airflow_hit(atom/A)
stunned += round(airflow_speed * vsc.airflow_stun/2) stunned += round(airflow_speed * vsc.airflow_stun/2)
. = ..() . = ..()
var/list/airflow_forbidden = list(/obj/structure/ore_box, /mob/aiEye)
zone/proc/movables() zone/proc/movables()
. = list() . = list()
for(var/turf/T in contents) for(var/turf/T in contents)
for(var/atom/A in T) for(var/atom/A in T)
. += A if(!(locate(A) in airflow_forbidden))
. += A

View File

@@ -101,6 +101,7 @@ datum
//Geometry updates lists //Geometry updates lists
var/list/turf/simulated/tiles_to_update = list() var/list/turf/simulated/tiles_to_update = list()
var/list/turf/simulated/tiles_with_connections = list() var/list/turf/simulated/tiles_with_connections = list()
var/list/connection/connections_checked = list()
// var/list/turf/simulated/groups_to_rebuild = list() // var/list/turf/simulated/groups_to_rebuild = list()
var/current_cycle = 0 var/current_cycle = 0
@@ -170,6 +171,9 @@ datum
for(var/turf/simulated/T in tiles_to_update) for(var/turf/simulated/T in tiles_to_update)
T.update_air_properties() T.update_air_properties()
tiles_to_update = list() tiles_to_update = list()
for(var/connection/C in connections_checked)
C.CheckPassSanity()
connections_checked = list()
for(var/zone/Z in zones) for(var/zone/Z in zones)
if(Z.last_update < current_cycle) if(Z.last_update < current_cycle)

View File

@@ -187,7 +187,7 @@ turf
if(air_master.tiles_with_connections["\ref[src]"]) //Check pass sanity of the connections. if(air_master.tiles_with_connections["\ref[src]"]) //Check pass sanity of the connections.
var/list/connections = air_master.tiles_with_connections["\ref[src]"] var/list/connections = air_master.tiles_with_connections["\ref[src]"]
for(var/connection/C in connections) for(var/connection/C in connections)
C.CheckPassSanity() air_master.connections_checked |= C
update_zone_properties() //Update self zone and adjacent zones. update_zone_properties() //Update self zone and adjacent zones.
@@ -211,15 +211,18 @@ turf
else if(zone) else if(zone)
zone.rebuild = 1 zone.rebuild = 1
continue continue
else if(!T.CanPass(null, src, 1.5, 1) && !T.CanPass(null, src, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt. else if(!T.CanPass(null, src, 1.5, 1) && !T.CanPass(null, src, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt.
if(T.zone && !T.zone.rebuild) if(T.zone && !T.zone.rebuild)
for(var/direction2 in cardinal - direction) //Check all other directions for air that might be connected. for(var/direction2 in cardinal - direction) //Check all other directions for air that might be connected.
var/turf/simulated/NT = get_step(src, direction2) var/turf/simulated/NT = get_step(src, direction2)
if(NT && NT.zone && NT.zone == T.zone) if(NT && NT.zone && NT.zone == T.zone)
T.zone.rebuild = 1 T.zone.rebuild = 1
else if((!T.CanPass(null, src, 1.5, 1) && T.CanPass(null, src, 0, 0)) || (!CanPass(null, T, 1.5, 1) && CanPass(null, T, 0, 0))) else if((!T.CanPass(null, src, 1.5, 1) && T.CanPass(null, src, 0, 0)) || (!CanPass(null, T, 1.5, 1) && CanPass(null, T, 0, 0)))
if(T.zone != zone) if(T.zone != zone)
ZConnect(src,T) ZConnect(src,T)
else if(zone && !zone.rebuild) else if(zone && !zone.rebuild)
for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected. for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected.
var/turf/simulated/NT = get_step(T, direction2) var/turf/simulated/NT = get_step(T, direction2)

View File

@@ -267,9 +267,9 @@ datum/gas_mixture/proc/zburn(obj/liquid_fuel/liquid)
temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature ) temperature = max( 1700*log(0.4*firelevel + 1.23) , temperature )
//Consume some gas. //Consume some gas.
var/consumed_gas = min(oxygen,0.0005*firelevel,total_fuel) / fuel_sources var/consumed_gas = min(oxygen,0.005*firelevel,total_fuel) / fuel_sources
oxygen -= consumed_gas oxygen = max(0,oxygen-consumed_gas)
toxins = max(0,toxins-consumed_gas) toxins = max(0,toxins-consumed_gas)

View File

@@ -117,8 +117,6 @@ proc/ZConnect(turf/A,turf/B)
if(!A.zone || !B.zone) return if(!A.zone || !B.zone) return
if(A.zone == B.zone) return if(A.zone == B.zone) return
if(!A.CanPass(0,B,0,0) || !B.CanPass(0,A,0,0)) return if(!A.CanPass(0,B,0,0) || !B.CanPass(0,A,0,0)) return
if(A.CanPass(null, B, 1.5, 1) && B.CanPass(null, A, 1.5, 1))
return ZMerge(A.zone, B.zone)
//Ensure the connection isn't already made. //Ensure the connection isn't already made.
if(air_master.tiles_with_connections["\ref[A]"]) if(air_master.tiles_with_connections["\ref[A]"])

View File

@@ -170,8 +170,10 @@
..() ..()
if(buckled_mob) if(buckled_mob)
if(buckled_mob.buckled == src) if(buckled_mob.buckled == src)
buckled_mob.loc = src.loc buckled_mob.loc = loc
buckled_mob.dir = src.dir buckled_mob.dir = dir
else
buckled_mob = null
/obj/structure/stool/bed/chair/Move() /obj/structure/stool/bed/chair/Move()
..() ..()