From 77f1203594ff4569c33996dc3581baa6d4a37e4b Mon Sep 17 00:00:00 2001 From: Sierra Helper <125094432+SierraHelper@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:48:07 +0300 Subject: [PATCH] [MIRROR] guns ignoring safety on harm intent is a preference Co-authored-by: That0nePerson <63219222+That0nePerson@users.noreply.github.com> --- code/modules/client/preference_setup/global/preferences.dm | 4 ++++ code/modules/projectiles/gun.dm | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/client/preference_setup/global/preferences.dm b/code/modules/client/preference_setup/global/preferences.dm index a1d6c3cc3179d..21fea4f93dc16 100644 --- a/code/modules/client/preference_setup/global/preferences.dm +++ b/code/modules/client/preference_setup/global/preferences.dm @@ -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" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index c76ea4ee684e0..c4ea836edeb14 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -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