Merge pull request #7997 from mwerezak/fixes

Fixes voidsuit attachment deployment not checking mob_can_equip()
This commit is contained in:
Chinsky
2015-01-31 09:25:16 +03:00
2 changed files with 8 additions and 15 deletions
+2 -2
View File
@@ -130,14 +130,14 @@
return 1
return 0
//This is a SAFE proc. Use this instead of equip_to_splot()!
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//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(!istype(W)) return 0
if(!W.mob_can_equip(src, slot, disable_warning))
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
del(W)
else