diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 9e94460dcbd..7ffcfa0e7ce 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -360,4 +360,9 @@ var/list/bloody_footprints_cache = list() #define EARLY_LAUNCHED 2 //Just space -#define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]" \ No newline at end of file +#define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]" + +//Gun trigger guards +#define TRIGGER_GUARD_ALLOW_ALL -1 +#define TRIGGER_GUARD_NONE 0 +#define TRIGGER_GUARD_NORMAL 1 \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 989ed1bf936..ce5ba1cba23 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -153,7 +153,7 @@ /mob/living/carbon/human/can_use_guns(var/obj/item/weapon/gun/G) . = ..() - if(G.trigger_guard) + if(G.trigger_guard == TRIGGER_GUARD_NORMAL) if(src.dna.check_mutation(HULK)) src << "Your meaty finger is much too large for the trigger guard!" return 0 @@ -165,4 +165,4 @@ src << "Use of ranged weaponry would bring dishonor to the clan." return 0 - return . + return . diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7d78d0a2e66..679927978c3 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -968,7 +968,7 @@ Sorry Giacom. Please don't be mad :( src << "You don't have the dexterity to do this!" return /mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G) - if (!IsAdvancedToolUser()) + if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser()) src << "You don't have the dexterity to do this!" return 0 return 1 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 60e546f65b4..0070be79669 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -27,7 +27,7 @@ var/recoil = 0 //boom boom shake the room var/clumsy_check = 1 var/obj/item/ammo_casing/chambered = null - var/trigger_guard = 1 //trigger guard on the weapon, hulks can't fire them with their big meaty fingers + var/trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers var/sawn_desc = null //description change if weapon is sawn-off var/sawn_state = SAWN_INTACT var/burst_size = 1 //how large a burst is diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index d49f0bf093b..e1eae1a20f8 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -38,7 +38,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser) heavy_weapon = 1 can_flashlight = 0 - trigger_guard = 0 + trigger_guard = TRIGGER_GUARD_NONE ammo_x_offset = 2 /obj/item/weapon/gun/energy/gun/nuclear diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 685483285a3..1600fc21096 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -16,7 +16,7 @@ var/no_den_usage origin_tech = null clumsy_check = 0 - trigger_guard = 0 + trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead pin = /obj/item/device/firing_pin/magic lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands diff --git a/code/modules/projectiles/guns/mounted.dm b/code/modules/projectiles/guns/mounted.dm index 177445f3b43..c5b050ff94e 100644 --- a/code/modules/projectiles/guns/mounted.dm +++ b/code/modules/projectiles/guns/mounted.dm @@ -7,6 +7,7 @@ force = 5 selfcharge = 1 can_flashlight = 0 + trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead /obj/item/weapon/gun/energy/gun/advtaser/mounted/dropped()//if somebody manages to drop this somehow... ..() @@ -20,6 +21,7 @@ item_state = "armcannonlase" force = 5 selfcharge = 1 + trigger_guard = TRIGGER_GUARD_ALLOW_ALL /obj/item/weapon/gun/energy/laser/mounted/dropped() ..()