From 73497fa67c23249fc5097ba842b86ea4883f05be Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sun, 19 Nov 2023 20:27:11 +0300 Subject: [PATCH] [Semi-Modular] Adds neck-item support for Muzzled variants, gives one to the new Face Scarf (and other small fixes) (#714) * adds a muzzled config since we never had one and this mask has used a digi one for months * this was part of that last commit oops * give the scarf the new muzzle config * adds compatiability for neck items to check for muzzled variations * update face scarf to have muzzle version and use the not-obsolete toggle component * fix the icon state flag check being backwards * moves the face scarf .dmis into their own little folder Co-authored-by: OrionTheFox <76465278+OrionTheFox@users.noreply.github.com> --- code/game/objects/items.dm | 2 ++ code/game/objects/items/cigs_lighters.dm | 2 +- .../mob/living/carbon/human/human_update_icons.dm | 6 ++++++ .../code/modules/clothing/base_clothes.dm | 2 ++ modular_skyrat/modules/GAGS/greyscale_configs.dm | 12 ++++++++---- .../icons/{ => neck/face_scarf}/face_scarf.dmi | Bin .../{ => neck/face_scarf}/face_scarf_worn.dmi | Bin .../neck/face_scarf/face_scarf_worn_muzzled.dmi | Bin 0 -> 503 bytes .../customization/modules/clothing/neck/_neck.dm | 13 +++++++++++-- 9 files changed, 30 insertions(+), 7 deletions(-) rename modular_skyrat/modules/GAGS/icons/{ => neck/face_scarf}/face_scarf.dmi (100%) rename modular_skyrat/modules/GAGS/icons/{ => neck/face_scarf}/face_scarf_worn.dmi (100%) create mode 100644 modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn_muzzled.dmi diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 5088db752fe..d592cd0790b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -374,6 +374,8 @@ // SKYRAT EDIT ADD START if(greyscale_config_worn_digi) worn_icon_digi = SSgreyscale.GetColoredIconByType(greyscale_config_worn_digi, greyscale_colors) + if(greyscale_config_worn_muzzled) + worn_icon_muzzled = SSgreyscale.GetColoredIconByType(greyscale_config_worn_muzzled, greyscale_colors) if(greyscale_config_worn_monkey) worn_icon_monkey = SSgreyscale.GetColoredIconByType(greyscale_config_worn_monkey, greyscale_colors) if(greyscale_config_worn_vox) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 6766e837668..7ef4b4bd64a 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -1058,7 +1058,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM worn_icon_state = "vape_worn" greyscale_config = /datum/greyscale_config/vape greyscale_config_worn = /datum/greyscale_config/vape/worn - greyscale_config_worn_digi = /datum/greyscale_config/vape/worn/digi //SKYRAT EDIT ADDITION - DigiGreyscale (Digi? On a vape? What? How did we do this) + greyscale_config_worn_muzzled = /datum/greyscale_config/vape/worn/muzzled //SKYRAT EDIT ADDITION greyscale_colors = "#2e2e2e" inhand_icon_state = null w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index 26ec247b463..077ebe669b7 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -332,6 +332,12 @@ There are several things that need to be remembered: if(species_icon_file) icon_file = species_icon_file mutant_override = TRUE + //On the off-chance we have a neck item that has to move around or cover the muzzle, it ALSO gets worn_icon_muzzled compatiability + if((bodytype & BODYTYPE_SNOUTED) && (worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION) && worn_item.worn_icon_muzzled) + var/snout_icon_file = worn_item.worn_icon_muzzled + if(snout_icon_file && icon_exists(snout_icon_file, RESOLVE_ICON_STATE(worn_item))) + icon_file = snout_icon_file + mutant_override = TRUE // SKYRAT EDIT END var/mutable_appearance/neck_overlay = worn_item.build_worn_icon(default_layer = NECK_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) // SKYRAT EDIT CHANGE diff --git a/modular_skyrat/master_files/code/modules/clothing/base_clothes.dm b/modular_skyrat/master_files/code/modules/clothing/base_clothes.dm index 07da17aa3eb..fbcdad4e997 100644 --- a/modular_skyrat/master_files/code/modules/clothing/base_clothes.dm +++ b/modular_skyrat/master_files/code/modules/clothing/base_clothes.dm @@ -4,6 +4,8 @@ var/icon/worn_icon_digi /// The config type to use for greyscaled worn sprites for digitigrade characters. Both this and greyscale_colors must be assigned to work. var/greyscale_config_worn_digi + /// The config type to use for greyscaled worn sprites for characters with a muzzle sprite accessory. Both this and greyscale_colors must be assigned to work. + var/greyscale_config_worn_muzzled /// Icon file for mob worn overlays, if the user is a monkey. var/icon/worn_icon_monkey /// The config type to use for greyscale worn sprites for monkeys. Both this and greyscale_colors must be assigned to work. diff --git a/modular_skyrat/modules/GAGS/greyscale_configs.dm b/modular_skyrat/modules/GAGS/greyscale_configs.dm index ed8a9f904d2..21d423040ed 100644 --- a/modular_skyrat/modules/GAGS/greyscale_configs.dm +++ b/modular_skyrat/modules/GAGS/greyscale_configs.dm @@ -239,8 +239,8 @@ json_config = 'modular_skyrat/modules/GAGS/json_configs/clown_mask/clown_mask_worn.json' // VAPE -/datum/greyscale_config/vape/worn/digi - name = "Vape (Worn, Digi) " +/datum/greyscale_config/vape/worn/muzzled + name = "Vape (Worn, Muzzled)" icon_file = 'modular_skyrat/master_files/icons/mob/clothing/mask.dmi' // RESPIRATOR @@ -487,12 +487,16 @@ //FACE SCARF /datum/greyscale_config/face_scarf name = "Face Scarf" - icon_file = 'modular_skyrat/modules/GAGS/icons/face_scarf.dmi' + icon_file = 'modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf.dmi' json_config = 'modular_skyrat/modules/GAGS/json_configs/neck/face_scarf.json' /datum/greyscale_config/face_scarf/worn name = "Face Scarf (Worn)" - icon_file = 'modular_skyrat/modules/GAGS/icons/face_scarf_worn.dmi' + icon_file = 'modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn.dmi' + +/datum/greyscale_config/face_scarf/worn/muzzled + name = "Face Scarf (Worn, Muzzled)" + icon_file = 'modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn_muzzled.dmi' /* * SUITS diff --git a/modular_skyrat/modules/GAGS/icons/face_scarf.dmi b/modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf.dmi similarity index 100% rename from modular_skyrat/modules/GAGS/icons/face_scarf.dmi rename to modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf.dmi diff --git a/modular_skyrat/modules/GAGS/icons/face_scarf_worn.dmi b/modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn.dmi similarity index 100% rename from modular_skyrat/modules/GAGS/icons/face_scarf_worn.dmi rename to modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn.dmi diff --git a/modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn_muzzled.dmi b/modular_skyrat/modules/GAGS/icons/neck/face_scarf/face_scarf_worn_muzzled.dmi new file mode 100644 index 0000000000000000000000000000000000000000..60d2f63b9789ed2f508ba224e58204a8e037a5c2 GIT binary patch literal 503 zcmVfMQoz8#=C5nI00001bW%=J06^y0W&i*Hbb3@+bVOxyV{&P5 zbZKvH004NLQ&w#kN#rF)%h9T{}s47 z3bYRo6bz`(T!9bONe)a?{u0v{2p1NFS93WJ^(bD`C|Fbu=^cewW)#pzomf10m57SGZUa`$uX=ZF>#^a*b? t-;Q{aYSRXs4bal*hT?vpzL8-VL?5FcBs9q1rRV?v002ovPDHLkV1l8H-!A|F literal 0 HcmV?d00001 diff --git a/modular_skyrat/modules/customization/modules/clothing/neck/_neck.dm b/modular_skyrat/modules/customization/modules/clothing/neck/_neck.dm index cf93fb379d9..75c95556f6d 100644 --- a/modular_skyrat/modules/customization/modules/clothing/neck/_neck.dm +++ b/modular_skyrat/modules/customization/modules/clothing/neck/_neck.dm @@ -93,13 +93,22 @@ icon_state = "face_scarf" greyscale_config = /datum/greyscale_config/face_scarf greyscale_config_worn = /datum/greyscale_config/face_scarf/worn + greyscale_config_worn_muzzled = /datum/greyscale_config/face_scarf/worn/muzzled greyscale_colors = "#a52424" flags_1 = IS_PLAYER_COLORABLE_1 - flags_inv = HIDEFACIALHAIR + flags_inv = HIDEFACIALHAIR | HIDESNOUT + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/neck/face_scarf/Initialize(mapload) . = ..() - AddComponent(/datum/component/toggle_clothes, "face_scarf_t") + AddComponent(/datum/component/toggle_icon, toggle_noun = "scarf") + +/obj/item/clothing/neck/face_scarf/AltClick(mob/user) //Make sure that toggling actually hides the snout so that it doesn't clip + . = ..() + if(icon_state != "face_scarf_t") + flags_inv = HIDEFACIALHAIR | HIDESNOUT + else + flags_inv = HIDEFACIALHAIR /obj/item/clothing/neck/maid_neck_cover name = "maid neck cover"