Files
Paradise/code/game/objects/items/weapons/tape.dm
T
d90a70ecda [REFACTOR] Consolidates SLOT_FLAG and SLOT_HUD into one ITEM_SLOT flag (#26743)
* IT WORKS UP UNTIL THIS POINT

* Consolidates SLOT_FLAG and SLOT_HUD into one

* Remove cover_both_ears

* SLOT_HUD to ITEM_SLOT

* Remove clothing_trait changes for the time being

* Remove accidental copy-paste

* Re-add no-slip var

* More failure to copy-paste correctly

* Leftover flag

* Combine left and right slot flags where possible

* UNGOOF MY DEFINES, PHAND IS NOT A THING

* Minor spacing changes

* Some more fixes from merge

* Seperates ITEM SLOT AMOUNT into two defines

* ON SECOND THOUGHT LETS NOT DO THAT.

* Addresses Contra's review

* Thank you GREP

* Rename ITEM_SLOT_FEET to ITEM_SLOT_SHOES

* Added a comment to the bitmasks in clothing defines

* Rename ITEM_SLOT_TIE to ITEM_SLOT_ACCESSORY

* These are for a seperate PR.

* Magboot fixes

* Requested changes

* Re-add accidental removal

* Wrong flags

* Update code/__DEFINES/clothing_defines.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Chap <erwin@lombok.demon.nl>

* Requested changes

* Merge fixes

* Fix double headset

* Fixes multiple accessories

---------

Signed-off-by: Chap <erwin@lombok.demon.nl>
Co-authored-by: Adrer <adrermail@gmail.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
2024-11-13 13:02:29 +00:00

56 lines
2.0 KiB
Plaintext

/obj/item/stack/tape_roll
name = "tape roll"
desc = "A roll of sticky tape. Possibly for taping ducks... or was that ducts?"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "taperoll"
singular_name = "tape roll"
w_class = WEIGHT_CLASS_TINY
amount = 25
max_amount = 25
/obj/item/stack/tape_roll/New(loc, amount=null)
..()
update_icon(UPDATE_ICON_STATE)
/obj/item/stack/tape_roll/attack(mob/living/carbon/human/M, mob/living/user)
if(!istype(M)) //What good is a duct tape mask if you are unable to speak?
return
if(M.wear_mask)
to_chat(user, "Remove [M.p_their()] mask first!")
return
if(amount < 2)
to_chat(user, "You'll need more tape for this!")
return
if(!M.check_has_mouth())
to_chat(user, "[M.p_they(TRUE)] [M.p_have()] no mouth to tape over!")
return
user.visible_message("<span class='warning'>[user] is taping [M]'s mouth closed!</span>",
"<span class='notice'>You try to tape [M == user ? "your own" : "[M]'s"] mouth shut!</span>",
"<span class='warning'>You hear tape ripping.</span>")
if(!do_after(user, 50, target = M))
return
if(!use(2))
to_chat(user, "<span class='notice'>You don't have enough tape!</span>")
return
if(M.wear_mask)
to_chat(user, "<span class='notice'>[M == user ? user : M]'s mouth is already covered!</span>")
return
user.visible_message("<span class='warning'>[user] tapes [M]'s mouth shut!</span>",
"<span class='notice'>You cover [M == user ? "your own" : "[M]'s"] mouth with a piece of duct tape.[M == user ? null : " That will shut them up."]</span>")
var/obj/item/clothing/mask/muzzle/G = new /obj/item/clothing/mask/muzzle/tapegag
M.equip_to_slot(G, ITEM_SLOT_MASK)
G.add_fingerprint(user)
/obj/item/stack/tape_roll/update_icon_state()
var/amount = get_amount()
if((amount <= 2) && (amount > 0))
icon_state = "taperoll"
if((amount <= 4) && (amount > 2))
icon_state = "taperoll-2"
if((amount <= 6) && (amount > 4))
icon_state = "taperoll-3"
if(amount > 6)
icon_state = "taperoll-4"
else
icon_state = "taperoll-4"