mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Species spawn_flags
Moves some more species flags into a new spawn_flags var.
This commit is contained in:
@@ -6,11 +6,13 @@
|
|||||||
#define NO_SLIP 0x10 // Cannot fall over.
|
#define NO_SLIP 0x10 // Cannot fall over.
|
||||||
#define NO_POISON 0x20 // Cannot not suffer toxloss.
|
#define NO_POISON 0x20 // Cannot not suffer toxloss.
|
||||||
#define IS_PLANT 0x40 // Is a treeperson.
|
#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
|
// 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
|
// Species appearance flags
|
||||||
#define HAS_SKIN_TONE 0x1 // Skin tone selectable in chargen. (0-255)
|
#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_SKIN_COLOR 0x2 // Skin colour selectable in chargen. (RGB)
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ var/global/list/endgame_safespawns = list()
|
|||||||
S.race_key = rkey //Used in mob icon caching.
|
S.race_key = rkey //Used in mob icon caching.
|
||||||
all_species[S.name] = S
|
all_species[S.name] = S
|
||||||
|
|
||||||
if(!(S.flags & IS_RESTRICTED))
|
if(!(S.spawn_flags & IS_RESTRICTED))
|
||||||
playable_species += S.name
|
playable_species += S.name
|
||||||
if(S.flags & IS_WHITELISTED)
|
if(S.spawn_flags & IS_WHITELISTED)
|
||||||
whitelisted_species += S.name
|
whitelisted_species += S.name
|
||||||
|
|
||||||
//Posters
|
//Posters
|
||||||
|
|||||||
@@ -633,9 +633,9 @@ datum/preferences
|
|||||||
dat += "<img src='species_preview_[current_species.name].png' width='64px' height='64px'><br/><br/>"
|
dat += "<img src='species_preview_[current_species.name].png' width='64px' height='64px'><br/><br/>"
|
||||||
dat += "<b>Language:</b> [current_species.language]<br/>"
|
dat += "<b>Language:</b> [current_species.language]<br/>"
|
||||||
dat += "<small>"
|
dat += "<small>"
|
||||||
if(current_species.flags & CAN_JOIN)
|
if(current_species.spawn_flags & CAN_JOIN)
|
||||||
dat += "</br><b>Often present on human stations.</b>"
|
dat += "</br><b>Often present on human stations.</b>"
|
||||||
if(current_species.flags & IS_WHITELISTED)
|
if(current_species.spawn_flags & IS_WHITELISTED)
|
||||||
dat += "</br><b>Whitelist restricted.</b>"
|
dat += "</br><b>Whitelist restricted.</b>"
|
||||||
if(current_species.flags & NO_BLOOD)
|
if(current_species.flags & NO_BLOOD)
|
||||||
dat += "</br><b>Does not have blood.</b>"
|
dat += "</br><b>Does not have blood.</b>"
|
||||||
@@ -663,9 +663,9 @@ datum/preferences
|
|||||||
|
|
||||||
var/restricted = 0
|
var/restricted = 0
|
||||||
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
|
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
|
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
|
restricted = 1
|
||||||
|
|
||||||
if(restricted)
|
if(restricted)
|
||||||
|
|||||||
@@ -141,13 +141,13 @@
|
|||||||
var/datum/species/current_species = all_species[current_species_name]
|
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(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
|
continue
|
||||||
if(whitelist.len && !(current_species_name in whitelist))
|
if(whitelist.len && !(current_species_name in whitelist))
|
||||||
continue
|
continue
|
||||||
if(blacklist.len && (current_species_name in blacklist))
|
if(blacklist.len && (current_species_name in blacklist))
|
||||||
continue
|
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
|
continue
|
||||||
|
|
||||||
valid_species += current_species_name
|
valid_species += current_species_name
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
remains_type = /obj/effect/decal/cleanable/ash
|
remains_type = /obj/effect/decal/cleanable/ash
|
||||||
death_message = "dissolves into 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)
|
/datum/species/shadow/handle_death(var/mob/living/carbon/human/H)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
poison_type = "oxygen"
|
poison_type = "oxygen"
|
||||||
siemens_coefficient = 0.2
|
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
|
appearance_flags = HAS_EYE_COLOR
|
||||||
|
|
||||||
blood_color = "#2299FC"
|
blood_color = "#2299FC"
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
var/darksight = 2 // Native darksight distance.
|
var/darksight = 2 // Native darksight distance.
|
||||||
var/flags = 0 // Various specific features.
|
var/flags = 0 // Various specific features.
|
||||||
var/appearance_flags = 0 // Appearance/display related 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/slowdown = 0 // Passive movement speed malus (or boost, if negative)
|
||||||
var/primitive_form // Lesser form, if any (ie. monkey for humans)
|
var/primitive_form // Lesser form, if any (ie. monkey for humans)
|
||||||
var/greater_form // Greater form, if any, ie. human for monkeys.
|
var/greater_form // Greater form, if any, ie. human for monkeys.
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
language = "Sol Common" //todo?
|
language = "Sol Common" //todo?
|
||||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/punch)
|
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
|
siemens_coefficient = 0
|
||||||
|
|
||||||
breath_type = null
|
breath_type = null
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
brute_mod = 1.5
|
brute_mod = 1.5
|
||||||
burn_mod = 1.5
|
burn_mod = 1.5
|
||||||
|
|
||||||
flags = IS_RESTRICTED
|
spawn_flags = IS_RESTRICTED
|
||||||
|
|
||||||
bump_flag = MONKEY
|
bump_flag = MONKEY
|
||||||
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
language = "Sol Common" //todo?
|
language = "Sol Common" //todo?
|
||||||
unarmed_types = list(/datum/unarmed_attack/slime_glomp)
|
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
|
siemens_coefficient = 3
|
||||||
darksight = 3
|
darksight = 3
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
num_alternate_languages = 2
|
num_alternate_languages = 2
|
||||||
secondary_langs = list("Sol Common")
|
secondary_langs = list("Sol Common")
|
||||||
|
|
||||||
flags = CAN_JOIN
|
spawn_flags = CAN_JOIN
|
||||||
appearance_flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR
|
appearance_flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR
|
||||||
|
|
||||||
/datum/species/unathi
|
/datum/species/unathi
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
heat_level_2 = 480 //Default 400
|
heat_level_2 = 480 //Default 400
|
||||||
heat_level_3 = 1100 //Default 1000
|
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
|
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
|
||||||
|
|
||||||
flesh_color = "#34AF10"
|
flesh_color = "#34AF10"
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
primitive_form = "Farwa"
|
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
|
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
|
||||||
|
|
||||||
flesh_color = "#AFA59E"
|
flesh_color = "#AFA59E"
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
num_alternate_languages = 2
|
num_alternate_languages = 2
|
||||||
secondary_langs = list("Skrellian")
|
secondary_langs = list("Skrellian")
|
||||||
|
|
||||||
flags = CAN_JOIN | IS_WHITELISTED
|
spawn_flags = CAN_JOIN | IS_WHITELISTED
|
||||||
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR
|
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR
|
||||||
|
|
||||||
flesh_color = "#8CD7A3"
|
flesh_color = "#8CD7A3"
|
||||||
@@ -206,7 +206,8 @@
|
|||||||
|
|
||||||
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
|
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"
|
blood_color = "#004400"
|
||||||
flesh_color = "#907E4A"
|
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.
|
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"
|
blood_color = "#1F181F"
|
||||||
flesh_color = "#575757"
|
flesh_color = "#575757"
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
cold_level_2 = -1
|
cold_level_2 = -1
|
||||||
cold_level_3 = -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
|
reagent_tag = IS_XENOS
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/datum/species/S = all_species[client.prefs.species]
|
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.")
|
src << alert("Your current species,[client.prefs.species], is not available for play on the station.")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/datum/species/S = all_species[client.prefs.species]
|
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.")
|
src << alert("Your current species, [client.prefs.species], is not available for play on the station.")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -493,7 +493,7 @@
|
|||||||
|
|
||||||
proc/is_species_whitelisted(datum/species/S)
|
proc/is_species_whitelisted(datum/species/S)
|
||||||
if(!S) return 1
|
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()
|
/mob/new_player/get_species()
|
||||||
var/datum/species/chosen_species
|
var/datum/species/chosen_species
|
||||||
|
|||||||
Reference in New Issue
Block a user