mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-25 17:41:56 +00:00
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.
16 lines
519 B
Plaintext
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 |