projectiles can pass

This commit is contained in:
S34NW
2021-09-10 19:07:02 +01:00
parent 6e0e36f9c1
commit 0c4dcd1b62
11 changed files with 21 additions and 8 deletions
+1
View File
@@ -103,6 +103,7 @@
#define PASSBLOB 8
#define PASSMOB 16
#define LETPASSTHROW 32
#define PASSFENCE 64
//turf-only flags
#define NOJAUNT 1
+7 -2
View File
@@ -26,12 +26,10 @@
/obj/structure/fence/Initialize()
. = ..()
update_cut_status()
/obj/structure/fence/examine(mob/user)
. = ..()
switch(hole_size)
if(MEDIUM_HOLE)
. += "There is a large hole in \the [src]."
@@ -58,6 +56,13 @@
icon_state = "straight_cut3"
hole_size = LARGE_HOLE
/obj/structure/fence/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSFENCE))
return TRUE
if(!density)
return TRUE
return FALSE
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
// Totally not stolen from code\game\objects\structures\grille.dm
+5 -1
View File
@@ -5,6 +5,7 @@
icon_state = "railing"
density = TRUE
anchored = TRUE
pass_flags = LETPASSTHROW
climbable = TRUE
layer = ABOVE_MOB_LAYER
var/currently_climbed = FALSE
@@ -64,6 +65,8 @@
return TRUE
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSFENCE))
return TRUE
..()
var/mob/living/M = mover
if(M.flying || M.floating || mover.throwing)
@@ -73,10 +76,11 @@
return TRUE
/obj/structure/railing/corner/CanPass()
..()
return TRUE
/obj/structure/railing/CheckExit(atom/movable/O, target)
if(istype(O) && O.checkpass(PASSFENCE))
return TRUE
var/mob/living/M = O
if(M.flying | M.floating)
return TRUE
+1 -1
View File
@@ -215,7 +215,7 @@
var/life_cycles = 0
var/life_cap = 20
anchored = TRUE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSFENCE
/obj/effect/beam/i_beam/proc/hit()
+1 -1
View File
@@ -70,7 +70,7 @@
damage = 60
damage_type = BRUTE
flag = "bullet"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSFENCE
weaken = 5
stun = 5
+1 -1
View File
@@ -81,7 +81,7 @@
if(!istype(user_turf))
return 0
var/obj/dummy = new(user_turf)
dummy.pass_flags |= PASSTABLE & PASSGLASS & PASSGRILLE //Grille/Glass so it can be used through common windows
dummy.pass_flags |= PASSTABLE & PASSGLASS & PASSGRILLE & PASSFENCE //Grille/Glass so it can be used through common windows
for(var/turf/turf in getline(user_turf,target))
if(turf.density)
qdel(dummy)
+1 -1
View File
@@ -1,7 +1,7 @@
/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSFENCE
damage = 20
damage_type = BURN
hitsound = 'sound/weapons/sear.ogg'
@@ -6,6 +6,7 @@
flag = "bullet"
hitsound_wall = "ricochet"
impact_effect_type = /obj/effect/temp_visual/impact_effect
pass_flags = PASSFENCE
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
name = "beanbag slug"
@@ -5,6 +5,7 @@
damage_type = BURN
flag = "energy"
is_reflectable = TRUE
pass_flags = PASSFENCE
/obj/item/projectile/energy/electrode
name = "electrode"
@@ -6,6 +6,7 @@
nodamage = 1
armour_penetration = 100
flag = "magic"
pass_flags = PASSFENCE
/obj/item/projectile/magic/death
name = "bolt of death"
@@ -53,7 +53,7 @@
nodamage = 1
flag = "energy"
var/temperature = 300
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSFENCE
/obj/item/projectile/temp/New(loc, shot_temp)
..()