mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 19:14:15 +01:00
cc0157190d
## About The Pull Request This PR makes species in the species menu sort themselves by how much lore is present for them, and also sorts template species to the bottom of the species list. This should help ensure that players see finished species to get their brains whirling first. As more species have lore written for them, this list is likely to change, and we will probably rewrite species with excessive lore in order to simplify them. Unathi are renamed to Lizardperson (generic) and moved to a template species. ## Why It's Good For The Game The species we've finished so far come first in the species menu, without removing any species from the game ## Proof Of Testing <img width="78" height="603" alt="image" src="https://github.com/user-attachments/assets/512d2aa6-7e98-45d6-8ca1-233c4551ff9a" /> ## Changelog 🆑 ReturnToZender add: The species menu now sorts itself based on the length of provided lore. Species with lore come first. del: Unathi have been renamed to Lizardperson (Generic). They don't have lore, and lack a lot of the engaging mechanics that Lizardpeople have, so we've reflavored them as a template species. /🆑
67 lines
2.6 KiB
Plaintext
67 lines
2.6 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]
|
|
|
|
//SKYRAT EDIT ADDITION
|
|
for (var/species_id in get_customizable_races())
|
|
values += GLOB.species_list[species_id]
|
|
//SKYRAT EDIT END
|
|
|
|
return values
|
|
|
|
/datum/preference/choiced/species/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/prefs)
|
|
target.set_species(value, icon_update = FALSE, pref_load = FALSE, override_features = prefs?.features.Copy(), override_mutantparts = prefs?.mutant_bodyparts.Copy(), override_markings = prefs?.body_markings.Copy()) // SKYRAT EDIT - Customization
|
|
|
|
//SKYRAT EDIT ADDITION
|
|
target.dna.update_body_size()
|
|
|
|
for(var/organ_key in list(ORGAN_SLOT_VAGINA, ORGAN_SLOT_PENIS, ORGAN_SLOT_BREASTS, ORGAN_SLOT_ANUS))
|
|
var/obj/item/organ/genital/gent = target.get_organ_slot(organ_key)
|
|
if(gent)
|
|
gent.aroused = prefs.arousal_preview
|
|
gent.update_sprite_suffix()
|
|
//SKYRAT EDIT END
|
|
|
|
/datum/preference/choiced/species/compile_constant_data()
|
|
var/list/data = list()
|
|
|
|
for (var/species_id in (get_selectable_species() + get_customizable_races())) //SKYRAT EDIT CHANGE
|
|
var/species_type = GLOB.species_list[species_id]
|
|
var/datum/species/species = GLOB.species_prototypes[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"] = (TRAIT_USES_SKINTONES in species.inherent_traits)
|
|
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()
|
|
data[species_id]["sort_bottom"] = species.sort_bottom //BUBBER EDIT ADDITION: Do we sort the species to the bottom?
|
|
|
|
return data
|