From 1d2f7ea70f88f7a97786098bdf876bb3628591e8 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 12 Nov 2022 10:10:59 -0800 Subject: [PATCH] fixes/improvements to species picking + fixes some cases where you can't see your inventory when joining as a ghostrole (#4701) Co-authored-by: VM_USER --- citadel.dme | 1 + code/__DEFINES/preferences/procs.dm | 10 +- code/__DEFINES/species/category.dm | 14 +++ code/__DEFINES/species/species_flags.dm | 34 +++--- .../subsystem/characters/character_species.dm | 11 +- .../subsystem/characters/species.dm | 4 +- .../mob/living/carbon/human/appearance.dm | 2 +- code/modules/mob/living/carbon/human/login.dm | 4 +- .../mob/living/carbon/human/update_icons.dm | 11 +- code/modules/mob/mob_helpers.dm | 4 + .../preference_setup/background/species.dm | 22 +++- .../preference_setup/helpers/species_pick.dm | 2 +- code/modules/resleeving/designer.dm | 4 +- code/modules/resleeving/infocore_records.dm | 2 +- code/modules/species/character_species.dm | 6 +- code/modules/species/outsider/celestials.dm | 8 +- code/modules/species/outsider/replicant.dm | 2 +- code/modules/species/outsider/scori.dm | 1 + code/modules/species/outsider/shadow.dm | 2 +- code/modules/species/outsider/skeleton.dm | 2 +- code/modules/species/outsider/vox.dm | 4 +- code/modules/species/promethean/promethean.dm | 2 +- .../species/protean/protean_species.dm | 4 +- code/modules/species/shadekin/shadekin.dm | 2 +- .../species/shadekin/shadekin_blackeyed.dm | 2 +- code/modules/species/station/adherent.dm | 2 +- code/modules/species/station/alraune.dm | 2 +- code/modules/species/station/apidaen.dm | 2 +- .../modules/species/station/custom_species.dm | 2 +- code/modules/species/station/diona.dm | 2 +- code/modules/species/station/golem.dm | 2 +- code/modules/species/station/monkey.dm | 2 +- code/modules/species/station/phoronoids.dm | 2 +- code/modules/species/station/rapala.dm | 2 +- .../modules/species/station/standard/akula.dm | 2 +- .../modules/species/station/standard/harpy.dm | 2 +- .../modules/species/station/standard/human.dm | 2 +- .../station/standard/human_subspecies.dm | 6 +- code/modules/species/station/standard/moth.dm | 6 +- .../species/station/standard/naramadi.dm | 2 +- .../species/station/standard/nevrean.dm | 2 +- .../species/station/standard/shadekin.dm | 2 +- .../species/station/standard/skrell.dm | 2 +- .../species/station/standard/tajaran.dm | 2 +- .../species/station/standard/teshari.dm | 2 +- .../species/station/standard/unathi.dm | 2 +- .../species/station/standard/vulpkanin.dm | 2 +- .../species/station/standard/zaddat.dm | 2 +- .../species/station/standard/zorren.dm | 4 +- code/modules/species/station/vasilissan.dm | 2 +- code/modules/species/station/werebeast.dm | 2 +- .../station/xenomorph_hybrids/xeno_hybrids.dm | 2 +- .../modules/species/virtual_reality/avatar.dm | 2 +- .../species/xenochimera/xenochimera.dm | 2 +- .../species/xenomorphs/alien_species.dm | 2 +- .../tgui/interfaces/LanguagePicker.tsx | 18 +-- .../tgui/interfaces/SpeciesPicker.tsx | 104 +++++++++++------- 57 files changed, 215 insertions(+), 137 deletions(-) create mode 100644 code/__DEFINES/species/category.dm diff --git a/citadel.dme b/citadel.dme index b9cfbb746b7..16ce72c04f5 100644 --- a/citadel.dme +++ b/citadel.dme @@ -220,6 +220,7 @@ #include "code\__DEFINES\sound\channels.dm" #include "code\__DEFINES\sound\environment.dm" #include "code\__DEFINES\sound\sound.dm" +#include "code\__DEFINES\species\category.dm" #include "code\__DEFINES\species\species.dm" #include "code\__DEFINES\species\species_flags.dm" #include "code\__DEFINES\tools\balancing.dm" diff --git a/code/__DEFINES/preferences/procs.dm b/code/__DEFINES/preferences/procs.dm index b0a73c2b9de..6a7b98b8264 100644 --- a/code/__DEFINES/preferences/procs.dm +++ b/code/__DEFINES/preferences/procs.dm @@ -2,14 +2,16 @@ /// we're actually spawning roundstart #define PREF_COPY_TO_FOR_ROUNDSTART (1<<0) /// we're spawning latejoin -#define PREF_COPY_TO_FOR_LATEJOIN (1<<1) +#define PREF_COPY_TO_FOR_LATEJOIN (1<<1) /// we're spawning ghostrole (or otherwise anything that isn't really a job) -#define PREF_COPY_TO_FOR_GHOSTROLE (1<<2) +#define PREF_COPY_TO_FOR_GHOSTROLE (1<<2) /// we're just doing it for some preview/visual reason -#define PREF_COPY_TO_FOR_RENDER (1<<3) +#define PREF_COPY_TO_FOR_RENDER (1<<3) +/// ignore species checks; you should check the species yourself! +#define PREF_COPY_TO_NO_CHECK_SPECIES (1<<4) /// DO NOT update icons -#define PREF_COPY_TO_DO_NOT_RENDER (1<<23) +#define PREF_COPY_TO_DO_NOT_RENDER (1<<23) /// helper #define PREF_COPY_TO_IS_SPAWNING (flags & (PREF_COPY_TO_FOR_ROUNDSTART | PREF_COPY_TO_FOR_LATEJOIN | PREF_COPY_TO_FOR_GHOSTROLE)) diff --git a/code/__DEFINES/species/category.dm b/code/__DEFINES/species/category.dm new file mode 100644 index 00000000000..cfd9c5ae6b3 --- /dev/null +++ b/code/__DEFINES/species/category.dm @@ -0,0 +1,14 @@ +//! species categories for UI; volatile, can change at any time. + +#define SPECIES_CATEGORY_ANGEL "Celestials" +#define SPECIES_CATEGORY_HUMAN "Human" +#define SPECIES_CATEGORY_MISC "Miscellaneous" +#define SEPCIES_CATEGORY_MOTH "Dnin-Nepid" +#define SPECIES_CATEGORY_NARAMADI "Naramadi" +#define SPECIES_CATEGORY_RESTRICTED "Restricted" +#define SPECIES_CATEGORY_SKRELL "Skrell" +#define SPECIES_CATEGORY_SPECIAL "Special" +#define SPECIES_CATEGORY_TAJARAN "Tajaran" +#define SPECIES_CATEGORY_UNATHI "Unathi" +#define SPECIES_CATEGORY_VOX "Vox" + diff --git a/code/__DEFINES/species/species_flags.dm b/code/__DEFINES/species/species_flags.dm index 45afa317b06..e93340cf0db 100644 --- a/code/__DEFINES/species/species_flags.dm +++ b/code/__DEFINES/species/species_flags.dm @@ -61,29 +61,37 @@ DEFINE_BITFIELD(species_fluff_flags, list( )) //! species_spawn_flags -/// Must be whitelisted to play. -#define SPECIES_SPAWN_WHITELISTED (1<<0) -/// Is not a core/normally playable species. (castes, mutantraces) -#define SPECIES_SPAWN_RESTRICTED (1<<1) -/// Species is selectable in chargen. - **this must be on a species to be roundstart/latejoin playable!!* -#define SPECIES_SPAWN_ALLOWED (1<<2) +/// is not considered a real character species; used for castes, monkies, etc. +/// this flag will cause the species to skip char-species generation. +#define SPECIES_SPAWN_SPECIAL (1<<0) +/// Species is selectable and visible in chargen. This must be on a species to be roundstart/latejoin. +#define SPECIES_SPAWN_CHARACTER (1<<1) +/// Must be whitelisted to play roundstart/latejoin. +#define SPECIES_SPAWN_WHITELISTED (1<<2) +/// Must be whitelisted to see this species at all. +#define SPECIES_SPAWN_SECRET (1<<3) +/// Cannot normally spawn; something must pass in PREFS_COPY_TO_NO_CHECK_SPECIES to spawn checks to use! +#define SPECIES_SPAWN_RESTRICTED (1<<4) +//? FLAGS ABOVE ARE RELEVANT TO UI. +//? If you change them, change necessary TGUI too. +//? Current TGUI that uses this: +//? SpeicesPicker.tsx /// FBP of this species can't be made in-game. -#define SPECIES_SPAWN_NO_FBP_CONSTRUCT (1<<3) +#define SPECIES_SPAWN_NO_FBP_CONSTRUCT (1<<5) /// FBP of this species can't be selected at chargen. -#define SPECIES_SPAWN_NO_FBP_SETUP (1<<4) +#define SPECIES_SPAWN_NO_FBP_SETUP (1<<6) /// Species cannot start with robotic organs or have them attached. -#define SPECIES_SPAWN_NO_ROBOTIC_ORGANS (1<<5) -/// Can select and customize, but not join as -#define SPECIES_SPAWN_WHITELIST_SELECTABLE (1<<6) +#define SPECIES_SPAWN_NO_ROBOTIC_ORGANS (1<<7) DEFINE_BITFIELD(species_spawn_flags, list( + BITFIELD(SPECIES_SPAWN_SPECIAL), + BITFIELD(SPECIES_SPAWN_CHARACTER), BITFIELD(SPECIES_SPAWN_WHITELISTED), + BITFIELD(SPECIES_SPAWN_SECRET), BITFIELD(SPECIES_SPAWN_RESTRICTED), - BITFIELD(SPECIES_SPAWN_ALLOWED), BITFIELD(SPECIES_SPAWN_NO_FBP_CONSTRUCT), BITFIELD(SPECIES_SPAWN_NO_FBP_SETUP), BITFIELD(SPECIES_SPAWN_NO_ROBOTIC_ORGANS), - BITFIELD(SPECIES_SPAWN_WHITELIST_SELECTABLE), )) //! species_appearance_flags diff --git a/code/controllers/subsystem/characters/character_species.dm b/code/controllers/subsystem/characters/character_species.dm index cb5eb1d8894..1bbe2ec1327 100644 --- a/code/controllers/subsystem/characters/character_species.dm +++ b/code/controllers/subsystem/characters/character_species.dm @@ -26,7 +26,9 @@ character_species_lookup = list() for(var/path in species_paths) var/datum/species/S = species_paths[path] - if(!(S.species_spawn_flags & SPECIES_SPAWN_ALLOWED)) // don't bother lmao + if(S.species_spawn_flags & (SPECIES_SPAWN_SPECIAL)) // don't bother + continue + if(!(S.species_spawn_flags & (SPECIES_SPAWN_CHARACTER))) // don't bother continue if(!S.uid) stack_trace("no species ID on [S.type].") @@ -44,7 +46,10 @@ stack_trace("ignoring custom character species path [path] - collides on uid [S.uid]") continue character_species_lookup[S.uid] = S + tim_sort(character_species_lookup, /proc/cmp_auto_compare, TRUE) + rebuild_character_species_ui_cache() +/datum/controller/subsystem/characters/proc/rebuild_character_species_ui_cache() // make species data cache character_species_cache = list() for(var/id in character_species_lookup) @@ -52,7 +57,7 @@ LAZYINITLIST(character_species_cache[S.category]) character_species_cache[S.category] += list(list( "id" = S.uid, - "whitelisted" = S.whitelisted, + "spawn_flags" = S.species_spawn_flags, "name" = S.name, "desc" = S.desc, "appearance_flags" = S.species_appearance_flags, @@ -60,8 +65,6 @@ "category" = S.category, // note to self optimize this )) - tim_sort(character_species_lookup, /proc/cmp_auto_compare, TRUE) - /datum/controller/subsystem/characters/proc/resolve_character_species(uid) RETURN_TYPE(/datum/character_species) return character_species_lookup[uid] diff --git a/code/controllers/subsystem/characters/species.dm b/code/controllers/subsystem/characters/species.dm index 9eb987429ff..787b9f48aa6 100644 --- a/code/controllers/subsystem/characters/species.dm +++ b/code/controllers/subsystem/characters/species.dm @@ -43,9 +43,9 @@ if(S.species_spawn_flags & SPECIES_SPAWN_WHITELISTED) whitelisted_species += S.name - if(!(S.species_spawn_flags & SPECIES_SPAWN_RESTRICTED)) + if(!(S.species_spawn_flags & SPECIES_SPAWN_SPECIAL)) playable_species += S.name - if((!(S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_RESTRICTED)) && !(S.get_species_id() in blacklisted_icon_ids)) || (S.get_species_id() in whitelisted_icon_ids)) + if((!(S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_SPECIAL)) && !(S.get_species_id() in blacklisted_icon_ids)) || (S.get_species_id() in whitelisted_icon_ids)) custom_species_bases += S.name tim_sort(species_lookup, /proc/cmp_auto_compare, TRUE) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index ccc6b80479a..8b2e905a497 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -188,7 +188,7 @@ var/current_species_name = S.name if(check_whitelist && config_legacy.usealienwhitelist && !check_rights(R_ADMIN, 0, src)) //If we're using the whitelist, make sure to check it! - if(!(S.species_spawn_flags & SPECIES_SPAWN_ALLOWED)) + if(!(S.species_spawn_flags & SPECIES_SPAWN_CHARACTER)) continue if(whitelist.len && !(current_species_name in whitelist)) continue diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index 5544180318d..572025ad037 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -1,5 +1,5 @@ /mob/living/carbon/human/Login() ..() update_hud() - if(species) species.handle_login_special(src) - return + if(species) + species.handle_login_special(src) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index dd9aa086e5c..0307e07210b 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -809,11 +809,14 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) /mob/living/carbon/human/update_hud() //TODO: do away with this if possible if(QDESTROYING(src)) return - + // todo: this is utterly shitcode and fucking stupid ~silicons + // todo: the rest of hud code here ain't much better LOL + var/list/obj/item/relevant = get_equipped_items(TRUE, TRUE) + if(hud_used) + for(var/obj/item/I as anything in relevant) + position_hud_item(I, slot_by_item(I)) if(client) - client.screen |= contents - if(hud_used) - hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar + client.screen |= relevant //update whether handcuffs appears on our hud. /mob/living/carbon/proc/update_hud_handcuffed() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 6937f3ce08a..34e164c56df 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -593,6 +593,10 @@ var/list/global/organ_rel_size = list( /mob/proc/position_hud_item(obj/item/item, slot) var/held = is_holding(item) + + if(!slot) + slot = slot_by_item(item) + if(!istype(hud_used) || !slot || !LAZYLEN(hud_used.slot_info)) return diff --git a/code/modules/preferences/preference_setup/background/species.dm b/code/modules/preferences/preference_setup/background/species.dm index 465eafc80df..6859686f148 100644 --- a/code/modules/preferences/preference_setup/background/species.dm +++ b/code/modules/preferences/preference_setup/background/species.dm @@ -7,18 +7,30 @@ /datum/category_item/player_setup_item/background/char_species/content(datum/preferences/prefs, mob/user, data) . = list() - var/datum/character_species/S = prefs.character_species_datum() + var/datum/character_species/CS = prefs.character_species_datum() . += "
" - . += "Species
[S.name] - \[[href_simple(prefs, "change", "CHANGE")]\]" + . += "Species
[CS.name] - \[[href_simple(prefs, "change", "CHANGE")]\]" + if(CS.species_spawn_flags & SPECIES_SPAWN_RESTRICTED) + . += "This is a [SPAN_RED("restricted")] species. You cannot join as this outside of special circumstances." + else if(CS.species_spawn_flags & SPECIES_SPAWN_WHITELISTED) + . += "This is a whitelisted species. You " + if(config.check_alien_whitelist(ckey(CS.name), prefs.client_ckey)) + . += SPAN_GREEN("do") + else + . += SPAN_RED("do not") + . += " have the whitelist to play as one." . += "
" . += "
" - . += "[S.desc]" + . += "[CS.desc]" . += "
" /datum/category_item/player_setup_item/background/char_species/spawn_checks(datum/preferences/prefs, data, flags, list/errors) var/datum/character_species/CS = SScharacters.resolve_character_species(data) - if(CS.whitelisted && !config.check_alien_whitelist(ckey(CS.name), prefs.client_ckey)) - errors?.Add(SPAN_WARNING("[CS.name] is a whitelisted species!")) + if((CS.species_spawn_flags & SPECIES_SPAWN_RESTRICTED) && !(flags & PREF_COPY_TO_NO_CHECK_SPECIES)) + errors?.Add(SPAN_WARNING("[CS.name] is a restricted species. You cannot join as this as most normal roles.")) + return FALSE + if((CS.species_spawn_flags & SPECIES_SPAWN_WHITELISTED) && !config.check_alien_whitelist(ckey(CS.name), prefs.client_ckey)) + errors?.Add(SPAN_WARNING("You do not have the whitelist to play as a [CS.name].")) return FALSE return TRUE diff --git a/code/modules/preferences/preference_setup/helpers/species_pick.dm b/code/modules/preferences/preference_setup/helpers/species_pick.dm index 5fb7bf9d1a6..1831662bc73 100644 --- a/code/modules/preferences/preference_setup/helpers/species_pick.dm +++ b/code/modules/preferences/preference_setup/helpers/species_pick.dm @@ -20,7 +20,7 @@ * check if we can play a species */ /datum/preferences/proc/check_character_species(datum/character_species/CS) - if(CS.whitelisted && !(config.check_alien_whitelist(ckey(CS.name), client_ckey))) + if((CS.species_spawn_flags & SPECIES_SPAWN_SECRET) && !(config.check_alien_whitelist(ckey(CS.name), client_ckey))) return FALSE return TRUE diff --git a/code/modules/resleeving/designer.dm b/code/modules/resleeving/designer.dm index 845e8367b7c..ea1fa7e62bc 100644 --- a/code/modules/resleeving/designer.dm +++ b/code/modules/resleeving/designer.dm @@ -74,7 +74,7 @@ if(menu == "3") var/stock_bodyrecords_list_ui[0] for (var/datum/species/S in SScharacters.all_static_species_meta()) - if((S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED|SPECIES_SPAWN_ALLOWED)) != SPECIES_SPAWN_ALLOWED) + if((S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED|SPECIES_SPAWN_CHARACTER)) != SPECIES_SPAWN_CHARACTER) continue stock_bodyrecords_list_ui += S if(stock_bodyrecords_list_ui.len) @@ -178,7 +178,7 @@ else if(href_list["view_stock_brec"]) var/datum/species/S = SScharacters.resolve_species_name(href_list["view_stock_brec"]) - if(S && (S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED|SPECIES_SPAWN_ALLOWED)) == SPECIES_SPAWN_ALLOWED) + if(S && (S.species_spawn_flags & (SPECIES_SPAWN_WHITELISTED|SPECIES_SPAWN_CHARACTER)) == SPECIES_SPAWN_CHARACTER) // Generate body record from species! mannequin = new(null, S.name) mannequin.real_name = "Stock [S.name] Body" diff --git a/code/modules/resleeving/infocore_records.dm b/code/modules/resleeving/infocore_records.dm index 059c1e89898..db79d51f4b6 100644 --- a/code/modules/resleeving/infocore_records.dm +++ b/code/modules/resleeving/infocore_records.dm @@ -111,7 +111,7 @@ //Prevent people from printing restricted and whitelisted species var/datum/species/S = SScharacters.resolve_species_name(M.dna.species) if(S) - toocomplex = (S.species_spawn_flags & SPECIES_SPAWN_WHITELISTED) || (S.species_spawn_flags & SPECIES_SPAWN_RESTRICTED) + toocomplex = (S.species_spawn_flags & SPECIES_SPAWN_WHITELISTED) || (S.species_spawn_flags & SPECIES_SPAWN_SPECIAL) //General stuff about them synthetic = M.isSynthetic() diff --git a/code/modules/species/character_species.dm b/code/modules/species/character_species.dm index 387e64953dd..1bc4199faa6 100644 --- a/code/modules/species/character_species.dm +++ b/code/modules/species/character_species.dm @@ -8,7 +8,7 @@ template.superspecies_id = id template.category = category template.desc = blurb - template.whitelisted = !!(species_spawn_flags & SPECIES_SPAWN_WHITELISTED) + template.species_spawn_flags = species_spawn_flags template.real_species_type = type template.genders = genders.Copy() template.min_age = min_age @@ -58,8 +58,8 @@ var/desc /// are we an actual species as opposed to a demoted species? **DO NOT TOUCH THIS VAR.** var/is_real = FALSE - /// is whitelisted (do someone need to be on alienwhitelist) - var/whitelisted = FALSE + /// spawn flags + var/species_spawn_flags = SPECIES_SPAWN_CHARACTER /// real species type var/real_species_type = /datum/species/custom /// species fluff flags - read species_flags.dm in __DEFINES diff --git a/code/modules/species/outsider/celestials.dm b/code/modules/species/outsider/celestials.dm index 8d4adc40f1e..dd2bebaa5ab 100644 --- a/code/modules/species/outsider/celestials.dm +++ b/code/modules/species/outsider/celestials.dm @@ -2,7 +2,7 @@ name = SPECIES_AURIL name_plural = SPECIES_AURIL uid = SPECIES_ID_AURIL - category = "Celestials" + category = SPECIES_CATEGORY_ANGEL blurb = {" The Auril are humanoids that resemble the angelic figures of Old Earth Christian myth. The resemblance, however, @@ -19,7 +19,7 @@ intrinsic_languages = LANGUAGE_ID_DAEDAL_AURIL max_additional_languages = 3 - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR color_mult = 1 @@ -57,7 +57,7 @@ uid = SPECIES_ID_DREMACHIR name = SPECIES_DREMACHIR name_plural = SPECIES_DREMACHIR - category = "Celestials" + category = SPECIES_CATEGORY_ANGEL blurb = {" Dremachir lore is still a work in progress. They are not actual supernatural creatures. They are aliens. @@ -71,7 +71,7 @@ intrinsic_languages = LANGUAGE_ID_DAEDAL_DREMACHIR max_additional_languages = 3 - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR color_mult = 1 diff --git a/code/modules/species/outsider/replicant.dm b/code/modules/species/outsider/replicant.dm index 96e94680c96..877664241be 100644 --- a/code/modules/species/outsider/replicant.dm +++ b/code/modules/species/outsider/replicant.dm @@ -37,7 +37,7 @@ siemens_coefficient = 0.9 heal_rate = 0 - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL species_appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_UNDERWEAR valid_transform_species = list(SPECIES_HUMAN, SPECIES_HUMAN_VATBORN, SPECIES_UNATHI, SPECIES_TAJ, SPECIES_SKRELL, SPECIES_DIONA, SPECIES_TESHARI, SPECIES_MONKEY, SPECIES_VOX) diff --git a/code/modules/species/outsider/scori.dm b/code/modules/species/outsider/scori.dm index 117aa9d5c7d..2d4bbeee981 100644 --- a/code/modules/species/outsider/scori.dm +++ b/code/modules/species/outsider/scori.dm @@ -2,6 +2,7 @@ uid = SPECIES_ID_SCORI name = "Scorian" name_plural = SPECIES_SCORI + category = SPECIES_CATEGORY_RESTRICTED default_language = LANGUAGE_ID_EVENT_1 max_additional_languages = 2 unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/bite) diff --git a/code/modules/species/outsider/shadow.dm b/code/modules/species/outsider/shadow.dm index 6eab3225819..e492c5d50d8 100644 --- a/code/modules/species/outsider/shadow.dm +++ b/code/modules/species/outsider/shadow.dm @@ -28,7 +28,7 @@ death_message = "dissolves into ash..." species_flags = NO_SCAN | NO_SLIP | NO_POISON | NO_MINOR_CUT - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL genders = list(NEUTER) diff --git a/code/modules/species/outsider/skeleton.dm b/code/modules/species/outsider/skeleton.dm index 958182c2eef..a3b8b488265 100644 --- a/code/modules/species/outsider/skeleton.dm +++ b/code/modules/species/outsider/skeleton.dm @@ -17,7 +17,7 @@ health_hud_intensity = 1.5 species_flags = NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_BLOOD | UNDEAD | NO_DEFIB - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL species_appearance_flags = null show_ssd = null diff --git a/code/modules/species/outsider/vox.dm b/code/modules/species/outsider/vox.dm index cb55037b9e5..18e9434779a 100644 --- a/code/modules/species/outsider/vox.dm +++ b/code/modules/species/outsider/vox.dm @@ -2,7 +2,7 @@ name = SPECIES_VOX name_plural = SPECIES_VOX uid = SPECIES_ID_VOX - category = "Vox" + category = SPECIES_CATEGORY_VOX default_bodytype = BODYTYPE_VOX icobase = 'icons/mob/species/vox/body.dmi' @@ -57,7 +57,7 @@ siemens_coefficient = 0.2 species_flags = NO_SCAN | CONTAMINATION_IMMUNE - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED species_appearance_flags = HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_SKIN_COLOR blood_color = "#9066BD" diff --git a/code/modules/species/promethean/promethean.dm b/code/modules/species/promethean/promethean.dm index acbb8c94429..96ed6fbd78e 100644 --- a/code/modules/species/promethean/promethean.dm +++ b/code/modules/species/promethean/promethean.dm @@ -37,7 +37,7 @@ var/datum/species/shapeshifter/promethean/prometheans species_flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT species_appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | RADIATION_GLOWS | HAS_UNDERWEAR - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER health_hud_intensity = 2 diff --git a/code/modules/species/protean/protean_species.dm b/code/modules/species/protean/protean_species.dm index 33cc85a7cdb..4a2999ecc7e 100644 --- a/code/modules/species/protean/protean_species.dm +++ b/code/modules/species/protean/protean_species.dm @@ -7,7 +7,7 @@ name_plural = "Proteans" category = "Special" blurb = "Sometimes very advanced civilizations will produce the ability to swap into manufactured, robotic bodies. And sometimes \ - VERY advanced civilizations have the option of 'nanoswarm' bodies. Effectively a single robot body comprised \ + very advanced civilizations have the option of 'nanoswarm' bodies. Effectively a single robot body comprised \ of millions of tiny nanites working in concert to maintain cohesion." show_ssd = "totally quiescent" death_message = "rapidly loses cohesion, dissolving into a cloud of gray dust..." @@ -22,7 +22,7 @@ species_flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_PAIN | CONTAMINATION_IMMUNE species_appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_LIPS - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED health_hud_intensity = 2 max_additional_languages = 5 // Let's not make them know every language, past me. assisted_langs = list(LANGUAGE_ROOTLOCAL, LANGUAGE_ROOTGLOBAL, LANGUAGE_VOX) diff --git a/code/modules/species/shadekin/shadekin.dm b/code/modules/species/shadekin/shadekin.dm index b9abf301268..3ad3ae9a587 100644 --- a/code/modules/species/shadekin/shadekin.dm +++ b/code/modules/species/shadekin/shadekin.dm @@ -58,7 +58,7 @@ heat_level_3 = 1150 species_flags = NO_SCAN | NO_MINOR_CUT | NO_INFECT | CONTAMINATION_IMMUNE - species_spawn_flags = SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_RESTRICTED | SPECIES_SPAWN_CHARACTER reagent_tag = IS_SHADEKIN // for shadekin-unique chem interactions diff --git a/code/modules/species/shadekin/shadekin_blackeyed.dm b/code/modules/species/shadekin/shadekin_blackeyed.dm index 28c348b18fd..90054e7ebb2 100644 --- a/code/modules/species/shadekin/shadekin_blackeyed.dm +++ b/code/modules/species/shadekin/shadekin_blackeyed.dm @@ -60,7 +60,7 @@ // Shadekin biology is still unknown to the universe (unless some bullshit lore says otherwise) species_flags = NO_SCAN | NO_MINOR_CUT | CONTAMINATION_IMMUNE - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED reagent_tag = IS_SHADEKIN // for shadekin-unique chem interactions diff --git a/code/modules/species/station/adherent.dm b/code/modules/species/station/adherent.dm index a6b1a6016f0..9d42058dd28 100644 --- a/code/modules/species/station/adherent.dm +++ b/code/modules/species/station/adherent.dm @@ -49,7 +49,7 @@ heat_level_3 = 2000 species_flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_PAIN - species_spawn_flags = SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_NO_FBP_CONSTRUCT | SPECIES_SPAWN_NO_FBP_SETUP | SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_NO_FBP_CONSTRUCT | SPECIES_SPAWN_NO_FBP_SETUP | SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_EYE_COLOR | HAS_BASE_SKIN_COLOR intrinsic_languages = LANGUAGE_ID_ADHERENT diff --git a/code/modules/species/station/alraune.dm b/code/modules/species/station/alraune.dm index 4c0b28a3e4f..7cf1c0cee72 100644 --- a/code/modules/species/station/alraune.dm +++ b/code/modules/species/station/alraune.dm @@ -59,7 +59,7 @@ breath_heat_level_3 = 800 //lower incineration threshold though species_flags = NO_SCAN | IS_PLANT | NO_MINOR_CUT - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR unarmed_types = list( diff --git a/code/modules/species/station/apidaen.dm b/code/modules/species/station/apidaen.dm index fb3055a4375..1948c0f8405 100644 --- a/code/modules/species/station/apidaen.dm +++ b/code/modules/species/station/apidaen.dm @@ -43,7 +43,7 @@ //primitive_form = SPECIES_MONKEY //I dunno. Replace this in the future. species_flags = NO_MINOR_CUT - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR color_mult = 1 diff --git a/code/modules/species/station/custom_species.dm b/code/modules/species/station/custom_species.dm index f41f3b40942..6be2cc2acaa 100644 --- a/code/modules/species/station/custom_species.dm +++ b/code/modules/species/station/custom_species.dm @@ -19,7 +19,7 @@ max_additional_languages = 3 assisted_langs = list(LANGUAGE_EAL, LANGUAGE_ROOTLOCAL, LANGUAGE_ROOTGLOBAL, LANGUAGE_VOX) - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR has_limbs = list( diff --git a/code/modules/species/station/diona.dm b/code/modules/species/station/diona.dm index fe7d642b91a..cb41401f4a5 100644 --- a/code/modules/species/station/diona.dm +++ b/code/modules/species/station/diona.dm @@ -96,7 +96,7 @@ hunger_factor = 0//Handled in handle_environment_special() species_flags = NO_MINOR_CUT | IS_PLANT | NO_SCAN | NO_PAIN | NO_SLIP | NO_HALLUCINATION | NO_BLOOD | CONTAMINATION_IMMUNE - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED blood_color = "#004400" flesh_color = "#907E4A" diff --git a/code/modules/species/station/golem.dm b/code/modules/species/station/golem.dm index 90a60463764..ed31d3d5e14 100644 --- a/code/modules/species/station/golem.dm +++ b/code/modules/species/station/golem.dm @@ -10,7 +10,7 @@ intrinsic_languages = LANGUAGE_ID_HUMAN // todo? - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL species_flags = NO_PAIN | NO_SCAN | NO_POISON | NO_MINOR_CUT siemens_coefficient = 0 diff --git a/code/modules/species/station/monkey.dm b/code/modules/species/station/monkey.dm index 9d6131fb12d..58a7a834402 100644 --- a/code/modules/species/station/monkey.dm +++ b/code/modules/species/station/monkey.dm @@ -35,7 +35,7 @@ brute_mod = 1.5 burn_mod = 1.5 - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL bump_flag = MONKEY swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL diff --git a/code/modules/species/station/phoronoids.dm b/code/modules/species/station/phoronoids.dm index 4a2a5aead32..db664031f2e 100644 --- a/code/modules/species/station/phoronoids.dm +++ b/code/modules/species/station/phoronoids.dm @@ -26,7 +26,7 @@ blood_color = "#FC2BC5" species_flags = NO_SCAN | NO_MINOR_CUT | CONTAMINATION_IMMUNE - species_spawn_flags = SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_EYE_COLOR show_ssd = "completely motionless" diff --git a/code/modules/species/station/rapala.dm b/code/modules/species/station/rapala.dm index c2512596f4d..47387376be0 100644 --- a/code/modules/species/station/rapala.dm +++ b/code/modules/species/station/rapala.dm @@ -32,7 +32,7 @@ // wikilink = "" catalogue_data = list(/datum/category_item/catalogue/fauna/rapala) - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR heat_discomfort_strings = list( diff --git a/code/modules/species/station/standard/akula.dm b/code/modules/species/station/standard/akula.dm index 137072c39f0..9e8b2f0407a 100644 --- a/code/modules/species/station/standard/akula.dm +++ b/code/modules/species/station/standard/akula.dm @@ -42,7 +42,7 @@ water_movement = -4 max_age = 80 - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" diff --git a/code/modules/species/station/standard/harpy.dm b/code/modules/species/station/standard/harpy.dm index ade9b15a494..8f235ef2f3b 100644 --- a/code/modules/species/station/standard/harpy.dm +++ b/code/modules/species/station/standard/harpy.dm @@ -30,7 +30,7 @@ catalogue_data = list(/datum/category_item/catalogue/fauna/rapala) - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR diff --git a/code/modules/species/station/standard/human.dm b/code/modules/species/station/standard/human.dm index ec4ddfe541e..2d2f559227a 100644 --- a/code/modules/species/station/standard/human.dm +++ b/code/modules/species/station/standard/human.dm @@ -32,7 +32,7 @@ health_hud_intensity = 1.5 - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER has_organ = list( O_HEART = /obj/item/organ/internal/heart, diff --git a/code/modules/species/station/standard/human_subspecies.dm b/code/modules/species/station/standard/human_subspecies.dm index d31f22b5091..09b4eb798e7 100644 --- a/code/modules/species/station/standard/human_subspecies.dm +++ b/code/modules/species/station/standard/human_subspecies.dm @@ -28,7 +28,7 @@ hunger_factor = 0.075//50% more hungry species_flags = NO_MINOR_CUT - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR color_mult = 1 @@ -75,7 +75,7 @@ slowdown = -0.1//Minor speedboost item_slowdown_mod = 1.05 //Minor slowdown - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR color_mult = 1 @@ -116,7 +116,7 @@ total_health = 115 hunger_factor = 0.35//less hungry - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR color_mult = 1 diff --git a/code/modules/species/station/standard/moth.dm b/code/modules/species/station/standard/moth.dm index 78359c7dfb2..1e6c89d71b5 100644 --- a/code/modules/species/station/standard/moth.dm +++ b/code/modules/species/station/standard/moth.dm @@ -110,7 +110,7 @@ GLOBAL_LIST_INIT(moth_lore_data, init_moth_lore()) move_trail = /obj/effect/debris/cleanable/blood/tracks/claw - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER primitive_form = null species_appearance_flags = HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR @@ -157,7 +157,7 @@ GLOBAL_LIST_INIT(moth_lore_data, init_moth_lore()) /datum/species/moth/dark name = SPECIES_MOTH_DARK uid = SPECIES_ID_MOTH_DARK - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER // darksight, but weak to light darksight = 7 @@ -167,7 +167,7 @@ GLOBAL_LIST_INIT(moth_lore_data, init_moth_lore()) /datum/species/moth/light name = SPECIES_MOTH_LIGHT uid = SPECIES_ID_MOTH_LIGHT - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER // hardy, but no darksight darksight = 2 diff --git a/code/modules/species/station/standard/naramadi.dm b/code/modules/species/station/standard/naramadi.dm index e31e99f5b16..292c3a73086 100644 --- a/code/modules/species/station/standard/naramadi.dm +++ b/code/modules/species/station/standard/naramadi.dm @@ -35,7 +35,7 @@ primitive_form = SPECIES_MONKEY_SERGAL - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" diff --git a/code/modules/species/station/standard/nevrean.dm b/code/modules/species/station/standard/nevrean.dm index f1dbcdff094..e28530d4b4e 100644 --- a/code/modules/species/station/standard/nevrean.dm +++ b/code/modules/species/station/standard/nevrean.dm @@ -35,7 +35,7 @@ color_mult = 1 max_age = 80 - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" diff --git a/code/modules/species/station/standard/shadekin.dm b/code/modules/species/station/standard/shadekin.dm index d7f58de05da..a70449e1897 100644 --- a/code/modules/species/station/standard/shadekin.dm +++ b/code/modules/species/station/standard/shadekin.dm @@ -48,7 +48,7 @@ heat_level_3 = 1150 flags = NO_SCAN | NO_MINOR_CUT | CONTAMINATION_IMMUNE //shadekin biology is still unknown to the universe (unless some bullshit lore says otherwise); CitadelRP: Now able to walk over shards of glass like regular shadekins - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED reagent_tag = IS_SHADEKIN // for shadekin-unique chem interactions diff --git a/code/modules/species/station/standard/skrell.dm b/code/modules/species/station/standard/skrell.dm index 491ba67450a..446eb60c9e3 100644 --- a/code/modules/species/station/standard/skrell.dm +++ b/code/modules/species/station/standard/skrell.dm @@ -46,7 +46,7 @@ ambiguous_genders = TRUE - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR flesh_color = "#8CD7A3" diff --git a/code/modules/species/station/standard/tajaran.dm b/code/modules/species/station/standard/tajaran.dm index b9ecc594727..456b494676b 100644 --- a/code/modules/species/station/standard/tajaran.dm +++ b/code/modules/species/station/standard/tajaran.dm @@ -70,7 +70,7 @@ primitive_form = SPECIES_MONKEY_TAJ - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" diff --git a/code/modules/species/station/standard/teshari.dm b/code/modules/species/station/standard/teshari.dm index 70d8a3f8155..15f4b2e2f38 100644 --- a/code/modules/species/station/standard/teshari.dm +++ b/code/modules/species/station/standard/teshari.dm @@ -71,7 +71,7 @@ ambiguous_genders = TRUE - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_EYE_COLOR bump_flag = MONKEY diff --git a/code/modules/species/station/standard/unathi.dm b/code/modules/species/station/standard/unathi.dm index 5b8fb8a5927..5e4627db684 100644 --- a/code/modules/species/station/standard/unathi.dm +++ b/code/modules/species/station/standard/unathi.dm @@ -68,7 +68,7 @@ body_temperature = null //mesothermic is basically cold-blooded right? - species_spawn_flags = SPECIES_SPAWN_ALLOWED // Species_can_join is the only spawn flag all the races get, so that none of them will be whitelist only if whitelist is enabled. + species_spawn_flags = SPECIES_SPAWN_CHARACTER // Species_can_join is the only spawn flag all the races get, so that none of them will be whitelist only if whitelist is enabled. species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR color_mult = 1 diff --git a/code/modules/species/station/standard/vulpkanin.dm b/code/modules/species/station/standard/vulpkanin.dm index 25b0eaa8ade..dc2b5e4c1fe 100644 --- a/code/modules/species/station/standard/vulpkanin.dm +++ b/code/modules/species/station/standard/vulpkanin.dm @@ -34,7 +34,7 @@ primitive_form = SPECIES_MONKEY_VULPKANIN - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#966464" diff --git a/code/modules/species/station/standard/zaddat.dm b/code/modules/species/station/standard/zaddat.dm index b1071dd827b..aeedb034811 100644 --- a/code/modules/species/station/standard/zaddat.dm +++ b/code/modules/species/station/standard/zaddat.dm @@ -54,7 +54,7 @@ genders = list(FEMALE, PLURAL) //females are polyp-producing, infertile females and males are nigh-identical - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = null flesh_color = "#AFA59E" diff --git a/code/modules/species/station/standard/zorren.dm b/code/modules/species/station/standard/zorren.dm index 820982e601e..d82c86581f4 100644 --- a/code/modules/species/station/standard/zorren.dm +++ b/code/modules/species/station/standard/zorren.dm @@ -35,7 +35,7 @@ ) - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" @@ -99,7 +99,7 @@ /datum/category_item/catalogue/fauna/flatzorren, ) - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" diff --git a/code/modules/species/station/vasilissan.dm b/code/modules/species/station/vasilissan.dm index 718f0a894df..83666e58023 100644 --- a/code/modules/species/station/vasilissan.dm +++ b/code/modules/species/station/vasilissan.dm @@ -51,7 +51,7 @@ //primitive_form = SPECIES_MONKEY //I dunno. Replace this in the future. species_flags = NO_MINOR_CUT | CONTAMINATION_IMMUNE - species_spawn_flags = SPECIES_SPAWN_ALLOWED + species_spawn_flags = SPECIES_SPAWN_CHARACTER species_appearance_flags = HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR color_mult = 1 diff --git a/code/modules/species/station/werebeast.dm b/code/modules/species/station/werebeast.dm index b61a7e59430..5167c041fc3 100644 --- a/code/modules/species/station/werebeast.dm +++ b/code/modules/species/station/werebeast.dm @@ -35,7 +35,7 @@ wikilink="N/A" catalogue_data = list(/datum/category_item/catalogue/fauna/vulpkanin) - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED species_appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_EYE_COLOR inherent_verbs = list( diff --git a/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm b/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm index 97c73ea2005..fe28a6aaeec 100644 --- a/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm +++ b/code/modules/species/station/xenomorph_hybrids/xeno_hybrids.dm @@ -28,7 +28,7 @@ max_additional_languages = 3 species_flags = NO_MINOR_CUT | CONTAMINATION_IMMUNE//Chitin like VASILISSANs should have the same flags - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR blood_color = "#12ff12" diff --git a/code/modules/species/virtual_reality/avatar.dm b/code/modules/species/virtual_reality/avatar.dm index 1becaa34fc6..ba8a8db3eb9 100644 --- a/code/modules/species/virtual_reality/avatar.dm +++ b/code/modules/species/virtual_reality/avatar.dm @@ -13,7 +13,7 @@ death_message = "flickers briefly, their gear falling in a heap on the floor around their motionless body." knockout_message = "has been knocked unconscious!" - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL speech_bubble_appearance = "cyber" diff --git a/code/modules/species/xenochimera/xenochimera.dm b/code/modules/species/xenochimera/xenochimera.dm index ee8aa6c712e..41f3ed64c66 100644 --- a/code/modules/species/xenochimera/xenochimera.dm +++ b/code/modules/species/xenochimera/xenochimera.dm @@ -84,7 +84,7 @@ ) species_flags = NO_SCAN | NO_INFECT | NO_DEFIB //Dying as a chimera is, quite literally, a death sentence. Well, if it wasn't for their revive, that is. - species_spawn_flags = SPECIES_SPAWN_ALLOWED | SPECIES_SPAWN_WHITELISTED | SPECIES_SPAWN_WHITELIST_SELECTABLE //Whitelisted as restricted is broken. + species_spawn_flags = SPECIES_SPAWN_CHARACTER | SPECIES_SPAWN_WHITELISTED //Whitelisted as restricted is broken. species_appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR has_organ = list( diff --git a/code/modules/species/xenomorphs/alien_species.dm b/code/modules/species/xenomorphs/alien_species.dm index 3e03c53c4c3..6f980d3c00f 100644 --- a/code/modules/species/xenomorphs/alien_species.dm +++ b/code/modules/species/xenomorphs/alien_species.dm @@ -30,7 +30,7 @@ cold_level_3 = -1 species_flags = NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON | NO_MINOR_CUT | NO_INFECT - species_spawn_flags = SPECIES_SPAWN_RESTRICTED + species_spawn_flags = SPECIES_SPAWN_SPECIAL reagent_tag = IS_XENOS diff --git a/tgui/packages/tgui/interfaces/LanguagePicker.tsx b/tgui/packages/tgui/interfaces/LanguagePicker.tsx index 757723ffff5..727d637d4cc 100644 --- a/tgui/packages/tgui/interfaces/LanguagePicker.tsx +++ b/tgui/packages/tgui/interfaces/LanguagePicker.tsx @@ -3,15 +3,15 @@ import { Window } from '../layouts'; import { Section, Stack, Button } from '../components'; type LanguagePickerContext = { - categories: String[], + categories: string[], languages: Language[], }; type Language = { - id: String, - name: String, - desc: String, - category: String, + id: string, + name: string, + desc: string, + category: string, }; export const LanguagePicker = (props, context) => { @@ -38,7 +38,7 @@ export const LanguagePicker = (props, context) => { const LanguageInfo = (props, context) => { const { act, data } = useBackend(context); - const [selectedLanguage, setSelectedLanguage] = useLocalState(context, 'selectedLanguage', null); + const [selectedLanguage, setSelectedLanguage] = useLocalState(context, 'selectedLanguage', null); let lang = data.languages.find((l) => l.id === selectedLanguage); if (lang === undefined) { return (
); @@ -69,7 +69,7 @@ const LanguageInfo = (props, context) => { const LanguageCategories = (props, context) => { const { act, data } = useBackend(context); const { categories } = data; - let [selectedCategory, setSelectedCategory] = useLocalState(context, 'selectedCategory', null); + let [selectedCategory, setSelectedCategory] = useLocalState(context, 'selectedCategory', null); return (
{ @@ -93,8 +93,8 @@ const LanguageCategories = (props, context) => { const LanguageSelect = (props, context) => { const { act, data } = useBackend(context); - let [selectedLanguage, setSelectedLanguage] = useLocalState(context, 'selectedLanguage', null); - let [selectedCategory, setSelectedCategory] = useLocalState(context, 'selectedCategory', null); + let [selectedLanguage, setSelectedLanguage] = useLocalState(context, 'selectedLanguage', null); + let [selectedCategory, setSelectedCategory] = useLocalState(context, 'selectedCategory', null); if (selectedCategory === null) { return (
diff --git a/tgui/packages/tgui/interfaces/SpeciesPicker.tsx b/tgui/packages/tgui/interfaces/SpeciesPicker.tsx index 6262184fec7..ef35479bf2c 100644 --- a/tgui/packages/tgui/interfaces/SpeciesPicker.tsx +++ b/tgui/packages/tgui/interfaces/SpeciesPicker.tsx @@ -1,25 +1,36 @@ import { BooleanLike } from 'common/react'; import { useBackend, useLocalState } from '../backend'; -import { Section, Stack, Button, Box } from '../components'; +import { Section, Stack, Button, Box, NoticeBox } from '../components'; import { Window } from '../layouts'; +import { sanitizeText } from '../sanitize'; + +// todo: this stuff should be generic constants somewhere for species manip type SpeciesPickerContext = { whitelisted: string[], species: [String: Species[]], - default: String, + default: string, admin: BooleanLike, }; type Species = { - id: String, - whitelisted: BooleanLike, - name: String, - desc: String, - appearance_flags: Number, - flags: Number, - category: String, + id: string, + spawn_flags: SpeciesSpawnFlags, + name: string, + desc: string, + appearance_flags: number, + flags: number, + category: string, }; +enum SpeciesSpawnFlags { + Special = (1<<0), + Character = (1<<1), + Whitelisted = (1<<2), + Secret = (1<<3), + Restricted = (1<<4), +} + // We currently do NOT render species appearance flags/numbers! export const SpeciesPicker = (props, context) => { @@ -42,8 +53,19 @@ export const SpeciesPicker = (props, context) => { }); }); categories.sort(); - const isWhitelisted = (id) => ( - !(species.find((s) => s.id === id)?.whitelisted) || (whitelisted.findIndex((s) => s === id) !== -1) || !!data.admin + const hasWhitelist = (s: Species) => ( + (whitelisted.findIndex((str) => str === s.id) !== -1) + && !!data.admin + ); + const isWhitelisted = (s: Species) => ( + (s.spawn_flags & SpeciesSpawnFlags.Whitelisted) + ); + const isHidden = (s: Species) => ( + (s.spawn_flags & SpeciesSpawnFlags.Secret) + && !hasWhitelist(s) + ); + const isRestricted = (s: Species) => ( + (s.spawn_flags & SpeciesSpawnFlags.Restricted) ); return ( @@ -72,7 +94,7 @@ export const SpeciesPicker = (props, context) => { ) : (
{ - species.filter((s) => s.category === selectedCategory).map((s) => ( + species.filter((s) => s.category === selectedCategory && !isHidden(s)).map((s) => ( - ) : ( - - Whitelisted - + + + {!!isRestricted(selected) && ( + + This is a restricted species. + You can select it, but cannot join the game with it in most normal roles. + )} + {!!isWhitelisted(selected) && (hasWhitelist(selected) + ?( + + You have the whitelist to play this species. + + ) + : ( + + This is a whitelisted species. + You can select it, but cannot join the game with it without a whitelist. + + ))} + +
) }