mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
* i wanna go to bed so im pushing this * It compiles but doesn't work yet * It works! * I WANT TO DIE * Appease linters * some CI fixes * Address reviews + oversight * Limb grower fix * more icon fixes * forgot to hit save * I'm a dumbass * Removes bodypart parent from unit test * Fixes monkeys and CI * Grammar pass * I hate zombie code so much * General code cleanup * THE SHITCODERS ARE COMING FOR MY VARS * THE UNIT TESTS ARE COMING FOR MY SHITCODE * Reviews + skirts * Removes an unused DMI * Why didn't I do this in the first place? * HAIR REFACTOR * Haha whoops * How did I miss this * Admin spawned creatures now have their features * Optimize me harder * minor fix i need to push to merge master * Fixes hair (maybe) and a runtime * Maybe fixes mirrors * Attempts to fix women * Fixes hair on dismembered heads and a grammar change * Caps lock did me dirty * address reviews * icon failures fix + missed reviews * Fixes: Facehuggers and Regenerate_limb * Fixes ethereal color pref appearance * How the fuck did this not break everything else horribly? * JESUS FUCKING CHRIST IM A MORON * Fixes compile * I'm not high I swear * Im a dipshiiiit * grumble grumble * Fixes a visual bug with digitigrade legs. Adds \improper to roundstart species names. Added two new clothing-related helper procs. Renamed a couple procs to be more accurate. Adds SHOULD_CALL_PARENT(TRUE) to examine_more. Addresses reviews. * Forgot this little readability thing. * Updates CODEOWNERS * Me when I forget how github works * mapload me harder * Last second fixes
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
/// Species preference
|
|
/datum/preference/choiced/species
|
|
savefile_identifier = PREFERENCE_CHARACTER
|
|
savefile_key = "species"
|
|
priority = PREFERENCE_PRIORITY_SPECIES
|
|
randomize_by_default = FALSE
|
|
|
|
/datum/preference/choiced/species/deserialize(input, datum/preferences/preferences)
|
|
return GLOB.species_list[sanitize_inlist(input, get_choices_serialized(), SPECIES_HUMAN)]
|
|
|
|
/datum/preference/choiced/species/serialize(input)
|
|
var/datum/species/species = input
|
|
return initial(species.id)
|
|
|
|
/datum/preference/choiced/species/create_default_value()
|
|
return /datum/species/human
|
|
|
|
/datum/preference/choiced/species/create_random_value(datum/preferences/preferences)
|
|
return pick(get_choices())
|
|
|
|
/datum/preference/choiced/species/init_possible_values()
|
|
var/list/values = list()
|
|
|
|
for (var/species_id in get_selectable_species())
|
|
values += GLOB.species_list[species_id]
|
|
|
|
return values
|
|
|
|
/datum/preference/choiced/species/apply_to_human(mob/living/carbon/human/target, value)
|
|
target.set_species(value, icon_update = FALSE, pref_load = TRUE)
|
|
|
|
/datum/preference/choiced/species/compile_constant_data()
|
|
var/list/data = list()
|
|
|
|
for (var/species_id in get_selectable_species())
|
|
var/species_type = GLOB.species_list[species_id]
|
|
var/datum/species/species = new species_type()
|
|
|
|
data[species_id] = list()
|
|
data[species_id]["name"] = species.name
|
|
data[species_id]["desc"] = species.get_species_description()
|
|
data[species_id]["lore"] = species.get_species_lore()
|
|
data[species_id]["icon"] = sanitize_css_class_name(species.name)
|
|
data[species_id]["use_skintones"] = species.use_skintones
|
|
data[species_id]["sexes"] = species.sexes
|
|
data[species_id]["enabled_features"] = species.get_features()
|
|
data[species_id]["perks"] = species.get_species_perks()
|
|
data[species_id]["diet"] = species.get_species_diet()
|
|
|
|
qdel(species)
|
|
|
|
return data
|