[MIRROR] [READY] Podperson hair (sprites by Shiets!) [MDB IGNORE] (#12235)

* [READY] Podperson hair (sprites by Shiets!)

* wew lad

* how'd i miss that?

Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
This commit is contained in:
SkyratBot
2022-03-23 22:45:00 -07:00
committed by GitHub
co-authored by dragomagol John Doe
parent 095d13071c
commit dd05433dde
17 changed files with 174 additions and 5 deletions
+4 -1
View File
@@ -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
+2
View File
@@ -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()
+24 -1
View File
@@ -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)
+1
View File
@@ -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",
+6
View File
@@ -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.
+1
View File
@@ -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()
@@ -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
+5 -1
View File
@@ -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)
@@ -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."
@@ -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
@@ -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
@@ -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()
+5 -1
View File
@@ -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)
*/
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+1
View File
@@ -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"