diff --git a/aurorastation.dme b/aurorastation.dme index 47ea318b988..095f1db6ee4 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -369,6 +369,7 @@ #include "code\datums\wires\vending.dm" #include "code\datums\wires\wires.dm" #include "code\defines\gases.dm" +#include "code\defines\mutable_appearance.dm" #include "code\defines\obj.dm" #include "code\defines\obj\weapon.dm" #include "code\defines\procs\announce.dm" diff --git a/code/defines/mutable_appearance.dm b/code/defines/mutable_appearance.dm new file mode 100644 index 00000000000..1b095c555d5 --- /dev/null +++ b/code/defines/mutable_appearance.dm @@ -0,0 +1,19 @@ +// Mutable appearances are an inbuilt byond datastructure. Read the documentation on them by hitting F1 in DM. +// Basically use them instead of images for overlays/underlays and when changing an object's appearance if you're doing so with any regularity. +// Unless you need the overlay/underlay to have a different direction than the base object. Then you have to use an image due to a bug. + +// Mutable appearances are children of images, just so you know. + +/mutable_appearance/New() + ..() + plane = FLOAT_PLANE // No clue why this is 0 by default yet images are on FLOAT_PLANE + // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var + +// Helper similar to image() +/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE) + var/mutable_appearance/MA = new() + MA.icon = icon + MA.icon_state = icon_state + MA.layer = layer + MA.plane = plane + return MA diff --git a/code/game/objects/items/weapons/chewables.dm b/code/game/objects/items/weapons/chewables.dm index a0148cf9630..f4b182e861d 100644 --- a/code/game/objects/items/weapons/chewables.dm +++ b/code/game/objects/items/weapons/chewables.dm @@ -23,7 +23,9 @@ /obj/item/clothing/mask/chewable/update_icon() cut_overlays() if(wrapped) - add_overlay("[initial(icon_state)]_wrapper") + var/mutable_appearance/base_overlay = mutable_appearance(icon, "[initial(icon_state)]_wrapper") + base_overlay.appearance_flags = RESET_COLOR + add_overlay(base_overlay) obj/item/clothing/mask/chewable/Initialize() . = ..() @@ -178,7 +180,15 @@ obj/item/clothing/mask/chewable/Destroy() /obj/item/trash/lollibutt name = "popsicle stick" desc = "A popsicle stick devoid of pop." - icon_state = "pop-stick" + icon_state = "lollipop_stick" + +/obj/item/clothing/mask/chewable/candy/lolli/update_icon() + cut_overlays() + var/mutable_appearance/base_overlay = mutable_appearance(icon, "[initial(icon_state)]_stick") + base_overlay.appearance_flags = RESET_COLOR + add_overlay(base_overlay) + if(wrapped) + add_overlay("[initial(icon_state)]_wrapper") /obj/item/clothing/mask/chewable/candy/lolli/Initialize() . = ..() diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index cf323d96994..b392e2967ce 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -156,10 +156,10 @@ starts_with = list(/obj/item/clothing/gloves/latex = 2, /obj/item/clothing/gloves/latex/nitrile = 5) /obj/item/storage/box/masks - name = "box of sterile masks" - desc = "This box contains masks of sterility." + name = "box of surgical masks" + desc = "This box contains masks of surgicality." icon_state = "sterile" - starts_with = list(/obj/item/clothing/mask/surgical = 7) + starts_with = list(/obj/item/clothing/mask/surgical = 4, /obj/item/clothing/mask/surgical/w = 3) /obj/item/storage/box/syringes name = "box of syringes" diff --git a/code/modules/client/preference_setup/loadout/loadout_mask.dm b/code/modules/client/preference_setup/loadout/loadout_mask.dm index cb6b4adc4e7..32701b2dd59 100644 --- a/code/modules/client/preference_setup/loadout/loadout_mask.dm +++ b/code/modules/client/preference_setup/loadout/loadout_mask.dm @@ -1,4 +1,27 @@ // Mask /datum/gear/mask - display_name = "sterile mask" - path = /obj/item/clothing/mask/surgical \ No newline at end of file + display_name = "dust mask" + path = /obj/item/clothing/mask/dust + slot = slot_wear_mask + sort_category = "Masks" + +/datum/gear/mask/surgical + display_name = "surgical mask selection" + path = /obj/item/clothing/mask/surgical + +/datum/gear/mask/surgical/New() + ..() + var/masks = list() + masks["surgical mask"] = /obj/item/clothing/mask/surgical + masks["surgical mask, white"] = /obj/item/clothing/mask/surgical/w + gear_tweaks += new/datum/gear_tweak/path(masks) + +/datum/gear/mask/cloth + display_name = "cloth mask" + path = /obj/item/clothing/mask/cloth + +/datum/gear/mask/cloth/New() + ..() + gear_tweaks += gear_tweak_free_color_choice + + diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index dfde80bd853..50ad856516f 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -528,7 +528,12 @@ /obj/item/clothing/mask name = "mask" icon = 'icons/obj/clothing/masks.dmi' + item_icons = list( + slot_l_hand_str = 'icons/mob/items/lefthand_masks.dmi', + slot_r_hand_str = 'icons/mob/items/righthand_masks.dmi' + ) slot_flags = SLOT_MASK + drop_sound = 'sound/items/drop/hat.ogg' body_parts_covered = FACE|EYES sprite_sheets = list( "Vox" = 'icons/mob/species/vox/masks.dmi', @@ -577,8 +582,7 @@ icon_state = "[icon_state]down" item_flags = down_item_flags flags_inv = down_flags_inv - user.visible_message("[user] adjust \his [src] to hang around \his neck.", "Your [src] is now hanging around your neck.") - + user.visible_message(span("notice", "[user] pulls \the [src] down to hang around \his neck."), span("notice", "You pull \the [src] down to hang around your neck.")) else gas_transfer_coefficient = initial(gas_transfer_coefficient) body_parts_covered = initial(body_parts_covered) @@ -586,9 +590,8 @@ item_state = initial(icon_state) item_flags = initial(item_flags) flags_inv = initial(flags_inv) - to_chat(user, "You pull [src] up to cover your face.") - user.visible_message("[user] puts \his [src] back up, to cover \his face.", "Your put your [src] back on.") - + user.visible_message(span("notice", "[user] pulls \the [src] up to cover \his face."), span("notice", "You pull \the [src] up to cover your face.")) + usr.update_action_buttons() update_clothing_icon() /obj/item/clothing/mask/attack_self(mob/user) diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index f1020902917..85e6326a9d7 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -29,16 +29,19 @@ name = "white balaclava" desc = "Designed to both hide identities and keep your face comfy and warm." icon_state = "swatclava" + item_state = "swatclava" /obj/item/clothing/mask/balaclava/military name = "green balaclava" desc = "Designed to both hide identities and keep your face comfy and warm." icon_state = "milclava" + item_state = "milclava" /obj/item/clothing/mask/balaclava/iacmask name = "IAC balaclava" desc = "Designed to keep the user warm and sterile in hostile enviroments." icon_state = "iacmask" + item_state = "iacmask" germ_level = 0 armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) @@ -50,7 +53,7 @@ flags_inv = HIDEFACE|BLOCKHAIR body_parts_covered = HEAD|FACE w_class = 2 - siemens_coefficient = 0.9 + siemens_coefficient = 0.9 /obj/item/clothing/mask/luchador/tecnicos name = "tecnicos mask" diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 98be93841a7..e894ecc330e 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -24,10 +24,10 @@ name = "overmask" desc = "A large breath mask with cushioning." icon_state = "breathcover" - item_state = "breathcover" + item_state = "cloth" /obj/item/clothing/mask/breath/offworlder/jagmask name = "jagmask" desc = "A two-piece, jagged filtering mask meant to conform to one's face comfortably." icon_state = "jagmask" - item_state = "jagmask" \ No newline at end of file + item_state = "muzzle" \ No newline at end of file diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 4ea24f78f93..d43b065f579 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -44,7 +44,7 @@ name = "plague doctor mask" desc = "A modernised version of the classic design, this mask will not only filter out phoron but it can also be connected to an air supply." icon_state = "plaguedoctor" - item_state = "gas_mask" + item_state = "plaguedoctor" armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 90, rad = 0) body_parts_covered = HEAD|FACE|EYES @@ -52,6 +52,7 @@ name = "\improper SWAT mask" desc = "A close-fitting tactical mask that can be connected to an air supply." icon_state = "swat" + item_state = "swat" siemens_coefficient = 0.7 body_parts_covered = FACE|EYES @@ -65,13 +66,14 @@ name = "tactical mask" desc = "A close-fitting tactical mask that can be connected to an air supply." icon_state = "swat" + item_state = "swat" siemens_coefficient = 0.7 /obj/item/clothing/mask/gas/clown_hat name = "clown wig and mask" desc = "A true prankster's facial attire. A clown is incomplete without their wig and mask." icon_state = "clown" - item_state = "clown_hat" + item_state = "clown" /obj/item/clothing/mask/gas/sexyclown name = "sexy-clown wig and mask" @@ -107,6 +109,7 @@ name = "owl mask" desc = "Twoooo!" icon_state = "owl" + item_state = "owl" body_parts_covered = HEAD|FACE|EYES /obj/item/clothing/mask/gas/tactical diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index f0db7bbfd7a..250ff2f1344 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -28,10 +28,10 @@ ..() /obj/item/clothing/mask/surgical - name = "sterile mask" - desc = "A sterile mask designed to help prevent the spread of diseases." - icon_state = "sterile" - item_state = "sterile" + name = "surgical mask" + desc = "A surgical mask designed to help prevent the spread of diseases." + icon_state = "surgical" + item_state = "surgical" w_class = 2 body_parts_covered = FACE item_flags = FLEXIBLEMATERIAL @@ -42,6 +42,41 @@ down_body_parts_covered = null adjustable = TRUE +/obj/item/clothing/mask/surgical/w + desc = "A surgical mask designed to help prevent the spread of diseases. This one's in white." + icon_state = "surgicalw" + item_state = "surgicalw" + +/obj/item/clothing/mask/cloth + name = "cloth mask" + desc = "A colorable cloth mask designed to protect the wearer against allergens, illnesses, and social interaction." + icon_state = "cloth" + item_state = "cloth" + w_class = 2 + body_parts_covered = FACE + item_flags = FLEXIBLEMATERIAL + gas_transfer_coefficient = 0.90 + permeability_coefficient = 0.01 + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 15, rad = 0) + down_gas_transfer_coefficient = 1 + down_body_parts_covered = null + adjustable = TRUE + +/obj/item/clothing/mask/dust + name = "dust mask" + desc = "A dust mask designed to protect the wearer against construction and/or custodial particulate." + icon_state = "dust" + item_state = "dust" + w_class = 2 + body_parts_covered = FACE + item_flags = FLEXIBLEMATERIAL + gas_transfer_coefficient = 0.90 + permeability_coefficient = 0.01 + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 15, rad = 10) + down_gas_transfer_coefficient = 1 + down_body_parts_covered = null + adjustable = TRUE + /obj/item/clothing/mask/fakemoustache name = "fake moustache" desc = "Warning: moustache is fake." @@ -53,6 +88,7 @@ name = "snorkel" desc = "For the Swimming Savant." icon_state = "snorkel" + item_state = "snorkel" flags_inv = HIDEFACE body_parts_covered = 0 @@ -196,6 +232,6 @@ name = "starveil" desc = "A thin holographic veil meant to cover the face, intended to block out light." icon_state = "starveil" - item_state = "starveil" + item_state = "muzzle" down_body_parts_covered = null adjustable = TRUE \ No newline at end of file diff --git a/code/modules/clothing/masks/voice.dm b/code/modules/clothing/masks/voice.dm index 31028abe153..ed8cff00c95 100644 --- a/code/modules/clothing/masks/voice.dm +++ b/code/modules/clothing/masks/voice.dm @@ -15,7 +15,7 @@ set src in usr changer.active = !changer.active - to_chat(usr, "You [changer.active ? "enable" : "disable"] the voice-changing module in \the [src].") + to_chat(usr, span("notice", "You [changer.active ? "enable" : "disable"] the voice-changing module in \the [src].")) /obj/item/clothing/mask/gas/voice/verb/Set_Voice(name as text) set category = "Object" @@ -24,7 +24,7 @@ var/voice = sanitize(name, MAX_NAME_LEN) if(!voice || !length(voice)) return changer.voice = voice - to_chat(usr, "You are now mimicking [changer.voice].") + to_chat(usr, span("notice", "You are now mimicking [changer.voice].")) /obj/item/clothing/mask/gas/voice/Initialize() . = ..() diff --git a/html/changelogs/wezzy_new_masks.yml b/html/changelogs/wezzy_new_masks.yml new file mode 100644 index 00000000000..e4b6faf4a0c --- /dev/null +++ b/html/changelogs/wezzy_new_masks.yml @@ -0,0 +1,45 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds two new masks - dust masks and cloth masks. They can be found in the loadout in a new tab. Sterile masks have been renamed to surgical masks to match their real-life counterpart." + - bugfix: "Equipped masks in the loadout should spawn properly equipped on your character on spawn." + - bugfix: "Grammar has been fixed with adjusting masks, and the top left action icon should update properly." + - imageadd: "New sprites for breathmasks and gas masks." + diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 937b3bd876d..7b708717e9b 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/lefthand_masks.dmi b/icons/mob/items/lefthand_masks.dmi new file mode 100644 index 00000000000..4d832b8d97e Binary files /dev/null and b/icons/mob/items/lefthand_masks.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index 458cda4f501..4d204d188e7 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ diff --git a/icons/mob/items/righthand_masks.dmi b/icons/mob/items/righthand_masks.dmi new file mode 100644 index 00000000000..1a6cdf67a97 Binary files /dev/null and b/icons/mob/items/righthand_masks.dmi differ diff --git a/icons/mob/mask.dmi b/icons/mob/mask.dmi index 8e8fc9dd4db..01f77fc2397 100644 Binary files a/icons/mob/mask.dmi and b/icons/mob/mask.dmi differ diff --git a/icons/obj/clothing/masks.dmi b/icons/obj/clothing/masks.dmi index ce72021e493..deb35d98730 100644 Binary files a/icons/obj/clothing/masks.dmi and b/icons/obj/clothing/masks.dmi differ