mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 03:27:46 +00:00
## About The Pull Request This PR: - Converts all of the blood types into their own datums, which can be set up to have their own colors, descriptions, and other fun unique properties. For example, the clown blood that is constantly randomizing itself. - Converts all the blood decals into greyscale, which in turn eliminates the need for separate xeno sprites. They both use the same ones now. - Audit of blood splatters/gibs/bodyparts/organs to make sure that they are getting the correct forensic data applied to them. - For the admins: Adds a clown blood smite. My primary goal with was to make the appearance of the new sprites look almost indistinguishable to the original ones. I consider this a "first pass", as in there are still some further refactors I would like to do on the backend side, but am satisfied with it enough to push it forward as a first step towards a better blood system! I didn't want to do too much at once because of A) fatigue and B) easier to test things to make sure I'm not breaking something important this way. This has been test-merged on Nova for over a week now and has been going great, so I finally got around to upstreaming the bones to TG. Although I did test it a bit you may want to TM it just in case I missed some things when copying it over.
72 lines
3.6 KiB
Plaintext
72 lines
3.6 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_human_blood_type(), create_mutation_blocks = randomize_mutations, randomize_features = TRUE)
|
|
// SKYRAT EDIT ADDITION BEGIN - CUSTOMIZATION
|
|
human.dna.species.mutant_bodyparts = human.dna.mutant_bodyparts.Copy()
|
|
human.dna.species.body_markings = human.dna.body_markings.Copy()
|
|
// SKYRAT EDIT ADDITION END
|
|
// Snowflake for Ethereals
|
|
human.updatehealth()
|
|
human.updateappearance(mutcolor_update = TRUE)
|
|
// BUBBER EDIT ADDITION BEGIN - Bloopers
|
|
human.set_blooper(pick(GLOB.blooper_list))
|
|
human.blooper_pitch = BLOOPER_PITCH_RAND(human.gender)
|
|
human.blooper_pitch_range = BLOOPER_VARIANCE_RAND
|
|
human.blooper_speed = rand(BLOOPER_DEFAULT_MINSPEED, BLOOPER_DEFAULT_MAXSPEED)
|
|
// BUBBER EDIT ADDITION END - Bloopers
|
|
|
|
/**
|
|
* 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_human_blood_type(), create_mutation_blocks = randomize_mutations, randomize_features = TRUE)
|
|
human.updatehealth()
|
|
if(update_body)
|
|
human.updateappearance(mutcolor_update = TRUE)
|