Files
Aurora.3/code/game/objects/weapons.dm
NanakoAC 8a4bf1d738 Alt-attack and trays (#394)
Added alt-attack function to held items/weapons, triggered by holding alt while clicking. Opens a lot of future possibilities. Works for cyborgs too. Only trays use it right now.

Overhauled trays to be useful and not-broken. See changelog for specifics.
2016-06-23 02:14:55 +03:00

16 lines
519 B
Plaintext

/obj/item/weapon
name = "weapon"
icon = 'icons/obj/weapons.dmi'
hitsound = "swing_hit"
/obj/item/weapon/Bump(mob/M as mob)
spawn(0)
..()
return
//Called when the user alt-clicks on something with this item in their active hand
//this function is designed to be overridden by individual weapons
/obj/item/weapon/proc/alt_attack(var/atom/target, var/mob/user)
return 1
//A return value of 1 continues on to do the normal alt-click action.
//A return value of 0 does not continue, and will not do the alt-click