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
@@ -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