diff --git a/code/modules/client/character_menu/general.dm b/code/modules/client/character_menu/general.dm index b70ae55c993d..9e6c7157eace 100644 --- a/code/modules/client/character_menu/general.dm +++ b/code/modules/client/character_menu/general.dm @@ -339,16 +339,22 @@ if("h_style") var/list/valid_hairstyles = get_valid_styles_from_cache(hairs_cache) + if(!length(valid_hairstyles)) + return var/new_h_style = input(user, "Choose your character's hair style:", "Character Hair Style", h_style) as null|anything in valid_hairstyles if(new_h_style) h_style = new_h_style if("h_style_left") var/list/valid_hairstyles = get_valid_styles_from_cache(hairs_cache) + if(!length(valid_hairstyles)) + return h_style = valid_hairstyles[h_style][LEFT] if("h_style_right") var/list/valid_hairstyles = get_valid_styles_from_cache(hairs_cache) + if(!length(valid_hairstyles)) + return h_style = valid_hairstyles[h_style][RIGHT] if("grad_color") @@ -385,16 +391,22 @@ if("f_style") var/list/valid_facialhairstyles = get_valid_styles_from_cache(facial_hairs_cache) + if(!length(valid_facialhairstyles)) + return var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character facial-hair style", f_style) as null|anything in valid_facialhairstyles if(new_f_style) f_style = new_f_style if("f_style_left") var/list/valid_facialhairstyles = get_valid_styles_from_cache(facial_hairs_cache) + if(!length(valid_facialhairstyles)) + return f_style = valid_facialhairstyles[f_style][LEFT] if("f_style_right") var/list/valid_facialhairstyles = get_valid_styles_from_cache(facial_hairs_cache) + if(!length(valid_facialhairstyles)) + return f_style = valid_facialhairstyles[f_style][RIGHT] if("underwear") @@ -595,7 +607,7 @@ organ_data[organ] = "mechanical" // Choosing a head for an IPC if("ipc_head") - var/list/ipc_heads = list("Default", "Alien", "Double", "Pillar", "Human") + var/list/ipc_heads = list("Default", "Cobalt", "Cathod", "Thorax", "Axon") ipc_head = input("Please select a head type", "Character Generation", null) in ipc_heads h_style = random_hair_style(gender, species, ipc_head) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index fb7911fa5d50..05bcf1473d4b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -415,17 +415,17 @@ var/global/list/datum/preferences/preferences_datums = list() if("Default") var/obj/item/organ/external/head/robot/ipc/H = new(null) H.insert_organ(character) - if("Alien") - var/obj/item/organ/external/head/robot/ipc/alien/H = new(null) + if("Cobalt") + var/obj/item/organ/external/head/robot/ipc/cobalt/H = new(null) H.insert_organ(character) - if("Double") - var/obj/item/organ/external/head/robot/ipc/double/H = new(null) + if("Cathod") + var/obj/item/organ/external/head/robot/ipc/cathod/H = new(null) H.insert_organ(character) - if("Pillar") - var/obj/item/organ/external/head/robot/ipc/pillar/H = new(null) + if("Thorax") + var/obj/item/organ/external/head/robot/ipc/thorax/H = new(null) H.insert_organ(character) - if("Human") - var/obj/item/organ/external/head/robot/ipc/human/H = new(null) + if("Axon") + var/obj/item/organ/external/head/robot/ipc/axon/H = new(null) H.insert_organ(character) var/obj/item/organ/internal/eyes/ipc/IO = new(null) IO.insert_organ(character) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 446e16580730..4e4dfeb8fbf9 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -3,7 +3,7 @@ //This is the current version, anything below this will attempt to update (if it's not obsolete) -#define SAVEFILE_VERSION_MAX 52 +#define SAVEFILE_VERSION_MAX 53 //For repetitive updates, should be the same or below SAVEFILE_VERSION_MAX //set this to (current SAVEFILE_VERSION_MAX)+1 when you need to update: @@ -466,6 +466,18 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if (pre_52_hairstyles_to_modern_ones[h_style]) h_style = pre_52_hairstyles_to_modern_ones[h_style] + if(current_version < 53) + ipc_head = initial(ipc_head) + // fuck named hairstyles, we should just move it to indexes + var/static/list/ipc_hairstyles_reset = list( + "alien IPC screen", + "double IPC screen", + "pillar IPC screen", + "human IPC screen" + ) + if(h_style in ipc_hairstyles_reset) + h_style = "Default" + // /datum/preferences/proc/repetitive_updates_character(current_version, savefile/S) diff --git a/code/modules/mob/dead/new_player/sprite_accessories.dm b/code/modules/mob/dead/new_player/sprite_accessories.dm index d3a4029d3bbb..20c48dfb753b 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories.dm @@ -1051,29 +1051,29 @@ species_allowed = list(IPC) ipc_head_compatible = "Default" -/datum/sprite_accessory/hair/ipc_screen_alien - name = "alien IPC screen" - icon_state = "ipc_alien" +/datum/sprite_accessory/hair/ipc_screen_cobalt + name = "cobalt IPC screen" + icon_state = "ipc_cobalt" species_allowed = list(IPC) - ipc_head_compatible = "Alien" + ipc_head_compatible = "Cobalt" -/datum/sprite_accessory/hair/ipc_screen_double - name = "double IPC screen" - icon_state = "ipc_double" +/datum/sprite_accessory/hair/ipc_screen_cathod + name = "cathod IPC screen" + icon_state = "ipc_cathod" species_allowed = list(IPC) - ipc_head_compatible = "Double" + ipc_head_compatible = "Cathod" -/datum/sprite_accessory/hair/ipc_screen_pillar - name = "pillar IPC screen" - icon_state = "ipc_pillar" +/datum/sprite_accessory/hair/ipc_screen_thorax + name = "thorax IPC screen" + icon_state = "ipc_thorax" species_allowed = list(IPC) - ipc_head_compatible = "Pillar" + ipc_head_compatible = "Thorax" -/datum/sprite_accessory/hair/ipc_screen_human - name = "human IPC screen" - icon_state = "ipc_human" +/datum/sprite_accessory/hair/ipc_screen_axon + name = "axon IPC screen" + icon_state = "ipc_axon" species_allowed = list(IPC) - ipc_head_compatible = "Human" + ipc_head_compatible = "Axon" /datum/sprite_accessory/hair/ipc_tamagotchi name = "tamagotchi IPC screen" diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 32a269fd06a5..093efb29b431 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -7,6 +7,8 @@ var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set. var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set. + var/alpha_color_mask = FALSE + var/damage_mask = TRUE var/eyes_icon = 'icons/mob/human_face.dmi' var/eyes = "eyes" // Icon for eyes. @@ -1076,6 +1078,8 @@ name = IPC icobase = 'icons/mob/human_races/r_machine.dmi' deform = 'icons/mob/human_races/r_machine.dmi' + alpha_color_mask = TRUE + language = LANGUAGE_TRINARY unarmed_type = /datum/unarmed_attack/punch race_verbs = list( diff --git a/code/modules/organs/external/ipc.dm b/code/modules/organs/external/ipc.dm index faae79027492..833b33c9abef 100644 --- a/code/modules/organs/external/ipc.dm +++ b/code/modules/organs/external/ipc.dm @@ -34,17 +34,17 @@ icon_state = "[body_zone]_[ipc_head]" color = original_color -/obj/item/organ/external/head/robot/ipc/alien - ipc_head = "Alien" +/obj/item/organ/external/head/robot/ipc/cobalt + ipc_head = "Cobalt" -/obj/item/organ/external/head/robot/ipc/double - ipc_head = "Double" +/obj/item/organ/external/head/robot/ipc/cathod + ipc_head = "Cathod" -/obj/item/organ/external/head/robot/ipc/pillar - ipc_head = "Pillar" +/obj/item/organ/external/head/robot/ipc/thorax + ipc_head = "Thorax" -/obj/item/organ/external/head/robot/ipc/human - ipc_head = "Human" +/obj/item/organ/external/head/robot/ipc/axon + ipc_head = "Axon" /obj/item/organ/external/groin/robot/ipc name = "ipc groin" diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index f2756a6cef92..6ef3ece35cac 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -569,42 +569,51 @@ Note that amputating the affected organ does in fact remove the infection from t return update_sprite() - var/mutable_appearance/MA = mutable_appearance(icon, icon_state, -icon_layer) - MA.color = color + var/mutable_appearance/base_appearance = mutable_appearance(icon, icon_state, -icon_layer) + . = list(base_appearance) - return MA + if(species && species.alpha_color_mask) + var/mutable_appearance/color_appearance = mutable_appearance(icon, "alpha_[icon_state]", -icon_layer) + color_appearance.color = color + . += color_appearance + else + base_appearance.color = color /obj/item/organ/external/head/get_icon(icon_layer) if (!owner) return update_sprite() - var/mutable_appearance/MA = mutable_appearance(icon, icon_state, -icon_layer) - MA.color = color - . = list(MA) + var/mutable_appearance/base_appearance = mutable_appearance(icon, icon_state, -icon_layer) + . = list(base_appearance) + + if(species && species.alpha_color_mask) + var/mutable_appearance/color_appearance = mutable_appearance(icon, "alpha_[icon_state]", -icon_layer) + color_appearance.color = color + . += color_appearance + else + base_appearance.color = color - //Eyes if(species && species.eyes) - var/eyes_layer = -icon_layer - var/mutable_appearance/img_eyes_s = mutable_appearance(species.eyes_icon, species.eyes, eyes_layer) + var/mutable_appearance/eyes_appearance = mutable_appearance(species.eyes_icon, species.eyes, -icon_layer) if(species.eyes_glowing) - img_eyes_s.plane = LIGHTING_LAMPS_PLANE - img_eyes_s.layer = ABOVE_LIGHTING_LAYER + eyes_appearance.plane = LIGHTING_LAMPS_PLANE + eyes_appearance.layer = ABOVE_LIGHTING_LAYER if(HULK in owner.mutations) - img_eyes_s.color = "#ff0000" + eyes_appearance.color = "#ff0000" else if(species.name == SHADOWLING || iszombie(owner)) - img_eyes_s.color = null + eyes_appearance.color = null else - img_eyes_s.color = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes) + eyes_appearance.color = rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes) - . += img_eyes_s + . += eyes_appearance //Mouth (lipstick!) if(owner.lip_style && owner.species.flags[HAS_LIPS]) // skeletons are allowed to wear lipstick no matter what you think, agouri. - var/mutable_appearance/lips = mutable_appearance('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s", -icon_layer) - lips.color = owner.lip_color - . += lips + var/mutable_appearance/lips_appearance = mutable_appearance('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s", -icon_layer) + lips_appearance.color = owner.lip_color + . += lips_appearance // Runs once when attached /obj/item/organ/external/proc/check_rejection() diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index afcccc3062e8..0f7d9368f0f6 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/mob/human_races/r_machine.dmi b/icons/mob/human_races/r_machine.dmi index afa6b3f321c7..02a40923883d 100644 Binary files a/icons/mob/human_races/r_machine.dmi and b/icons/mob/human_races/r_machine.dmi differ