Merge pull request #11080 from kevinz000/surubatons
hey someone gave me this idea for stunbatons (and I sort of expanded it) and it's worth a test
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/obj/item/proc/rightclick_melee_attack_chain(mob/user, atom/target, params)
|
||||
if(!pre_altattackby(target, user, params)) //Hey, does this item have special behavior that should override all normal right-click functionality?
|
||||
if(!alt_pre_attack(target, user, params)) //Hey, does this item have special behavior that should override all normal right-click functionality?
|
||||
if(!target.altattackby(src, user, params)) //Does the target do anything special when we right-click on it?
|
||||
melee_attack_chain(user, target, params) //Ugh. Lame! I'm filing a legal complaint about the discrimination against the right mouse button!
|
||||
else
|
||||
altafterattack(target, user, TRUE, params)
|
||||
return
|
||||
|
||||
/obj/item/proc/pre_altattackby(atom/A, mob/living/user, params)
|
||||
/obj/item/proc/alt_pre_attack(atom/A, mob/living/user, params)
|
||||
return FALSE //return something other than false if you wanna override attacking completely
|
||||
|
||||
/atom/proc/altattackby(obj/item/W, mob/user, params)
|
||||
|
||||
Reference in New Issue
Block a user