mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Fixes an issues with zas causing plasma to hop over walls with high enough pressure.
This commit is contained in:
@@ -67,6 +67,7 @@ mob/living/carbon/metroid/airflow_stun()
|
||||
return
|
||||
|
||||
mob/living/carbon/human/airflow_stun()
|
||||
if(1) return 0
|
||||
if(last_airflow_stun > world.time - vsc.airflow_stun_cooldown) return 0
|
||||
if(buckled) return 0
|
||||
if(shoes)
|
||||
@@ -132,8 +133,9 @@ proc/Airflow(zone/A, zone/B)
|
||||
connected_turfs |= C.A
|
||||
else
|
||||
connected_turfs |= C.B
|
||||
|
||||
return
|
||||
//Get lists of things that can be thrown across the room for each zone (assumes air is moving from zone B to zone A)
|
||||
/*
|
||||
var/list/air_sucked = B.movables()
|
||||
var/list/air_repelled = A.movables()
|
||||
if(n < 0)
|
||||
@@ -188,9 +190,11 @@ proc/Airflow(zone/A, zone/B)
|
||||
M.airflow_dest = pick(close_turfs) //Pick a random midpoint to fly towards.
|
||||
|
||||
spawn M.RepelAirflowDest(abs(n)/5)
|
||||
*/
|
||||
|
||||
proc/AirflowSpace(zone/A)
|
||||
|
||||
return
|
||||
/*
|
||||
//The space version of the Airflow(A,B,n) proc.
|
||||
|
||||
var/n = A.air.return_pressure()
|
||||
@@ -224,6 +228,7 @@ proc/AirflowSpace(zone/A)
|
||||
spawn
|
||||
if(M) M.GotoAirflowDest(n/10)
|
||||
//Sometimes shit breaks, and M isn't there after the spawn.
|
||||
*/
|
||||
|
||||
atom/movable
|
||||
var/tmp/turf/airflow_dest
|
||||
@@ -232,6 +237,8 @@ atom/movable
|
||||
var/tmp/last_airflow = 0
|
||||
|
||||
proc/GotoAirflowDest(n)
|
||||
return
|
||||
/*
|
||||
if(!airflow_dest) return
|
||||
if(airflow_speed < 0) return
|
||||
if(last_airflow > world.time - vsc.airflow_delay) return
|
||||
@@ -294,9 +301,12 @@ atom/movable
|
||||
airflow_time = 0
|
||||
if(od)
|
||||
density = 0
|
||||
*/
|
||||
|
||||
|
||||
proc/RepelAirflowDest(n)
|
||||
return
|
||||
/*
|
||||
if(!airflow_dest) return
|
||||
if(airflow_speed < 0) return
|
||||
if(last_airflow > world.time - vsc.airflow_delay) return
|
||||
@@ -353,30 +363,38 @@ atom/movable
|
||||
airflow_time = 0
|
||||
if(od)
|
||||
density = 0
|
||||
*/
|
||||
|
||||
|
||||
Bump(atom/A)
|
||||
/*
|
||||
if(airflow_speed > 0 && airflow_dest)
|
||||
airflow_hit(A)
|
||||
else
|
||||
airflow_speed = 0
|
||||
airflow_time = 0
|
||||
. = ..()
|
||||
*/
|
||||
. = ..()
|
||||
|
||||
atom/movable/proc/airflow_hit(atom/A)
|
||||
airflow_speed = 0
|
||||
airflow_dest = null
|
||||
|
||||
mob/airflow_hit(atom/A)
|
||||
/*
|
||||
for(var/mob/M in hearers(src))
|
||||
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
|
||||
playsound(src.loc, "smash.ogg", 25, 1, -1)
|
||||
weakened = max(weakened, (istype(A,/obj/item) ? A:w_class : rand(1,5))) //Heheheh
|
||||
*/
|
||||
. = ..()
|
||||
|
||||
obj/airflow_hit(atom/A)
|
||||
/*
|
||||
for(var/mob/M in hearers(src))
|
||||
M.show_message("\red <B>\The [src] slams into \a [A]!</B>",1,"\red You hear a loud slam!",2)
|
||||
playsound(src.loc, "smash.ogg", 25, 1, -1)
|
||||
*/
|
||||
. = ..()
|
||||
|
||||
obj/item/airflow_hit(atom/A)
|
||||
@@ -386,6 +404,7 @@ obj/item/airflow_hit(atom/A)
|
||||
mob/living/carbon/human/airflow_hit(atom/A)
|
||||
// for(var/mob/M in hearers(src))
|
||||
// M.show_message("\red <B>[src] slams into [A]!</B>",1,"\red You hear a loud slam!",2)
|
||||
/*
|
||||
playsound(src.loc, "punch", 25, 1, -1)
|
||||
loc:add_blood(src)
|
||||
if (src.wear_suit)
|
||||
@@ -408,6 +427,7 @@ mob/living/carbon/human/airflow_hit(atom/A)
|
||||
stunned = max(stunned,paralysis + 3)
|
||||
else
|
||||
stunned += round(airflow_speed * vsc.airflow_stun/2)
|
||||
*/
|
||||
. = ..()
|
||||
|
||||
zone/proc/movables()
|
||||
|
||||
@@ -163,7 +163,7 @@ connection
|
||||
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_1.connected_zones[zone_2] > 1)
|
||||
zone_1.connected_zones[zone_2]--
|
||||
else
|
||||
@@ -173,7 +173,7 @@ connection
|
||||
zone_1.connected_zones = null
|
||||
|
||||
//Then do the same for the other zone.
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_2.connected_zones[zone_1] > 1)
|
||||
zone_2.connected_zones[zone_1]--
|
||||
else
|
||||
@@ -186,7 +186,7 @@ connection
|
||||
|
||||
//If there are more than one connection, decrement the number of connections
|
||||
//Otherwise, remove all connections between the zones.
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_1.closed_connection_zones[zone_2] > 1)
|
||||
zone_1.closed_connection_zones[zone_2]--
|
||||
else
|
||||
@@ -196,7 +196,7 @@ connection
|
||||
zone_1.closed_connection_zones = null
|
||||
|
||||
//Then do the same for the other zone.
|
||||
if(zone_1 in zone_2.connected_zones)
|
||||
if(zone_2 in zone_1.connected_zones)
|
||||
if(zone_2.closed_connection_zones[zone_1] > 1)
|
||||
zone_2.closed_connection_zones[zone_1]--
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user