From 651c2c6ba64e78a4d0f51fa577d0097cdc40dd95 Mon Sep 17 00:00:00 2001 From: HarpyEagle Date: Fri, 10 Jul 2015 17:24:20 -0400 Subject: [PATCH] Species spawn_flags Moves some more species flags into a new spawn_flags var. --- code/__defines/species_languages.dm | 18 ++++++++++-------- code/_helpers/global_lists.dm | 4 ++-- code/modules/client/preferences.dm | 8 ++++---- .../mob/living/carbon/human/appearance.dm | 4 ++-- .../carbon/human/species/outsider/shadow.dm | 3 ++- .../carbon/human/species/outsider/vox.dm | 3 ++- .../mob/living/carbon/human/species/species.dm | 1 + .../carbon/human/species/station/golem.dm | 3 ++- .../carbon/human/species/station/monkey.dm | 2 +- .../carbon/human/species/station/slime.dm | 3 ++- .../carbon/human/species/station/station.dm | 14 ++++++++------ .../human/species/xenomorphs/alien_species.dm | 3 ++- code/modules/mob/new_player/new_player.dm | 6 +++--- 13 files changed, 41 insertions(+), 31 deletions(-) diff --git a/code/__defines/species_languages.dm b/code/__defines/species_languages.dm index 5cd5f273ac..fd1ab61bf3 100644 --- a/code/__defines/species_languages.dm +++ b/code/__defines/species_languages.dm @@ -6,17 +6,19 @@ #define NO_SLIP 0x10 // Cannot fall over. #define NO_POISON 0x20 // Cannot not suffer toxloss. #define IS_PLANT 0x40 // Is a treeperson. -#define IS_WHITELISTED 0x80 // Must be whitelisted to play. -#define CAN_JOIN 0x100 // Species is selectable in chargen. -#define IS_RESTRICTED 0x200 // Is not a core/normally playable species. (castes, mutantraces) // unused: 0x8000 - higher than this will overflow +// Species spawn flags +#define IS_WHITELISTED 0x1 // Must be whitelisted to play. +#define CAN_JOIN 0x2 // Species is selectable in chargen. +#define IS_RESTRICTED 0x4 // Is not a core/normally playable species. (castes, mutantraces) + // Species appearance flags -#define HAS_SKIN_TONE 0x1 // Skin tone selectable in chargen. (0-255) -#define HAS_SKIN_COLOR 0x2 // Skin colour selectable in chargen. (RGB) -#define HAS_LIPS 0x4 // Lips are drawn onto the mob icon. (lipstick) -#define HAS_UNDERWEAR 0x8 // Underwear is drawn onto the mob icon. -#define HAS_EYE_COLOR 0x10 // Eye colour selectable in chargen. (RGB) +#define HAS_SKIN_TONE 0x1 // Skin tone selectable in chargen. (0-255) +#define HAS_SKIN_COLOR 0x2 // Skin colour selectable in chargen. (RGB) +#define HAS_LIPS 0x4 // Lips are drawn onto the mob icon. (lipstick) +#define HAS_UNDERWEAR 0x8 // Underwear is drawn onto the mob icon. +#define HAS_EYE_COLOR 0x10 // Eye colour selectable in chargen. (RGB) // Languages. #define LANGUAGE_HUMAN 1 diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 09e6f845c8..7690e73e09 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -130,9 +130,9 @@ var/global/list/endgame_safespawns = list() S.race_key = rkey //Used in mob icon caching. all_species[S.name] = S - if(!(S.flags & IS_RESTRICTED)) + if(!(S.spawn_flags & IS_RESTRICTED)) playable_species += S.name - if(S.flags & IS_WHITELISTED) + if(S.spawn_flags & IS_WHITELISTED) whitelisted_species += S.name //Posters diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 31ff20dd1a..585b6327bd 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -633,9 +633,9 @@ datum/preferences dat += "

" dat += "Language: [current_species.language]
" dat += "" - if(current_species.flags & CAN_JOIN) + if(current_species.spawn_flags & CAN_JOIN) dat += "
Often present on human stations." - if(current_species.flags & IS_WHITELISTED) + if(current_species.spawn_flags & IS_WHITELISTED) dat += "
Whitelist restricted." if(current_species.flags & NO_BLOOD) dat += "
Does not have blood." @@ -663,9 +663,9 @@ datum/preferences var/restricted = 0 if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it! - if(!(current_species.flags & CAN_JOIN)) + if(!(current_species.spawn_flags & CAN_JOIN)) restricted = 2 - else if((current_species.flags & IS_WHITELISTED) && !is_alien_whitelisted(user,current_species)) + else if((current_species.spawn_flags & IS_WHITELISTED) && !is_alien_whitelisted(user,current_species)) restricted = 1 if(restricted) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 1d7a2b0171..7cb3f03dcd 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -141,13 +141,13 @@ var/datum/species/current_species = all_species[current_species_name] if(check_whitelist && config.usealienwhitelist && !check_rights(R_ADMIN, 0, src)) //If we're using the whitelist, make sure to check it! - if(!(current_species.flags & CAN_JOIN)) + if(!(current_species.spawn_flags & CAN_JOIN)) continue if(whitelist.len && !(current_species_name in whitelist)) continue if(blacklist.len && (current_species_name in blacklist)) continue - if((current_species.flags & IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name)) + if((current_species.spawn_flags & IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name)) continue valid_species += current_species_name diff --git a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm index dd614bb55b..a5035b4ffa 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -18,7 +18,8 @@ remains_type = /obj/effect/decal/cleanable/ash death_message = "dissolves into ash..." - flags = IS_RESTRICTED | NO_BLOOD | NO_SCAN | NO_SLIP | NO_POISON + flags = NO_BLOOD | NO_SCAN | NO_SLIP | NO_POISON + spawn_flags = IS_RESTRICTED /datum/species/shadow/handle_death(var/mob/living/carbon/human/H) spawn(1) diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index eb609bcf0d..99e989e02e 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -31,7 +31,8 @@ poison_type = "oxygen" siemens_coefficient = 0.2 - flags = CAN_JOIN | IS_WHITELISTED | NO_SCAN + flags = NO_SCAN + spawn_flags = CAN_JOIN | IS_WHITELISTED appearance_flags = HAS_EYE_COLOR blood_color = "#2299FC" diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index dbd34e7908..82bb18f245 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -104,6 +104,7 @@ var/darksight = 2 // Native darksight distance. var/flags = 0 // Various specific features. var/appearance_flags = 0 // Appearance/display related features. + var/spawn_flags = 0 // Flags that specify who can spawn as this species var/slowdown = 0 // Passive movement speed malus (or boost, if negative) var/primitive_form // Lesser form, if any (ie. monkey for humans) var/greater_form // Greater form, if any, ie. human for monkeys. diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index ce106c4191..2ad9a8d2c4 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -7,7 +7,8 @@ language = "Sol Common" //todo? unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch) - flags = IS_RESTRICTED | NO_BREATHE | NO_PAIN | NO_BLOOD | NO_SCAN | NO_POISON + flags = NO_BREATHE | NO_PAIN | NO_BLOOD | NO_SCAN | NO_POISON + spawn_flags = IS_RESTRICTED siemens_coefficient = 0 breath_type = null diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index 6ae24db2f6..6f75f8406a 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -32,7 +32,7 @@ brute_mod = 1.5 burn_mod = 1.5 - flags = IS_RESTRICTED + spawn_flags = IS_RESTRICTED bump_flag = MONKEY swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm index 46a7e9f5f5..b40497b2ad 100644 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ b/code/modules/mob/living/carbon/human/species/station/slime.dm @@ -8,7 +8,8 @@ language = "Sol Common" //todo? unarmed_types = list(/datum/unarmed_attack/slime_glomp) - flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE + flags = NO_SCAN | NO_SLIP | NO_BREATHE + spawn_flags = IS_RESTRICTED siemens_coefficient = 3 darksight = 3 diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index e30d43893c..525862f09f 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -11,7 +11,7 @@ num_alternate_languages = 2 secondary_langs = list("Sol Common") - flags = CAN_JOIN + spawn_flags = CAN_JOIN appearance_flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR /datum/species/unathi @@ -42,7 +42,7 @@ heat_level_2 = 480 //Default 400 heat_level_3 = 1100 //Default 1000 - flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = CAN_JOIN | IS_WHITELISTED appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#34AF10" @@ -98,7 +98,7 @@ primitive_form = "Farwa" - flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = CAN_JOIN | IS_WHITELISTED appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flesh_color = "#AFA59E" @@ -132,7 +132,7 @@ num_alternate_languages = 2 secondary_langs = list("Skrellian") - flags = CAN_JOIN | IS_WHITELISTED + spawn_flags = CAN_JOIN | IS_WHITELISTED appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR flesh_color = "#8CD7A3" @@ -206,7 +206,8 @@ body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not - flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP + flags = NO_BREATHE | NO_SCAN | IS_PLANT | NO_BLOOD | NO_PAIN | NO_SLIP + spawn_flags = CAN_JOIN | IS_WHITELISTED blood_color = "#004400" flesh_color = "#907E4A" @@ -280,7 +281,8 @@ passive_temp_gain = 10 // This should cause IPCs to stabilize at ~80 C in a 20 C environment. - flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_POISON + flags = NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_POISON + spawn_flags = CAN_JOIN | IS_WHITELISTED blood_color = "#1F181F" flesh_color = "#575757" diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index 52410c5fc6..f534196f38 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -25,7 +25,8 @@ cold_level_2 = -1 cold_level_3 = -1 - flags = IS_RESTRICTED | NO_BREATHE | NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON + flags = NO_BREATHE | NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON + spawn_flags = IS_RESTRICTED reagent_tag = IS_XENOS diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 72b3fe23ec..7493d155e5 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -149,7 +149,7 @@ return 0 var/datum/species/S = all_species[client.prefs.species] - if(!(S.flags & IS_WHITELISTED)) + if(!(S.spawn_flags & IS_WHITELISTED)) src << alert("Your current species,[client.prefs.species], is not available for play on the station.") return 0 @@ -173,7 +173,7 @@ return 0 var/datum/species/S = all_species[client.prefs.species] - if(!(S.flags & CAN_JOIN)) + if(!(S.spawn_flags & CAN_JOIN)) src << alert("Your current species, [client.prefs.species], is not available for play on the station.") return 0 @@ -493,7 +493,7 @@ proc/is_species_whitelisted(datum/species/S) if(!S) return 1 - return is_alien_whitelisted(src, S.name) || !config.usealienwhitelist || !(S.flags & IS_WHITELISTED) + return is_alien_whitelisted(src, S.name) || !config.usealienwhitelist || !(S.spawn_flags & IS_WHITELISTED) /mob/new_player/get_species() var/datum/species/chosen_species