mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 15:38:02 +01:00
Fixes critical inventory equipment bug
This commit is contained in:
@@ -391,7 +391,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
|
||||
|
||||
@@ -417,7 +417,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.
|
||||
|
||||
@@ -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("<span class='danger'>\The [user] has taped up \the [H]'s eyes!</span>")
|
||||
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("<span class='danger'>\The [user] has taped up \the [H]'s mouth!</span>")
|
||||
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user