mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 17:11:22 +00:00
Adds a preference to have an intent check for guns (#3653)
what title says
This commit is contained in:
@@ -148,9 +148,14 @@
|
||||
return ..() //Pistolwhippin'
|
||||
|
||||
/obj/item/weapon/gun/proc/Fire(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
|
||||
|
||||
|
||||
if(!user || !target) return
|
||||
|
||||
add_fingerprint(user)
|
||||
if(user.client && (user.client.prefs.toggles_secondary & SAFETY_CHECK) && user.a_intent != I_HURT) //Check this first to save time.
|
||||
user << "You refrain from firing, as you aren't on harm intent."
|
||||
return
|
||||
|
||||
if(!special_check(user))
|
||||
return
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
AO.update_aiming_deferred()
|
||||
|
||||
/obj/aiming_overlay/proc/trigger(var/perm)
|
||||
|
||||
if((user.client.prefs.toggles_secondary & SAFETY_CHECK) && user.a_intent != I_HURT) //Check this first to save time.
|
||||
user << "You refrain from firing, as you aren't on harm intent."
|
||||
return
|
||||
if(!owner || !aiming_with || !aiming_at || !locked)
|
||||
return
|
||||
if(perm && (target_permissions & perm))
|
||||
@@ -25,7 +29,7 @@
|
||||
toggle_active()
|
||||
if (owner.client)
|
||||
owner.client.remove_gun_icons()
|
||||
|
||||
|
||||
/mob/living/ClickOn(var/atom/A, var/params)
|
||||
. = ..()
|
||||
trigger_aiming(TARGET_CAN_CLICK)
|
||||
|
||||
Reference in New Issue
Block a user