Skip to content

Commit

Permalink
[MIRROR] guns ignoring safety on harm intent is a preference
Browse files Browse the repository at this point in the history
Co-authored-by: That0nePerson <[email protected]>
  • Loading branch information
SierraHelper and That0nePerson authored Sep 19, 2023
1 parent 7f34b14 commit 77f1203
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions code/modules/client/preference_setup/global/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ var/global/list/_client_preferences_by_type
description = "Draw gun based on intent"
key = "HOLSTER_ON_INTENT"

/datum/client_preference/safety_toggle_on_intent
description = "Ignore safety on harm intent"
key = "SAFETY_ON_INTENT"

/datum/client_preference/show_credits
description = "Show End Titles"
key = "SHOW_CREDITS"
Expand Down
6 changes: 1 addition & 5 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,11 @@
return

if(safety())
// [SIERRA-EDIT] - Mirror revert
// handle_click_safety(user) // SIERRA-EDIT - ORIGINAL
if(user.a_intent == I_HURT && user.skill_check(SKILL_WEAPONS, SKILL_EXPERIENCED))
if(user.a_intent == I_HURT && user.skill_check(SKILL_WEAPONS, SKILL_EXPERIENCED) && user.client?.get_preference_value(/datum/client_preference/safety_toggle_on_intent) == GLOB.PREF_YES)
toggle_safety(user)
else
handle_click_safety(user)
return
// [/SIERRA-EDIT]
return

if(world.time < next_fire_time)
if (world.time % 3) //to prevent spam
Expand Down

0 comments on commit 77f1203

Please sign in to comment.