Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disablers can no longer execute people #6696

Merged
merged 7 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,25 @@
#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)
#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)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ DEFINE_BITFIELD(flags_gun_features, list(
"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,
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
zzzmike marked this conversation as resolved.
Show resolved Hide resolved
/// 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
Expand Down
Loading