mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 00:27:31 +01:00
CTF guns only hurt mobs with CTF armor (#22284)
* CTF guns only hurt mobs with CTF armor This is moving towards the possiblity of spawning CTF spawns and flag spawns onto the station without people being caught in the crossfire. * Debug messages are bad
This commit is contained in:
@@ -334,6 +334,7 @@
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/ctf
|
||||
desc = "This looks like it could really hurt in melee."
|
||||
force = 75
|
||||
mag_type = /obj/item/ammo_box/magazine/m50/ctf
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/ctf/dropped()
|
||||
. = ..()
|
||||
@@ -343,6 +344,20 @@
|
||||
if(isturf(loc))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/ammo_box/magazine/m50/ctf
|
||||
ammo_type = /obj/item/ammo_casing/a50/ctf
|
||||
|
||||
/obj/item/ammo_casing/a50/ctf
|
||||
projectile_type = /obj/item/projectile/bullet/ctf
|
||||
|
||||
/obj/item/projectile/bullet/ctf
|
||||
damage = 0
|
||||
|
||||
/obj/item/projectile/bullet/ctf/prehit(atom/target)
|
||||
if(is_ctf_target(target))
|
||||
damage = 60
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/laser/ctf
|
||||
mag_type = /obj/item/ammo_box/magazine/recharge/ctf
|
||||
desc = "This looks like it could really hurt in melee."
|
||||
@@ -364,9 +379,23 @@
|
||||
projectile_type = /obj/item/projectile/beam/ctf
|
||||
|
||||
/obj/item/projectile/beam/ctf
|
||||
damage = 150
|
||||
damage = 0
|
||||
icon_state = "omnilaser"
|
||||
|
||||
/obj/item/projectile/beam/ctf/prehit(atom/target)
|
||||
if(is_ctf_target(target))
|
||||
damage = 150
|
||||
. = ..()
|
||||
|
||||
/proc/is_ctf_target(atom/target)
|
||||
. = FALSE
|
||||
if(istype(target, /obj/structure/barricade/security/ctf))
|
||||
. = TRUE
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit/shielded/ctf))
|
||||
. = TRUE
|
||||
|
||||
// RED TEAM GUNS
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/laser/ctf/red
|
||||
|
||||
@@ -1234,7 +1234,6 @@
|
||||
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
if(/obj/item/projectile/energy/florayield)
|
||||
H.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
return
|
||||
|
||||
/datum/species/proc/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
|
||||
// called before a projectile hit
|
||||
|
||||
@@ -74,6 +74,9 @@
|
||||
else //when a limb is missing the damage is actually passed to the chest
|
||||
return "chest"
|
||||
|
||||
/obj/item/projectile/proc/prehit(atom/target)
|
||||
return
|
||||
|
||||
/obj/item/projectile/proc/on_hit(atom/target, blocked = 0)
|
||||
var/turf/target_loca = get_turf(target)
|
||||
if(!isliving(target))
|
||||
@@ -145,6 +148,7 @@
|
||||
|
||||
var/turf/target_turf = get_turf(A)
|
||||
|
||||
prehit(A)
|
||||
var/permutation = A.bullet_act(src, def_zone) // searches for return value, could be deleted after run so check A isn't null
|
||||
if(permutation == -1 || forcedodge)// the bullet passes through a dense object!
|
||||
loc = target_turf
|
||||
@@ -158,6 +162,7 @@
|
||||
mobs_list += L
|
||||
if(mobs_list.len)
|
||||
var/mob/living/picked_mob = pick(mobs_list)
|
||||
prehit(picked_mob)
|
||||
picked_mob.bullet_act(src, def_zone)
|
||||
qdel(src)
|
||||
|
||||
@@ -168,6 +173,7 @@
|
||||
if(!log_override && firer && original)
|
||||
add_logs(firer, original, "fired at", src, " [get_area(src)]")
|
||||
if(direct_target)
|
||||
prehit(direct_target)
|
||||
direct_target.bullet_act(src, def_zone)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user