mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Fixes runtime in inventory.dm
Clicking an inventory slot with nothing in your active hand would runtime. Now it checks to make sure you have something in your active hand, and if not it returns 0.
This commit is contained in:
@@ -48,6 +48,8 @@ var/list/slot_equipment_priority = list( \
|
||||
//set disable_warning to disable the 'you are unable to equip that' warning.
|
||||
//unset redraw_mob to prevent the mob from being redrawn at the end.
|
||||
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
|
||||
if(!W)
|
||||
return 0
|
||||
if(!W.mob_can_equip(src, slot))
|
||||
if(del_on_fail)
|
||||
qdel(W)
|
||||
|
||||
Reference in New Issue
Block a user