mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Repathed /obj/item/projectile to /obj/projectile (#19693)
Repathed /obj/item/projectile to /obj/projectile, same as TG and Bay, that's pretty much it.
This commit is contained in:
@@ -85,14 +85,14 @@
|
||||
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0))
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
if(istype(mover, /obj/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if (get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/structure/barricade/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
/obj/structure/barricade/proc/check_cover(obj/projectile/P, turf/from)
|
||||
var/turf/cover = get_turf(src)
|
||||
if(!cover)
|
||||
return TRUE
|
||||
@@ -197,7 +197,7 @@
|
||||
playsound(src, barricade_hitsound, 25, 1)
|
||||
hit_barricade(attacking_item, user)
|
||||
|
||||
/obj/structure/barricade/bullet_act(obj/item/projectile/P)
|
||||
/obj/structure/barricade/bullet_act(obj/projectile/P)
|
||||
bullet_ping(P)
|
||||
var/damage_to_take = P.damage * P.anti_materiel_potential
|
||||
take_damage(damage_to_take)
|
||||
|
||||
@@ -316,12 +316,12 @@
|
||||
new /obj/item/stack/material/steel(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/closet/bullet_act(var/obj/projectile/Proj)
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(!proj_damage)
|
||||
return
|
||||
|
||||
if(Proj.penetrating || istype(Proj, /obj/item/projectile/bullet))
|
||||
if(Proj.penetrating || istype(Proj, /obj/projectile/bullet))
|
||||
var/distance = get_dist(Proj.starting, get_turf(loc))
|
||||
for(var/mob/living/L in contents)
|
||||
Proj.attack_mob(L, distance)
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/closet/statue/bullet_act(var/obj/projectile/Proj)
|
||||
health -= Proj.get_structure_damage()
|
||||
check_health()
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
if (istype(mover,/obj/item/projectile))
|
||||
if (istype(mover,/obj/projectile))
|
||||
// Crates on a table always block shots, otherwise they only occasionally do so.
|
||||
return tablestatus == ABOVE_TABLE ? FALSE : (prob(15) ? FALSE : TRUE)
|
||||
else if((istype(mover) && (mover.pass_flags & PASSTABLE)) && tablestatus == ABOVE_TABLE)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
layer = ABOVE_HUMAN_LAYER
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
|
||||
/obj/structure/curtain/bullet_act(obj/projectile/P, def_zone)
|
||||
if(!P.nodamage)
|
||||
visible_message(SPAN_WARNING("[P] tears [src] down!"))
|
||||
qdel(src)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
health_check()
|
||||
|
||||
|
||||
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/displaycase/bullet_act(var/obj/projectile/Proj)
|
||||
health -= Proj.get_structure_damage()
|
||||
..()
|
||||
health_check()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
health = 50
|
||||
cover = 25
|
||||
|
||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/girder/bullet_act(var/obj/projectile/Proj)
|
||||
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||
if(Proj.original != src && !prob(cover))
|
||||
return PROJECTILE_CONTINUE //pass through
|
||||
@@ -50,7 +50,7 @@
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
if(!istype(Proj, /obj/item/projectile/beam))
|
||||
if(!istype(Proj, /obj/projectile/beam))
|
||||
damage *= 0.4 //non beams do reduced damage
|
||||
|
||||
take_damage(damage)
|
||||
@@ -376,7 +376,7 @@
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (!mover)
|
||||
return 1
|
||||
if(istype(mover,/obj/item/projectile) && density)
|
||||
if(istype(mover,/obj/projectile) && density)
|
||||
if (prob(50))
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
visible_message(SPAN_WARNING(final_message))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/gore/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/gore/bullet_act(var/obj/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
healthcheck()
|
||||
return ..()
|
||||
|
||||
@@ -107,12 +107,12 @@
|
||||
if(istype(mover) && mover.pass_flags & PASSGRILLE)
|
||||
return 1
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
if(istype(mover, /obj/projectile))
|
||||
return prob(30)
|
||||
else
|
||||
return !density
|
||||
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/grille/bullet_act(var/obj/projectile/Proj)
|
||||
if(!Proj) return
|
||||
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if(health <= 0)
|
||||
topple()
|
||||
|
||||
/obj/structure/hadii_statue/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/hadii_statue/bullet_act(var/obj/projectile/Proj)
|
||||
if(toppled)
|
||||
return
|
||||
if(!Proj)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/inflatable/bullet_act(var/obj/projectile/Proj)
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(!proj_damage)
|
||||
return
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
if(istype(mover, /mob/living) && mover == pulling)
|
||||
return 1
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
if(istype(mover, /obj/projectile))
|
||||
return prob(30)
|
||||
else
|
||||
return !density
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if (!mover)
|
||||
return 1
|
||||
|
||||
if(istype(mover,/obj/item/projectile) && density)
|
||||
if(istype(mover,/obj/projectile) && density)
|
||||
if (!occupied && prob(80))
|
||||
//Wiry frame, usually wont be cover
|
||||
return 1
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
reflection.update_mirror_filters()
|
||||
|
||||
|
||||
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/mirror/bullet_act(var/obj/projectile/Proj)
|
||||
if(prob(Proj.get_structure_damage() * 2))
|
||||
if(!shattered)
|
||||
shatter()
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
. += FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[anchored ? "" : "not"] screwed</b> to the floor."))
|
||||
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
if(istype(mover,/obj/projectile))
|
||||
return TRUE
|
||||
if(!istype(mover) || mover.pass_flags & PASSRAILING)
|
||||
return TRUE
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/simple_door/bullet_act(var/obj/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
bullet_ping(Proj)
|
||||
CheckHealth()
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/rod_railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
if(istype(mover,/obj/projectile))
|
||||
return TRUE
|
||||
if(!istype(mover) || mover.pass_flags & PASSRAILING)
|
||||
return TRUE
|
||||
@@ -315,7 +315,7 @@
|
||||
icon_state = "guard_top_end"
|
||||
|
||||
/obj/structure/road_barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
if(istype(mover,/obj/projectile))
|
||||
return TRUE
|
||||
if(!istype(mover) || mover.pass_flags & PASSRAILING)
|
||||
return TRUE
|
||||
@@ -347,8 +347,8 @@
|
||||
/obj/structure/chainlink_fence/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
|
||||
if(air_group || (height==0))
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = mover
|
||||
if(istype(mover, /obj/projectile))
|
||||
var/obj/projectile/P = mover
|
||||
if(P.original == src)
|
||||
return FALSE
|
||||
if(P.firer && Adjacent(P.firer))
|
||||
@@ -380,7 +380,7 @@
|
||||
can_be_unanchored = FALSE
|
||||
|
||||
/obj/structure/rope_railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
if(istype(mover,/obj/projectile))
|
||||
return TRUE
|
||||
if(!istype(mover) || mover.pass_flags & PASSRAILING)
|
||||
return TRUE
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/window/bullet_act(var/obj/projectile/Proj)
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(!proj_damage)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user