Adds custom age limits to each species (#20878)

* Custom min/max ages for species

* fixing the pitch

* tweaking AGE_MAX

* Revert "tweaking AGE_MAX"

This reverts commit 0270ba6840.

* max_age decreased roughly by 10%

* Update code/__DEFINES/mob_defines.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* machine minimum age

* clamp

* Adjustments to ages

* age max

* Update code/modules/mob/living/carbon/human/species/_species.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* clamp and age pitch tweaks

* finally found plasmaman lifespan1

---------

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Henri215
2023-05-22 17:04:42 -03:00
committed by GitHub
parent 7b2bd705b2
commit 764aed10c5
24 changed files with 33 additions and 14 deletions
+2 -2
View File
@@ -481,7 +481,7 @@
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender, FALSE, !SP.has_gender)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
age = sanitize_integer(age, SP.min_age, SP.max_age, initial(age))
h_colour = sanitize_hexcolor(h_colour)
h_sec_colour = sanitize_hexcolor(h_sec_colour)
f_colour = sanitize_hexcolor(f_colour)
@@ -596,7 +596,7 @@
if(S.bodyflags & HAS_SKIN_COLOR)
randomize_skin_color()
backbag = 2
age = rand(AGE_MIN, AGE_MAX)
age = rand(S.min_age, S.max_age)
/datum/character_save/proc/randomize_hair_color(target = "hair")
@@ -135,7 +135,7 @@
var/mob/new_player/N = user
N.new_player_panel_proc()
if("age")
active_character.age = rand(AGE_MIN, AGE_MAX)
active_character.age = rand(S.min_age , S.max_age)
if("hair")
if(!(S.bodyflags & BALD))
active_character.h_colour = rand_hex_color()
@@ -212,9 +212,9 @@
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
if("age")
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
var/new_age = input(user, "Choose your character's age:\n([S.min_age]-[S.max_age])", "Character Preference") as num|null
if(new_age)
active_character.age = max(min(round(text2num(new_age)), AGE_MAX),AGE_MIN)
active_character.age = max(min(round(text2num(new_age)), S.max_age), S.min_age)
if("species")
var/list/new_species = list()
var/prev_species = active_character.species
@@ -230,6 +230,7 @@
to_chat(user, "<span class='warning'>Invalid species, please pick something else.</span>")
return
if(prev_species != active_character.species)
active_character.age = clamp(active_character.age, NS.min_age, NS.max_age)
if(NS.has_gender && active_character.gender == PLURAL)
active_character.gender = pick(MALE,FEMALE)
var/datum/robolimb/robohead