Generalization + Features for Other Species

Turns horns into head accessories, fixes some species checks, gets
Tajara and Vulpkanin into the mix, ensures the system cannot be
exploited, adds species-specific body markings for Tajara, Vulpkanin and
Unathi.
This commit is contained in:
KasparoVy
2015-12-28 01:02:23 -05:00
parent c6e265e410
commit 366d05f745
12 changed files with 171 additions and 129 deletions
@@ -14,11 +14,11 @@
var/b_hair = 0
var/h_style = "Bald"
//Horns
var/r_horns = 0
var/g_horns = 0
var/b_horns = 0
var/hn_style = "None"
//Head accessory colour and style
var/r_headacc = 0
var/g_headacc = 0
var/b_headacc = 0
var/ha_style = "None"
//Facial hair colour and style
var/r_facial = 0
@@ -40,7 +40,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HORNS | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_CARN
cold_level_1 = 280 //Default 260 - Lower is better
@@ -95,7 +95,7 @@
flags = HAS_LIPS | CAN_BE_FAT
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
flesh_color = "#AFA59E"
@@ -130,7 +130,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
flesh_color = "#966464"
@@ -121,7 +121,7 @@ Please contact me on #coderbus IRC. ~Carn x
#define SUIT_STORE_LAYER 14
#define BACK_LAYER 15
#define HAIR_LAYER 16 //TODO: make part of head layer?
#define HORN_LAYER 17
#define HEAD_ACCESSORY_LAYER 17
#define FHAIR_LAYER 18
#define FACEMASK_LAYER 19
#define HEAD_LAYER 20
@@ -353,8 +353,8 @@ var/global/list/damage_icon_parts = list()
//tail
update_tail_layer(0)
//horns
update_horns(0)
//head accessory
update_head_accessory(0)
//markings
update_markings(0)
//hair
@@ -384,42 +384,42 @@ var/global/list/damage_icon_parts = list()
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
markings_standing.Blend(markings_s, ICON_OVERLAY)
else
//warning("Invalid markings for [species.name]: [horns]")
//warning("Invalid m_style for [species.name]: [m_style]")
overlays_standing[MARKINGS_LAYER] = image(markings_standing)
if(update_icons) update_icons()
//HORN OVERLAY
/mob/living/carbon/human/proc/update_horns(var/update_icons=1)
//Reset our horns
overlays_standing[HORN_LAYER] = null
//HEAD ACCESSORY OVERLAY
/mob/living/carbon/human/proc/update_head_accessory(var/update_icons=1)
//Reset our head accessory
overlays_standing[HEAD_ACCESSORY_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
//masks and helmets can obscure our horns
//masks and helmets can obscure our head accessory
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if(update_icons) update_icons()
return
//base icons
var/icon/horns_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(hn_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HORNS)))
var/datum/sprite_accessory/horn_style = horn_styles_list[hn_style]
if(horn_style && horn_style.species_allowed)
if(src.species.name in horn_style.species_allowed)
var/icon/horns_s = new/icon("icon" = horn_style.icon, "icon_state" = "[horn_style.icon_state]_s")
if(horn_style.do_colouration)
horns_s.Blend(rgb(r_horns, g_horns, b_horns), ICON_ADD)
horns_standing.Blend(horns_s, ICON_OVERLAY)
if(ha_style && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HEAD_ACCESSORY)))
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
if(src.species.name in head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
if(head_accessory_style.do_colouration)
head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
head_accessory_standing.Blend(head_accessory_s, ICON_OVERLAY)
else
//warning("Invalid horns for [species.name]: [horns]")
//warning("Invalid ha_style for [species.name]: [ha_style]")
overlays_standing[HORN_LAYER] = image(horns_standing)
overlays_standing[HEAD_ACCESSORY_LAYER] = image(head_accessory_standing)
if(update_icons) update_icons()
@@ -581,7 +581,7 @@ var/global/list/damage_icon_parts = list()
update_mutations(0)
update_body(0)
update_hair(0)
update_horns(0)
update_head_accessory(0)
update_fhair(0)
update_mutantrace(0)
update_inv_w_uniform(0,0)
@@ -1131,7 +1131,7 @@ var/global/list/damage_icon_parts = list()
#undef BACK_LAYER
#undef HAIR_LAYER
#undef HEAD_LAYER
#undef HORN_LAYER
#undef HEAD_ACCESSORY_LAYER
#undef FHAIR_LAYER
#undef COLLAR_LAYER
#undef HANDCUFF_LAYER
@@ -251,7 +251,7 @@ datum/preferences
//Body Markings
if(current_species && (current_species.bodyflags & HAS_MARKINGS))
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style)
if(marking_style && marking_style.species_allowed)
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
preview_icon.Blend(markings_s, ICON_OVERLAY)
@@ -267,16 +267,16 @@ datum/preferences
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
eyes_s.Blend(hair_s, ICON_OVERLAY)
//Horns
if(current_species && (current_species.bodyflags & HAS_HORNS))
var/datum/sprite_accessory/horn_style = horn_styles_list[hn_style]
if(horn_style)
var/icon/horns_s = new/icon("icon" = horn_style.icon, "icon_state" = "[horn_style.icon_state]_s")
horns_s.Blend(rgb(r_horns, g_horns, b_horns), ICON_ADD)
eyes_s.Blend(horns_s, ICON_OVERLAY)
//Head Accessory
if(current_species && (current_species.bodyflags & HAS_HEAD_ACCESSORY))
var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
head_accessory_s.Blend(rgb(r_headacc, g_headacc, b_headacc), ICON_ADD)
eyes_s.Blend(head_accessory_s, ICON_OVERLAY)
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style]
if(facial_hair_style)
if(facial_hair_style && facial_hair_style.species_allowed)
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
@@ -930,6 +930,13 @@
//Vulpkanin
vulp_earfluff
name = "Vulpkanin Earfluff"
icon_state = "vulp_facial_earfluff"
species_allowed = list("Vulpkanin")
gender = NEUTER
vulp_blaze
name = "Blaze"
icon_state = "vulp_facial_blaze"
@@ -942,12 +949,6 @@
species_allowed = list("Vulpkanin")
gender = NEUTER
vulp_earfluff
name = "Earfluff"
icon_state = "vulp_facial_earfluff"
species_allowed = list("Vulpkanin")
gender = NEUTER
vulp_mask
name = "Mask"
icon_state = "vulp_facial_mask"
@@ -1550,52 +1551,88 @@
gender = NEUTER
species_allowed = list("Vox")
/* HORNS */
/* HEAD ACCESSORY */
/datum/sprite_accessory/horns
/datum/sprite_accessory/head_accessory
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi")
icon_state = null
/datum/sprite_accessory/horns/none
name = "None"
species_allowed = list("Unathi", "Vulpkanin", "Tajaran")
icon_state = "accessory_none"
/datum/sprite_accessory/horns/simple
/datum/sprite_accessory/head_accessory/none
name = "None"
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington","Vox")
icon_state = "accessory_none"
/datum/sprite_accessory/head_accessory/simple
name = "Simple"
species_allowed = list("Unathi")
icon_state = "horns_simple"
/datum/sprite_accessory/horns/short
/datum/sprite_accessory/head_accessory/short
name = "Short"
species_allowed = list("Unathi")
icon_state = "horns_short"
/datum/sprite_accessory/horns/curled
/datum/sprite_accessory/head_accessory/curled
name = "Curled"
species_allowed = list("Unathi")
icon_state = "horns_curled"
/datum/sprite_accessory/horns/ram
/datum/sprite_accessory/head_accessory/ram
name = "Ram"
species_allowed = list("Unathi")
icon_state = "horns_ram"
/datum/sprite_accessory/head_accessory/vulp_earfluff
icon = 'icons/mob/human_face.dmi'
name = "Vulpkanin Earfluff"
icon_state = "vulp_facial_earfluff"
species_allowed = list("Vulpkanin")
/datum/sprite_accessory/head_accessory/taj_ears
icon = 'icons/mob/human_face.dmi'
name = "Tajaran Ears"
icon_state = "ears_plain"
species_allowed = list("Tajaran")
/* BODY MARKINGS */
/datum/sprite_accessory/body_markings
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi")
icon_state = null
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "accessory_none"
/datum/sprite_accessory/body_markings/none
name = "None"
species_allowed = list("Human","Unathi","Diona","Grey","Machine","Tajaran","Vulpkanin","Slime People","Skellington","Vox")
icon_state = "accessory_none"
/datum/sprite_accessory/body_markings/stripe
name = "Stripe"
species_allowed = list("Unathi")
icon_state = "markings_stripe"
/datum/sprite_accessory/body_markings/tiger
name = "Tiger Body"
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "markings_tiger"
/datum/sprite_accessory/body_markings/tigerhead
name = "Tiger Body + Head"
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "markings_tigerhead"
/datum/sprite_accessory/body_markings/tigerheadface_taj
name = "Tajaran Tiger Body + Head + Face"
species_allowed = list("Tajaran")
icon_state = "markings_tigerheadface_taj"
/datum/sprite_accessory/body_markings/tigerheadface_vulp
name = "Vulpkanin Tiger Body + Head + Face"
species_allowed = list("Vulpkanin")
icon_state = "markings_tigerheadface_vulp"
/datum/sprite_accessory/body_markings/tigerheadface_una
name = "Unathi Tiger Body + Head + Face"
species_allowed = list("Unathi")
icon_state = "markings_tigerheadface_una"