Add species sorting

This commit is contained in:
Aronai Sieyes
2021-06-26 11:13:57 -04:00
parent bb219fb11d
commit ec09ddd547
6 changed files with 34 additions and 4 deletions
@@ -272,6 +272,8 @@
var/icon_height = 32
var/agility = 20 //prob() to do agile things
var/sort_hint = SPECIES_SORT_NORMAL
/datum/species/proc/update_attack_types()
unarmed_attacks = list()
for(var/u_type in unarmed_types)
@@ -305,6 +307,14 @@
inherent_verbs = list()
inherent_verbs |= /mob/living/carbon/human/proc/regurgitate
update_sort_hint()
/datum/species/proc/update_sort_hint()
if(spawn_flags & SPECIES_IS_RESTRICTED)
sort_hint = SPECIES_SORT_RESTRICTED
else if(spawn_flags & SPECIES_IS_WHITELISTED)
sort_hint = SPECIES_SORT_WHITELISTED
/datum/species/proc/sanitize_name(var/name, var/robot = 0)
return sanitizeName(name, MAX_NAME_LEN, robot)
@@ -42,6 +42,9 @@
BP_R_FOOT = list("path" = /obj/item/organ/external/foot/right, "descriptor" = "right foot")
)
/datum/species/custom/update_sort_hint()
sort_hint = SPECIES_SORT_CUSTOM
/datum/species/custom/get_race_key()
var/datum/species/real = GLOB.all_species[base_species]
return real.race_key