mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Better Species Select (#10534)
This commit is contained in:
@@ -118,7 +118,13 @@
|
||||
log_debug("SQL CHARACTER LOAD: Logic error, general/basic/load_special() didn't return any rows when it should have. Character ID: [pref.current_character].")
|
||||
|
||||
/datum/category_item/player_setup_item/general/basic/sanitize_character()
|
||||
if(!pref.species || !(pref.species in playable_species))
|
||||
if(!pref.species)
|
||||
pref.species = SPECIES_HUMAN
|
||||
var/is_in_playable_species = FALSE
|
||||
for(var/thing in playable_species)
|
||||
if(pref.species in playable_species[thing])
|
||||
is_in_playable_species = TRUE
|
||||
if(!is_in_playable_species)
|
||||
pref.species = SPECIES_HUMAN
|
||||
|
||||
pref.age = sanitize_integer(text2num(pref.age), pref.getMinAge(), pref.getMaxAge(), initial(pref.age))
|
||||
|
||||
@@ -313,8 +313,16 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
else if(href_list["show_species"])
|
||||
// Actual whitelist checks are handled elsewhere, this is just for accessing the preview window.
|
||||
var/choice = input("Which species would you like to look at?") as null|anything in playable_species
|
||||
if(!choice) return
|
||||
var/species_choice = input(usr, "Which species would you like to look at?", "Species Selection") as null|anything in playable_species
|
||||
if(!species_choice)
|
||||
return
|
||||
var/choice
|
||||
if(length(playable_species[species_choice]) == 1)
|
||||
choice = playable_species[species_choice][1]
|
||||
else
|
||||
choice = input(usr, "Which subspecies would you like to look at?", "Sub-species Selection") as null|anything in playable_species[species_choice]
|
||||
if(!choice)
|
||||
return
|
||||
choice = html_decode(choice)
|
||||
pref.species_preview = choice
|
||||
SetSpecies(preference_mob())
|
||||
|
||||
Reference in New Issue
Block a user