diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 293b0613549..d820becdbc8 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -37,7 +37,8 @@ //SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION (moved to modular_skyrat/modules/customization/_DEFINES/DNA.dm) /* -#define DNA_FEATURE_BLOCKS 15 +/// This number needs to equal the total number of DNA blocks +#define DNA_FEATURE_BLOCKS 16 #define DNA_MUTANT_COLOR_BLOCK 1 #define DNA_ETHEREAL_COLOR_BLOCK 2 #define DNA_LIZARD_MARKINGS_BLOCK 3 @@ -65,6 +66,7 @@ // SKYRAT EDIT CHANGE END +#define DNA_POD_HAIR_BLOCK 16 #define DNA_SEQUENCE_LENGTH 4 #define DNA_MUTATION_BLOCKS 8 @@ -139,6 +141,7 @@ #define ORGAN_SLOT_EXTERNAL_WINGS "wings" #define ORGAN_SLOT_EXTERNAL_ANTENNAE "antennae" #define ORGAN_SLOT_EXTERNAL_BODYMARKINGS "bodymarkings" +#define ORGAN_SLOT_EXTERNAL_POD_HAIR "pod_hair" /// Xenomorph organ slots diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index cd4147c9797..88ac90194a0 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -52,6 +52,8 @@ sort_list(GLOB.laugh_types, /proc/cmp_typepaths_asc) //SKYRAT EDIT END + init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list) + //Species for(var/spath in subtypesof(/datum/species)) var/datum/species/S = new spath() diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index e5f11feb2d8..3f1071b25dd 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -87,11 +87,34 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list) if(!GLOB.moth_markings_list.len) init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list) + if(!GLOB.pod_hair_list.len) + init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list) + //For now we will always return none for tail_human and ears. - return(list("mcolor" = "#[pick("7F","FF")][pick("7F","FF")][pick("7F","FF")]","ethcolor" = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)], "tail_lizard" = pick(GLOB.tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(GLOB.snouts_list), "horns" = pick(GLOB.horns_list), "ears" = "None", "frills" = pick(GLOB.frills_list), "spines" = pick(GLOB.spines_list), "body_markings" = pick(GLOB.body_markings_list), "legs" = "Normal Legs", "caps" = pick(GLOB.caps_list), "moth_wings" = pick(GLOB.moth_wings_list), "moth_antennae" = pick(GLOB.moth_antennae_list), "moth_markings" = pick(GLOB.moth_markings_list), "tail_monkey" = "None")) + return(list( + "mcolor" = "#[pick("7F","FF")][pick("7F","FF")][pick("7F","FF")]", + "ethcolor" = GLOB.color_list_ethereal[pick(GLOB.color_list_ethereal)], + "tail_lizard" = pick(GLOB.tails_list_lizard), + "tail_human" = "None", + "wings" = "None", + "snout" = pick(GLOB.snouts_list), + "horns" = pick(GLOB.horns_list), + "ears" = "None", + "frills" = pick(GLOB.frills_list), + "spines" = pick(GLOB.spines_list), + "body_markings" = pick(GLOB.body_markings_list), + "legs" = "Normal Legs", + "caps" = pick(GLOB.caps_list), + "moth_wings" = pick(GLOB.moth_wings_list), + "moth_antennae" = pick(GLOB.moth_antennae_list), + "moth_markings" = pick(GLOB.moth_markings_list), + "tail_monkey" = "None", + "pod_hair" = pick(GLOB.pod_hair_list), + )) */ //SKYRAT EDIT REMOVAL END + /proc/random_hairstyle(gender) switch(gender) if(MALE) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 17178b7a4d2..bfc8490047f 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -44,6 +44,7 @@ GLOBAL_LIST_EMPTY(caps_list) GLOBAL_LIST_EMPTY(tails_list_monkey) */ //SKYRAT EDIT REMOVAL END +GLOBAL_LIST_EMPTY(pod_hair_list) GLOBAL_LIST_INIT(color_list_ethereal, list( "Blue" = "#3399ff", diff --git a/code/datums/dna.dm b/code/datums/dna.dm index a6e3dce80ea..fdf36c7cc76 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -242,6 +242,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) L[DNA_MUSHROOM_CAPS_BLOCK] = construct_block(GLOB.caps_list.Find(features["caps"]), GLOB.caps_list.len) if(features["tail_monkey"]) L[DNA_MONKEY_TAIL_BLOCK] = construct_block(GLOB.tails_list_monkey.Find(features["tail_monkey"]), GLOB.tails_list_monkey.len) + if(features["pod_hair"]) + L[DNA_POD_HAIR_BLOCK] = construct_block(GLOB.pod_hair_list.Find(features["pod_hair"]), GLOB.pod_hair_list.len) for(var/blocknum in 1 to DNA_FEATURE_BLOCKS) . += L[blocknum] || random_string(GET_UI_BLOCK_LEN(blocknum), GLOB.hex_characters) @@ -382,6 +384,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) set_uni_feature_block(blocknumber, construct_block(GLOB.tails_list_monkey.Find(features["tail_monkey"]), GLOB.tails_list_monkey.len)) */ //SKYRAT EDIT REMOVAL END + if(DNA_POD_HAIR_BLOCK) + set_uni_feature_block(blocknumber, construct_block(GLOB.pod_hair_list.Find(features["pod_hair"]), GLOB.pod_hair_list.len)) //Please use add_mutation or activate_mutation instead /datum/dna/proc/force_give(datum/mutation/human/HM) @@ -646,6 +650,8 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) dna.features["caps"] = GLOB.caps_list[deconstruct_block(get_uni_feature_block(features, DNA_MUSHROOM_CAPS_BLOCK), GLOB.caps_list.len)] if(dna.features["tail_monkey"]) dna.features["tail_monkey"] = GLOB.tails_list_monkey[deconstruct_block(get_uni_feature_block(features, DNA_MONKEY_TAIL_BLOCK), GLOB.tails_list_monkey.len)] + if(dna.features["pod_hair"]) + dna.features["pod_hair"] = GLOB.pod_hair_list[deconstruct_block(get_uni_feature_block(features, DNA_POD_HAIR_BLOCK), GLOB.pod_hair_list.len)] if(icon_update) dna.species.handle_body(src) // We want 'update_body_parts()' to be called only if mutcolor_update is TRUE, so no 'update_body()' here. diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index b04015beeeb..3b968e5b7c5 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -47,6 +47,7 @@ H.dna.species.mutant_bodyparts = H.dna.mutant_bodyparts.Copy() H.dna.species.body_markings = H.dna.body_markings.Copy() //SKYRAT EDIT ADDITION END + H.dna.features["pod_hair"] = pick(GLOB.pod_hair_list) H.update_body() H.update_hair() diff --git a/code/modules/client/preferences/species_features/pod.dm b/code/modules/client/preferences/species_features/pod.dm new file mode 100644 index 00000000000..8e5102e859d --- /dev/null +++ b/code/modules/client/preferences/species_features/pod.dm @@ -0,0 +1,15 @@ +/datum/preference/choiced/pod_hair + savefile_key = "feature_pod_hair" + savefile_identifier = PREFERENCE_CHARACTER + category = PREFERENCE_CATEGORY_FEATURES + main_feature_name = "Hairstyle" + should_generate_icons = FALSE + +/datum/preference/choiced/pod_hair/init_possible_values() + return GLOB.pod_hair_list + +/datum/preference/choiced/pod_hair/create_default_value() + return pick(GLOB.pod_hair_list) + +/datum/preference/choiced/pod_hair/apply_to_human(mob/living/carbon/human/target, value) + target.dna.features["pod_hair"] = value diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 0f67477f09f..323e0db7a2a 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -195,10 +195,14 @@ podman.faction |= factions if(!features["mcolor"]) features["mcolor"] = "#59CE00" + if(!features["pod_hair"]) + features["pod_hair"] = pick(GLOB.pod_hair_list) + for(var/V in quirks) new V(podman) - podman.hardset_dna(null,null,null,podman.real_name,blood_type, new /datum/species/pod,features)//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman + podman.hardset_dna(null, null, null, podman.real_name, blood_type, new /datum/species/pod, features) // Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman podman.set_cloned_appearance() + podman.dna.species.exotic_blood = max(reagents_add) || /datum/reagent/water log_cloning("[key_name(mind)] cloned as a podman via [src] in [parent] at [AREACOORD(parent)].") parent.update_tray(user, 1) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index b0dbf6fb78e..bafe5055c14 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -573,6 +573,37 @@ attack_verb_simple = list("slash", "slice", "cut", "claw") hitsound = 'sound/weapons/bladeslice.ogg' +/// Secateurs can be used to style podperson "hair" +/obj/item/secateurs/attack(mob/trimmed, mob/living/trimmer) + if(ispodperson(trimmed)) + var/mob/living/carbon/human/pod = trimmed + var/location = trimmer.zone_selected + if((location in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_HEAD)) && !pod.get_bodypart(BODY_ZONE_HEAD)) + to_chat(trimmer, span_warning("[pod] [pod.p_do()]n't have a head!")) + return + if(location == BODY_ZONE_HEAD && !trimmer.combat_mode) + if(!trimmer.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return + var/new_style = tgui_input_list(trimmer, "Select a hairstyle", "Grooming", GLOB.pod_hair_list) + if(isnull(new_style)) + return + trimmer.visible_message( + span_notice("[trimmer] tries to change [pod == trimmer ? trimmer.p_their() : pod.name + "'s"] hairstyle using [src]."), + span_notice("You try to change [pod == trimmer ? "your" : pod.name + "'s"] hairstyle using [src].") + ) + if(new_style && do_after(trimmer, 6 SECONDS, target = pod)) + trimmer.visible_message( + span_notice("[trimmer] successfully changes [pod == trimmer ? trimmer.p_their() : pod.name + "'s"] hairstyle using [src]."), + span_notice("You successfully change [pod == trimmer ? "your" : pod.name + "'s"] hairstyle using [src].") + ) + + var/datum/species/pod/species = pod.dna?.species + species?.change_hairstyle(pod, new_style) + else + return ..() + else + return ..() + /obj/item/geneshears name = "Botanogenetic Plant Shears" desc = "A high tech, high fidelity pair of plant shears, capable of cutting genetic traits out of a plant." diff --git a/code/modules/mob/dead/new_player/sprite_accessories.dm b/code/modules/mob/dead/new_player/sprite_accessories.dm index 9ff25f11c0d..2d26ce841cb 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories.dm @@ -1757,6 +1757,50 @@ icon_state = "monkey" color_src = FALSE +/datum/sprite_accessory/pod_hair + icon = 'icons/mob/podperson_hair.dmi' + em_block = TRUE + +/datum/sprite_accessory/pod_hair/ivy + name = "Ivy" + icon_state = "ivy" + +/datum/sprite_accessory/pod_hair/cabbage + name = "Cabbage" + icon_state = "cabbage" + +/datum/sprite_accessory/pod_hair/spinach + name = "Spinach" + icon_state = "spinach" + +/datum/sprite_accessory/pod_hair/prayer + name = "Prayer" + icon_state = "prayer" + +/datum/sprite_accessory/pod_hair/vine + name = "Vine" + icon_state = "vine" + +/datum/sprite_accessory/pod_hair/shrub + name = "Shrub" + icon_state = "shrub" + +/datum/sprite_accessory/pod_hair/rose + name = "Rose" + icon_state = "rose" + +/datum/sprite_accessory/pod_hair/orchid + name = "Orchid" + icon_state = "orchid" + +/datum/sprite_accessory/pod_hair/fig + name = "Fig" + icon_state = "fig" + +/datum/sprite_accessory/pod_hair/hibiscus + name = "Hibiscus" + icon_state = "hibiscus" + /datum/sprite_accessory/snouts icon = 'icons/mob/mutant_bodyparts.dmi' em_block = TRUE diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 544a93fc360..28337abee8f 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -943,6 +943,7 @@ GLOBAL_LIST_EMPTY(features_by_species) accessory = GLOB.caps_list[source.dna.features["caps"]] if("tail_monkey") accessory = GLOB.tails_list_monkey[source.dna.features["tail_monkey"]] + if(!accessory || accessory.icon_state == "none") continue diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index fe9e3c82902..90197c03099 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -4,12 +4,15 @@ plural_form = "Podpeople" id = SPECIES_PODPERSON default_color = "59CE00" - species_traits = list(MUTCOLORS,EYECOLOR, HAS_FLESH, HAS_BONE) + species_traits = list(MUTCOLORS, EYECOLOR, HAS_FLESH, HAS_BONE) inherent_traits = list( TRAIT_ADVANCEDTOOLUSER, TRAIT_CAN_STRIP, TRAIT_PLANT_SAFE, ) + external_organs = list( + /obj/item/organ/external/pod_hair = "None", + ) inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_PLANT inherent_factions = list("plants", "vines") attack_verb = "slash" @@ -59,3 +62,14 @@ /datum/species/pod/get_species_lore() return list("You're a plant!") // SKYRAT EDIT END + +/datum/species/pod/randomize_main_appearance_element(mob/living/carbon/human/human_mob) + var/hairstyle = pick(GLOB.pod_hair_list) + human_mob.dna.features["pod_hair"] = hairstyle + mutant_bodyparts["pod_hair"] = hairstyle + human_mob.update_body() + +/datum/species/pod/proc/change_hairstyle(mob/living/carbon/human/human_mob, new_style) + var/obj/item/organ/external/organ = human_mob.getorganslot(ORGAN_SLOT_EXTERNAL_POD_HAIR ) + organ.set_sprite(new_style) + human_mob.update_body_parts() diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 7520724d447..c6c60a9308b 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -864,7 +864,7 @@ //to update the bodypart's icon when not attached to a mob /obj/item/bodypart/proc/update_icon_dropped() cut_overlays() - var/list/standing = get_limb_icon(1) + var/list/standing = get_limb_icon(TRUE) if(!standing.len) icon_state = initial(icon_state)//no overlays found, we default back to initial icon. return @@ -982,6 +982,10 @@ continue //Some externals have multiple layers for background, foreground and between for(var/external_layer in external_organ.all_layers) + if(istype(external_organ, /obj/item/organ/external/pod_hair)) + var/rgb_list = rgb2num(draw_color, COLORSPACE_RGB) + // Invert the colour of the pod hair's flower + draw_color = rgb(255 - rgb_list[1], 255 - rgb_list[2], 255 - rgb_list[3]) if(external_organ.layers & external_layer) external_organ.get_overlays(., image_dir, external_organ.bitflag_to_layer(external_layer), icon_gender, draw_color) */ diff --git a/code/modules/surgery/organs/external/_external_organs.dm b/code/modules/surgery/organs/external/_external_organs.dm index 5258bca3c34..d285157d2ee 100644 --- a/code/modules/surgery/organs/external/_external_organs.dm +++ b/code/modules/surgery/organs/external/_external_organs.dm @@ -266,3 +266,22 @@ if(burnt) burnt = FALSE set_sprite(original_sprite) + +//podperson hair +/obj/item/organ/external/pod_hair + zone = BODY_ZONE_HEAD + slot = ORGAN_SLOT_EXTERNAL_POD_HAIR + layers = EXTERNAL_FRONT|EXTERNAL_ADJACENT + + feature_key = "pod_hair" + preference = "feature_pod_hair" + + dna_block = DNA_POD_HAIR_BLOCK + +/obj/item/organ/external/pod_hair/can_draw_on_bodypart(mob/living/carbon/human/human) + if(!(human.head?.flags_inv & HIDEHAIR) || (human.wear_mask?.flags_inv & HIDEHAIR)) + return TRUE + return FALSE + +/obj/item/organ/external/pod_hair/get_global_feature_list() + return GLOB.pod_hair_list diff --git a/icons/mob/human_parts_greyscale.dmi b/icons/mob/human_parts_greyscale.dmi index d9b217b04c9..647c263c407 100644 Binary files a/icons/mob/human_parts_greyscale.dmi and b/icons/mob/human_parts_greyscale.dmi differ diff --git a/icons/mob/podperson_hair.dmi b/icons/mob/podperson_hair.dmi new file mode 100644 index 00000000000..bdf66948bf0 Binary files /dev/null and b/icons/mob/podperson_hair.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 910b74de41b..29c198d423b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2522,6 +2522,7 @@ #include "code\modules\client\preferences\species_features\lizard.dm" #include "code\modules\client\preferences\species_features\moth.dm" #include "code\modules\client\preferences\species_features\mutants.dm" +#include "code\modules\client\preferences\species_features\pod.dm" #include "code\modules\client\preferences\species_features\vampire.dm" #include "code\modules\client\verbs\ooc.dm" #include "code\modules\client\verbs\ping.dm"