diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 1c936e837ca9..b34fc1e5b16d 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -137,6 +137,8 @@ #define CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON (1<<2) ///has a sprite for monkeys #define CLOTHING_MONKEY_VARIATION (1<<3) +///Has a sprite for snouted heads specifically. +#define CLOTHING_SNOUTED_VARIATION (1<<4) //flags for covering body parts #define GLASSESCOVERSEYES (1<<0) diff --git a/code/__DEFINES/species_clothing_paths.dm b/code/__DEFINES/species_clothing_paths.dm index 51d94eb0463d..745d6e51a0ab 100644 --- a/code/__DEFINES/species_clothing_paths.dm +++ b/code/__DEFINES/species_clothing_paths.dm @@ -12,8 +12,13 @@ //DIGITIGRADE PATHS ///The dmi containing digitigrade uniforms -#define DIGITIGRADE_UNIFORM_FILE 'icons/mob/species/misc/digitigrade.dmi' +#define DIGITIGRADE_UNIFORM_FILE 'monkestation/icons/mob/species/misc/uniform_digi.dmi' ///The dmi containing digitigrade shoes -#define DIGITIGRADE_SHOES_FILE 'icons/mob/species/misc/digitigrade_shoes.dmi' +#define DIGITIGRADE_SHOES_FILE 'monkestation/icons/mob/species/misc/feet_digi.dmi' ///The dmi containing digitigrade oversuits -#define DIGITIGRADE_SUIT_FILE 'icons/mob/species/misc/digitigrade_suits.dmi' +#define DIGITIGRADE_SUIT_FILE 'monkestation/icons/mob/species/misc/suit_digi.dmi' + +///The dmi containing snouted variation masks +#define SNOUTED_MASK_FILE 'monkestation/icons/mob/species/misc/mask_muzzled.dmi' +///The dmi containing snouted variation helmets +#define SNOUTED_HEAD_FILE 'monkestation/icons/mob/species/misc/head_muzzled.dmi' diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 9ab4fd2d42a9..60d5d655b7d0 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -386,6 +386,7 @@ DEFINE_BITFIELD(bodytype, list( "BODYTYPE_ROBOTIC" = BODYTYPE_ROBOTIC, "BODYTYPE_SNOUTED" = BODYTYPE_SNOUTED, "BODYTYPE_CUSTOM" = BODYTYPE_CUSTOM, + "BODYTYPE_SNOUTED" = BODYTYPE_SNOUTED, )) DEFINE_BITFIELD(bodypart_flags, list( diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 015f8926734b..7d0fc92b4446 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -241,6 +241,8 @@ GLOBAL_LIST_INIT(backpacklist, list( //Female Uniforms GLOBAL_LIST_EMPTY(female_clothing_icons) + //Auto-generated 'fallback' clothing icons +GLOBAL_LIST_EMPTY(fallback_clothing_icons) GLOBAL_LIST_INIT(scarySounds, list( 'sound/effects/footstep/clownstep1.ogg', diff --git a/code/datums/greyscale/config_types/greyscale_configs.dm b/code/datums/greyscale/config_types/greyscale_configs.dm index 552d2351f7a2..4f7223a78f74 100644 --- a/code/datums/greyscale/config_types/greyscale_configs.dm +++ b/code/datums/greyscale/config_types/greyscale_configs.dm @@ -1096,6 +1096,19 @@ name = "simian Hardsuit" json_config = 'code/datums/greyscale/json_configs/simian_fallbacks/hardsuit.json' +/datum/greyscale_config/lizard + name = "lizard Clothing" + icon_file = 'monkestation/icons/mob/gags/clothing/lizard_fallbacks.dmi' + json_config = 'code/datums/greyscale/json_configs/lizard_fallbacks/shoes.json' + +/datum/greyscale_config/lizard/shoes + name = "lizard Shoes" + json_config = 'code/datums/greyscale/json_configs/lizard_fallbacks/shoes.json' + +/datum/greyscale_config/lizard/under + name = "lizard Under" + json_config = 'code/datums/greyscale/json_configs/lizard_fallbacks/under.json' + /datum/greyscale_config/polycloak name = "cloak" @@ -1141,3 +1154,49 @@ name = "Worn Fish Analyzer" icon_file = 'icons/mob/clothing/belt.dmi' json_config = 'code/datums/greyscale/json_configs/fish_analyzer_worn.json' + +/* +* MASKS +*/ + +// BANDANAS + +/datum/greyscale_config/bandana_worn/snouted + name = "Worn Bandana" + icon_file = SNOUTED_MASK_FILE + +/datum/greyscale_config/bandstriped_worn/snouted + name = "Worn Striped Bandana" + icon_file = SNOUTED_MASK_FILE + +/datum/greyscale_config/bandskull_worn/snouted + name = "Worn Skull Bandana" + icon_file = SNOUTED_MASK_FILE + +/* +* SUITS +*/ + +// JUMPSUITS + +/datum/greyscale_config/jumpsuit_worn/digitigrade + name = "Worn Jumpsuit - Digitigrade" + icon_file = DIGITIGRADE_UNIFORM_FILE + +/datum/greyscale_config/jumpsuit_prison_worn/digitigrade + name = "Worn Prison Jumpsuit - Digitigrade" + icon_file = DIGITIGRADE_UNIFORM_FILE + +/* +* SHOES +*/ + +// SNEAKERS + +/datum/greyscale_config/sneakers_worn/digitigrade + name = "Worn Sneakers - Digitigrade" + icon_file = DIGITIGRADE_SHOES_FILE + +/datum/greyscale_config/sneakers_orange_worn/digitigrade + name = "Worn Orange Sneakers - Digitigrade" + icon_file = DIGITIGRADE_SHOES_FILE diff --git a/code/datums/greyscale/json_configs/lizard_fallbacks/shoes.json b/code/datums/greyscale/json_configs/lizard_fallbacks/shoes.json new file mode 100644 index 000000000000..48cba2bac661 --- /dev/null +++ b/code/datums/greyscale/json_configs/lizard_fallbacks/shoes.json @@ -0,0 +1,10 @@ +{ + "": [ + { + "type": "icon_state", + "icon_state": "boots", + "blend_mode": "overlay", + "color_ids": [ 1 ] + } + ] +} diff --git a/code/datums/greyscale/json_configs/lizard_fallbacks/under.json b/code/datums/greyscale/json_configs/lizard_fallbacks/under.json new file mode 100644 index 000000000000..6e4854948920 --- /dev/null +++ b/code/datums/greyscale/json_configs/lizard_fallbacks/under.json @@ -0,0 +1,16 @@ +{ + "": [ + { + "type": "icon_state", + "icon_state": "jumpsuit", + "blend_mode": "overlay", + "color_ids": [ 1 ] + }, + { + "type": "icon_state", + "icon_state": "jumpsuit_accessories", + "blend_mode": "overlay", + "color_ids": [ 2 ] + } + ] +} diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 3af16ddff55c..800c29e4c555 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -38,6 +38,15 @@ ///The config type to use for greyscaled belt overlays. Both this and greyscale_colors must be assigned to work. var/greyscale_config_belt + //Overrides for digitigrade and snouted clothing handling + //Icon file for mob worn overlays, if the user is digitigrade. + var/icon/worn_icon_digitigrade + //Same as above, but for if the user is snouted. + var/icon/worn_icon_snouted + + var/greyscale_config_worn_digitigrade + var/greyscale_config_worn_snouted + /// Used for BODYTYPE_CUSTOM: Needs to follow this syntax: a list() with the x and y coordinates of the pixel you want to get the color from. Colors are filled in as GAGs values for fallback. var/list/species_clothing_color_coords[3] /* !!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!! @@ -363,6 +372,10 @@ return if(greyscale_config_worn) worn_icon = SSgreyscale.GetColoredIconByType(greyscale_config_worn, greyscale_colors) + if(greyscale_config_worn_digitigrade) + worn_icon_digitigrade = SSgreyscale.GetColoredIconByType(greyscale_config_worn_digitigrade, greyscale_colors) + if(greyscale_config_worn_snouted) + worn_icon_snouted = SSgreyscale.GetColoredIconByType(greyscale_config_worn_snouted, greyscale_colors) if(greyscale_config_inhand_left) lefthand_file = SSgreyscale.GetColoredIconByType(greyscale_config_inhand_left, greyscale_colors) if(greyscale_config_inhand_right) diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 4fc8935b3d49..648be418acc7 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -138,6 +138,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM body_parts_covered = null grind_results = list() heat = 1000 + supports_variations_flags = CLOTHING_SNOUTED_VARIATION throw_verb = "flick" /// Whether this cigarette has been lit. var/lit = FALSE @@ -468,6 +469,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM chem_volume = 50 list_reagents = null choke_time_max = 40 SECONDS + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/mask/cigarette/rollie/Initialize(mapload) name = pick(list( @@ -587,6 +589,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM smoketime = 20 MINUTES chem_volume = 80 list_reagents = list(/datum/reagent/drug/nicotine = 40) + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/mask/cigarette/cigar/havana name = "premium Havanian cigar" @@ -597,6 +600,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM smoketime = 30 MINUTES chem_volume = 60 list_reagents = list(/datum/reagent/drug/nicotine = 45) + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/cigbutt name = "cigarette butt" @@ -629,6 +633,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM list_reagents = null w_class = WEIGHT_CLASS_SMALL choke_forever = TRUE + supports_variations_flags = CLOTHING_SNOUTED_VARIATION ///name of the stuff packed inside this pipe var/packeditem diff --git a/code/modules/client/preferences/species_features/lizard.dm b/code/modules/client/preferences/species_features/lizard.dm index df7b847f48ef..c136f16acba4 100644 --- a/code/modules/client/preferences/species_features/lizard.dm +++ b/code/modules/client/preferences/species_features/lizard.dm @@ -37,7 +37,7 @@ /datum/preference/choiced/lizard_body_markings/init_possible_values() var/list/values = list() - var/icon/lizard = icon('icons/mob/species/lizard/bodyparts.dmi', "lizard_chest_m") + var/icon/lizard = icon('icons/mob/species/lizard/bodyparts.dmi', "lizard_chest") for (var/name in GLOB.body_markings_list) var/datum/sprite_accessory/sprite_accessory = GLOB.body_markings_list[name] diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 47b1b84b0435..421a50b8a108 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -607,6 +607,7 @@ flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH w_class = WEIGHT_CLASS_SMALL + supports_variations_flags = CLOTHING_SNOUTED_VARIATION var/voice_change = 1 ///This determines if the voice changer is on or off. diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 72deaad51a19..db7de736cb47 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -14,6 +14,7 @@ clothing_flags = SNUG_FIT | PLASMAMAN_HELMET_EXEMPT flags_cover = HEADCOVERSEYES flags_inv = HIDEHAIR + supports_variations_flags = CLOTHING_SNOUTED_VARIATION dog_fashion = /datum/dog_fashion/head/helmet @@ -173,10 +174,10 @@ toggle_message = "You pull the visor down on" alt_toggle_message = "You push the visor up on" armor_type = /datum/armor/toggleable_riot - flags_inv = HIDEEARS|HIDEFACE|HIDESNOUT + flags_inv = HIDEEARS|HIDEFACE strip_delay = 80 actions_types = list(/datum/action/item_action/toggle) - visor_flags_inv = HIDEFACE|HIDESNOUT + visor_flags_inv = HIDEFACE flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF diff --git a/code/modules/clothing/head/welding.dm b/code/modules/clothing/head/welding.dm index 4da5f96206aa..4d7f82f6cc73 100644 --- a/code/modules/clothing/head/welding.dm +++ b/code/modules/clothing/head/welding.dm @@ -10,12 +10,13 @@ flash_protect = FLASH_PROTECTION_WELDER tint = 2 armor_type = /datum/armor/utility_welding - flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDESNOUT + flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE actions_types = list(/datum/action/item_action/toggle) - visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDESNOUT + visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF resistance_flags = FIRE_PROOF clothing_flags = SNUG_FIT | PLASMAMAN_HELMET_EXEMPT + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /datum/armor/utility_welding melee = 10 diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index dfcc3060c9f4..5b7a3332d062 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -7,6 +7,7 @@ slot_flags = ITEM_SLOT_MASK strip_delay = 40 equip_delay_other = 40 + supports_variations_flags = CLOTHING_SNOUTED_VARIATION var/modifies_speech = FALSE var/mask_adjusted = FALSE var/adjusted_flags = null diff --git a/code/modules/clothing/masks/bandana.dm b/code/modules/clothing/masks/bandana.dm index 86ea1e71fb61..d836b8c1f21e 100644 --- a/code/modules/clothing/masks/bandana.dm +++ b/code/modules/clothing/masks/bandana.dm @@ -17,9 +17,11 @@ worn_icon_state = "bandana_worn" greyscale_config = /datum/greyscale_config/bandana greyscale_config_worn = /datum/greyscale_config/bandana_worn + greyscale_config_worn_snouted = /datum/greyscale_config/bandana_worn/snouted greyscale_config_inhand_left = /datum/greyscale_config/bandana_inhands_left greyscale_config_inhand_right = /datum/greyscale_config/bandana_inhands_right greyscale_colors = "#2e2e2e" + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/mask/bandana/attack_self(mob/user) if(slot_flags & ITEM_SLOT_NECK) @@ -51,8 +53,8 @@ else if(!user.is_holding(src)) to_chat(user, span_warning("You must be holding [src] in order to tie it!")) return - - + + if(slot_flags & ITEM_SLOT_MASK) undyeable = TRUE slot_flags = ITEM_SLOT_NECK @@ -131,6 +133,7 @@ worn_icon_state = "bandstriped_worn" greyscale_config = /datum/greyscale_config/bandstriped greyscale_config_worn = /datum/greyscale_config/bandstriped_worn + greyscale_config_worn_snouted = /datum/greyscale_config/bandstriped_worn/snouted greyscale_config_inhand_left = /datum/greyscale_config/bandana_striped_inhands_left greyscale_config_inhand_right = /datum/greyscale_config/bandana_striped_inhands_right greyscale_colors = "#2e2e2e#C6C6C6" @@ -185,6 +188,7 @@ worn_icon_state = "bandskull_worn" greyscale_config = /datum/greyscale_config/bandskull greyscale_config_worn = /datum/greyscale_config/bandskull_worn + greyscale_config_worn_snouted = /datum/greyscale_config/bandskull_worn/snouted greyscale_config_inhand_left = /datum/greyscale_config/bandana_skull_inhands_left greyscale_config_inhand_right = /datum/greyscale_config/bandana_skull_inhands_right greyscale_colors = "#2e2e2e#C6C6C6" diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index 8ba15fe521d5..b56f4855f3b2 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -12,6 +12,7 @@ flags_cover = MASKCOVERSMOUTH visor_flags_cover = MASKCOVERSMOUTH resistance_flags = NONE + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /datum/armor/mask_breath bio = 50 diff --git a/code/modules/clothing/masks/costume.dm b/code/modules/clothing/masks/costume.dm index 7eb5da57743f..3dd95e8567ea 100644 --- a/code/modules/clothing/masks/costume.dm +++ b/code/modules/clothing/masks/costume.dm @@ -4,6 +4,7 @@ icon_state = "joy" clothing_flags = MASKINTERNALS flags_inv = HIDESNOUT + supports_variations_flags = CLOTHING_SNOUTED_VARIATION unique_reskin = list( "Joy" = "joy", "Flushed" = "flushed", diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index a60613cdb5dc..e8f00faa9f7d 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -18,6 +18,7 @@ GLOBAL_LIST_INIT(clown_mask_options, list( armor_type = /datum/armor/mask_gas flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH | PEPPERPROOF resistance_flags = NONE + supports_variations_flags = CLOTHING_SNOUTED_VARIATION ///Max numbers of installable filters var/max_filters = 1 ///List to keep track of each filter diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 9551eb04fa65..c9f9d3ae09e8 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -58,6 +58,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list( tint = 0 has_fov = FALSE COOLDOWN_DECLARE(hailer_cooldown) + supports_variations_flags = CLOTHING_SNOUTED_VARIATION var/aggressiveness = AGGR_BAD_COP var/overuse_cooldown = FALSE var/recent_uses = 0 @@ -79,6 +80,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list( flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES | PEPPERPROOF visor_flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES | PEPPERPROOF has_fov = TRUE + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/mask/gas/sechailer/swat/spacepol name = "spacepol mask" @@ -216,7 +218,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list( COOLDOWN_DECLARE(horn_cooldown) /obj/item/clothing/mask/party_horn/ui_action_click(mob/user, action) - if(!COOLDOWN_FINISHED(src, horn_cooldown)) + if(!COOLDOWN_FINISHED(src, horn_cooldown)) return COOLDOWN_START(src, horn_cooldown, 10 SECONDS) playsound(src, 'sound/items/party_horn.ogg', 75, FALSE) diff --git a/code/modules/clothing/masks/surgical.dm b/code/modules/clothing/masks/surgical.dm index b754dc430141..585f82c66d6c 100644 --- a/code/modules/clothing/masks/surgical.dm +++ b/code/modules/clothing/masks/surgical.dm @@ -10,6 +10,7 @@ visor_flags_cover = MASKCOVERSMOUTH armor_type = /datum/armor/mask_surgical actions_types = list(/datum/action/item_action/adjust) + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /datum/armor/mask_surgical bio = 100 diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index acb10fdbb80c..b0ef5a29c703 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -8,6 +8,7 @@ body_parts_covered = FEET slot_flags = ITEM_SLOT_FEET + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION armor_type = /datum/armor/clothing_shoes slowdown = SHOES_SLOWDOWN diff --git a/code/modules/clothing/shoes/sneakers.dm b/code/modules/clothing/shoes/sneakers.dm index f5601cdc28b6..f07ea00c5089 100644 --- a/code/modules/clothing/shoes/sneakers.dm +++ b/code/modules/clothing/shoes/sneakers.dm @@ -7,6 +7,7 @@ greyscale_colors = "#2d2d33#ffffff" greyscale_config = /datum/greyscale_config/sneakers greyscale_config_worn = /datum/greyscale_config/sneakers_worn + greyscale_config_worn_digitigrade = /datum/greyscale_config/sneakers_worn/digitigrade greyscale_config_inhand_left = /datum/greyscale_config/sneakers_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/sneakers_inhand_right flags_1 = IS_PLAYER_COLORABLE_1 @@ -81,6 +82,7 @@ greyscale_colors = "#d15b1b#ffffff" greyscale_config = /datum/greyscale_config/sneakers_orange greyscale_config_worn = /datum/greyscale_config/sneakers_orange_worn + greyscale_config_worn_digitigrade = /datum/greyscale_config/sneakers_orange_worn/digitigrade greyscale_config_inhand_left = /datum/greyscale_config/sneakers_orange_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/sneakers_orange_inhand_right flags_1 = NONE diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index c7c206e66872..621d77f29079 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -17,6 +17,7 @@ var/blood_overlay_type = "suit" limb_integrity = 0 // disabled for most exo-suits var/suittoggled = FALSE // sec duster toggling and more + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION /obj/item/clothing/suit/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index e4b9fe079508..83efcbcda8d9 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -11,6 +11,7 @@ flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEHAIR|HIDEFACIALHAIR|HIDEFACE|HIDESNOUT resistance_flags = ACID_PROOF flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/head/bio_hood/Initialize(mapload) . = ..() diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 8be36ed7df7b..743cb8d2c06a 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -7,6 +7,7 @@ inhand_icon_state = "labcoat" blood_overlay_type = "coat" body_parts_covered = CHEST|ARMS + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON allowed = list( /obj/item/analyzer, /obj/item/biopsy_tool, diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index df27303be829..2aae8cde37e7 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -21,6 +21,7 @@ var/alt_covers_chest = FALSE // for adjusted/rolled-down jumpsuits, FALSE = exposes chest and arms, TRUE = exposes arms only var/obj/item/clothing/accessory/attached_accessory var/mutable_appearance/accessory_overlay + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION /datum/armor/clothing_under bio = 10 diff --git a/code/modules/clothing/under/color.dm b/code/modules/clothing/under/color.dm index 3c30e24ea7fb..2db04ce19be9 100644 --- a/code/modules/clothing/under/color.dm +++ b/code/modules/clothing/under/color.dm @@ -7,6 +7,8 @@ greyscale_config_inhand_left = /datum/greyscale_config/jumpsuit_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/jumpsuit_inhand_right greyscale_config_worn = /datum/greyscale_config/jumpsuit_worn + greyscale_config_worn_digitigrade = /datum/greyscale_config/jumpsuit_worn/digitigrade + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION icon = 'icons/obj/clothing/under/color.dmi' icon_state = "jumpsuit" inhand_icon_state = "jumpsuit" @@ -20,6 +22,7 @@ female_sprite_flags = FEMALE_UNIFORM_TOP_ONLY icon_state = "jumpskirt" supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON + greyscale_config_worn_digitigrade = null /// Returns a random, acceptable jumpsuit typepath /proc/get_random_jumpsuit() diff --git a/code/modules/clothing/under/jobs/security.dm b/code/modules/clothing/under/jobs/security.dm index 8f76bd4587a1..2fc58750e5f4 100644 --- a/code/modules/clothing/under/jobs/security.dm +++ b/code/modules/clothing/under/jobs/security.dm @@ -240,6 +240,7 @@ greyscale_config_inhand_left = /datum/greyscale_config/jumpsuit_prison_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/jumpsuit_prison_inhand_right greyscale_config_worn = /datum/greyscale_config/jumpsuit_prison_worn + greyscale_config_worn_digitigrade = /datum/greyscale_config/jumpsuit_prison_worn/digitigrade has_sensor = LOCKED_SENSORS sensor_mode = SENSOR_COORDS random_sensor = FALSE @@ -255,6 +256,7 @@ greyscale_config_inhand_left = /datum/greyscale_config/jumpsuit_prison_inhand_left greyscale_config_inhand_right = /datum/greyscale_config/jumpsuit_prison_inhand_right greyscale_config_worn = /datum/greyscale_config/jumpsuit_prison_worn + greyscale_config_worn_digitigrade = null body_parts_covered = CHEST|GROIN|ARMS dying_key = DYE_REGISTRY_JUMPSKIRT female_sprite_flags = FEMALE_UNIFORM_TOP_ONLY diff --git a/code/modules/clothing/under/suits.dm b/code/modules/clothing/under/suits.dm index 775a37d77d66..730cb4a50f61 100644 --- a/code/modules/clothing/under/suits.dm +++ b/code/modules/clothing/under/suits.dm @@ -30,7 +30,7 @@ desc = "It's a very smart uniform with a special pocket for tip." icon_state = "waiter" inhand_icon_state = "waiter" - supports_variations_flags = CLOTHING_MONKEY_VARIATION + supports_variations_flags = CLOTHING_MONKEY_VARIATION|CLOTHING_DIGITIGRADE_VARIATION /obj/item/clothing/under/suit/blacktwopiece name = "black two piece suit" diff --git a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm index 3b759a95f496..e23d9b4b7fd4 100644 --- a/code/modules/hydroponics/beekeeping/beekeeper_suit.dm +++ b/code/modules/hydroponics/beekeeping/beekeeper_suit.dm @@ -13,4 +13,5 @@ inhand_icon_state = null body_parts_covered = CHEST|GROIN|LEGS|ARMS clothing_flags = THICKMATERIAL + supports_variations_flags = CLOTHING_SNOUTED_VARIATION allowed = list(/obj/item/melee/flyswatter, /obj/item/reagent_containers/spray/plantbgone, /obj/item/plant_analyzer, /obj/item/seeds, /obj/item/reagent_containers/cup/bottle, /obj/item/reagent_containers/cup/beaker, /obj/item/cultivator, /obj/item/reagent_containers/spray/pestspray, /obj/item/hatchet, /obj/item/storage/bag/plants) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 1c4a19b78d63..1ab1a779e681 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -25,6 +25,7 @@ plane = GAME_PLANE_FOV_HIDDEN max_integrity = 100 item_flags = XENOMORPH_HOLDABLE + supports_variations_flags = CLOTHING_SNOUTED_VARIATION var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case var/sterile = FALSE diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 00e69ade86a1..f7449b28c0bb 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -42,7 +42,8 @@ GLOBAL_LIST_EMPTY(features_by_species) OFFSET_SUIT = list(0,0), OFFSET_NECK = list(0,0), ) - + ///If this species needs special 'fallback' sprites, what is the path to the file that contains them? + var/fallback_clothing_path ///The maximum number of bodyparts this species can have. var/max_bodypart_count = 6 ///This allows races to have specific hair colors. If null, it uses the H's hair/facial hair colors. If "mutcolor", it uses the H's mutant_color. If "fixedmutcolor", it uses fixedmutcolor @@ -766,7 +767,7 @@ GLOBAL_LIST_EMPTY(features_by_species) var/datum/sprite_accessory/undershirt/undershirt = GLOB.undershirt_list[species_human.undershirt] if(undershirt) var/mutable_appearance/working_shirt - if(species_human.dna.species.sexes && species_human.physique == FEMALE) + if(species_human.dna.species.sexes && species_human.physique == FEMALE && species_human.get_bodypart(BODY_ZONE_CHEST)?.is_dimorphic) working_shirt = wear_female_version(undershirt.icon_state, undershirt.icon, BODY_LAYER) else working_shirt = mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER) @@ -2274,9 +2275,9 @@ GLOBAL_LIST_EMPTY(features_by_species) new_species ||= target.dna.species //If no new species is provided, assume its src. //Note for future: Potentionally add a new C.dna.species() to build a template species for more accurate limb replacement + var/is_digitigrade = FALSE if((new_species.digitigrade_customization == DIGITIGRADE_OPTIONAL && target.dna.features["legs"] == DIGITIGRADE_LEGS) || new_species.digitigrade_customization == DIGITIGRADE_FORCED) - new_species.bodypart_overrides[BODY_ZONE_R_LEG] = /obj/item/bodypart/leg/right/digitigrade - new_species.bodypart_overrides[BODY_ZONE_L_LEG] = /obj/item/bodypart/leg/left/digitigrade + is_digitigrade = TRUE for(var/obj/item/bodypart/old_part as anything in target.bodyparts) if((old_part.change_exempt_flags & BP_BLOCK_CHANGE_SPECIES) || (old_part.bodypart_flags & BODYPART_IMPLANTED)) @@ -2286,6 +2287,8 @@ GLOBAL_LIST_EMPTY(features_by_species) var/obj/item/bodypart/new_part if(path) new_part = new path() + if(istype(new_part, /obj/item/bodypart/leg) && is_digitigrade) + new_part:set_digitigrade(TRUE) new_part.replace_limb(target, TRUE) new_part.update_limb(is_creating = TRUE) qdel(old_part) 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 e7ce621533be..b7c5018e6db8 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -105,7 +105,11 @@ There are several things that need to be remembered: if((dna?.species.bodytype & BODYTYPE_MONKEY) && (uniform.supports_variations_flags & CLOTHING_MONKEY_VARIATION)) icon_file = MONKEY_UNIFORM_FILE else if((dna?.species.bodytype & BODYTYPE_DIGITIGRADE) && (uniform.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION)) - icon_file = DIGITIGRADE_UNIFORM_FILE + icon_file = uniform.worn_icon_digitigrade || DIGITIGRADE_UNIFORM_FILE + if(!(icon_exists(icon_file, RESOLVE_ICON_STATE(uniform)))) //if the digitigrade icon doesn't exist + var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_UNIFORM, uniform) + if(species_icon_file) + icon_file = species_icon_file //Female sprites have lower priority than digitigrade sprites else if(dna.species.bodytype & BODYTYPE_CUSTOM) icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_UNIFORM, w_uniform) @@ -124,7 +128,7 @@ There are several things that need to be remembered: isinhands = FALSE, female_uniform = woman ? uniform.female_sprite_flags : null, override_state = target_overlay, - override_file = handled_by_bodytype ? icon_file : null, + override_file = handled_by_bodytype ? icon_file : null ) if(OFFSET_UNIFORM in dna.species.offset_features) @@ -324,12 +328,25 @@ There are several things that need to be remembered: var/icon_file = DEFAULT_SHOES_FILE var/mutant_override = FALSE - if(dna.species.bodytype & BODYTYPE_CUSTOM) + if((dna.species.bodytype & BODYTYPE_DIGITIGRADE) && (worn_item.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION)) + var/obj/item/bodypart/leg/leg = src.get_bodypart(BODY_ZONE_L_LEG) + if(leg.limb_id == leg.digitigrade_id) //make sure our legs are visually digitigrade + icon_file = shoes.worn_icon_digitigrade || DIGITIGRADE_SHOES_FILE + if(!(icon_exists(icon_file, RESOLVE_ICON_STATE(worn_item)))) //if the digitigrade icon doesn't exist + var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_SHOES, shoes) + if(species_icon_file) + icon_file = species_icon_file + mutant_override = TRUE + else if(dna.species.bodytype & BODYTYPE_CUSTOM) var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_SHOES, shoes) if(species_icon_file) icon_file = species_icon_file mutant_override = TRUE + if(!(icon_exists(icon_file, RESOLVE_ICON_STATE(worn_item)))) + mutant_override = FALSE + icon_file = DEFAULT_SHOES_FILE + var/mutable_appearance/shoes_overlay = shoes.build_worn_icon(default_layer = SHOES_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) if(!shoes_overlay) return @@ -380,12 +397,22 @@ There are several things that need to be remembered: var/icon_file = 'icons/mob/clothing/head/default.dmi' var/mutant_override = FALSE - if(dna.species.bodytype & BODYTYPE_CUSTOM) + + if(dna.species.bodytype & BODYTYPE_SNOUTED) + if(worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION) + if((icon_exists(head.worn_icon_snouted || SNOUTED_HEAD_FILE, RESOLVE_ICON_STATE(worn_item)))) //make sure the icon we're about to switch to exists + icon_file = head.worn_icon_snouted || SNOUTED_HEAD_FILE + mutant_override = TRUE + else if(dna.species.bodytype & BODYTYPE_CUSTOM) var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_HEAD, head) if(species_icon_file) icon_file = species_icon_file mutant_override = TRUE + if(!(icon_exists(icon_file, RESOLVE_ICON_STATE(worn_item)))) + mutant_override = FALSE + icon_file = 'icons/mob/clothing/head/default.dmi' + var/mutable_appearance/head_overlay = head.build_worn_icon(default_layer = HEAD_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) if(!mutant_override &&(OFFSET_HEAD in dna.species.offset_features)) head_overlay.pixel_x += dna.species.offset_features[OFFSET_HEAD][1] @@ -439,13 +466,22 @@ There are several things that need to be remembered: var/icon_file = DEFAULT_SUIT_FILE var/mutant_override = FALSE - if(dna.species.bodytype & BODYTYPE_CUSTOM) + if((dna?.species.bodytype & BODYTYPE_DIGITIGRADE) && (wear_suit.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION)) + icon_file = wear_suit.worn_icon_digitigrade || DIGITIGRADE_SUIT_FILE + mutant_override = TRUE + else if(dna.species.bodytype & BODYTYPE_CUSTOM) var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_SUIT, wear_suit) if(species_icon_file) icon_file = species_icon_file mutant_override = TRUE + if(!(icon_exists(icon_file, RESOLVE_ICON_STATE(worn_item)))) + mutant_override = FALSE + icon_file = DEFAULT_SUIT_FILE + var/mutable_appearance/suit_overlay = wear_suit.build_worn_icon(default_layer = SUIT_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) + if(!suit_overlay) + return if(!mutant_override && (OFFSET_SUIT in dna.species.offset_features)) suit_overlay.pixel_x += dna.species.offset_features[OFFSET_SUIT][1] suit_overlay.pixel_y += dna.species.offset_features[OFFSET_SUIT][2] @@ -497,12 +533,20 @@ There are several things that need to be remembered: var/icon_file = 'icons/mob/clothing/mask.dmi' var/mutant_override = FALSE - if(dna.species.bodytype & BODYTYPE_CUSTOM) + if(dna.species.bodytype & BODYTYPE_SNOUTED) + if(worn_item.supports_variations_flags & CLOTHING_SNOUTED_VARIATION) + icon_file = wear_mask.worn_icon_snouted || SNOUTED_MASK_FILE + mutant_override = TRUE + else if(dna.species.bodytype & BODYTYPE_CUSTOM) var/species_icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_MASK, wear_mask) if(species_icon_file) icon_file = species_icon_file mutant_override = TRUE + if(!(icon_exists(icon_file, RESOLVE_ICON_STATE(worn_item)))) + icon_file = 'icons/mob/clothing/mask.dmi' + mutant_override = FALSE + var/mutable_appearance/mask_overlay = wear_mask.build_worn_icon(default_layer = FACEMASK_LAYER, default_icon_file = icon_file, override_file = mutant_override ? icon_file : null) if(!mutant_override &&(OFFSET_FACEMASK in dna.species.offset_features)) mask_overlay.pixel_x += dna.species.offset_features[OFFSET_FACEMASK][1] @@ -602,7 +646,6 @@ There are several things that need to be remembered: out += overlays_standing[i] return out - //human HUD updates for items in our inventory /mob/living/carbon/human/proc/update_hud_uniform(obj/item/worn_item) diff --git a/code/modules/mod/mod_clothes.dm b/code/modules/mod/mod_clothes.dm index fd2732f7345f..849cb58e16f5 100644 --- a/code/modules/mod/mod_clothes.dm +++ b/code/modules/mod/mod_clothes.dm @@ -5,11 +5,13 @@ icon_state = "standard-helmet" base_icon_state = "helmet" worn_icon = 'icons/mob/clothing/modsuit/mod_clothing.dmi' + worn_icon_snouted = 'monkestation/icons/mob/mod.dmi' armor_type = /datum/armor/none body_parts_covered = HEAD heat_protection = HEAD cold_protection = HEAD obj_flags = IMMUTABLE_SLOW + supports_variations_flags = CLOTHING_SNOUTED_VARIATION /obj/item/clothing/suit/mod name = "MOD chestplate" @@ -18,6 +20,7 @@ icon_state = "standard-chestplate" base_icon_state = "chestplate" worn_icon = 'icons/mob/clothing/modsuit/mod_clothing.dmi' + worn_icon_digitigrade = 'monkestation/icons/mob/mod.dmi' blood_overlay_type = "armor" allowed = list( /obj/item/tank/internals, @@ -29,6 +32,7 @@ heat_protection = CHEST|GROIN cold_protection = CHEST|GROIN obj_flags = IMMUTABLE_SLOW + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION /obj/item/clothing/gloves/mod name = "MOD gauntlets" @@ -42,6 +46,7 @@ heat_protection = HANDS|ARMS cold_protection = HANDS|ARMS obj_flags = IMMUTABLE_SLOW + supports_variations_flags = NONE /obj/item/clothing/shoes/mod name = "MOD boots" @@ -50,6 +55,7 @@ icon_state = "standard-boots" base_icon_state = "boots" worn_icon = 'icons/mob/clothing/modsuit/mod_clothing.dmi' + worn_icon_digitigrade = 'monkestation/icons/mob/mod.dmi' armor_type = /datum/armor/none body_parts_covered = FEET|LEGS heat_protection = FEET|LEGS @@ -57,3 +63,4 @@ obj_flags = IMMUTABLE_SLOW item_flags = IGNORE_DIGITIGRADE can_be_tied = FALSE + supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION diff --git a/code/modules/mod/modules/_module.dm b/code/modules/mod/modules/_module.dm index c8fe571330c8..594528915f95 100644 --- a/code/modules/mod/modules/_module.dm +++ b/code/modules/mod/modules/_module.dm @@ -43,6 +43,14 @@ var/list/pinned_to = list() /// flags that let the module ability be used in odd circumstances var/allow_flags = NONE + /// The suit's supports_variations_flags, currently only for the chestplate and the helmet parts of the MODsuit. + var/suit_supports_variations_flags = NONE + /// Does this module have a separate head sprite? Useful for muzzled sprites + var/has_head_sprite = FALSE + /// Is the module's visuals head-only when active? Useful for visors and such, to avoid multiplying the amount of overlay with empty images + var/head_only_when_active = FALSE + /// Is the module's visuals head-only when inactive? Useful for visors and such, to avoid multiplying the amount of overlay with empty images + var/head_only_when_inactive = FALSE /// Timer for the cooldown COOLDOWN_DECLARE(cooldown_timer) @@ -404,3 +412,45 @@ /obj/item/mod/module/anomaly_locked/update_icon_state() icon_state = initial(icon_state) + (core ? "-core" : "") return ..() + +/** + * Proc that handles the mutable_appearances of the module on the MODsuits + * + * Arguments: + * * standing - The mutable_appearance we're taking as a reference for this one, mainly to use its layer. + * * module_icon_state - The name of the icon_state we'll be using for the module on the MODsuit. + */ +/obj/item/mod/module/proc/handle_module_icon(mutable_appearance/standing, module_icon_state) + . = list() + if(mod.wearer) + if(mod.chestplate && (mod.chestplate.supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION) && (mod.wearer.dna.species.bodytype & BODYTYPE_DIGITIGRADE)) + suit_supports_variations_flags |= CLOTHING_DIGITIGRADE_VARIATION + + if(mod.helmet && (mod.helmet.supports_variations_flags & CLOTHING_SNOUTED_VARIATION) && (mod.wearer.dna.species.bodytype & BODYTYPE_SNOUTED)) + suit_supports_variations_flags |= CLOTHING_SNOUTED_VARIATION + + var/icon_to_use = 'icons/mob/clothing/modsuit/mod_modules.dmi' + var/icon_state_to_use = module_icon_state + var/add_overlay = TRUE + if(suit_supports_variations_flags && (supports_variations_flags & CLOTHING_DIGITIGRADE_VARIATION)) + icon_to_use = 'monkestation/icons/mob/mod.dmi' + icon_state_to_use = "[module_icon_state]_digi" + + if((active && head_only_when_active) | (!active && head_only_when_inactive)) + add_overlay = FALSE + + if(add_overlay) + var/mutable_appearance/module_icon = mutable_appearance(icon_to_use, icon_state_to_use, layer = standing.layer + 0.1) // Just changed the raw icon path to icon_to_use and the used_overlay to icon_state_to_use + module_icon.appearance_flags |= RESET_COLOR + . += module_icon + + if(has_head_sprite) + icon_to_use = 'monkestation/icons/mob/mod.dmi' + icon_state_to_use = "[module_icon_state]_head" + + if(suit_supports_variations_flags && (supports_variations_flags & CLOTHING_SNOUTED_VARIATION)) + icon_state_to_use = "[icon_state_to_use]_muzzled" + + var/mutable_appearance/additional_module_icon = mutable_appearance(icon_to_use, icon_state_to_use, layer = standing.layer + 0.1) + additional_module_icon.appearance_flags |= RESET_COLOR + . += additional_module_icon diff --git a/code/modules/mod/modules/modules_antag.dm b/code/modules/mod/modules/modules_antag.dm index 0c603350f640..338f8c0a2f9a 100644 --- a/code/modules/mod/modules/modules_antag.dm +++ b/code/modules/mod/modules/modules_antag.dm @@ -16,6 +16,9 @@ overlay_state_inactive = "module_armorbooster_off" overlay_state_active = "module_armorbooster_on" use_mod_colors = TRUE + suit_supports_variations_flags = CLOTHING_DIGITIGRADE_VARIATION | CLOTHING_SNOUTED_VARIATION + has_head_sprite = TRUE + head_only_when_active = TRUE /// Whether or not this module removes pressure protection. var/remove_pressure_protection = TRUE /// Speed added to the control unit. @@ -80,6 +83,8 @@ /obj/item/mod/module/armor_booster/generate_worn_overlay(mutable_appearance/standing) overlay_state_inactive = "[initial(overlay_state_inactive)]-[mod.skin]" overlay_state_active = "[initial(overlay_state_active)]-[mod.skin]" + if((mod.wearer?.dna.species.bodytype & BODYTYPE_SNOUTED) && (suit_supports_variations_flags & CLOTHING_SNOUTED_VARIATION)) + overlay_icon_file = 'monkestation/icons/mob/mod.dmi' //if the user has a snout, and the module supports a snout, we'll shift to the digi/snout icon file instead return ..() ///Energy Shield - Gives you a rechargeable energy shield that nullifies attacks. diff --git a/code/modules/surgery/bodyparts/digitigrade.dm b/code/modules/surgery/bodyparts/digitigrade.dm new file mode 100644 index 000000000000..1d297c33fcb8 --- /dev/null +++ b/code/modules/surgery/bodyparts/digitigrade.dm @@ -0,0 +1,42 @@ +/obj/item/bodypart/leg/proc/set_digitigrade(is_digi) + if(is_digi) + if(!can_be_digitigrade) + return FALSE + + bodytype |= BODYTYPE_DIGITIGRADE + . = TRUE + else + if(!(bodytype & BODYTYPE_DIGITIGRADE)) + return FALSE + + bodytype &= ~BODYTYPE_DIGITIGRADE + if(old_limb_id) + limb_id = old_limb_id + . = TRUE + + if(.) + if(owner) + synchronize_bodytypes(owner) + owner.update_body_parts() + else + update_icon_dropped() + + +/obj/item/bodypart/leg/update_limb(dropping_limb, is_creating) + . = ..() + if(!ishuman(owner) || !(bodytype & BODYTYPE_DIGITIGRADE)) + return + + var/mob/living/carbon/human/human_owner = owner + var/uniform_compatible = FALSE + var/suit_compatible = FALSE + if(!(human_owner.w_uniform) || (human_owner.w_uniform.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON))) //Checks uniform compatibility + uniform_compatible = TRUE + if((!human_owner.wear_suit) || (human_owner.wear_suit.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON)) || !(human_owner.wear_suit.body_parts_covered & LEGS)) //Checks suit compatability + suit_compatible = TRUE + + if((uniform_compatible && suit_compatible) || (suit_compatible && human_owner.wear_suit?.flags_inv & HIDEJUMPSUIT)) //If the uniform is hidden, it doesnt matter if its compatible + old_limb_id = limb_id + limb_id = digitigrade_id + else + limb_id = old_limb_id diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index dddf77755807..f441643ba768 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -306,7 +306,7 @@ desc = "This item shouldn't exist. Talk about breaking a leg. Badum-Tss!" attack_verb_continuous = list("kicks", "stomps") attack_verb_simple = list("kick", "stomp") - bodytype = BODYTYPE_HUMANOID | BODYTYPE_MONKEY | BODYTYPE_ORGANIC + bodytype = BODYTYPE_HUMANOID | BODYTYPE_ORGANIC max_damage = 50 body_damage_coeff = 0.75 can_be_disabled = TRUE @@ -317,6 +317,12 @@ unarmed_damage_high = 15 unarmed_stun_threshold = 10 + /// Can these legs be digitigrade? See digitigrade.dm + var/can_be_digitigrade = FALSE + ///Set limb_id to this when in "digi mode". MUST BE UNIQUE LIKE ALL LIMB IDS + var/digitigrade_id + /// Used solely by digitigrade limbs to remember what their old limb ID was. + var/old_limb_id biological_state = BIO_STANDARD_JOINTED /obj/item/bodypart/leg/Destroy() diff --git a/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm b/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm index 1c24a849e39b..233afcd9b19b 100644 --- a/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm +++ b/code/modules/surgery/bodyparts/species_parts/lizard_bodyparts.dm @@ -6,7 +6,7 @@ /obj/item/bodypart/chest/lizard icon_greyscale = 'icons/mob/species/lizard/bodyparts.dmi' limb_id = SPECIES_LIZARD - is_dimorphic = TRUE + is_dimorphic = FALSE /obj/item/bodypart/arm/left/lizard icon_greyscale = 'icons/mob/species/lizard/bodyparts.dmi' @@ -33,59 +33,11 @@ /obj/item/bodypart/leg/left/lizard icon_greyscale = 'icons/mob/species/lizard/bodyparts.dmi' limb_id = SPECIES_LIZARD + can_be_digitigrade = TRUE + digitigrade_id = "digitigrade" /obj/item/bodypart/leg/right/lizard icon_greyscale = 'icons/mob/species/lizard/bodyparts.dmi' limb_id = SPECIES_LIZARD - -/obj/item/bodypart/leg/left/digitigrade - icon_greyscale = 'icons/mob/species/lizard/bodyparts.dmi' - limb_id = BODYPART_ID_DIGITIGRADE - bodytype = BODYTYPE_HUMANOID | BODYTYPE_ORGANIC | BODYTYPE_DIGITIGRADE - -/obj/item/bodypart/leg/left/digitigrade/update_limb(dropping_limb = FALSE, is_creating = FALSE) - . = ..() - if(ishuman(owner)) - var/mob/living/carbon/human/human_owner = owner - var/obj/item/clothing/shoes/worn_shoes = human_owner.get_item_by_slot(ITEM_SLOT_FEET) - var/uniform_compatible = FALSE - var/suit_compatible = FALSE - var/shoes_compatible = FALSE - if(!(human_owner.w_uniform) || (human_owner.w_uniform.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON))) //Checks uniform compatibility - uniform_compatible = TRUE - if((!human_owner.wear_suit) || (human_owner.wear_suit.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON)) || !(human_owner.wear_suit.body_parts_covered & LEGS)) //Checks suit compatability - suit_compatible = TRUE - if((worn_shoes == null) || (worn_shoes.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON))) - shoes_compatible = TRUE - - if((uniform_compatible && suit_compatible && shoes_compatible) || (suit_compatible && shoes_compatible && human_owner.wear_suit?.flags_inv & HIDEJUMPSUIT)) //If the uniform is hidden, it doesnt matter if its compatible - limb_id = BODYPART_ID_DIGITIGRADE - - else - limb_id = SPECIES_LIZARD - -/obj/item/bodypart/leg/right/digitigrade - icon_greyscale = 'icons/mob/species/lizard/bodyparts.dmi' - limb_id = BODYPART_ID_DIGITIGRADE - bodytype = BODYTYPE_HUMANOID | BODYTYPE_ORGANIC | BODYTYPE_DIGITIGRADE - -/obj/item/bodypart/leg/right/digitigrade/update_limb(dropping_limb = FALSE, is_creating = FALSE) - . = ..() - if(ishuman(owner)) - var/mob/living/carbon/human/human_owner = owner - var/obj/item/clothing/shoes/worn_shoes = human_owner.get_item_by_slot(ITEM_SLOT_FEET) - var/uniform_compatible = FALSE - var/suit_compatible = FALSE - var/shoes_compatible = FALSE - if(!(human_owner.w_uniform) || (human_owner.w_uniform.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON))) //Checks uniform compatibility - uniform_compatible = TRUE - if((!human_owner.wear_suit) || (human_owner.wear_suit.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON)) || !(human_owner.wear_suit.body_parts_covered & LEGS)) //Checks suit compatability - suit_compatible = TRUE - if((worn_shoes == null) || (worn_shoes.supports_variations_flags & (CLOTHING_DIGITIGRADE_VARIATION|CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON))) - shoes_compatible = TRUE - - if((uniform_compatible && suit_compatible && shoes_compatible) || (suit_compatible && shoes_compatible && human_owner.wear_suit?.flags_inv & HIDEJUMPSUIT)) //If the uniform is hidden, it doesnt matter if its compatible - limb_id = BODYPART_ID_DIGITIGRADE - - else - limb_id = SPECIES_LIZARD + can_be_digitigrade = TRUE + digitigrade_id = "digitigrade" diff --git a/code/modules/surgery/organs/_organ.dm b/code/modules/surgery/organs/_organ.dm index 0363a9aa7e23..1a1885c5423b 100644 --- a/code/modules/surgery/organs/_organ.dm +++ b/code/modules/surgery/organs/_organ.dm @@ -41,10 +41,28 @@ var/failure_time = 0 ///Do we effect the appearance of our mob. Used to save time in preference code var/visual = TRUE + ///If the organ is cosmetic only, it loses all organ functionality. + var/cosmetic_only = FALSE /// Traits that are given to the holder of the organ. If you want an effect that changes this, don't add directly to this. Use the add_organ_trait() proc - var/list/organ_traits + var/list/organ_traits = list() /// Status Effects that are given to the holder of the organ. var/list/organ_effects + ///Sometimes we need multiple layers, for like the back, middle and front of the person + var/list/layers + ///Defines what kind of 'organ' we're looking at. Sprites have names like 'm_mothwings_firemoth'. 'mothwings' would then be feature_key + var/feature_key = "" + ///Similar to feature key, but overrides it in the case you need more fine control over the iconstate, like with Tails. + var/render_key = "" + ///Stores the dna.features[feature_key], used for external organs that can be surgically removed or inserted. + var/stored_feature_id = "" + /// The savefile_key of the preference this relates to. Used for the preferences UI. + var/preference + ///Sprite datum we use to draw on the bodypart + var/datum/sprite_accessory/sprite_datum + ///With what DNA block do we mutate in mutate_feature() ? For genetics + var/dna_block + ///Does this organ have any bodytypes to pass to it's ownerlimb? + var/external_bodytypes = NONE /// String displayed when the organ has decayed. var/failing_desc = "has decayed for too long, and has turned a sickly color. It probably won't work without repairs." @@ -54,7 +72,7 @@ // any nonhumans created in that time would experience the same effect. INITIALIZE_IMMEDIATE(/obj/item/organ) -/obj/item/organ/Initialize(mapload) +/obj/item/organ/Initialize(mapload, mob_sprite) . = ..() if(organ_flags & ORGAN_EDIBLE) AddComponent(/datum/component/edible,\ @@ -63,6 +81,20 @@ INITIALIZE_IMMEDIATE(/obj/item/organ) volume = reagent_vol,\ after_eat = CALLBACK(src, PROC_REF(OnEatFrom))) + if(cosmetic_only) //Cosmetic organs don't process. + if(mob_sprite) + set_sprite(mob_sprite) + +/obj/item/organ/proc/set_sprite(sprite_name) + stored_feature_id = sprite_name + sprite_datum = get_global_feature_list()[sprite_name] + if(!sprite_datum && stored_feature_id) + stack_trace("External organ has no valid sprite datum for name [sprite_name]") + +///Return a dumb glob list for this specific feature (called from parse_sprite) +/obj/item/organ/proc/get_global_feature_list() + CRASH("External organ has no feature list, it will render invisible") + /* * Insert the organ into the select mob. * diff --git a/code/modules/surgery/organs/external/_external_organs.dm b/code/modules/surgery/organs/external/_external_organs.dm index ca747f498879..b22d325f4c4d 100644 --- a/code/modules/surgery/organs/external/_external_organs.dm +++ b/code/modules/surgery/organs/external/_external_organs.dm @@ -17,16 +17,9 @@ ///If not null, overrides the appearance with this sprite accessory datum var/sprite_accessory_override - /// The savefile_key of the preference this relates to. Used for the preferences UI. - var/preference - ///With what DNA block do we mutate in mutate_feature() ? For genetics - var/dna_block - ///Set to EXTERNAL_BEHIND, EXTERNAL_FRONT or EXTERNAL_ADJACENT if you want to draw one of those layers as the object sprite. FALSE to use your own ///This will not work if it doesn't have a limb to generate it's icon with var/use_mob_sprite_as_obj_sprite = FALSE - ///Does this organ have any bodytypes to pass to it's ownerlimb? - var/external_bodytypes = NONE ///Which flags does a 'modification tool' need to have to restyle us, if it all possible (located in code/_DEFINES/mobs) var/restyle_flags = NONE @@ -221,9 +214,15 @@ desc = "Take a closer look at that snout!" icon_state = "snout" + organ_flags = ORGAN_UNREMOVABLE | ORGAN_EDIBLE + visual = TRUE + cosmetic_only = TRUE + zone = BODY_ZONE_HEAD slot = ORGAN_SLOT_EXTERNAL_SNOUT + layers = list(BODY_ADJ_LAYER) + feature_key = "snout" preference = "feature_lizard_snout" external_bodytypes = BODYTYPE_SNOUTED diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png index 3bd5efdc3896..8d4ce08d1afd 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard.png differ diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png index 92b82d57d685..47533d89deb4 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_ashwalker.png differ diff --git a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png index 5d2f36315973..5cdf85338431 100644 Binary files a/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png and b/code/modules/unit_tests/screenshots/screenshot_humanoids__datum_species_lizard_silverscale.png differ diff --git a/icons/mob/species/lizard/bodyparts.dmi b/icons/mob/species/lizard/bodyparts.dmi index f81da7e6f6ad..9d3c3b6c5943 100644 Binary files a/icons/mob/species/lizard/bodyparts.dmi and b/icons/mob/species/lizard/bodyparts.dmi differ diff --git a/icons/mob/species/lizard/lizard_misc.dmi b/icons/mob/species/lizard/lizard_misc.dmi index ab228f29076f..cb4a0435b592 100644 Binary files a/icons/mob/species/lizard/lizard_misc.dmi and b/icons/mob/species/lizard/lizard_misc.dmi differ diff --git a/monkestation/code/modules/clothing/spacesuits/hardsuits/_hardsuit.dm b/monkestation/code/modules/clothing/spacesuits/hardsuits/_hardsuit.dm index 719f959446f1..4d8352baab4c 100644 --- a/monkestation/code/modules/clothing/spacesuits/hardsuits/_hardsuit.dm +++ b/monkestation/code/modules/clothing/spacesuits/hardsuits/_hardsuit.dm @@ -13,7 +13,6 @@ allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/t_scanner, /obj/item/construction/rcd, /obj/item/pipe_dispenser) siemens_coefficient = 0 actions_types = list(/datum/action/item_action/toggle_helmet) - supports_variations_flags = NONE var/obj/item/clothing/head/helmet/space/hardsuit/helmet var/helmettype = /obj/item/clothing/head/helmet/space/hardsuit diff --git a/monkestation/code/modules/mob/living/carbon/human/lizard_gags.dm b/monkestation/code/modules/mob/living/carbon/human/lizard_gags.dm new file mode 100644 index 000000000000..d85a75940767 --- /dev/null +++ b/monkestation/code/modules/mob/living/carbon/human/lizard_gags.dm @@ -0,0 +1,10 @@ +/obj/item + var/datum/greyscale_config/greyscale_config_worn_lizard_fallback + +/obj/item/clothing/shoes + species_clothing_color_coords = list(list(UNDER_COLORPIXEL_X_1, UNDER_COLORPIXEL_Y_1), list(UNDER_COLORPIXEL_X_2, UNDER_COLORPIXEL_Y_2)) + greyscale_config_worn_lizard_fallback = /datum/greyscale_config/lizard/shoes + +/obj/item/clothing/under + species_clothing_color_coords = list(list(UNDER_COLORPIXEL_X_1, UNDER_COLORPIXEL_Y_1), list(UNDER_COLORPIXEL_X_2, UNDER_COLORPIXEL_Y_2)) + greyscale_config_worn_lizard_fallback = /datum/greyscale_config/lizard/under diff --git a/monkestation/code/modules/mob/living/carbon/human/species_type/lizardpeople.dm b/monkestation/code/modules/mob/living/carbon/human/species_type/lizardpeople.dm index 0ebbe6f6b119..f3efd0b7c62b 100644 --- a/monkestation/code/modules/mob/living/carbon/human/species_type/lizardpeople.dm +++ b/monkestation/code/modules/mob/living/carbon/human/species_type/lizardpeople.dm @@ -18,3 +18,17 @@ if(prob(1)) return 'monkestation/sound/voice/weh.ogg' return 'monkestation/sound/voice/laugh/lizard/lizard_laugh.ogg' + +/datum/species/lizard/get_custom_worn_config_fallback(item_slot, obj/item/item) + + return item.greyscale_config_worn_lizard_fallback + +/datum/species/lizard/generate_custom_worn_icon(item_slot, obj/item/item) + . = ..() + if(.) + return + + // Use the fancy fallback sprites. + . = generate_custom_worn_icon_fallback(item_slot, item) + if(.) + return diff --git a/monkestation/code/modules/surgery/organs/external/chelicerae/chelicerae.dm b/monkestation/code/modules/surgery/organs/external/chelicerae/chelicerae.dm index 138c018c71ff..95a3c24671e7 100644 --- a/monkestation/code/modules/surgery/organs/external/chelicerae/chelicerae.dm +++ b/monkestation/code/modules/surgery/organs/external/chelicerae/chelicerae.dm @@ -4,8 +4,7 @@ preference = "feature_arachnid_chelicerae" zone = BODY_ZONE_HEAD - slot = ORGAN_SLOT_EXTERNAL_SNOUT - external_bodytypes = BODYTYPE_SNOUTED + slot = ORGAN_SLOT_EXTERNAL_ANTENNAE use_mob_sprite_as_obj_sprite = TRUE bodypart_overlay = /datum/bodypart_overlay/mutant/arachnid_chelicerae diff --git a/monkestation/icons/mob/clothing/species/feet_digi.dmi b/monkestation/icons/mob/clothing/species/feet_digi.dmi new file mode 100644 index 000000000000..92f76d5b6308 Binary files /dev/null and b/monkestation/icons/mob/clothing/species/feet_digi.dmi differ diff --git a/monkestation/icons/mob/clothing/species/head_muzzled.dmi b/monkestation/icons/mob/clothing/species/head_muzzled.dmi new file mode 100644 index 000000000000..7570b61d7b1b Binary files /dev/null and b/monkestation/icons/mob/clothing/species/head_muzzled.dmi differ diff --git a/monkestation/icons/mob/clothing/species/mask_muzzled.dmi b/monkestation/icons/mob/clothing/species/mask_muzzled.dmi new file mode 100644 index 000000000000..82b13494c5d7 Binary files /dev/null and b/monkestation/icons/mob/clothing/species/mask_muzzled.dmi differ diff --git a/monkestation/icons/mob/clothing/species/suit_digi.dmi b/monkestation/icons/mob/clothing/species/suit_digi.dmi new file mode 100644 index 000000000000..89b99dbf2306 Binary files /dev/null and b/monkestation/icons/mob/clothing/species/suit_digi.dmi differ diff --git a/monkestation/icons/mob/clothing/species/uniform_digi.dmi b/monkestation/icons/mob/clothing/species/uniform_digi.dmi new file mode 100644 index 000000000000..64cee185b819 Binary files /dev/null and b/monkestation/icons/mob/clothing/species/uniform_digi.dmi differ diff --git a/monkestation/icons/mob/gags/clothing/lizard_fallbacks.dmi b/monkestation/icons/mob/gags/clothing/lizard_fallbacks.dmi new file mode 100644 index 000000000000..6841a1c9050b Binary files /dev/null and b/monkestation/icons/mob/gags/clothing/lizard_fallbacks.dmi differ diff --git a/monkestation/icons/mob/mod.dmi b/monkestation/icons/mob/mod.dmi new file mode 100644 index 000000000000..8f053f47ecaa Binary files /dev/null and b/monkestation/icons/mob/mod.dmi differ diff --git a/monkestation/icons/mob/species/lizard/multipart.dmi b/monkestation/icons/mob/species/lizard/multipart.dmi index e5214bbe3bfc..659930eae881 100644 Binary files a/monkestation/icons/mob/species/lizard/multipart.dmi and b/monkestation/icons/mob/species/lizard/multipart.dmi differ diff --git a/monkestation/icons/mob/species/misc/feet_digi.dmi b/monkestation/icons/mob/species/misc/feet_digi.dmi new file mode 100644 index 000000000000..6f37a62c36b3 Binary files /dev/null and b/monkestation/icons/mob/species/misc/feet_digi.dmi differ diff --git a/monkestation/icons/mob/species/misc/head_muzzled.dmi b/monkestation/icons/mob/species/misc/head_muzzled.dmi new file mode 100644 index 000000000000..71df59af70e4 Binary files /dev/null and b/monkestation/icons/mob/species/misc/head_muzzled.dmi differ diff --git a/monkestation/icons/mob/species/misc/mask_muzzled.dmi b/monkestation/icons/mob/species/misc/mask_muzzled.dmi new file mode 100644 index 000000000000..8decaadcc62f Binary files /dev/null and b/monkestation/icons/mob/species/misc/mask_muzzled.dmi differ diff --git a/monkestation/icons/mob/species/misc/mod.dmi b/monkestation/icons/mob/species/misc/mod.dmi new file mode 100644 index 000000000000..b2d514e3ab68 Binary files /dev/null and b/monkestation/icons/mob/species/misc/mod.dmi differ diff --git a/monkestation/icons/mob/species/misc/suit_digi.dmi b/monkestation/icons/mob/species/misc/suit_digi.dmi new file mode 100644 index 000000000000..2ae0ebd6627a Binary files /dev/null and b/monkestation/icons/mob/species/misc/suit_digi.dmi differ diff --git a/monkestation/icons/mob/species/misc/uniform_digi.dmi b/monkestation/icons/mob/species/misc/uniform_digi.dmi new file mode 100644 index 000000000000..36239900b048 Binary files /dev/null and b/monkestation/icons/mob/species/misc/uniform_digi.dmi differ diff --git a/tgstation.dme b/tgstation.dme index ada172fa6251..791c5aced03d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5281,6 +5281,7 @@ #include "code\modules\surgery\advanced\bioware\nerve_splicing.dm" #include "code\modules\surgery\advanced\bioware\vein_threading.dm" #include "code\modules\surgery\bodyparts\_bodyparts.dm" +#include "code\modules\surgery\bodyparts\digitigrade.dm" #include "code\modules\surgery\bodyparts\dismemberment.dm" #include "code\modules\surgery\bodyparts\hair.dm" #include "code\modules\surgery\bodyparts\head.dm" @@ -6194,6 +6195,7 @@ #include "monkestation\code\modules\mob\living\carbon\human\emotes.dm" #include "monkestation\code\modules\mob\living\carbon\human\human.dm" #include "monkestation\code\modules\mob\living\carbon\human\human_defines.dm" +#include "monkestation\code\modules\mob\living\carbon\human\lizard_gags.dm" #include "monkestation\code\modules\mob\living\carbon\human\simian_gags.dm" #include "monkestation\code\modules\mob\living\carbon\human\species.dm" #include "monkestation\code\modules\mob\living\carbon\human\worn_overlays.dm"