[DNM][DNM][WIP] Projectile backend code port and update

Ports#54924,  #65061, #59804 from /tg.
adds auxiliary code from /tg to make code work.
This commit is contained in:
Solaris-Shade
2022-03-06 15:20:23 -05:00
parent 8b77ee159f
commit 2fdb70b2b9
84 changed files with 597 additions and 503 deletions
+8 -17
View File
@@ -37,22 +37,19 @@
else
return ..()
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
/obj/structure/barricade/CanAllowThrough(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
. = ..()
if(locate(/obj/structure/barricade) in get_turf(mover))
return 1
return TRUE
else if(istype(mover, /obj/item/projectile))
if(!anchored)
return 1
return TRUE
var/obj/item/projectile/proj = mover
if(proj.firer && Adjacent(proj.firer))
return 1
return TRUE
if(prob(proj_pass_rate))
return 1
return 0
else
return !density
return TRUE
return FALSE
/////BARRICADE TYPES///////
@@ -79,7 +76,6 @@
return
return ..()
/obj/structure/barricade/wooden/crude
name = "crude plank barricade"
desc = "This space is blocked off by a crude assortment of planks."
@@ -96,7 +92,6 @@
/obj/structure/barricade/wooden/make_debris()
new /obj/item/stack/sheet/mineral/wood(get_turf(src), drop_amount)
/obj/structure/barricade/sandbags
name = "sandbags"
desc = "Bags of sand. Self explanatory."
@@ -104,13 +99,12 @@
icon_state = "sandbags"
max_integrity = 280
proj_pass_rate = 20
pass_flags = LETPASSTHROW
pass_flags_self = LETPASSTHROW
bar_material = SAND
climbable = TRUE
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/barricade/sandbags, /turf/closed/wall, /turf/closed/wall/r_wall, /obj/structure/falsewall, /obj/structure/falsewall/reinforced, /turf/closed/wall/rust, /turf/closed/wall/r_wall/rust, /obj/structure/barricade/security)
/obj/structure/barricade/security
name = "security barrier"
desc = "A deployable barrier. Provides good cover in fire fights."
@@ -125,7 +119,6 @@
var/deploy_time = 40
var/deploy_message = TRUE
/obj/structure/barricade/security/Initialize()
. = ..()
addtimer(CALLBACK(src, .proc/deploy), deploy_time)
@@ -137,7 +130,6 @@
if(deploy_message)
visible_message("<span class='warning'>[src] deploys!</span>")
/obj/item/grenade/barrier
name = "barrier grenade"
desc = "Instant cover."
@@ -194,7 +186,6 @@
/obj/item/grenade/barrier/ui_action_click(mob/user)
toggle_mode(user)
#undef SINGLE
#undef VERTICAL
#undef HORIZONTAL