Skip to content

Commit

Permalink
[Semi-Modular] Adds neck-item support for Muzzled variants, gives one…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
  • Loading branch information
Steals-The-PRs and OrionTheFox authored Nov 19, 2023
1 parent 9605798 commit 73497fa
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 7 deletions.
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/cigs_lighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/human/human_update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 8 additions & 4 deletions modular_skyrat/modules/GAGS/greyscale_configs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 73497fa

Please sign in to comment.