diff --git a/code/modules/client/preference_setup/loadout/loadout_mask.dm b/code/modules/client/preference_setup/loadout/loadout_mask.dm index 2c89ce66cb2..a313f3023d8 100644 --- a/code/modules/client/preference_setup/loadout/loadout_mask.dm +++ b/code/modules/client/preference_setup/loadout/loadout_mask.dm @@ -46,13 +46,13 @@ /datum/gear/mask/gaiter display_name = "neck gaiter selection" - path = /obj/item/clothing/mask/gaiter + path = /obj/item/clothing/accessory/gaiter cost = 1 /datum/gear/mask/gaiter/New() ..() var/list/gaiters = list() - for(var/gaiter in typesof(/obj/item/clothing/mask/gaiter)) - var/obj/item/clothing/mask/gaiter_type = gaiter + for(var/gaiter in typesof(/obj/item/clothing/accessory/gaiter)) + var/obj/item/clothing/accessory/gaiter_type = gaiter gaiters[initial(gaiter_type.name)] = gaiter_type gear_tweaks += new/datum/gear_tweak/path(sortTim(gaiters, /proc/cmp_text_asc)) \ No newline at end of file diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 3a79b7177a9..7f15afe180c 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -362,33 +362,6 @@ src.icon_state = "flushed" return -//Gaiter scarves -/obj/item/clothing/mask/gaiter - name = "red neck gaiter" - desc = "A slightly worn neck gaiter, it's loose enough to be worn comfortably like a scarf. Commonly used by outdoorsmen and mercenaries, both to keep warm and keep debris away from the face." - icon_state = "gaiter_red" - -/obj/item/clothing/mask/gaiter/attack_self(mob/user as mob) - if(src.icon_state == initial(icon_state)) - src.icon_state = "[icon_state]_up" - to_chat(user, "You pull the gaiter up over your nose.") - else - src.icon_state = initial(icon_state) - to_chat(user, "You tug the gaiter down around your neck.") - update_clothing_icon() //so our mob-overlays update - -/obj/item/clothing/mask/gaiter/tan - name = "tan neck gaiter" - icon_state = "gaiter_tan" - -/obj/item/clothing/mask/gaiter/gray - name = "gray neck gaiter" - icon_state = "gaiter_gray" - -/obj/item/clothing/mask/gaiter/green - name = "green neck gaiter" - icon_state = "gaiter_green" - /obj/item/clothing/mask/mouthwheat name = "mouth wheat" desc = "100% synthetic \"Country Girls LLC.\" brand mouth wheat. Warning: not for actual consumption." diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 2157f9ceec9..cdf4eeaa2bf 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -435,4 +435,69 @@ name = "sash" desc = "A plain, unadorned sash." icon_state = "sash" - slot = ACCESSORY_SLOT_OVER \ No newline at end of file + slot = ACCESSORY_SLOT_OVER + +//Gaiter scarves +/obj/item/clothing/accessory/gaiter + name = "red neck gaiter" + desc = "A slightly worn neck gaiter, it's loose enough to be worn comfortably like a scarf. Commonly used by outdoorsmen and mercenaries, both to keep warm and keep debris away from the face." + icon_state = "gaiter_red" + slot_flags = SLOT_MASK | SLOT_TIE + body_parts_covered = FACE + w_class = ITEMSIZE_SMALL + slot = ACCESSORY_SLOT_INSIGNIA // snowflakey, i know, shut up + var/breath_masked = FALSE + var/obj/item/clothing/mask/breath/breathmask + action_button_name = "Pull On Gaiter" + +/obj/item/clothing/accessory/gaiter/update_clothing_icon() + . = ..() + if(ismob(src.loc)) + var/mob/M = src.loc + M.update_inv_wear_mask() + +/obj/item/clothing/accessory/gaiter/attackby(obj/item/I, mob/user) + if(istype(I, /obj/item/clothing/mask/breath)) + to_chat(user, SPAN_NOTICE("You tuck [I] behind [src].")) + breathmask = I + breath_masked = TRUE + user.drop_from_inventory(I, drop_location()) + I.forceMove(src) + . = ..() + +/obj/item/clothing/accessory/gaiter/AltClick(mob/user) + . = ..() + if(breath_masked && breathmask) + to_chat(user, SPAN_NOTICE("You pull [breathmask] out from behind [src], and it drops to your feet.")) + breathmask.forceMove(drop_location()) + breathmask = null + breath_masked = FALSE + item_flags &= ~AIRTIGHT + +/obj/item/clothing/accessory/gaiter/attack_self(mob/user) + var/gaiterstring = "You pull [src] " + if(src.icon_state == initial(icon_state)) + src.icon_state = "[icon_state]_up" + gaiterstring += "up over your nose[breath_masked ? " and secure the mask tucked underneath." : "."]" + if(breath_masked) + item_flags |= AIRTIGHT + else + src.icon_state = initial(icon_state) + gaiterstring += "down around your neck[breath_masked ? " and dislodge the mask tucked underneath." : "."]" + if(breath_masked) + item_flags &= ~AIRTIGHT + to_chat(user, SPAN_NOTICE(gaiterstring)) + qdel(mob_overlay) // we're gonna need to refresh these + update_clothing_icon() //so our mob-overlays update + +/obj/item/clothing/accessory/gaiter/tan + name = "tan neck gaiter" + icon_state = "gaiter_tan" + +/obj/item/clothing/accessory/gaiter/gray + name = "gray neck gaiter" + icon_state = "gaiter_gray" + +/obj/item/clothing/accessory/gaiter/green + name = "green neck gaiter" + icon_state = "gaiter_green" diff --git a/icons/inventory/accessory/item.dmi b/icons/inventory/accessory/item.dmi index 9c51533b025..766a661e795 100644 Binary files a/icons/inventory/accessory/item.dmi and b/icons/inventory/accessory/item.dmi differ diff --git a/icons/inventory/accessory/mob.dmi b/icons/inventory/accessory/mob.dmi index dcf3765fe4e..b6e325e2d89 100644 Binary files a/icons/inventory/accessory/mob.dmi and b/icons/inventory/accessory/mob.dmi differ diff --git a/icons/inventory/face/item.dmi b/icons/inventory/face/item.dmi index 0d18ec906ff..fb8c9508592 100644 Binary files a/icons/inventory/face/item.dmi and b/icons/inventory/face/item.dmi differ diff --git a/icons/inventory/face/mob.dmi b/icons/inventory/face/mob.dmi index e7e5626fdea..83095f8a106 100644 Binary files a/icons/inventory/face/mob.dmi and b/icons/inventory/face/mob.dmi differ