Melting Snowflakes & (Adds/Changes Frills & Adds Body Markings)

This commit is contained in:
KasparoVy
2015-12-26 00:48:01 -05:00
parent 0f8f514671
commit be3bb885f2
13 changed files with 224 additions and 76 deletions
+39 -4
View File
@@ -110,8 +110,12 @@ datum/preferences
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = 2 //backpack type
var/h_style = "Bald" //Hair type
var/horns = "None" //Horn style
var/m_style = "None" //Marking style
var/r_markings = 0 //Marking colour
var/g_markings = 0 //Marking colour
var/b_markings = 0 //Marking colour
var/h_style = "Bald" //Hair type
var/r_hair = 0 //Hair color
var/g_hair = 0 //Hair color
var/b_hair = 0 //Hair color
@@ -354,10 +358,14 @@ datum/preferences
dat += "[TextPreview(flavor_text)]...<br>"
dat += "<br>"
if(species == "Unathi")
if(species == "Unathi") //Species that have horns.
dat += "<br><b>Horns</b><br>"
dat += "Style: <a href='?_src_=prefs;preference=horns;task=input'>[horns]</a><br>"
dat += "<br><b>Body Markings</b><br>"
dat += "<a href='?_src_=prefs;preference=markings;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_markings, 2)][num2hex(g_markings, 2)][num2hex(b_markings, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_markings, 2)][num2hex(g_markings, 2)][num2hex(b_markings)]'><tr><td>__</td></tr></table></font> "
dat += "<br>Style: <a href='?_src_=prefs;preference=m_style;task=input'>[m_style]</a><br>"
var/hairname = "Hair"
if(species == "Machine")
hairname = "Frame Color"
@@ -374,7 +382,7 @@ datum/preferences
if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
dat += "<br><b>Body Color</b><br>"
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin)]'><tr><td>__</td></tr></table></font>"
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_skin, 2)][num2hex(g_skin, 2)][num2hex(b_skin)]'><tr><td>__</td></tr></table></font><br>"
if(body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
dat += "<br><b>Body Accessory</b><br>"
@@ -1206,6 +1214,28 @@ datum/preferences
if(new_horn_style)
horns = new_horn_style
if("markings")
if(species == "Unathi")
var/input = "Choose the colour of your your character's body markings:"
var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null
if(new_markings)
r_markings = hex2num(copytext(new_markings, 2, 4))
g_markings = hex2num(copytext(new_markings, 4, 6))
b_markings = hex2num(copytext(new_markings, 6, 8))
if("m_style")
var/list/valid_markings = list()
for(var/markingstyle in marking_styles_list)
var/datum/sprite_accessory/M = marking_styles_list[markingstyle]
if( !(species in M.species_allowed))
continue
valid_markings[markingstyle] = marking_styles_list[markingstyle]
var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference") as null|anything in valid_markings
if(new_marking_style)
m_style = new_marking_style
if("body_accessory")
var/list/possible_body_accessories = list()
if(check_rights(R_ADMIN, 1, user))
@@ -1625,8 +1655,13 @@ datum/preferences
character.undershirt = undershirt
character.socks = socks
if(character.species.name == "Unathi")
if(character.species.bodyflags & HAS_HORNS)
character.horns = horns
if(character.species.bodyflags & HAS_MARKINGS)
character.r_markings = r_markings
character.g_markings = g_markings
character.b_markings = b_markings
character.m_style = m_style
if(body_accessory)
character.body_accessory = body_accessory_by_name["[body_accessory]"]
@@ -124,6 +124,9 @@
S["spawnpoint"] >> spawnpoint
//colors to be consolidated into hex strings (requires some work with dna code)
S["markings_red"] >> r_markings
S["markings_green"] >> g_markings
S["markings_blue"] >> b_markings
S["hair_red"] >> r_hair
S["hair_green"] >> g_hair
S["hair_blue"] >> b_hair
@@ -135,6 +138,7 @@
S["skin_green"] >> g_skin
S["skin_blue"] >> b_skin
S["horn_style_name"] >> horns
S["marking_style_name"] >> m_style
S["hair_style_name"] >> h_style
S["facial_style_name"] >> f_style
S["eyes_red"] >> r_eyes
@@ -188,6 +192,9 @@
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
gender = sanitize_gender(gender)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings))
g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings))
b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings))
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
@@ -199,6 +206,7 @@
g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin))
b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin))
horns = sanitize_inlist(horns, horn_styles_list, initial(horns))
m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style))
h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style))
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
@@ -2,6 +2,12 @@
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
//Marking colour and style
var/r_markings = 0
var/g_markings = 0
var/b_markings = 0
var/m_style = "None"
//Hair colour and style
var/r_hair = 0
var/g_hair = 0
@@ -40,7 +40,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HORNS | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_CARN
cold_level_1 = 280 //Default 260 - Lower is better
@@ -106,31 +106,32 @@ Please contact me on #coderbus IRC. ~Carn x
//Human Overlays Indexes/////////
#define MUTANTRACE_LAYER 1
#define MUTATIONS_LAYER 2
#define DAMAGE_LAYER 3
#define UNIFORM_LAYER 4
#define ID_LAYER 5
#define SHOES_LAYER 6
#define GLOVES_LAYER 7
#define EARS_LAYER 8
#define SUIT_LAYER 9
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define TAIL_LAYER 12 //bs12 specific. this hack is probably gonna come back to haunt me
#define SUIT_STORE_LAYER 13
#define BACK_LAYER 14
#define HAIR_LAYER 15 //TODO: make part of head layer?
#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
#define MARKINGS_LAYER 2
#define MUTATIONS_LAYER 3
#define DAMAGE_LAYER 4
#define UNIFORM_LAYER 5
#define ID_LAYER 6
#define SHOES_LAYER 7
#define GLOVES_LAYER 8
#define EARS_LAYER 9
#define SUIT_LAYER 10
#define GLASSES_LAYER 11
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
#define TAIL_LAYER 13 //bs12 specific. this hack is probably gonna come back to haunt me
#define SUIT_STORE_LAYER 14
#define BACK_LAYER 15
#define HAIR_LAYER 16 //TODO: make part of head layer?
#define HORN_LAYER 17
#define FACEMASK_LAYER 18
#define HEAD_LAYER 19
#define COLLAR_LAYER 20
#define HANDCUFF_LAYER 21
#define LEGCUFF_LAYER 22
#define L_HAND_LAYER 23
#define R_HAND_LAYER 24
#define TARGETED_LAYER 25 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 26 //If you're on fire
#define TOTAL_LAYERS 26
@@ -353,8 +354,39 @@ var/global/list/damage_icon_parts = list()
update_tail_layer(0)
//horns
update_horns(0)
//markings
update_markings(0)
//MARKINGS OVERLAY
/mob/living/carbon/human/proc/update_markings(var/update_icons=1)
world << "\red PROC CALLED"
//Reset our markings
overlays_standing[MARKINGS_LAYER] = null
var/obj/item/organ/external/chest/chest_organ = get_organ("chest")
if(!chest_organ || chest_organ.is_stump() || (chest_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
//base icons
var/icon/markings_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(m_style && (src.species.bodyflags & HAS_MARKINGS))
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style && marking_style.species_allowed)
if(src.species.name in marking_style.species_allowed)
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
if(marking_style.do_colouration)
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]")
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
@@ -365,15 +397,15 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons()
return
//masks and helmets can obscure our horns, unless we're a synthetic
//masks and helmets can obscure our horns
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")
var/icon/horns_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(horns && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.name == "Unathi")))
if(horns && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HORNS)))
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)
@@ -1053,6 +1085,7 @@ var/global/list/damage_icon_parts = list()
//Human Overlays Indexes/////////
#undef MUTANTRACE_LAYER
#undef MARKINGS_LAYER
#undef MUTATIONS_LAYER
#undef DAMAGE_LAYER
#undef UNIFORM_LAYER
@@ -248,9 +248,19 @@ datum/preferences
else
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
//Body Markings
if(current_species && (current_species.bodyflags & HAS_MARKINGS))
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style)
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)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if(hair_style)
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
@@ -264,7 +274,7 @@ datum/preferences
eyes_s.Blend(facial_s, ICON_OVERLAY)
//Horns
if(current_species && current_species.name == "Unathi")
if(current_species && (current_species.bodyflags & HAS_HORNS))
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")
@@ -272,19 +282,19 @@ datum/preferences
eyes_s.Blend(horns_s, ICON_OVERLAY)
var/icon/underwear_s = null
if(underwear && current_species.clothing_flags & HAS_UNDERWEAR)
if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR))
var/datum/sprite_accessory/underwear/U = underwear_list[underwear]
if(U)
underwear_s = new/icon(U.icon, "uw_[U.icon_state]_s", ICON_OVERLAY)
var/icon/undershirt_s = null
if(undershirt && current_species.clothing_flags & HAS_UNDERSHIRT)
if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT))
var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt]
if(U2)
undershirt_s = new/icon(U2.icon, "us_[U2.icon_state]_s", ICON_OVERLAY)
var/icon/socks_s = null
if(socks && current_species.clothing_flags & HAS_SOCKS)
if(socks && (current_species.clothing_flags & HAS_SOCKS))
var/datum/sprite_accessory/socks/U3 = socks_list[socks]
if(U3)
socks_s = new/icon(U3.icon, "sk_[U3.icon_state]_s", ICON_OVERLAY)
@@ -564,25 +564,6 @@
*/
/datum/sprite_accessory/hair
una_spines_long
name = "Long Unathi Spines"
icon_state = "soghun_longspines"
species_allowed = list("Unathi")
una_spines_short
name = "Short Unathi Spines"
icon_state = "soghun_shortspines"
species_allowed = list("Unathi")
una_frills_long
name = "Long Unathi Frills"
icon_state = "soghun_longfrills"
species_allowed = list("Unathi")
una_frills_short
name = "Short Unathi Frills"
icon_state = "soghun_shortfrills"
species_allowed = list("Unathi")
una_horns
name = "Unathi Horns"
@@ -872,6 +853,8 @@
/datum/sprite_accessory/facial_hair
//Tajara
taj_sideburns
name = "Tajara Sideburns"
icon_state = "facial_sideburns"
@@ -902,6 +885,8 @@
icon_state = "facial_smallstache"
species_allowed = list("Tajaran")
//Vox
vox_colonel
name = "Vox Colonel Beard"
icon_state = "vox_colonel"
@@ -973,6 +958,51 @@
species_allowed = list("Vulpkanin")
gender = NEUTER
//Unathi
una_spines_long
name = "Long Unathi Spines"
icon_state = "soghun_longspines"
species_allowed = list("Unathi")
gender = NEUTER
una_spines_short
name = "Short Unathi Spines"
icon_state = "soghun_shortspines"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_long
name = "Long Unathi Frills"
icon_state = "soghun_longfrills"
species_allowed = list("Unathi")
gender = NEUTER
una_frills_short
name = "Short Unathi Frills"
icon_state = "soghun_shortfrills"
species_allowed = list("Unathi")
gender = NEUTER
una_simple
name = "Simple"
icon_state = "soghun_longwebbed_frills"
species_allowed = list("Unathi")
gender = NEUTER
una_short
name = "Short"
icon_state = "soghun_shortwebbed_frills"
species_allowed = list("Unathi")
gender = NEUTER
una_aquatic
name = "Aquatic"
icon_state = "soghun_aquafrills"
species_allowed = list("Unathi")
gender = NEUTER
//skin styles - WIP
//going to have to re-integrate this with surgery
//let the icon_state hold an icon preview for now
@@ -1509,7 +1539,7 @@
/datum/sprite_accessory/horns/none
name = "None"
icon_state = "horns_none"
icon_state = "accessory_none"
/datum/sprite_accessory/horns/simple
name = "Simple"
@@ -1527,25 +1557,37 @@
name = "Ram"
icon_state = "horns_ram"
/* FRILLS */
/* BODY MARKINGS */
/datum/sprite_accessory/frills
/datum/sprite_accessory/body_markings
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi")
icon_state = null
/datum/sprite_accessory/frills/none
/datum/sprite_accessory/body_markings/none
name = "None"
icon_state = null
icon_state = "accessory_none"
/datum/sprite_accessory/frills/simple
name = "Simple"
icon_state = "simple"
/datum/sprite_accessory/body_markings/dstripe
name = "Dark Stripe"
icon_state = "markings_dstripe"
/datum/sprite_accessory/frills/short
name = "Short"
icon_state = "short"
/datum/sprite_accessory/body_markings/lstripe
name = "Light Stripe"
icon_state = "markings_lstripe"
/datum/sprite_accessory/frills/aquatic
name = "Aquatic"
icon_state = "aqua"
/datum/sprite_accessory/body_markings/dtiger
name = "Dark Tiger Body"
icon_state = "markings_dtiger"
/datum/sprite_accessory/body_markings/dtigerhead
name = "Dark Tiger Body + Head"
icon_state = "markings_dtigerhead"
/datum/sprite_accessory/body_markings/ltiger
name = "Light Tiger Body"
icon_state = "markings_ltiger"
/datum/sprite_accessory/body_markings/ltigerhead
name = "Light Tiger Body + Head"
icon_state = "markings_ltigerhead"