Makes inventory slots forward clicks to items in them. In effect that means you don't have to pixelhunt item in the slot, just click the slot. Smoking cigs is easy mode now.

This commit is contained in:
Chinsky
2016-01-08 09:08:44 +03:00
committed by Yoshax
parent 780d650f18
commit 11b7a38cf4

View File

@@ -24,7 +24,13 @@ var/list/slot_equipment_priority = list( \
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(var/slot)
var/obj/item/W = get_active_hand()
if(istype(W))
var/obj/item/E = get_equipped_item(slot)
if (istype(E))
if(istype(W))
E.attackby(W,src)
else
E.attack_hand(src)
else
equip_to_slot_if_possible(W, slot)
/* Inventory manipulation */