Files
Bubberstation/code/modules/admin/create_mob.dm
SmArtKar 64cf28cc4f Adds bodypart visuals for different implants, improves eye color/blinking handling (#90010)
## About The Pull Request

Added visual overlays for all arm implants, HUD implants (not the
headrev one), internal thrusters, breathing tube, nutriment pumps and
reviver implant.


![dreamseeker_wd79oYLszL](https://github.com/user-attachments/assets/76582c23-8639-4261-8414-622a0419dc5b)

![dreamseeker_MnlpCHD0nQ](https://github.com/user-attachments/assets/c4692105-0435-401b-aa30-66a33a813fc4)

![dreamseeker_nLJrSPGC63](https://github.com/user-attachments/assets/5b43a1a6-45d6-454e-9348-c119db3cfb43)

Additionally, added a wrapper for eye color setting which solves the
issue where non-pref sourced eyecolors got reset after changing them,
and changed how blinking works so now update_body calls don't force you
to blink.

## Why It's Good For The Game

Gives you incredible drip (which makes augments feel more impactful) and
allows others to see if you have certain important augments (reviver)
that could matter.
As for technical changes, both were required for this to HUDs to work
nicely and fix some bugs as a side effect.

## Changelog
🆑
add: Certain implants now have visuals when implanted
fix: You no longer blink when you adjust your clothing
fix: Fixed an issue where some NPC/midround humans would not get their
eye color set correctly
/🆑
2025-03-17 19:09:55 +01:00

62 lines
3.1 KiB
Plaintext

/datum/admins/proc/create_mob(mob/user)
var/static/create_mob_html
if (!create_mob_html)
var/mobjs = null
mobjs = jointext(typesof(/mob), ";")
create_mob_html = file2text('html/create_object.html')
create_mob_html = replacetext(create_mob_html, "Create Object", "Create Mob")
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
user << browse(create_panel_helper(create_mob_html), "window=create_mob;size=425x475")
/**
* Fully randomizes everything about a human, including DNA and name.
*/
/proc/randomize_human(mob/living/carbon/human/human, randomize_mutations = FALSE)
human.gender = human.dna.species.sexes ? pick(MALE, FEMALE, PLURAL, NEUTER) : PLURAL
human.physique = human.gender
human.real_name = human.generate_random_mob_name()
human.name = human.get_visible_name()
human.set_hairstyle(random_hairstyle(human.gender), update = FALSE)
human.set_facial_hairstyle(random_facial_hairstyle(human.gender), update = FALSE)
human.set_haircolor("#[random_color()]", update = FALSE)
human.set_facial_haircolor(human.hair_color, update = FALSE)
human.set_eye_color(random_eye_color())
human.skin_tone = pick(GLOB.skin_tones)
human.dna.species.randomize_active_underwear_only(human)
// Needs to be called towards the end to update all the UIs just set above
human.dna.initialize_dna(newblood_type = random_blood_type(), create_mutation_blocks = randomize_mutations, randomize_features = TRUE)
// Snowflake for Ethereals
human.updatehealth()
human.updateappearance(mutcolor_update = TRUE)
/**
* Randomizes a human, but produces someone who looks exceedingly average (by most standards).
*
* (IE, no wacky hair styles / colors)
*/
/proc/randomize_human_normie(mob/living/carbon/human/human, randomize_mutations = FALSE, update_body = TRUE)
// Sorry enbys but statistically you are not average enough
human.gender = human.dna.species.sexes ? pick(MALE, FEMALE) : PLURAL
human.physique = human.gender
human.real_name = human.generate_random_mob_name()
human.name = human.get_visible_name()
human.set_eye_color(random_eye_color())
human.skin_tone = pick(GLOB.skin_tones)
// No underwear generation handled here
var/picked_color = random_hair_color()
human.set_haircolor(picked_color, update = FALSE)
human.set_facial_haircolor(picked_color, update = FALSE)
var/datum/sprite_accessory/hairstyle = SSaccessories.hairstyles_list[random_hairstyle(human.gender)]
if(hairstyle && hairstyle.natural_spawn && !hairstyle.locked)
human.set_hairstyle(hairstyle.name, update = FALSE)
var/datum/sprite_accessory/facial_hair = SSaccessories.facial_hairstyles_list[random_facial_hairstyle(human.gender)]
if(facial_hair && facial_hair.natural_spawn && !facial_hair.locked)
human.set_facial_hairstyle(facial_hair.name, update = FALSE)
// Normal DNA init stuff, these can generally be wacky but we care less, they're aliens after all
human.dna.initialize_dna(newblood_type = random_blood_type(), create_mutation_blocks = randomize_mutations, randomize_features = TRUE)
human.updatehealth()
if(update_body)
human.updateappearance(mutcolor_update = TRUE)