diff --git a/code/datums/outfits/outfit.dm b/code/datums/outfits/outfit.dm index 62647c55c0..74cb76871b 100644 --- a/code/datums/outfits/outfit.dm +++ b/code/datums/outfits/outfit.dm @@ -41,7 +41,7 @@ var/list/outfits_decls_by_type_ var/l_hand = null // In the list(path=count,otherpath=count) format var/list/uniform_accessories = list() // webbing, armbands etc - fits in slot_tie - var/list/backpack_contents = list() + var/list/backpack_contents = list() var/id_type var/id_desc diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 645168b041..688f535f00 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -394,7 +394,7 @@ var/list/global/slot_flags_enumeration = list( //If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. //Set disable_warning to 1 if you wish it to not give you outputs. //Should probably move the bulk of this into mob code some time, as most of it is related to the definition of slots and not item-specific -/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = FALSE) +/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = FALSE, var/ignore_obstruction = FALSE) if(!slot) return 0 if(!M) return 0 @@ -420,7 +420,7 @@ var/list/global/slot_flags_enumeration = list( //Next check if the slot is accessible. var/mob/_user = disable_warning? null : H - if(!H.slot_is_accessible(slot, src, _user)) + if(!H.slot_is_accessible(slot, src, _user) && !ignore_obstruction) return 0 //Lastly, check special rules for the desired slot. diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 5db107b130..c75c154e7d 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -16,7 +16,7 @@ for (var/obj/item/weapon/grab/G in H.grabbed_by) if (G.loc == user && G.state >= GRAB_AGGRESSIVE) return TRUE - + return FALSE /obj/item/weapon/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user) @@ -53,7 +53,7 @@ return user.visible_message("\The [user] has taped up \the [H]'s eyes!") - H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses) + H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/blindfold/tape(H), slot_glasses, ignore_obstructions = FALSE) H.update_inv_glasses() playsound(src, 'sound/effects/tape.ogg',25) @@ -83,7 +83,7 @@ user.visible_message("\The [user] has taped up \the [H]'s mouth!") - H.equip_to_slot_or_del(new /obj/item/clothing/mask/muzzle/tape(H), slot_wear_mask) + H.equip_to_slot_or_del(new /obj/item/clothing/mask/muzzle/tape(H), slot_wear_mask, ignore_obstructions = FALSE) H.update_inv_wear_mask() playsound(src, 'sound/effects/tape.ogg',25) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 761ea37154..1f0ca2f085 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -47,10 +47,10 @@ var/list/slot_equipment_priority = list( \ //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) +/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1, ignore_obstructions = 1) if(!W) return 0 - if(!W.mob_can_equip(src, slot, disable_warning)) + if(!W.mob_can_equip(src, slot, disable_warning, ignore_obstructions)) if(del_on_fail) qdel(W) @@ -68,8 +68,8 @@ var/list/slot_equipment_priority = list( \ return //This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such. -/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot) - return equip_to_slot_if_possible(W, slot, 1, 1, 0) +/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot, ignore_obstructions = 1) + return equip_to_slot_if_possible(W, slot, 1, 1, 0, ignore_obstructions) //hurgh. these feel hacky, but they're the only way I could get the damn thing to work. I guess they could be handy for antag spawners too? /mob/proc/equip_voidsuit_to_slot_or_del_with_refit(obj/item/clothing/suit/space/void/W as obj, slot, species = SPECIES_HUMAN)