Splits species flags

Splits several species flags off into a separate appearance_flags var, to avoid rollover.
This commit is contained in:
HarpyEagle
2015-07-10 17:16:55 -04:00
parent c136bd47cc
commit 8a9caac7cc
10 changed files with 54 additions and 45 deletions

View File

@@ -1,20 +1,22 @@
// Species flags. // Species flags.
#define NO_BLOOD 1 // Vessel var is not filled with blood, cannot bleed out. #define NO_BLOOD 0x1 // Vessel var is not filled with blood, cannot bleed out.
#define NO_BREATHE 2 // Cannot suffocate or take oxygen loss. #define NO_BREATHE 0x2 // Cannot suffocate or take oxygen loss.
#define NO_SCAN 4 // Cannot be scanned in a DNA machine/genome-stolen. #define NO_SCAN 0x4 // Cannot be scanned in a DNA machine/genome-stolen.
#define NO_PAIN 8 // Cannot suffer halloss/recieves deceptive health indicator. #define NO_PAIN 0x8 // Cannot suffer halloss/recieves deceptive health indicator.
#define NO_SLIP 16 // Cannot fall over. #define NO_SLIP 0x10 // Cannot fall over.
#define NO_POISON 32 // Cannot not suffer toxloss. #define NO_POISON 0x20 // Cannot not suffer toxloss.
#define HAS_SKIN_TONE 64 // Skin tone selectable in chargen. (0-255) #define IS_PLANT 0x40 // Is a treeperson.
#define HAS_SKIN_COLOR 128 // Skin colour selectable in chargen. (RGB) #define IS_WHITELISTED 0x80 // Must be whitelisted to play.
#define HAS_LIPS 256 // Lips are drawn onto the mob icon. (lipstick) #define CAN_JOIN 0x100 // Species is selectable in chargen.
#define HAS_UNDERWEAR 512 // Underwear is drawn onto the mob icon. #define IS_RESTRICTED 0x200 // Is not a core/normally playable species. (castes, mutantraces)
#define IS_PLANT 1024 // Is a treeperson. // unused: 0x8000 - higher than this will overflow
#define IS_WHITELISTED 2048 // Must be whitelisted to play.
#define HAS_EYE_COLOR 4096 // Eye colour selectable in chargen. (RGB) // Species appearance flags
#define CAN_JOIN 8192 // Species is selectable in chargen. #define HAS_SKIN_TONE 0x1 // Skin tone selectable in chargen. (0-255)
#define IS_RESTRICTED 16384 // Is not a core/normally playable species. (castes, mutantraces) #define HAS_SKIN_COLOR 0x2 // Skin colour selectable in chargen. (RGB)
// unused: 32768 - higher than this will overflow #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. // Languages.
#define LANGUAGE_HUMAN 1 #define LANGUAGE_HUMAN 1
@@ -36,13 +38,14 @@
#define LANGUAGE_GUTTER "Gutter" #define LANGUAGE_GUTTER "Gutter"
// Language flags. // Language flags.
#define WHITELISTED 1 // Language is available if the speaker is whitelisted. #define WHITELISTED 1 // Language is available if the speaker is whitelisted.
#define RESTRICTED 2 // Language can only be accquired by spawning or an admin. #define RESTRICTED 2 // Language can only be acquired by spawning or an admin.
#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight. #define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight.
#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand. #define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand.
#define HIVEMIND 16 // Broadcast to all mobs with this language. #define HIVEMIND 16 // Broadcast to all mobs with this language.
#define NONGLOBAL 32 // Do not add to general languages list. #define NONGLOBAL 32 // Do not add to general languages list.
#define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes) #define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes)
#define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message #define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message
#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems #define NO_STUTTER 256 // No stuttering, slurring, or other speech problems
#define COMMON_VERBS 512 // Robots will apply regular verbs to this #define COMMON_VERBS 512 // Robots will apply regular verbs to this

View File

@@ -8,7 +8,7 @@
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob) /obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
src.add_fingerprint(user) src.add_fingerprint(user)
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR))) if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>" user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
return 0 return 0

View File

@@ -649,11 +649,11 @@ datum/preferences
dat += "</br><b>Has excellent traction.</b>" dat += "</br><b>Has excellent traction.</b>"
if(current_species.flags & NO_POISON) if(current_species.flags & NO_POISON)
dat += "</br><b>Immune to most poisons.</b>" dat += "</br><b>Immune to most poisons.</b>"
if(current_species.flags & HAS_SKIN_TONE) if(current_species.appearance_flags & HAS_SKIN_TONE)
dat += "</br><b>Has a variety of skin tones.</b>" dat += "</br><b>Has a variety of skin tones.</b>"
if(current_species.flags & HAS_SKIN_COLOR) if(current_species.appearance_flags & HAS_SKIN_COLOR)
dat += "</br><b>Has a variety of skin colours.</b>" dat += "</br><b>Has a variety of skin colours.</b>"
if(current_species.flags & HAS_EYE_COLOR) if(current_species.appearance_flags & HAS_EYE_COLOR)
dat += "</br><b>Has a variety of eye colours.</b>" dat += "</br><b>Has a variety of eye colours.</b>"
if(current_species.flags & IS_PLANT) if(current_species.flags & IS_PLANT)
dat += "</br><b>Has a plantlike physiology.</b>" dat += "</br><b>Has a plantlike physiology.</b>"

View File

@@ -110,7 +110,7 @@
return 1 return 1
/mob/living/carbon/human/proc/change_skin_color(var/red, var/green, var/blue) /mob/living/carbon/human/proc/change_skin_color(var/red, var/green, var/blue)
if(red == r_skin && green == g_skin && blue == b_skin || !(species.flags & HAS_SKIN_COLOR)) if(red == r_skin && green == g_skin && blue == b_skin || !(species.appearance_flags & HAS_SKIN_COLOR))
return return
r_skin = red r_skin = red
@@ -122,7 +122,7 @@
return 1 return 1
/mob/living/carbon/human/proc/change_skin_tone(var/tone) /mob/living/carbon/human/proc/change_skin_tone(var/tone)
if(s_tone == tone || !(species.flags & HAS_SKIN_TONE)) if(s_tone == tone || !(species.appearance_flags & HAS_SKIN_TONE))
return return
s_tone = tone s_tone = tone

View File

@@ -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 | HAS_EYE_COLOR flags = CAN_JOIN | IS_WHITELISTED | NO_SCAN
appearance_flags = HAS_EYE_COLOR
blood_color = "#2299FC" blood_color = "#2299FC"
flesh_color = "#808D11" flesh_color = "#808D11"

View File

@@ -103,6 +103,7 @@
var/siemens_coefficient = 1 // The lower, the thicker the skin and better the insulation. var/siemens_coefficient = 1 // The lower, the thicker the skin and better the insulation.
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/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.

View File

@@ -11,7 +11,8 @@
num_alternate_languages = 2 num_alternate_languages = 2
secondary_langs = list("Sol Common") secondary_langs = list("Sol Common")
flags = CAN_JOIN | HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR flags = CAN_JOIN
appearance_flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR
/datum/species/unathi /datum/species/unathi
name = "Unathi" name = "Unathi"
@@ -41,7 +42,8 @@
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 | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flags = CAN_JOIN | IS_WHITELISTED
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
flesh_color = "#34AF10" flesh_color = "#34AF10"
@@ -96,7 +98,8 @@
primitive_form = "Farwa" primitive_form = "Farwa"
flags = CAN_JOIN | IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR flags = CAN_JOIN | IS_WHITELISTED
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
flesh_color = "#AFA59E" flesh_color = "#AFA59E"
base_color = "#333333" base_color = "#333333"
@@ -129,7 +132,8 @@
num_alternate_languages = 2 num_alternate_languages = 2
secondary_langs = list("Skrellian") secondary_langs = list("Skrellian")
flags = CAN_JOIN | IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR flags = CAN_JOIN | IS_WHITELISTED
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR
flesh_color = "#8CD7A3" flesh_color = "#8CD7A3"
blood_color = "#1D2CBF" blood_color = "#1D2CBF"

View File

@@ -325,10 +325,10 @@ var/global/list/damage_icon_parts = list()
stand_icon.Blend(base_icon,ICON_OVERLAY) stand_icon.Blend(base_icon,ICON_OVERLAY)
//Underwear //Underwear
if(underwear && species.flags & HAS_UNDERWEAR) if(underwear && species.appearance_flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', underwear), ICON_OVERLAY) stand_icon.Blend(new /icon('icons/mob/human.dmi', underwear), ICON_OVERLAY)
if(undershirt && species.flags & HAS_UNDERWEAR) if(undershirt && species.appearance_flags & HAS_UNDERWEAR)
stand_icon.Blend(new /icon('icons/mob/human.dmi', undershirt), ICON_OVERLAY) stand_icon.Blend(new /icon('icons/mob/human.dmi', undershirt), ICON_OVERLAY)
if(update_icons) if(update_icons)

View File

@@ -140,10 +140,10 @@
return owner && (flags & flag) return owner && (flags & flag)
/datum/nano_module/appearance_changer/proc/can_change_skin_tone() /datum/nano_module/appearance_changer/proc/can_change_skin_tone()
return owner && (flags & APPEARANCE_SKIN) && owner.species.flags & HAS_SKIN_TONE return owner && (flags & APPEARANCE_SKIN) && owner.species.appearance_flags & HAS_SKIN_TONE
/datum/nano_module/appearance_changer/proc/can_change_skin_color() /datum/nano_module/appearance_changer/proc/can_change_skin_color()
return owner && (flags & APPEARANCE_SKIN) && owner.species.flags & HAS_SKIN_COLOR return owner && (flags & APPEARANCE_SKIN) && owner.species.appearance_flags & HAS_SKIN_COLOR
/datum/nano_module/appearance_changer/proc/cut_and_generate_data() /datum/nano_module/appearance_changer/proc/cut_and_generate_data()
// Making the assumption that the available species remain constant // Making the assumption that the available species remain constant

View File

@@ -19,9 +19,9 @@ var/global/list/limb_icon_cache = list()
return return
if(species && human.species && species.name != human.species.name) if(species && human.species && species.name != human.species.name)
return return
if(!isnull(human.s_tone) && (human.species.flags & HAS_SKIN_TONE)) if(!isnull(human.s_tone) && (human.species.appearance_flags & HAS_SKIN_TONE))
s_tone = human.s_tone s_tone = human.s_tone
if(human.species.flags & HAS_SKIN_COLOR) if(human.species.appearance_flags & HAS_SKIN_COLOR)
s_col = list(human.r_skin, human.g_skin, human.b_skin) s_col = list(human.r_skin, human.g_skin, human.b_skin)
/obj/item/organ/external/proc/sync_colour_to_dna() /obj/item/organ/external/proc/sync_colour_to_dna()
@@ -29,9 +29,9 @@ var/global/list/limb_icon_cache = list()
s_col = null s_col = null
if(status & ORGAN_ROBOT) if(status & ORGAN_ROBOT)
return return
if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.flags & HAS_SKIN_TONE)) if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && (species.appearance_flags & HAS_SKIN_TONE))
s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE) s_tone = dna.GetUIValue(DNA_UI_SKIN_TONE)
if(species.flags & HAS_SKIN_COLOR) if(species.appearance_flags & HAS_SKIN_COLOR)
s_col = list(dna.GetUIValue(DNA_UI_SKIN_R), dna.GetUIValue(DNA_UI_SKIN_G), dna.GetUIValue(DNA_UI_SKIN_B)) s_col = list(dna.GetUIValue(DNA_UI_SKIN_R), dna.GetUIValue(DNA_UI_SKIN_G), dna.GetUIValue(DNA_UI_SKIN_B))
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human) /obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
@@ -60,7 +60,7 @@ var/global/list/limb_icon_cache = list()
mob_icon.Blend(eyes_icon, ICON_OVERLAY) mob_icon.Blend(eyes_icon, ICON_OVERLAY)
overlays |= eyes_icon overlays |= eyes_icon
if(owner.lip_style && (species && (species.flags & HAS_LIPS))) if(owner.lip_style && (species && (species.appearance_flags & HAS_LIPS)))
var/icon/lip_icon = new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s") var/icon/lip_icon = new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s")
overlays |= lip_icon overlays |= lip_icon
mob_icon.Blend(lip_icon, ICON_OVERLAY) mob_icon.Blend(lip_icon, ICON_OVERLAY)