Skip to content

Commit

Permalink
add: Cosmetic Wryn Update: Resprite and Character Setup Update (#6168)
Browse files Browse the repository at this point in the history
* Wryn body, tail and antannae resprite

changed body, tail and antannae sprites for Wryn

* New tail sprite

Made it more good

* Added test hair

Addedd test hair "Curvy"

* New hair styles for Wryn

Added seven new hair style for wryn in character setup menu.
Renamed original "antennae" to "Normal Antennae".
Renamed icons/mob/sprite_accessories/wryn/wryn_face.dm to "wryn_head_accesories"/

* Small fixes for new resprite

Added unique eyes overlay for wryn
Fixed species sprite in r_wryn.dmi

* fixed new wryn hair

now it shows new hair styles ingame

* minor sprite changes + comments

fixed wryn tail sprite, changed female sprite and some comments were rewriten.

* new customization element for wryn

added mane customization for wryn with six new options including shaved variant

* Small updates and changes

Added wryn tail variant, fixed body_accessories visibility in Character setup, light changes in r_wryn

* final touches

changed:
* hands in r_wryn.dmi
* head in r_wryn
* wryn tails in body_accessory.dmi

* Light changes

Почистил код где надо, переместил иконки органов вринов в отдельный файл.

* tweak bullshit

Deleted antennae icon state from r_wryn.dmi since it pointless now.

* Update wryn.dm

* fix #1

* contibutor fix

* final final touches fixes

* доработка

* доработка x2

* fix

* Hair path cleared

Сделал красивые пути к прическам
 переименовал wryn_face в wryn_hair

* fix

* доработка x10

* error fix

* fix x2

* fix x3

* Update code/__HELPERS/mobs.dm

* may be better

* Update code/__HELPERS/mobs.dm

---------

Co-authored-by: Antoonij <[email protected]>
  • Loading branch information
oi98 and Antoonij authored Dec 30, 2024
1 parent c13f132 commit d78434e
Show file tree
Hide file tree
Showing 24 changed files with 175 additions and 84 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1200,3 +1200,6 @@
/// Source: /mob/living/simple_animal/borer, listening in datum/antagonist/borer
#define COMSIG_BORER_ENTERED_HOST "borer_on_enter" // when borer entered host
#define COMSIG_BORER_LEFT_HOST "borer_on_leave" // when borer left host

/// Source: /proc/random_hair_style (mob/living/carbon/human/human, valid_hairstyles, robohead)
#define COMSIG_RANDOM_HAIR_STYLE "random_hair_style"
47 changes: 19 additions & 28 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,41 +46,33 @@

return pick(valid_picks)

/proc/random_hair_style(gender, species = SPECIES_HUMAN, datum/robolimb/robohead, mob/living/carbon/human/H)
/proc/random_hair_style(
gender,
datum/species/species,
datum/robolimb/robohead = GLOB.all_robolimbs["Morpheus Cyberkinetics"],
mob/living/carbon/human/human
)
var/h_style = "Bald"
var/list/valid_hairstyles = list()

if(species == SPECIES_WRYN) // wryns antennaes now bound to hivenode, no need to change them
if(H)
var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD)
if(head_organ?.h_style)
return head_organ.h_style
else
return "Antennae"

for(var/hairstyle in GLOB.hair_styles_public_list)
var/datum/sprite_accessory/S = GLOB.hair_styles_public_list[hairstyle]
var/datum/sprite_accessory/style = GLOB.hair_styles_public_list[hairstyle]

if(hairstyle == "Bald") //Just in case.
valid_hairstyles += hairstyle
if(!LAZYIN(style.species_allowed, species.name))
continue
if(gender == S.unsuitable_gender)

if(gender == style.unsuitable_gender)
continue

if(!species.is_allowed_hair_style(human, robohead, style))
continue
if(species == SPECIES_MACNINEPERSON) //If the user is a species who can have a robotic head...
if(!robohead)
robohead = GLOB.all_robolimbs["Morpheus Cyberkinetics"]
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
else
if(!robohead.is_monitor && (SPECIES_HUMAN in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */
valid_hairstyles += hairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(species in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
valid_hairstyles += hairstyle

if(valid_hairstyles.len)
h_style = pick(valid_hairstyles)
LAZYADD(valid_hairstyles, hairstyle)

if(human)
SEND_SIGNAL(human, COMSIG_RANDOM_HAIR_STYLE, valid_hairstyles, robohead)

h_style = safepick(valid_hairstyles)

return h_style

Expand Down Expand Up @@ -668,4 +660,3 @@
out_ckey = "(Disconnected)"

return out_ckey

2 changes: 1 addition & 1 deletion code/game/gamemodes/nuclear/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
head_organ.sec_hair_colour = hair_c
M.change_eye_color(eye_c)
M.s_tone = skin_tone
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species.name)
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species)
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.dna.species.name)
M.body_accessory = null
M.regenerate_icons()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/awaymissions/corpse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
if(hair_style)
D.h_style = hair_style
else
D.h_style = random_hair_style(gender, D.dna.species.name)
D.h_style = random_hair_style(gender, D.dna.species)
D.hair_colour = rand_hex_color()
if(facial_hair_style)
D.f_style = facial_hair_style
Expand Down
8 changes: 4 additions & 4 deletions code/modules/client/preference/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_WRYN, SPECIES_VULPKANIN, SPECIES_VOX))
h_sec_colour = rand_hex_color()
if("h_style")
h_style = random_hair_style(gender, species, robohead)
h_style = random_hair_style(gender, S, robohead)
if("facial")
if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_WRYN, SPECIES_VULPKANIN, SPECIES_VOX))
f_colour = rand_hex_color()
Expand Down Expand Up @@ -1647,7 +1647,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
robohead = GLOB.all_robolimbs[head_model]
//grab one of the valid hair styles for the newly chosen species
h_style = random_hair_style(gender, species, robohead)
h_style = random_hair_style(gender, S, robohead)

//grab one of the valid facial hair styles for the newly chosen species
f_style = random_facial_hair_style(gender, species, robohead)
Expand Down Expand Up @@ -1994,7 +1994,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts


if("facial")
if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_VULPKANIN, SPECIES_VOX)) //Species that have facial hair. (No HAS_HAIR_FACIAL flag)
if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_VULPKANIN, SPECIES_VOX, SPECIES_WRYN)) //Species that have facial hair. (No HAS_HAIR_FACIAL flag)
var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", f_colour) as color|null
if(new_facial)
f_colour = new_facial
Expand Down Expand Up @@ -2397,7 +2397,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
robohead = GLOB.all_robolimbs[head_model]

h_style = random_hair_style(gender, species, robohead)
h_style = random_hair_style(gender, S, robohead)
f_style = random_facial_hair_style(gender, species, robohead)

m_styles["body"] = random_marking_style("body", species, gender = src.gender)
Expand Down
19 changes: 17 additions & 2 deletions code/modules/mob/living/carbon/human/body_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,24 @@ GLOBAL_LIST_INIT(body_accessory_by_species, list())
allowed_species = list(SPECIES_VULPKANIN)

//Wryn
/datum/body_accessory/tail/wryn
/datum/body_accessory/tail/bee
name = "Bee Tail"
icon_state = "wryntail"
icon_state = "beetail"
allowed_species = list(SPECIES_WRYN)

/datum/body_accessory/tail/roach
name = "Cockroach Tail"
icon_state = "roachtail"
allowed_species = list(SPECIES_WRYN)

/datum/body_accessory/tail/wasp
name = "Wasp Tail"
icon_state = "wasptail"
allowed_species = list(SPECIES_WRYN)

/datum/body_accessory/tail/wasper
name = "Wasper Tail"
icon_state = "waspertail"
allowed_species = list(SPECIES_WRYN)

//Nian
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/human/species/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@
var/datum/language/species_language = GLOB.all_languages[language]
return species_language.get_random_name(gender)

/datum/species/proc/is_allowed_hair_style(mob/living/carbon/human/human, datum/robolimb/robohead, datum/sprite_accessory/style)
return TRUE

/proc/get_age_limits(datum/species/species, list/tags)
if(!islist(tags))
Expand Down
40 changes: 27 additions & 13 deletions code/modules/mob/living/carbon/human/species/machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,39 +102,53 @@
JOB_MIN_AGE_COMMAND = 15,
)

/datum/species/machine/on_species_gain(mob/living/carbon/human/H)
/datum/species/machine/on_species_gain(mob/living/carbon/human/human)
. = ..()
var/datum/action/innate/change_monitor/monitor = locate() in H.actions
var/datum/action/innate/change_monitor/monitor = locate() in human.actions

if(!monitor)
monitor = new
monitor.Grant(H)
monitor = new()
monitor.Grant(H)
monitor.Grant(human)

var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medhud.remove_from_hud(H)
add_verb(H, list(
medhud.remove_from_hud(human)

add_verb(human, list(
/mob/living/carbon/human/proc/emote_ping,
/mob/living/carbon/human/proc/emote_beep,
/mob/living/carbon/human/proc/emote_buzz,
/mob/living/carbon/human/proc/emote_buzz2,
/mob/living/carbon/human/proc/emote_yes,
/mob/living/carbon/human/proc/emote_no))


/datum/species/machine/on_species_loss(mob/living/carbon/human/H)
/datum/species/machine/on_species_loss(mob/living/carbon/human/human)
. = ..()
var/datum/action/innate/change_monitor/monitor = locate() in H.actions
monitor?.Remove(H)
var/datum/action/innate/change_monitor/monitor = locate() in human.actions
monitor?.Remove(human)

var/datum/atom_hud/data/human/medical/advanced/medhud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
medhud.add_to_hud(H)
remove_verb(H, list(
medhud.add_to_hud(human)

remove_verb(human, list(
/mob/living/carbon/human/proc/emote_ping,
/mob/living/carbon/human/proc/emote_beep,
/mob/living/carbon/human/proc/emote_buzz,
/mob/living/carbon/human/proc/emote_buzz2,
/mob/living/carbon/human/proc/emote_yes,
/mob/living/carbon/human/proc/emote_no))

/datum/species/machine/is_allowed_hair_style(mob/living/carbon/human/human, datum/robolimb/robohead, datum/sprite_accessory/style)
. = ..()

if(!.)
return

if(!robohead.is_monitor || !(style.models_allowed && (robohead.company in style.models_allowed)) && style.models_allowed)
return FALSE

else if(robohead.is_monitor || !(SPECIES_HUMAN in style.species_allowed))
return FALSE

// Allows IPC's to change their monitor display
/datum/action/innate/change_monitor
name = "Change Monitor"
Expand Down
15 changes: 7 additions & 8 deletions code/modules/mob/living/carbon/human/species/wryn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
deform = 'icons/mob/human_races/r_wryn.dmi'
blacklisted = TRUE
tail = "wryntail"
eyes = "wryn_eyes_s"
punchdamagelow = 0
punchdamagehigh = 1
speed_mod = 1
Expand Down Expand Up @@ -60,7 +61,7 @@
TRAIT_NO_SCAN,
)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR
bodyflags = HAS_SKIN_COLOR | HAS_BODY_ACCESSORY

dies_at_threshold = TRUE

Expand All @@ -70,8 +71,10 @@
blood_color = "#FFFF99"
blood_species = "Wryn"
//Default styles for created mobs.
default_hair = "Antennae"

default_hair = "Normal antennae"
default_fhair = "Default mane"
default_bodyacc = "Bee Tail"
default_fhair_colour = "#704300"
age_sheet = list(
SPECIES_AGE_MIN = 15,
SPECIES_AGE_MAX = 55,
Expand All @@ -93,14 +96,10 @@

/datum/species/wryn/after_equip_job(datum/job/J, mob/living/carbon/human/H)
var/comb_deafness = H.client.prefs.speciesprefs

if(comb_deafness)
var/obj/item/organ/internal/wryn/hivenode/node = H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)
node.remove(H)
qdel(node)
else
var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD)
head_organ.h_style = "Antennae"
H.update_hair()

/* Wryn Sting Action Begin */

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/new_player/preferences_setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
body_accessory = random_body_accessory(species, S.optional_body_accessory)
if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE))
s_tone = random_skin_tone(species)
h_style = random_hair_style(gender, species, robohead)
h_style = random_hair_style(gender, S, robohead)
f_style = random_facial_hair_style(gender, species, robohead)
if(species in list(SPECIES_HUMAN, SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL, SPECIES_MACNINEPERSON, SPECIES_WRYN, SPECIES_VULPKANIN, SPECIES_VOX))
randomize_hair_color("hair")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/datum/sprite_accessory/facial_hair/wryn
icon = 'icons/mob/sprite_accessories/wryn/wryn_facial_hair.dmi'
species_allowed = list(SPECIES_WRYN)
unsuitable_gender = null
over_hair = TRUE

/datum/sprite_accessory/facial_hair/wryn/default
name = "Default mane"
icon_state = "default"

/datum/sprite_accessory/facial_hair/wryn/fluff
name = "Fluff mane"
icon_state = "fluff"

/datum/sprite_accessory/facial_hair/wryn/sharp
name = "Sharp mane"
icon_state = "sharp"

/datum/sprite_accessory/facial_hair/wryn/square
name = "Square mane"
icon_state = "square"

/datum/sprite_accessory/facial_hair/wryn/round
name = "Round mane"
icon_state = "round"
36 changes: 36 additions & 0 deletions code/modules/mob/new_player/sprite_accessories/wryn/wryn_hair.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/datum/sprite_accessory/hair/wryn
icon = 'icons/mob/sprite_accessories/wryn/wryn_head_accessories.dmi'
species_allowed = list(SPECIES_WRYN)
glasses_over = 1

/datum/sprite_accessory/hair/wryn/default
name = "Normal antennae"
icon_state = "antennae"

/datum/sprite_accessory/hair/wryn/curvy
name = "Curvy antennae"
icon_state = "curvy"

/datum/sprite_accessory/hair/wryn/nian
name = "Nian antennae"
icon_state = "moth"

/datum/sprite_accessory/hair/wryn/perky
name = "Perky antennae"
icon_state = "perky"

/datum/sprite_accessory/hair/wryn/sweep
name = "Sweep antennae"
icon_state = "sweep"

/datum/sprite_accessory/hair/wryn/short
name = "Short antennae"
icon_state = "short"

/datum/sprite_accessory/hair/wryn/long
name = "Long antennae"
icon_state = "long"

/datum/sprite_accessory/hair/wryn/long
name = "Low Long antennae"
icon_state = "low_long"
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD)
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.name, H = H)
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.name, human = H)
head_organ.f_style = random_facial_hair_style(H.gender, head_organ.dna.species.name)
H.update_hair()
H.update_fhair()
Expand All @@ -380,7 +380,7 @@
if(head_organ.dna.species.name in tmp_hair_style.species_allowed) //If 'Very Long Hair' is a style the person's species can have, give it to them.
head_organ.h_style = "Very Long Hair"
else //Otherwise, give them a random hair style.
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.name, H = H)
head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species, human = H)
if(head_organ.dna.species.name in tmp_facial_hair_style.species_allowed) //If 'Very Long Beard' is a style the person's species can have, give it to them.
head_organ.f_style = "Very Long Beard"
else //Otherwise, give them a random facial hair style.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/response_team/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE)
head_organ.sec_hair_colour = hair_c
M.change_eye_color(eye_c)
M.s_tone = skin_tone
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species.name)
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species)
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.dna.species.name)
M.rename_character(null, "Безымянный") // Rewritten in /datum/outfit/job/centcom/response_team/pre_equip
M.age = rand(23,35)
Expand Down
Loading

0 comments on commit d78434e

Please sign in to comment.