From 397347d1f2ca0d6e4a70fd46b6de673bceba48d2 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:42:07 -0700 Subject: [PATCH 1/7] Update energy.dm --- code/modules/projectiles/guns/energy.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index b2ec3dea63ce..c3ac3d80f302 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -214,6 +214,7 @@ charge_icon = "+taser" black_market_value = 20 actions_types = list(/datum/action/item_action/taser/change_mode) + flags_gun_features = GUN_CANT_EXECUTE /// Determines if the taser will hit any target, or if it checks for wanted status. Default is wanted only. var/mode = TASER_MODE_P var/skilllock = SKILL_POLICE_SKILLED From df5f5186cb4f7e707672349e840f93a0204c3191 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:46:00 -0700 Subject: [PATCH 2/7] Update conflict.dm --- code/__DEFINES/conflict.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index a6a7aa53f182..9a3811a10f59 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -54,6 +54,7 @@ #define GUN_TRIGGER_SAFETY (1<<1) #define GUN_UNUSUAL_DESIGN (1<<2) #define GUN_SILENCED (1<<3) +#define GUN_CANT_EXECUTE (1<<4) ///If checking for ammo with current.mag you have to check it against numerical values, as booleans will not trigger. #define GUN_INTERNAL_MAG (1<<4) #define GUN_AUTO_EJECTOR (1<<5) From dc3dd4068ee861dad4471c53e57790fd8871e3bf Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:49:18 -0700 Subject: [PATCH 3/7] Update bitfields.dm --- code/_globalvars/bitfields.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index facc2b951ad3..a21bee21cc35 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -105,6 +105,7 @@ DEFINE_BITFIELD(projectile_flags, list( DEFINE_BITFIELD(flags_gun_features, list( "GUN_CAN_POINTBLANK" = GUN_CAN_POINTBLANK, + "GUN_CANT_EXECUTE" = GUN_CANT_EXECUTE, "GUN_TRIGGER_SAFETY" = GUN_TRIGGER_SAFETY, "GUN_UNUSUAL_DESIGN" = GUN_UNUSUAL_DESIGN, "GUN_SILENCED" = GUN_SILENCED, From 0bd612a7866e0e0cc70d186466b2f1ad111972b8 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:55:40 -0700 Subject: [PATCH 4/7] Update gun.dm --- code/modules/projectiles/gun.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index f7ffbf2875e2..e841d3ac3cff 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -1336,6 +1336,8 @@ and you're good to go. if(EXECUTION_CHECK) //Execution if(!able_to_fire(user)) //Can they actually use guns in the first place? return ..() + if(flags_gun_features & GUN_CANT_EXECUTE) + return ..() user.visible_message(SPAN_DANGER("[user] puts [src] up to [attacked_mob], steadying their aim."), SPAN_WARNING("You put [src] up to [attacked_mob], steadying your aim."),null, null, CHAT_TYPE_COMBAT_ACTION) if(!do_after(user, 3 SECONDS, INTERRUPT_ALL|INTERRUPT_DIFF_INTENT, BUSY_ICON_HOSTILE)) return TRUE From 6e0e70be69bd29254bb144ea4e01130705f7453a Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:03:58 -0700 Subject: [PATCH 5/7] woops --- code/__DEFINES/conflict.dm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index 9a3811a10f59..17fd8b32c280 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -56,23 +56,23 @@ #define GUN_SILENCED (1<<3) #define GUN_CANT_EXECUTE (1<<4) ///If checking for ammo with current.mag you have to check it against numerical values, as booleans will not trigger. -#define GUN_INTERNAL_MAG (1<<4) -#define GUN_AUTO_EJECTOR (1<<5) -#define GUN_AMMO_COUNTER (1<<6) -#define GUN_BURST_FIRING (1<<7) -#define GUN_FLASHLIGHT_ON (1<<8) -#define GUN_WY_RESTRICTED (1<<9) -#define GUN_SPECIALIST (1<<10) -#define GUN_WIELDED_FIRING_ONLY (1<<11) +#define GUN_INTERNAL_MAG (1<<5) +#define GUN_AUTO_EJECTOR (1<<6) +#define GUN_AMMO_COUNTER (1<<7) +#define GUN_BURST_FIRING (1<<8) +#define GUN_FLASHLIGHT_ON (1<<9) +#define GUN_WY_RESTRICTED (1<<10) +#define GUN_SPECIALIST (1<<11) +#define GUN_WIELDED_FIRING_ONLY (1<<12) /// removes unwielded accuracy and scatter penalties (not recoil) -#define GUN_ONE_HAND_WIELDED (1<<12) -#define GUN_ANTIQUE (1<<13) +#define GUN_ONE_HAND_WIELDED (1<<13) +#define GUN_ANTIQUE (1<<14) /// Whether the gun has been fired by its current user (reset upon `dropped()`) -#define GUN_RECOIL_BUILDUP (1<<14) +#define GUN_RECOIL_BUILDUP (1<<15) /// support weapon, bipod will grant autofire -#define GUN_SUPPORT_PLATFORM (1<<15) +#define GUN_SUPPORT_PLATFORM (1<<16) /// No gun description, only base desc -#define GUN_NO_DESCRIPTION (1<<16) +#define GUN_NO_DESCRIPTION (1<<17) // NOTE: Don't add flags past 1<<23, it'll break things due to BYOND limitations. You can usually use a Component instead. #define USES_STREAKS (1<<0) From e6c1e9c0275b8e4bc3f247f6ec093370648ec47a Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:07:49 -0700 Subject: [PATCH 6/7] woops --- code/_globalvars/bitfields.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index a21bee21cc35..4a8c4e9906cb 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -105,10 +105,10 @@ DEFINE_BITFIELD(projectile_flags, list( DEFINE_BITFIELD(flags_gun_features, list( "GUN_CAN_POINTBLANK" = GUN_CAN_POINTBLANK, - "GUN_CANT_EXECUTE" = GUN_CANT_EXECUTE, "GUN_TRIGGER_SAFETY" = GUN_TRIGGER_SAFETY, "GUN_UNUSUAL_DESIGN" = GUN_UNUSUAL_DESIGN, "GUN_SILENCED" = GUN_SILENCED, + "GUN_CANT_EXECUTE" = GUN_CANT_EXECUTE, "GUN_INTERNAL_MAG" = GUN_INTERNAL_MAG, "GUN_AUTO_EJECTOR" = GUN_AUTO_EJECTOR, "GUN_AMMO_COUNTER" = GUN_AMMO_COUNTER, From 6bf58006002be8eb0cf8138478b1e1203b775c51 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:08:32 -0700 Subject: [PATCH 7/7] thanks :) --- code/modules/projectiles/guns/energy.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index c3ac3d80f302..ffaea9542634 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -214,7 +214,7 @@ charge_icon = "+taser" black_market_value = 20 actions_types = list(/datum/action/item_action/taser/change_mode) - flags_gun_features = GUN_CANT_EXECUTE + flags_gun_features = GUN_UNUSUAL_DESIGN|GUN_CAN_POINTBLANK|GUN_CANT_EXECUTE /// Determines if the taser will hit any target, or if it checks for wanted status. Default is wanted only. var/mode = TASER_MODE_P var/skilllock = SKILL_POLICE_SKILLED