From f5ec7f5b654c957a7e74fbd5579a9d077788d183 Mon Sep 17 00:00:00 2001 From: ZeroMan Date: Thu, 12 Mar 2020 20:47:35 -0400 Subject: [PATCH 1/2] it works it works --- code/modules/clothing/masks/miscellaneous.dm | 24 +++++++++++++++ code/modules/clothing/neck/_neck.dm | 32 ++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 84990f9660..c743f26363 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -247,6 +247,30 @@ /obj/item/clothing/mask/bandana/attack_self(mob/user) adjustmask(user) +/obj/item/clothing/mask/bandana/AltClick(mob/user) + . = ..() + if(iscarbon(user)) + var/mob/living/carbon/C = user + if((C.get_item_by_slot(SLOT_HEAD == src)) || (C.get_item_by_slot(SLOT_WEAR_MASK) == src)) + to_chat(user, "You can't tie [src] while wearing it!") + return + if(slot_flags & ITEM_SLOT_HEAD) + to_chat(user, "You must undo [src] before you can tie it into a neckerchief!") + else + if(user.is_holding(src)) + var/obj/item/clothing/neck/neckerchief/nk = new(src) + nk.name = "[name] neckerchief" + nk.desc = "[desc] It's tied up like a neckerchief." + nk.icon_state = icon_state + nk.sourceBandanaType = src.type + var/currentHandIndex = user.get_held_index_of_item(src) + user.transferItemToLoc(src, null) + user.put_in_hand(nk, currentHandIndex) + user.visible_message("You tie [src] up like a neckerchief.", "[user] ties [src] up like a neckerchief.") + qdel(src) + else + to_chat(user, "You must be holding [src] in order to tie it!") + /obj/item/clothing/mask/bandana/red name = "red bandana" desc = "A fine red bandana with nanotech lining." diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 2b43460257..f24d90f7fe 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -291,3 +291,35 @@ icon = 'icons/obj/clothing/neck.dmi' icon_state = "bling" item_color = "bling" + +////////////////////////////////// +//VERY SUPER BADASS NECKERCHIEFS// +////////////////////////////////// +obj/item/clothing/neck/neckerchief + icon = 'icons/obj/clothing/masks.dmi' //In order to reuse the bandana sprite + w_class = WEIGHT_CLASS_TINY + var/sourceBandanaType + +/obj/item/clothing/neck/neckerchief/worn_overlays(isinhands) + . = ..() + if(!isinhands) + var/mutable_appearance/realOverlay = mutable_appearance('icons/mob/mask.dmi', icon_state) + realOverlay.pixel_y = -3 + . += realOverlay + +/obj/item/clothing/neck/neckerchief/AltClick(mob/user) + . = ..() + if(iscarbon(user)) + var/mob/living/carbon/C = user + if(C.get_item_by_slot(SLOT_NECK) == src) + to_chat(user, "You can't untie [src] while wearing it!") + return + if(user.is_holding(src)) + var/obj/item/clothing/mask/bandana/newBand = new sourceBandanaType(user) + var/currentHandIndex = user.get_held_index_of_item(src) + var/oldName = src.name + qdel(src) + user.put_in_hand(newBand, currentHandIndex) + user.visible_message("You untie [oldName] back into a [newBand.name]", "[user] unties [oldName] back into a [newBand.name]") + else + to_chat(user, "You must be holding [src] in order to untie it!") From 3fa39fd7abc2ddb93300b3a8b3afcdc3af4e0507 Mon Sep 17 00:00:00 2001 From: ZeroMan Date: Thu, 12 Mar 2020 20:57:41 -0400 Subject: [PATCH 2/2] i hate my ocd --- code/modules/clothing/neck/_neck.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index f24d90f7fe..530af7777d 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -295,6 +295,7 @@ ////////////////////////////////// //VERY SUPER BADASS NECKERCHIEFS// ////////////////////////////////// + obj/item/clothing/neck/neckerchief icon = 'icons/obj/clothing/masks.dmi' //In order to reuse the bandana sprite w_class = WEIGHT_CLASS_TINY