mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 21:22:40 +00:00
Finishes seperating ZAS logic from CanPass().
This commit is contained in:
@@ -22,10 +22,8 @@
|
||||
update_icon()
|
||||
return ..(loc)
|
||||
|
||||
/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target, var/height = 0, var/air_group = 0)
|
||||
if(air_group || height == 0)
|
||||
return 1
|
||||
return 0
|
||||
/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target)
|
||||
return FALSE
|
||||
|
||||
/obj/effect/blob/ex_act(var/severity)
|
||||
switch(severity)
|
||||
@@ -207,5 +205,5 @@
|
||||
else
|
||||
icon_state = "blob_damaged"
|
||||
|
||||
/obj/effect/blob/shield/CanPass(var/atom/movable/mover, var/turf/target, var/height = 0, var/air_group = 0)
|
||||
/obj/effect/blob/shield/CanPass(var/atom/movable/mover, var/turf/target)
|
||||
return !density
|
||||
|
||||
@@ -46,30 +46,19 @@ var/list/blobs = list()
|
||||
color = null
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
world << "/obj/structure/blob/CanPass(mover=[mover], target=[target], height=[height], air_group=[air_group]) called on [src]."
|
||||
if(air_group || (height==0))
|
||||
world << "Returned true due to being air group or having height=0"
|
||||
return TRUE
|
||||
// Blob tiles are not actually dense so we need Special Code(tm).
|
||||
/obj/structure/blob/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSBLOB))
|
||||
world << "Returned true due to having PASSBLOB."
|
||||
return TRUE
|
||||
else if(istype(mover, /mob/living))
|
||||
var/mob/living/L = mover
|
||||
if(L.faction == "blob")
|
||||
world << "Returned true due to being in blob faction."
|
||||
return TRUE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(P.firer && P.firer.faction == "blob")
|
||||
world << "Returned true due to being a projectile fired by someone in blob faction."
|
||||
if(istype(P.firer) && P.firer.faction == "blob")
|
||||
return TRUE
|
||||
world << "Returned false due to being a projectile, with firer not in faction."
|
||||
return FALSE
|
||||
else
|
||||
world << "Returned false."
|
||||
return FALSE
|
||||
// return ..()
|
||||
return FALSE
|
||||
|
||||
/obj/structure/blob/examine(mob/user)
|
||||
..()
|
||||
@@ -264,7 +253,7 @@ var/list/blobs = list()
|
||||
if(!P)
|
||||
return
|
||||
|
||||
if(P.firer && P.firer.faction == "blob")
|
||||
if(istype(P.firer) && P.firer.faction == "blob")
|
||||
return
|
||||
|
||||
var/damage = P.get_structure_damage() // So tasers don't hurt the blob.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
desc = "A solid wall of slightly twitching tendrils."
|
||||
max_integrity = 100
|
||||
point_return = 4
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
|
||||
/obj/structure/blob/shield/core
|
||||
point_return = 0
|
||||
|
||||
@@ -320,19 +320,18 @@
|
||||
visible_message("<span class='notice'>[user] dunks [W] into the [src]!</span>", 3)
|
||||
return
|
||||
|
||||
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target)
|
||||
if (istype(mover,/obj/item) && mover.throwing)
|
||||
var/obj/item/I = mover
|
||||
if(istype(I, /obj/item/projectile))
|
||||
return
|
||||
return TRUE
|
||||
if(prob(50))
|
||||
I.loc = src.loc
|
||||
visible_message("<span class='notice'>Swish! \the [I] lands in \the [src].</span>", 3)
|
||||
I.forceMove(loc)
|
||||
visible_message(span("notice", "Swish! \the [I] lands in \the [src]."), 3)
|
||||
else
|
||||
visible_message("<span class='warning'>\The [I] bounces off of \the [src]'s rim!</span>", 3)
|
||||
return 0
|
||||
else
|
||||
return ..(mover, target, height, air_group)
|
||||
visible_message(span("warning", "\The [I] bounces off of \the [src]'s rim!"), 3)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/readybutton
|
||||
|
||||
@@ -217,13 +217,10 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/check_health()
|
||||
if(seed && !dead && health <= 0)
|
||||
|
||||
@@ -143,8 +143,8 @@
|
||||
var/mob/observer/dead/M = src
|
||||
M.manifest(user)
|
||||
|
||||
/mob/observer/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 1
|
||||
/mob/observer/dead/CanPass(atom/movable/mover, turf/target)
|
||||
return TRUE
|
||||
/*
|
||||
Transfer_mind is there to check if mob is being deleted/not going to have a body.
|
||||
Works together with spawning an observer, noted above.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
/mob/CanPass(atom/movable/mover, turf/target)
|
||||
if(ismob(mover))
|
||||
var/mob/moving_mob = mover
|
||||
if ((other_mobs && moving_mob.other_mobs))
|
||||
@@ -9,4 +9,4 @@
|
||||
return (!mover.density || !density || lying)
|
||||
|
||||
/mob/CanZASPass(turf/T, is_zone)
|
||||
return TRUE
|
||||
return ATMOS_PASS_YES
|
||||
@@ -74,9 +74,8 @@ proc/cardinalrange(var/center)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
return 0
|
||||
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target)
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/process()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
/obj/effect/fusion_particle_catcher/CanPass(var/atom/movable/mover, var/turf/target, var/height=0, var/air_group=0)
|
||||
/obj/effect/fusion_particle_catcher/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/effect/accelerated_particle) || istype(mover, /obj/item/projectile/beam))
|
||||
return !density
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -95,10 +95,8 @@
|
||||
stat |= BROKEN
|
||||
|
||||
// When anchored, don't let air past us.
|
||||
/obj/machinery/compressor/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(!height || air_group)
|
||||
return !anchored
|
||||
return !density
|
||||
/obj/machinery/compressor/CanZASPass(turf/T, is_zone)
|
||||
return anchored ? ATMOS_PASS_NO : ATMOS_PASS_YES
|
||||
|
||||
/obj/machinery/compressor/proc/locate_machinery()
|
||||
if(turbine)
|
||||
|
||||
@@ -467,7 +467,7 @@
|
||||
H.vent_gas(loc)
|
||||
qdel(H)
|
||||
|
||||
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return 1
|
||||
if (istype(mover,/obj/item) && mover.throwing)
|
||||
@@ -483,7 +483,7 @@
|
||||
M.show_message("\The [I] bounces off of \the [src]'s rim!", 3)
|
||||
return 0
|
||||
else
|
||||
return ..(mover, target, height, air_group)
|
||||
return ..(mover, target)
|
||||
|
||||
// virtual disposal object
|
||||
// travels through pipes in lieu of actual items
|
||||
|
||||
@@ -53,10 +53,8 @@
|
||||
projector = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/directional_shield/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0))
|
||||
return TRUE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
/obj/effect/directional_shield/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(istype(P, /obj/item/projectile/test)) // Turrets need to try to kill the shield and so their test bullet needs to penetrate.
|
||||
return TRUE
|
||||
@@ -64,8 +62,6 @@
|
||||
var/bad_arc = reverse_direction(dir) // Arc of directions from which we cannot block.
|
||||
if(check_shield_arc(src, bad_arc, P)) // This is actually for mobs but it will work for our purposes as well.
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/effect/directional_shield/bullet_act(var/obj/item/projectile/P)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
var/const/max_health = 200
|
||||
var/health = max_health //The shield can only take so much beating (prevents perma-prisons)
|
||||
var/shield_generate_power = 7500 //how much power we use when regenerating
|
||||
@@ -38,10 +39,6 @@
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
if(!height || air_group) return 0
|
||||
else return ..()
|
||||
|
||||
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!istype(W)) return
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
plane = MOB_PLANE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
density = 0
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
var/obj/machinery/shield_gen/my_gen = null
|
||||
var/strength = 0 // in Renwicks
|
||||
var/ticks_recovering = 10
|
||||
@@ -103,15 +104,6 @@
|
||||
update_icon()
|
||||
update_nearby_tiles()
|
||||
|
||||
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
||||
//Called by: Movement, airflow.
|
||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
||||
//Outputs: Boolean if can pass.
|
||||
|
||||
//return (!density || !height || air_group)
|
||||
return !density
|
||||
|
||||
/obj/effect/energy_field/update_icon(var/update_neightbors = 0)
|
||||
overlays.Cut()
|
||||
var/list/adjacent_shields_dir = list()
|
||||
|
||||
@@ -317,13 +317,9 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return prob(20)
|
||||
else
|
||||
if (istype(mover, /obj/item/projectile))
|
||||
return prob(10)
|
||||
else
|
||||
return !src.density
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(10)
|
||||
return !density
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
if(air_group || (height==0)) return 1
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if (flipped == 1)
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
return TRUE
|
||||
if(locate(/obj/structure/table/bench) in get_turf(mover))
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
|
||||
if(table && !table.flipped)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
|
||||
Reference in New Issue
Block a user