mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Allow Transparency for Wings, Tails, and Ears (#10424)
Co-authored-by: eghughguhhhhhh <Hawoogabooga@gmail.com> Co-authored-by: vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
58e2f1d66b
commit
b3fbd293d1
@@ -438,6 +438,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
. += "<a href='byond://?src=\ref[src];ear_color2=1'>Change Secondary Color</a> [color_square(hex = pref.read_preference(/datum/preference/color/human/ears_color2))]<br>"
|
||||
if(ear.extra_overlay2)
|
||||
. += "<a href='byond://?src=\ref[src];ear_color3=1'>Change Tertiary Color</a> [color_square(hex = pref.read_preference(/datum/preference/color/human/ears_color3))]<br>"
|
||||
.+= "<a href='byond://?src=\ref[src];ears_alpha=1'>Change Ears Alpha</a> Current:[pref.read_preference(/datum/preference/numeric/human/ears_alpha)]<br>"
|
||||
else
|
||||
. += " Style: <a href='byond://?src=\ref[src];ear_style=1'>Select</a><br>"
|
||||
|
||||
@@ -447,6 +448,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
. += " Style: <a href='byond://?src=\ref[src];ear_secondary_style=1'>[ears_secondary.name]</a><br>"
|
||||
for(var/channel in 1 to min(ears_secondary.get_color_channel_count(), length(GLOB.fancy_sprite_accessory_color_channel_names)))
|
||||
. += "<a href='byond://?src=\ref[src];ear_secondary_color=[channel]'>Change [GLOB.fancy_sprite_accessory_color_channel_names[channel]] Color</a> [color_square(hex = LAZYACCESS(pref.ear_secondary_colors, channel) || "#ffffff")]<br>"
|
||||
.+= "<a href='byond://?src=\ref[src];secondary_ears_alpha=1'>Change Horns Alpha</a> Current:[pref.read_preference(/datum/preference/numeric/human/ears_alpha/secondary)]<br>"
|
||||
else
|
||||
. += " Style: <a href='byond://?src=\ref[src];ear_secondary_style=1'>Select</a><br>"
|
||||
|
||||
@@ -461,6 +463,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
. += "<a href='byond://?src=\ref[src];tail_color2=1'>Change Secondary Color</a> [color_square(hex = pref.read_preference(/datum/preference/color/human/tail_color2))]<br>"
|
||||
if(tail.extra_overlay2)
|
||||
. += "<a href='byond://?src=\ref[src];tail_color3=1'>Change Tertiary Color</a> [color_square(hex = pref.read_preference(/datum/preference/color/human/tail_color3))]<br>"
|
||||
.+= "<a href='byond://?src=\ref[src];tail_alpha=1'>Change Tail Alpha</a> Current:[pref.read_preference(/datum/preference/numeric/human/tail_alpha)]<br>"
|
||||
else
|
||||
. += " Style: <a href='byond://?src=\ref[src];tail_style=1'>Select</a><br>"
|
||||
|
||||
@@ -475,6 +478,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
. += "<a href='byond://?src=\ref[src];wing_color2=1'>Change Secondary Color</a> [color_square(hex = pref.read_preference(/datum/preference/color/human/wing_color2))]<br>"
|
||||
if(wings.extra_overlay2)
|
||||
. += "<a href='byond://?src=\ref[src];wing_color3=1'>Change Secondary Color</a> [color_square(hex = pref.read_preference(/datum/preference/color/human/wing_color3))]<br>"
|
||||
.+= "<a href='byond://?src=\ref[src];wing_alpha=1'>Change Wing Alpha</a> Current:[pref.read_preference(/datum/preference/numeric/human/wing_alpha)]<br>"
|
||||
else
|
||||
. += " Style: <a href='byond://?src=\ref[src];wing_style=1'>Select</a><br>"
|
||||
|
||||
@@ -1078,6 +1082,20 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
pref.update_preference_by_type(/datum/preference/color/human/ears_color3, new_earc3)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if (href_list["ears_alpha"])
|
||||
var/new_ear_alpha = tgui_input_number(user, "Choose how transparent your character's primary ears are.", "Character Preference",
|
||||
pref.read_preference(/datum/preference/numeric/human/ears_alpha), 255, 0)
|
||||
if(new_ear_alpha)
|
||||
pref.update_preference_by_type(/datum/preference/numeric/human/ears_alpha, new_ear_alpha)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if (href_list["secondary_ears_alpha"])
|
||||
var/new_ear_alpha = tgui_input_number(user, "Choose how transparent your character's horns are.", "Character Preference",
|
||||
pref.read_preference(/datum/preference/numeric/human/ears_alpha/secondary), 255, 0)
|
||||
if(new_ear_alpha)
|
||||
pref.update_preference_by_type(/datum/preference/numeric/human/ears_alpha/secondary, new_ear_alpha)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["ear_secondary_style"])
|
||||
var/new_style = tgui_input_list(user, "Select an ear style for this character:", "Character Preference", pref.get_available_styles(global.ear_styles_list), pref.ear_secondary_style)
|
||||
if(!new_style)
|
||||
@@ -1131,6 +1149,13 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
pref.update_preference_by_type(/datum/preference/color/human/tail_color3, new_tailc3)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["tail_alpha"])
|
||||
var/new_tail_alpha = tgui_input_number(user, "Choose how transparent your character's tail is.", "Character Preference",
|
||||
pref.read_preference(/datum/preference/numeric/human/tail_alpha), 255, 0)
|
||||
if(new_tail_alpha)
|
||||
pref.update_preference_by_type(/datum/preference/numeric/human/tail_alpha, new_tail_alpha)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["wing_style"])
|
||||
var/new_wing_style = tgui_input_list(user, "Select a wing style for this character:", "Character Preference", pref.get_available_styles(global.wing_styles_list), pref.wing_style)
|
||||
if(new_wing_style)
|
||||
@@ -1158,6 +1183,12 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
if(new_wingc)
|
||||
pref.update_preference_by_type(/datum/preference/color/human/wing_color3, new_wingc)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
else if(href_list["wing_alpha"])
|
||||
var/new_wing_alpha = tgui_input_number(user, "Choose how transparent your character's wings are.", "Character Preference",
|
||||
pref.read_preference(/datum/preference/numeric/human/wing_alpha), 255, 0)
|
||||
if(new_wing_alpha)
|
||||
pref.update_preference_by_type(/datum/preference/numeric/human/wing_alpha, new_wing_alpha)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/proc/reset_limbs()
|
||||
|
||||
@@ -534,6 +534,9 @@ var/list/preferences_datums = list()
|
||||
var/datum/preference/color/wing_color3 = GLOB.preference_entries[/datum/preference/color/human/wing_color3]
|
||||
wing_color3.apply_pref_to(character, read_preference(/datum/preference/color/human/wing_color3))
|
||||
|
||||
var/datum/preference/numeric/wing_alpha = GLOB.preference_entries[/datum/preference/numeric/human/wing_alpha]
|
||||
wing_alpha.apply_pref_to(character,read_preference(/datum/preference/numeric/human/wing_alpha))
|
||||
|
||||
character.set_gender(biological_gender)
|
||||
|
||||
// Destroy/cyborgize organs and limbs.
|
||||
|
||||
@@ -97,6 +97,19 @@
|
||||
target.g_tail3 = hex2num(copytext(value, 4, 6))
|
||||
target.b_tail3 = hex2num(copytext(value, 6, 8))
|
||||
|
||||
/datum/preference/numeric/human/tail_alpha
|
||||
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "tail_alpha"
|
||||
can_randomize = FALSE
|
||||
minimum = 0
|
||||
maximum = 255
|
||||
|
||||
/datum/preference/numeric/human/tail_alpha/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.a_tail = value
|
||||
|
||||
/datum/preference/numeric/human/tail_alpha/create_default_value()
|
||||
return 255 //nada.
|
||||
|
||||
/datum/preference/color/human/wing_color1
|
||||
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
|
||||
@@ -131,6 +144,20 @@
|
||||
target.g_wing3 = hex2num(copytext(value, 4, 6))
|
||||
target.b_wing3 = hex2num(copytext(value, 6, 8))
|
||||
|
||||
/datum/preference/numeric/human/wing_alpha
|
||||
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "wing_alpha"
|
||||
can_randomize = FALSE
|
||||
minimum = 0
|
||||
maximum = 255 //while it'd be dumb to have fully transparent wings, I'm not your mom.
|
||||
|
||||
/datum/preference/numeric/human/wing_alpha/create_default_value()
|
||||
return 255 //no randomization here.
|
||||
|
||||
/datum/preference/numeric/human/wing_alpha/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.a_wing = value
|
||||
|
||||
|
||||
/datum/preference/color/human/ears_color1
|
||||
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
|
||||
@@ -164,3 +191,23 @@
|
||||
target.r_ears3 = hex2num(copytext(value, 2, 4))
|
||||
target.g_ears3 = hex2num(copytext(value, 4, 6))
|
||||
target.b_ears3 = hex2num(copytext(value, 6, 8))
|
||||
|
||||
/datum/preference/numeric/human/ears_alpha
|
||||
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ears_alpha"
|
||||
can_randomize = FALSE
|
||||
minimum = 0
|
||||
maximum = 255
|
||||
|
||||
/datum/preference/numeric/human/ears_alpha/secondary
|
||||
savefile_key = "secondary_ears_alpha"
|
||||
|
||||
/datum/preference/numeric/human/ears_alpha/secondary/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.a_ears2 = value;
|
||||
|
||||
/datum/preference/numeric/human/ears_alpha/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.a_ears = value
|
||||
|
||||
/datum/preference/numeric/human/ears_alpha/create_default_value()
|
||||
return 255 //no randomization here.
|
||||
|
||||
@@ -130,6 +130,8 @@
|
||||
var/r_ears3 = 30 //Trust me, we could always use more colour. No japes.
|
||||
var/g_ears3 = 30
|
||||
var/b_ears3 = 30
|
||||
var/a_ears = 255 //applied to the ears
|
||||
var/a_ears2 = 255 //applied to the horns
|
||||
|
||||
/// secondary ears sprite accessory reference
|
||||
var/datum/sprite_accessory/ears/ear_secondary_style
|
||||
@@ -146,6 +148,10 @@
|
||||
var/r_tail3 = 30
|
||||
var/g_tail3 = 30
|
||||
var/b_tail3 = 30
|
||||
var/a_tail = 255 //applied to the entire tail
|
||||
|
||||
var/wagging = 0 //UGH.
|
||||
|
||||
var/datum/sprite_accessory/wing/wing_style = null
|
||||
var/r_wing = 30
|
||||
var/g_wing = 30
|
||||
@@ -157,7 +163,8 @@
|
||||
var/g_wing3 = 30
|
||||
var/b_wing3 = 30
|
||||
|
||||
var/wagging = 0 //UGH.
|
||||
var/a_wing = 255 //applied to both portions.
|
||||
|
||||
var/flapping = 0
|
||||
|
||||
// Custom Species Name
|
||||
|
||||
@@ -178,6 +178,7 @@ var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
r_ears3 = character.r_ears3
|
||||
b_ears3 = character.b_ears3
|
||||
g_ears3 = character.g_ears3
|
||||
a_ears = character.a_ears
|
||||
|
||||
tail_style = character.tail_style
|
||||
r_tail = character.r_tail
|
||||
@@ -189,6 +190,7 @@ var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
r_tail3 = character.r_tail3
|
||||
b_tail3 = character.b_tail3
|
||||
g_tail3 = character.g_tail3
|
||||
a_tail = character.a_tail
|
||||
|
||||
wing_style = character.wing_style
|
||||
r_wing = character.r_wing
|
||||
@@ -200,6 +202,7 @@ var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
r_wing3 = character.r_wing3
|
||||
b_wing3 = character.b_wing3
|
||||
g_wing3 = character.g_wing3
|
||||
a_wing = character.a_wing
|
||||
|
||||
|
||||
var/bodytype = character.species?.get_bodytype()
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
g_ears3 = new_color_rgb_list[2]
|
||||
b_ears3 = new_color_rgb_list[3]
|
||||
|
||||
var/new_ear_alpha = tgui_input_number(src, "Set ear alpha (0-255):","Ear Alpha", a_ears,255,0)
|
||||
if(new_ear_alpha)
|
||||
a_ears = new_ear_alpha
|
||||
|
||||
update_hair() //Includes Virgo ears
|
||||
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears()
|
||||
@@ -85,7 +89,9 @@
|
||||
var/default = LAZYACCESS(ear_secondary_colors, channel) || "#ffffff"
|
||||
var/new_color = tgui_color_picker(src, "Pick [channel_name]", "Ear Color ([channel_name])", default)
|
||||
new_colors += new_color || default
|
||||
|
||||
var/new_ear_alpha = tgui_input_number(src, "Set ear alpha (0-255):","Ear Alpha", a_ears2,255,0)
|
||||
if(new_ear_alpha)
|
||||
a_ears2 = new_ear_alpha
|
||||
update_hair()
|
||||
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail()
|
||||
@@ -140,6 +146,11 @@
|
||||
g_tail3 = new_color_rgb_list[2]
|
||||
b_tail3 = new_color_rgb_list[3]
|
||||
|
||||
|
||||
var/new_tail_alpha = tgui_input_number(src, "Set tail alpha (0-255):","Tail Alpha", a_tail,255,0)
|
||||
if(new_tail_alpha)
|
||||
a_tail = new_tail_alpha
|
||||
|
||||
update_tail_showing()
|
||||
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings()
|
||||
@@ -194,6 +205,10 @@
|
||||
g_wing3 = new_color_rgb_list[2]
|
||||
b_wing3 = new_color_rgb_list[3]
|
||||
|
||||
var/new_alpha = tgui_input_number(src, "Set wing alpha (0-255):","Wing Alpha", a_wing,255,0)
|
||||
if(new_alpha)
|
||||
a_wing = new_alpha
|
||||
|
||||
|
||||
update_wing_showing()
|
||||
|
||||
|
||||
@@ -500,8 +500,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
|
||||
if(head_organ.transparent) //VORESTATION EDIT: transparent instead of nonsolid
|
||||
face_standing += rgb(,,,120)
|
||||
if (ears_s)
|
||||
ears_s += rgb(,,,180)
|
||||
//if (ears_s) //maybe cap this instead of removing it? ae, if your ears are above 180 a reduce it down?
|
||||
//ears_s += rgb(,,,180)
|
||||
|
||||
var/image/em_block_ears
|
||||
if(ears_s)
|
||||
@@ -1026,7 +1026,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
var/image/tail_image = get_tail_image()
|
||||
if(tail_image)
|
||||
tail_image.layer = BODY_LAYER+tail_layer
|
||||
tail_image.alpha = chest?.transparent ? 180 : 255 //VORESTATION EDIT: transparent instead of nonsolid
|
||||
overlays_standing[tail_layer] = tail_image
|
||||
apply_layer(tail_layer)
|
||||
return
|
||||
@@ -1037,7 +1036,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
if(species_tail && !(wear_suit && wear_suit.flags_inv & HIDETAIL))
|
||||
var/icon/tail_s = get_tail_icon()
|
||||
tail_image = image(icon = tail_s, icon_state = "[species_tail]_s", layer = BODY_LAYER+tail_layer)
|
||||
tail_image.alpha = chest?.transparent ? 180 : 255 //VORESTATION EDIT: transparent instead of nonsolid
|
||||
tail_image.alpha = chest?.transparent ? 180 : 255 //VORESTATION EDIT: transparent instead of nonsolid //keeping this as is
|
||||
overlays_standing[tail_layer] = tail_image
|
||||
animate_tail_reset()
|
||||
|
||||
@@ -1146,7 +1145,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
|
||||
if(wing_image)
|
||||
wing_image.layer = BODY_LAYER+WING_LAYER
|
||||
wing_image.alpha = chest?.transparent ? 180 : 255 //VORESTATION EDIT: transparent instead of nonsolid
|
||||
overlays_standing[WING_LAYER] = wing_image
|
||||
if(wing_style && wing_style.multi_dir)
|
||||
wing_image = get_wing_image(TRUE)
|
||||
@@ -1265,6 +1263,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
wing_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
var/image/working = image(wing_s)
|
||||
working.alpha = src.a_wing
|
||||
if(wing_style.em_block)
|
||||
working.overlays += em_block_image_generic(working) // Leaving this as overlays +=
|
||||
working.pixel_x -= wing_style.wing_offset
|
||||
@@ -1295,6 +1294,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
ears_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
rendered = ears_s
|
||||
rendered += rgb(,,,src.a_ears) //idk why this isn't an img but there's surely a good reason
|
||||
|
||||
// todo: this is utterly horrible but i don't think i should be violently refactoring sprite acc rendering in a feature PR ~silicons
|
||||
if(ear_secondary_style && !(head && (head.flags_inv & BLOCKHEADHAIR)))
|
||||
@@ -1317,6 +1317,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
overlay.Blend(color, ear_secondary_style.color_blend_mode)
|
||||
ears_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
ears_s += rgb(,,,src.a_ears2)
|
||||
if(!rendered)
|
||||
rendered = ears_s
|
||||
else
|
||||
@@ -1378,6 +1379,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
|
||||
else if(islongtail(tail_style))
|
||||
working.pixel_x = tail_style.offset_x
|
||||
working.pixel_y = tail_style.offset_y
|
||||
working.alpha = src.a_tail
|
||||
return working
|
||||
return null
|
||||
|
||||
|
||||
@@ -263,6 +263,23 @@
|
||||
owner.update_hair()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
if("ears_alpha")
|
||||
var/new_alpha = clamp(params["ears_alpha"], 0, 255)
|
||||
if(isnum(new_alpha) && can_still_topic(ui.user, state))
|
||||
owner.a_ears = new_alpha
|
||||
update_dna(owner)
|
||||
owner.update_hair()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
if("secondary_ears_alpha")
|
||||
var/new_alpha = clamp(params["secondary_ears_alpha"], 0, 255)
|
||||
if(isnum(new_alpha) && can_still_topic(ui.user, state))
|
||||
owner.a_ears2 = new_alpha
|
||||
update_dna(owner)
|
||||
owner.update_hair()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
|
||||
if("ears_secondary_color")
|
||||
if(can_change(owner, APPEARANCE_HAIR_COLOR))
|
||||
var/channel = params["channel"]
|
||||
@@ -321,6 +338,15 @@
|
||||
owner.update_tail_showing()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
if("tail_alpha")
|
||||
var/new_alpha = clamp(params["tail_alpha"], 0, 255)
|
||||
if(isnum(new_alpha) && can_still_topic(ui.user, state))
|
||||
owner.a_tail = new_alpha
|
||||
update_dna(owner)
|
||||
owner.update_tail_showing()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
|
||||
if("wing")
|
||||
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
||||
var/datum/sprite_accessory/wing/instance = locate(params["ref"])
|
||||
@@ -366,6 +392,16 @@
|
||||
owner.update_wing_showing()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
|
||||
if("wing_alpha")
|
||||
var/new_alpha = clamp(params["wing_alpha"], 0, 255)
|
||||
if(isnum(new_alpha) && can_still_topic(ui.user, state))
|
||||
owner.a_wing = new_alpha
|
||||
update_dna(owner)
|
||||
owner.update_wing_showing()
|
||||
changed_hook(APPEARANCECHANGER_CHANGED_HAIRCOLOR)
|
||||
return 1
|
||||
|
||||
if("marking")
|
||||
if(can_change(owner, APPEARANCE_ALL_HAIR))
|
||||
var/todo = params["todo"]
|
||||
@@ -812,6 +848,10 @@
|
||||
data["wing_color"] = rgb(owner.r_wing, owner.g_wing, owner.b_wing)
|
||||
data["wing2_color"] = rgb(owner.r_wing2, owner.g_wing2, owner.b_wing2)
|
||||
data["wing3_color"] = rgb(owner.r_wing3, owner.g_wing3, owner.b_wing3)
|
||||
data["wing_alpha"] = owner.a_wing
|
||||
data["tail_alpha"] = owner.a_tail
|
||||
data["ears_alpha"] = owner.a_ears
|
||||
data["secondary_ears_alpha"] = owner.a_ears2
|
||||
|
||||
data["change_facial_hair_color"] = can_change(owner, APPEARANCE_FACIAL_HAIR_COLOR)
|
||||
if(data["change_facial_hair_color"])
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/ears_color1, rgb(character.r_ears, character.g_ears, character.b_ears))
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/ears_color2, rgb(character.r_ears2, character.g_ears2, character.b_ears2))
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/ears_color3, rgb(character.r_ears3, character.g_ears3, character.b_ears3))
|
||||
prefs.update_preference_by_type(/datum/preference/numeric/human/ears_alpha, character.a_ears)
|
||||
|
||||
// secondary ears
|
||||
prefs.ear_secondary_style = character.ear_secondary_style?.name
|
||||
@@ -146,11 +147,13 @@
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/tail_color1, rgb(character.r_tail, character.g_tail, character.b_tail))
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/tail_color2, rgb(character.r_tail2, character.g_tail2, character.b_tail2))
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/tail_color3, rgb(character.r_tail3, character.g_tail3, character.b_tail3))
|
||||
prefs.update_preference_by_type(/datum/preference/numeric/human/tail_alpha, character.a_tail)
|
||||
|
||||
// TODO: This will break if update_preference_by_type starts to respect is_accessible
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/wing_color1, rgb(character.r_wing, character.g_wing, character.b_wing))
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/wing_color2, rgb(character.r_wing2, character.g_wing2, character.b_wing2))
|
||||
prefs.update_preference_by_type(/datum/preference/color/human/wing_color3, rgb(character.r_wing3, character.g_wing3, character.b_wing3))
|
||||
prefs.update_preference_by_type(/datum/preference/numeric/human/wing_alpha, character.a_wing)
|
||||
|
||||
prefs.custom_species = character.custom_species
|
||||
prefs.digitigrade = character.digitigrade
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
ImageButton,
|
||||
Input,
|
||||
LabeledList,
|
||||
NumberInput,
|
||||
Section,
|
||||
Stack,
|
||||
Tabs,
|
||||
@@ -37,12 +38,16 @@ export const AppearanceChangerColors = (props) => {
|
||||
facial_hair_color,
|
||||
ears_color,
|
||||
ears2_color,
|
||||
ears_alpha,
|
||||
secondary_ears_alpha,
|
||||
tail_color,
|
||||
tail2_color,
|
||||
tail3_color,
|
||||
tail_alpha,
|
||||
wing_color,
|
||||
wing2_color,
|
||||
wing3_color,
|
||||
wing_alpha,
|
||||
ear_secondary_colors,
|
||||
hair_grads,
|
||||
} = data;
|
||||
@@ -108,6 +113,16 @@ export const AppearanceChangerColors = (props) => {
|
||||
Change Ears Color (Secondary)
|
||||
</Button>
|
||||
</Box>
|
||||
<Box>
|
||||
Ears Alpha:{' '}
|
||||
<NumberInput
|
||||
step={1}
|
||||
minValue={0}
|
||||
value={ears_alpha}
|
||||
maxValue={255}
|
||||
onDrag={(val: number) => act('ears_alpha', { ears_alpha: val })}
|
||||
/>
|
||||
</Box>
|
||||
{ear_secondary_colors.map((color, index) => (
|
||||
<Box key={index}>
|
||||
<ColorBox color={color} mr={1} />
|
||||
@@ -121,6 +136,18 @@ export const AppearanceChangerColors = (props) => {
|
||||
</Button>
|
||||
</Box>
|
||||
))}
|
||||
<Box>
|
||||
Horns Alpha:{' '}
|
||||
<NumberInput
|
||||
step={1}
|
||||
minValue={0}
|
||||
value={ears_alpha}
|
||||
maxValue={255}
|
||||
onDrag={(val: number) =>
|
||||
act('secondary_ears_alpha', { secondary_ears_alpha: val })
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<ColorBox color={tail_color} mr={1} />
|
||||
<Button onClick={() => act('tail_color')}>Change Tail Color</Button>
|
||||
@@ -137,6 +164,16 @@ export const AppearanceChangerColors = (props) => {
|
||||
Change Tertiary Tail Color
|
||||
</Button>
|
||||
</Box>
|
||||
<Box>
|
||||
Tail Alpha:{' '}
|
||||
<NumberInput
|
||||
step={1}
|
||||
minValue={0}
|
||||
value={tail_alpha}
|
||||
maxValue={255}
|
||||
onDrag={(val: number) => act('tail_alpha', { tail_alpha: val })}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<ColorBox color={wing_color} mr={1} />
|
||||
<Button onClick={() => act('wing_color')}>Change Wing Color</Button>
|
||||
@@ -153,6 +190,16 @@ export const AppearanceChangerColors = (props) => {
|
||||
Change Tertiary Wing Color
|
||||
</Button>
|
||||
</Box>
|
||||
<Box>
|
||||
Wing Alpha:{' '}
|
||||
<NumberInput
|
||||
step={1}
|
||||
minValue={0}
|
||||
value={wing_alpha}
|
||||
maxValue={255}
|
||||
onDrag={(val: number) => act('wing_alpha', { wing_alpha: val })}
|
||||
/>
|
||||
</Box>
|
||||
</>
|
||||
) : null}
|
||||
{change_facial_hair_color ? (
|
||||
|
||||
@@ -35,12 +35,16 @@ export type Data = {
|
||||
facial_hair_color: string;
|
||||
ears_color: string;
|
||||
ears2_color: string;
|
||||
ears_alpha: number;
|
||||
secondary_ears_alpha: number;
|
||||
tail_color: string;
|
||||
tail2_color: string;
|
||||
tail3_color: string;
|
||||
tail_alpha: number;
|
||||
wing_color: string;
|
||||
wing2_color: string;
|
||||
wing3_color: string;
|
||||
wing_alpha: number;
|
||||
facial_hair_styles: bodyStyle[];
|
||||
hair_styles: bodyStyle[];
|
||||
hair_grads: string[];
|
||||
|
||||
Reference in New Issue
Block a user