Skip to content

Commit

Permalink
Disablers can no longer execute people (#6696)
Browse files Browse the repository at this point in the history
# About the pull request

Disablers can't execute people anymore.

# Explain why it's good for the game

This doesn't really make sense to be in the game, I've never seen anyone
intentionally try to execute with a disabler before, it's always some
poor newbie MP who does it by accident and gets PTSD afterwards.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
del: Disablers can't execute people anymore
/:cl:
  • Loading branch information
zzzmike authored Jul 30, 2024
1 parent dc08e8e commit ecf653a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
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 @@ -1340,6 +1340,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_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
Expand Down

0 comments on commit ecf653a

Please sign in to comment.