From 6c797b906dd58c0e2e0166bb709507e72bad454e Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Tue, 27 Jul 2021 21:16:54 -0400 Subject: [PATCH] Fix some CanPass stuff --- code/ZAS/Atom.dm | 8 -------- code/ZAS/Fire.dm | 2 +- code/game/atoms.dm | 8 ++++++++ code/game/objects/effects/decals/Cleanable/fuel.dm | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index 06305182b37..cb17cc4ea38 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -3,14 +3,6 @@ /atom/var/pressure_resistance = ONE_ATMOSPHERE /atom/var/can_atmos_pass = ATMOS_PASS_YES -// Purpose: Determines if the object can pass this atom. -// Called by: Movement. -// Inputs: The moving atom, target turf. -// Outputs: Boolean if can pass. -// Airflow and ZAS zones now uses CanZASPass() instead of this proc. -/atom/proc/CanPass(atom/movable/mover, turf/target) - return !density - // Purpose: Determines if airflow is allowed between T and loc. // Called by: Airflow. // Inputs: The turf the airflow is from, which may not be the same as loc. is_zone is for conditionally disallowing merging. diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index e67d2ad3acd..015ffa36a92 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -170,7 +170,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin continue //Spread the fire. - if(prob( 50 + 50 * (firelevel/vsc.fire_firelevel_multiplier) ) && my_tile.CanPass(null, enemy_tile, 0,0) && enemy_tile.CanPass(null, my_tile, 0,0)) + if(prob( 50 + 50 * (firelevel/vsc.fire_firelevel_multiplier) ) && my_tile.CanPass(src, enemy_tile) && enemy_tile.CanPass(src, my_tile)) enemy_tile.create_fire(firelevel) else diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3e4b2776960..07c1ed38510 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -715,3 +715,11 @@ /atom/proc/interact(mob/user) return + +// Purpose: Determines if the object can pass this atom. +// Called by: Movement. +// Inputs: The moving atom, target turf. +// Outputs: Boolean if can pass. +// Airflow and ZAS zones now uses CanZASPass() instead of this proc. +/atom/proc/CanPass(atom/movable/mover, turf/target) + return !density \ No newline at end of file diff --git a/code/game/objects/effects/decals/Cleanable/fuel.dm b/code/game/objects/effects/decals/Cleanable/fuel.dm index 2ea550d66d7..4661d42ca67 100644 --- a/code/game/objects/effects/decals/Cleanable/fuel.dm +++ b/code/game/objects/effects/decals/Cleanable/fuel.dm @@ -38,7 +38,7 @@ for(var/d in cardinal) var/turf/simulated/target = get_step(src,d) var/turf/simulated/origin = get_turf(src) - if(origin.CanPass(null, target, 0, 0) && target.CanPass(null, origin, 0, 0)) + if(origin.CanPass(src, target) && target.CanPass(src, origin)) var/obj/effect/decal/cleanable/liquid_fuel/other_fuel = locate() in target if(other_fuel) other_fuel.amount += amount*0.25 @@ -73,7 +73,7 @@ var/turf/simulated/O = get_step(S,d) if(locate(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel) in O) continue - if(O.CanPass(null, S, 0, 0) && S.CanPass(null, O, 0, 0)) + if(O.CanPass(src, S) && S.CanPass(src, O)) var/new_pool_amount = amount * 0.25 if(new_pool_amount > 0.1) var/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel/F = new(O, new_pool_amount, d)