Adds Unathi Horn and Tail Customization

Does not include tail colour correction.
In this iteration, the horns do not have their own colour-- they use the
skin colour.
This commit is contained in:
KasparoVy
2015-12-21 22:55:39 -05:00
parent 9feda771fd
commit 0f8f514671
11 changed files with 148 additions and 11 deletions
@@ -91,6 +91,8 @@ var/global/list/body_accessory_by_species = list("None" = null)
icon = 'icons/mob/body_accessory.dmi'
animated_icon = 'icons/mob/body_accessory.dmi'
blend_mode = ICON_ADD
icon_state = "null"
animated_icon_state = "null"
/datum/body_accessory/tail/try_restrictions(var/mob/living/carbon/human/H)
if(!H.wear_suit || !(H.wear_suit.flags_inv & HIDETAIL) && !istype(H.wear_suit, /obj/item/clothing/suit/space))
@@ -1,12 +1,16 @@
/mob/living/carbon/human
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
//Hair colour and style
var/r_hair = 0
var/g_hair = 0
var/b_hair = 0
var/h_style = "Bald"
//Horns
var/horns = "None"
//Facial hair colour and style
var/r_facial = 0
var/g_facial = 0
@@ -120,16 +120,17 @@ Please contact me on #coderbus IRC. ~Carn x
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#define FACEMASK_LAYER 16
#define HEAD_LAYER 17
#define COLLAR_LAYER 18
#define HANDCUFF_LAYER 19
#define LEGCUFF_LAYER 20
#define L_HAND_LAYER 21
#define R_HAND_LAYER 22
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 24 //If you're on fire
#define TOTAL_LAYERS 24
#define HORN_LAYER 16
#define FACEMASK_LAYER 17
#define HEAD_LAYER 18
#define COLLAR_LAYER 19
#define HANDCUFF_LAYER 20
#define LEGCUFF_LAYER 21
#define L_HAND_LAYER 22
#define R_HAND_LAYER 23
#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 25 //If you're on fire
#define TOTAL_LAYERS 25
@@ -350,6 +351,42 @@ var/global/list/damage_icon_parts = list()
//tail
update_tail_layer(0)
//horns
update_horns(0)
//HORN OVERLAY
/mob/living/carbon/human/proc/update_horns(var/update_icons=1)
//Reset our horns
overlays_standing[HORN_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, unless we're a synthetic
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',"horns_none_s")
if(horns && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.name == "Unathi")))
var/datum/sprite_accessory/horn_style = horn_styles_list[horns]
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_skin, g_skin, b_skin), ICON_ADD)
horns_standing.Blend(horns_s, ICON_OVERLAY)
else
//warning("Invalid horns for [species.name]: [horns]")
overlays_standing[HORN_LAYER] = image(horns_standing)
if(update_icons) update_icons()
//HAIR OVERLAY
@@ -1032,6 +1069,7 @@ var/global/list/damage_icon_parts = list()
#undef BACK_LAYER
#undef HAIR_LAYER
#undef HEAD_LAYER
#undef HORN_LAYER
#undef COLLAR_LAYER
#undef HANDCUFF_LAYER
#undef LEGCUFF_LAYER
@@ -263,6 +263,13 @@ datum/preferences
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
eyes_s.Blend(facial_s, ICON_OVERLAY)
//Horns
if(current_species && current_species.name == "Unathi")
var/datum/sprite_accessory/horn_style = horn_styles_list[horns]
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_skin, g_skin, b_skin), ICON_ADD)
eyes_s.Blend(horns_s, ICON_OVERLAY)
var/icon/underwear_s = null
if(underwear && current_species.clothing_flags & HAS_UNDERWEAR)
@@ -1498,4 +1498,54 @@
name = "Vox Fishnets"
icon_state = "vox_fishnet"
gender = NEUTER
species_allowed = list("Vox")
species_allowed = list("Vox")
/* HORNS */
/datum/sprite_accessory/horns
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi")
icon_state = null
/datum/sprite_accessory/horns/none
name = "None"
icon_state = "horns_none"
/datum/sprite_accessory/horns/simple
name = "Simple"
icon_state = "horns_simple"
/datum/sprite_accessory/horns/short
name = "Short"
icon_state = "horns_short"
/datum/sprite_accessory/horns/curled
name = "Curled"
icon_state = "horns_curled"
/datum/sprite_accessory/horns/ram
name = "Ram"
icon_state = "horns_ram"
/* FRILLS */
/datum/sprite_accessory/frills
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi")
icon_state = null
/datum/sprite_accessory/frills/none
name = "None"
icon_state = null
/datum/sprite_accessory/frills/simple
name = "Simple"
icon_state = "simple"
/datum/sprite_accessory/frills/short
name = "Short"
icon_state = "short"
/datum/sprite_accessory/frills/aquatic
name = "Aquatic"
icon_state = "aqua"