mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
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:
@@ -111,6 +111,7 @@ datum/preferences
|
||||
var/socks = "Nude" //socks type
|
||||
var/backbag = 2 //backpack type
|
||||
var/h_style = "Bald" //Hair type
|
||||
var/horns = "None" //Horn style
|
||||
var/r_hair = 0 //Hair color
|
||||
var/g_hair = 0 //Hair color
|
||||
var/b_hair = 0 //Hair color
|
||||
@@ -353,6 +354,10 @@ datum/preferences
|
||||
dat += "[TextPreview(flavor_text)]...<br>"
|
||||
dat += "<br>"
|
||||
|
||||
if(species == "Unathi")
|
||||
dat += "<br><b>Horns</b><br>"
|
||||
dat += "Style: <a href='?_src_=prefs;preference=horns;task=input'>[horns]</a><br>"
|
||||
|
||||
var/hairname = "Hair"
|
||||
if(species == "Machine")
|
||||
hairname = "Frame Color"
|
||||
@@ -1188,6 +1193,19 @@ datum/preferences
|
||||
if(new_h_style)
|
||||
h_style = new_h_style
|
||||
|
||||
if("horns")
|
||||
var/list/valid_hornstyles = list()
|
||||
for(var/hornstyle in horn_styles_list)
|
||||
var/datum/sprite_accessory/H = horn_styles_list[hornstyle]
|
||||
if( !(species in H.species_allowed))
|
||||
continue
|
||||
|
||||
valid_hornstyles[hornstyle] = horn_styles_list[hornstyle]
|
||||
|
||||
var/new_horn_style = input(user, "Choose your character's horn style:", "Character Preference") as null|anything in valid_hornstyles
|
||||
if(new_horn_style)
|
||||
horns = new_horn_style
|
||||
|
||||
if("body_accessory")
|
||||
var/list/possible_body_accessories = list()
|
||||
if(check_rights(R_ADMIN, 1, user))
|
||||
@@ -1607,6 +1625,8 @@ datum/preferences
|
||||
character.undershirt = undershirt
|
||||
character.socks = socks
|
||||
|
||||
if(character.species.name == "Unathi")
|
||||
character.horns = horns
|
||||
if(body_accessory)
|
||||
character.body_accessory = body_accessory_by_name["[body_accessory]"]
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
S["skin_red"] >> r_skin
|
||||
S["skin_green"] >> g_skin
|
||||
S["skin_blue"] >> b_skin
|
||||
S["horn_style_name"] >> horns
|
||||
S["hair_style_name"] >> h_style
|
||||
S["facial_style_name"] >> f_style
|
||||
S["eyes_red"] >> r_eyes
|
||||
@@ -197,6 +198,7 @@
|
||||
r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin))
|
||||
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))
|
||||
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))
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user