Whether or not a pacifist can fire a gun is no longer based on the gun being harmful, but the chambered round being harmful (#36670)

fix: makes dragnet non harmful
tweak: pacifists can now use any disabler or stun setting on any energy gun
code: removed all of the pacifism check code from code/modules/mob/living/living.dm
code: gun objects no longer have a harmful variable, instead, ammo_casing objects now have a harmful variable, which is by default set to TRUE
code: if a pacifist fires a gun, it checks whether or not the round chambered is lethal, instead of whether or not the gun itself is lethal.
This commit is contained in:
iksyp
2018-04-11 02:59:03 -07:00
committed by CitadelStationBot
parent 4063781baf
commit 5a06fd98ed
14 changed files with 23 additions and 26 deletions
@@ -18,6 +18,7 @@
var/click_cooldown_override = 0 //Override this to make your gun have a faster fire rate, in tenths of a second. 4 is the default gun cooldown.
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired.
var/heavy_metal = TRUE
var/harmful = TRUE //pacifism check for boolet, set to FALSE if bullet is non-lethal
/obj/item/ammo_casing/Initialize()
@@ -6,6 +6,7 @@
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foamdart"
var/modified = 0
harmful = FALSE
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
..()
@@ -32,6 +33,7 @@
else if (istype(A, /obj/item/pen))
if(modified)
if(!FD.pen)
harmful = TRUE
if(!user.transferItemToLoc(A, FD))
return
FD.pen = A
@@ -18,6 +18,7 @@
/obj/item/ammo_casing/energy/laser/practice
projectile_type = /obj/item/projectile/beam/practice
select_name = "practice"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/scatter
projectile_type = /obj/item/projectile/beam/scatter
@@ -29,6 +30,7 @@
projectile_type = /obj/item/projectile/beam/disabler
pellets = 3
variance = 15
harmful = FALSE
/obj/item/ammo_casing/energy/laser/heavy
projectile_type = /obj/item/projectile/beam/laser/heavylaser
@@ -44,6 +46,7 @@
/obj/item/ammo_casing/energy/laser/bluetag
projectile_type = /obj/item/projectile/beam/lasertag/bluetag
select_name = "bluetag"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/bluetag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/bluetag/hitscan
@@ -51,6 +54,7 @@
/obj/item/ammo_casing/energy/laser/redtag
projectile_type = /obj/item/projectile/beam/lasertag/redtag
select_name = "redtag"
harmful = FALSE
/obj/item/ammo_casing/energy/laser/redtag/hitscan
projectile_type = /obj/item/projectile/beam/lasertag/redtag/hitscan
@@ -10,6 +10,7 @@
/obj/item/ammo_casing/energy/flora
fire_sound = 'sound/effects/stealthoff.ogg'
harmful = FALSE
/obj/item/ammo_casing/energy/flora/yield
projectile_type = /obj/item/projectile/energy/florayield
@@ -38,10 +39,12 @@
select_name = "netting"
pellets = 6
variance = 40
harmful = FALSE
/obj/item/ammo_casing/energy/trap
projectile_type = /obj/item/projectile/energy/trap
select_name = "snare"
harmful = FALSE
/obj/item/ammo_casing/energy/instakill
projectile_type = /obj/item/projectile/beam/instakill
@@ -3,6 +3,7 @@
select_name = "stun"
fire_sound = 'sound/weapons/taser.ogg'
e_cost = 200
harmful = FALSE
/obj/item/ammo_casing/energy/electrode/spec
e_cost = 100
@@ -22,3 +23,4 @@
select_name = "disable"
e_cost = 50
fire_sound = 'sound/weapons/taser2.ogg'
harmful = FALSE
@@ -13,15 +13,18 @@
/obj/item/ammo_casing/magic/heal
projectile_type = /obj/item/projectile/magic/resurrection
harmful = FALSE
/obj/item/ammo_casing/magic/death
projectile_type = /obj/item/projectile/magic/death
/obj/item/ammo_casing/magic/teleport
projectile_type = /obj/item/projectile/magic/teleport
harmful = FALSE
/obj/item/ammo_casing/magic/door
projectile_type = /obj/item/projectile/magic/door
harmful = FALSE
/obj/item/ammo_casing/magic/fireball
projectile_type = /obj/item/projectile/magic/aoe/fireball