mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-22 03:26:21 +01:00
Merge pull request #7997 from mwerezak/fixes
Fixes voidsuit attachment deployment not checking mob_can_equip()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user