This commit is contained in:
kevinz000
2020-02-13 15:59:58 -07:00
parent 4345f01322
commit b3a81d9c8e
2 changed files with 42 additions and 40 deletions
+2 -2
View File
@@ -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)