mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
[MIRROR] RangedAttack now takes modifiers. (#3706)
* RangedAttack now takes modifiers. (#57214) * RangedAttack now takes modifiers. Co-authored-by: Gurkenglas <gurkenglas@hotmail.de>
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
* * [mob/proc/UnarmedAttack] (atom,adjacent) - used here only when adjacent, with no item in hand; in the case of humans, checks gloves
|
||||
* * [atom/proc/attackby] (item,user) - used only when adjacent
|
||||
* * [obj/item/proc/afterattack] (atom,user,adjacent,params) - used both ranged and adjacent
|
||||
* * [mob/proc/RangedAttack] (atom,params) - used only ranged, only used for tk and laser eyes but could be changed
|
||||
* * [mob/proc/RangedAttack] (atom,modifiers) - used only ranged, only used for tk and laser eyes but could be changed
|
||||
*/
|
||||
/mob/proc/ClickOn( atom/A, params )
|
||||
if(world.time <= next_click)
|
||||
@@ -163,7 +163,7 @@
|
||||
else
|
||||
W.afterattack(A,src,0,params)
|
||||
else
|
||||
RangedAttack(A,params)
|
||||
RangedAttack(A,modifiers)
|
||||
|
||||
/// Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it
|
||||
/atom/proc/IsObscured()
|
||||
@@ -285,8 +285,8 @@
|
||||
* for things like ranged glove touches, spitting alien acid/neurotoxin,
|
||||
* animals lunging, etc.
|
||||
*/
|
||||
/mob/proc/RangedAttack(atom/A, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_MOB_ATTACK_RANGED, A, params) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
/mob/proc/RangedAttack(atom/A, modifiers)
|
||||
if(SEND_SIGNAL(src, COMSIG_MOB_ATTACK_RANGED, A, modifiers) & COMPONENT_CANCEL_ATTACK_CHAIN)
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
@@ -98,13 +98,13 @@
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
|
||||
/mob/living/carbon/human/RangedAttack(atom/A, modifiers)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
if(istype(G) && G.Touch(A,0,mouseparams)) // for magic gloves
|
||||
if(istype(G) && G.Touch(A,0,modifiers)) // for magic gloves
|
||||
return TRUE
|
||||
|
||||
if(isturf(A) && get_dist(src,A) <= 1)
|
||||
|
||||
Reference in New Issue
Block a user