mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 09:03:53 +01:00
Merge remote-tracking branch 'upstream/master' into kk-rings
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
var/list/random_species_list = list(SPECIES_HUMAN,SPECIES_TAJ,SPECIES_UNATHI,SPECIES_SKRELL)
|
||||
var/list/tail_type = null
|
||||
var/list/ear_type = null
|
||||
/// list(name of ear, color of ear, color of ear, ...).
|
||||
/// Color is optional, each position after the name is a color channel from 1 to n.
|
||||
var/list/ear_secondary_type
|
||||
var/list/wing_type = null
|
||||
var/corpsesynthtype = 0 // 0 for organic, 1 for drone, 2 for posibrain
|
||||
var/corpsesynthbrand = "Unbranded"
|
||||
@@ -85,6 +88,12 @@
|
||||
M.g_ears3 = color_rgb_list[2]
|
||||
M.b_ears3 = color_rgb_list[3]
|
||||
M.update_hair()
|
||||
// handle secondary ears
|
||||
if(length(ear_secondary_type) && (ear_secondary_type[1] in global.ear_styles_list))
|
||||
M.ear_secondary_style = global.ear_styles_list[ear_secondary_type[1]]
|
||||
if(length(ear_secondary_type) > 1)
|
||||
M.ear_secondary_colors = ear_secondary_type.Copy(2, min(length(GLOB.fancy_sprite_accessory_color_channel_names), length(ear_secondary_type)) + 1)
|
||||
|
||||
if(wing_type && wing_type.len)
|
||||
if(wing_type[1] in wing_styles_list)
|
||||
M.wing_style = wing_styles_list[wing_type[1]]
|
||||
|
||||
@@ -135,6 +135,12 @@
|
||||
var/r_ears3 = 30 //Trust me, we could always use more colour. No japes.
|
||||
var/g_ears3 = 30
|
||||
var/b_ears3 = 30
|
||||
|
||||
/// secondary ears sprite accessory reference
|
||||
var/datum/sprite_accessory/ears/ear_secondary_style
|
||||
/// secondary ears color channels; can be null, or a list of #aabbcc hexcolors
|
||||
var/list/ear_secondary_colors
|
||||
|
||||
var/datum/sprite_accessory/tail/tail_style = null
|
||||
var/r_tail = 30
|
||||
var/g_tail = 30
|
||||
@@ -164,4 +170,4 @@
|
||||
|
||||
var/block_hud
|
||||
|
||||
var/phobias //For holding a list of phobias
|
||||
var/phobias //For holding a list of phobias
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_eye_colour,
|
||||
/mob/living/proc/set_size,
|
||||
// /mob/living/carbon/human/proc/lleill_contact,
|
||||
|
||||
@@ -82,6 +82,7 @@
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears,
|
||||
/mob/living/proc/set_size,
|
||||
// /mob/living/carbon/human/proc/lleill_invisibility,
|
||||
// /mob/living/carbon/human/proc/lleill_transmute,
|
||||
|
||||
@@ -56,6 +56,37 @@
|
||||
|
||||
update_hair() //Includes Virgo ears
|
||||
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears()
|
||||
set name = "Select Secondary Ears"
|
||||
set category = "Abilities"
|
||||
|
||||
if(stat || world.time < last_special)
|
||||
return
|
||||
last_special = world.time + 1 SECONDS
|
||||
|
||||
// Construct the list of names allowed for this user.
|
||||
var/list/pretty_ear_styles = list("Normal" = null)
|
||||
for(var/path in ear_styles_list)
|
||||
var/datum/sprite_accessory/ears/instance = ear_styles_list[path]
|
||||
if((!instance.ckeys_allowed) || (ckey in instance.ckeys_allowed))
|
||||
pretty_ear_styles[instance.name] = path
|
||||
|
||||
// Handle style pick
|
||||
var/new_ear_style = tgui_input_list(src, "Pick some ears!", "Character Preference", pretty_ear_styles)
|
||||
if(!new_ear_style)
|
||||
return
|
||||
ear_secondary_style = ear_styles_list[pretty_ear_styles[new_ear_style]]
|
||||
|
||||
// Handle color picks
|
||||
var/list/new_colors = list()
|
||||
for(var/channel in 1 to ear_secondary_style.get_color_channel_count())
|
||||
var/channel_name = GLOB.fancy_sprite_accessory_color_channel_names[channel]
|
||||
var/default = LAZYACCESS(ear_secondary_colors, channel) || "#ffffff"
|
||||
var/new_color = input(usr, "Pick [channel_name]", "Ear Color ([channel_name])", default) as color | null
|
||||
new_colors += new_color || default
|
||||
|
||||
update_hair()
|
||||
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail()
|
||||
set name = "Select Tail"
|
||||
set category = "Abilities"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears,
|
||||
/mob/living/carbon/human/proc/prommie_blobform,
|
||||
/mob/living/proc/set_size,
|
||||
/mob/living/carbon/human/proc/promethean_select_opaqueness,
|
||||
|
||||
@@ -103,7 +103,8 @@
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_gender,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears,
|
||||
)
|
||||
|
||||
var/global/list/abilities = list()
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_eye_colour,
|
||||
/mob/living/proc/set_size
|
||||
)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_wings,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_tail,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_ears,
|
||||
/mob/living/carbon/human/proc/shapeshifter_select_secondary_ears,
|
||||
/mob/living/proc/set_size,
|
||||
/mob/living/carbon/human/proc/regenerate,
|
||||
/mob/living/carbon/human/proc/promethean_select_opaqueness,
|
||||
|
||||
@@ -555,7 +555,8 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
if(ears_s.Height() > face_standing.Height()) // Tol ears
|
||||
face_standing.Crop(1, 1, face_standing.Width(), ears_s.Height())
|
||||
face_standing.Blend(ears_s, ICON_OVERLAY)
|
||||
if(ear_style?.em_block)
|
||||
// todo: these should be considered separately, but it'd take a slight refactor to how sprite acc's are rendered (or atleast ears)
|
||||
if(ear_style?.em_block || ear_secondary_style?.em_block)
|
||||
em_block_ears = em_block_image_generic(image(ears_s))
|
||||
|
||||
var/image/semifinal = image(face_standing, layer = BODY_LAYER+HAIR_LAYER, "pixel_y" = head_organ.head_offset)
|
||||
@@ -1315,11 +1316,13 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
/mob/living/carbon/human/proc/get_ears_overlay()
|
||||
//If you are FBP with ear style and didn't set a custom one
|
||||
var/datum/robolimb/model = isSynthetic()
|
||||
if(istype(model) && model.includes_ears && !ear_style)
|
||||
if(istype(model) && model.includes_ears && !ear_style && !ear_secondary_style)
|
||||
var/icon/ears_s = new/icon("icon" = synthetic.icon, "icon_state" = "ears")
|
||||
ears_s.Blend(rgb(src.r_ears, src.g_ears, src.b_ears), species.color_mult ? ICON_MULTIPLY : ICON_ADD)
|
||||
return ears_s
|
||||
|
||||
var/icon/rendered
|
||||
|
||||
if(ear_style && !(head && (head.flags_inv & BLOCKHEADHAIR)))
|
||||
var/icon/ears_s = new/icon("icon" = ear_style.icon, "icon_state" = ear_style.icon_state)
|
||||
if(ear_style.do_colouration)
|
||||
@@ -1334,9 +1337,29 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
overlay.Blend(rgb(src.r_ears3, src.g_ears3, src.b_ears3), ear_style.color_blend_mode)
|
||||
ears_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
return ears_s
|
||||
return null
|
||||
rendered = ears_s
|
||||
|
||||
// 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)))
|
||||
var/icon/ears_s = new/icon("icon" = ear_secondary_style.icon, "icon_state" = ear_secondary_style.icon_state)
|
||||
if(ear_secondary_style.do_colouration)
|
||||
ears_s.Blend(LAZYACCESS(ear_secondary_colors, 1), ear_secondary_style.color_blend_mode)
|
||||
if(ear_secondary_style.extra_overlay)
|
||||
var/icon/overlay = new/icon("icon" = ear_secondary_style.icon, "icon_state" = ear_secondary_style.extra_overlay)
|
||||
overlay.Blend(LAZYACCESS(ear_secondary_colors, 2), ear_secondary_style.color_blend_mode)
|
||||
ears_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
if(ear_secondary_style.extra_overlay2) //MORE COLOURS IS BETTERER
|
||||
var/icon/overlay = new/icon("icon" = ear_secondary_style.icon, "icon_state" = ear_secondary_style.extra_overlay2)
|
||||
overlay.Blend(LAZYACCESS(ear_secondary_colors, 3), ear_secondary_style.color_blend_mode)
|
||||
ears_s.Blend(overlay, ICON_OVERLAY)
|
||||
qdel(overlay)
|
||||
if(!rendered)
|
||||
rendered = ears_s
|
||||
else
|
||||
rendered.Blend(ears_s, ICON_OVERLAY)
|
||||
|
||||
return rendered
|
||||
|
||||
/mob/living/carbon/human/proc/get_tail_image()
|
||||
//If you are FBP with tail style and didn't set a custom one
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
|
||||
/mob/living/silicon/robot/handle_light()
|
||||
if(lights_on)
|
||||
set_light(integrated_light_power, 1, "#FFFFFF")
|
||||
set_light(integrated_light_power, 1, robot_light_col)
|
||||
return TRUE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
var/lights_on = 0 // Is our integrated light on?
|
||||
var/robot_light_col = "#FFFFFF"
|
||||
var/used_power_this_tick = 0
|
||||
var/sight_mode = 0
|
||||
var/custom_name = ""
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
data["max_charge"] = R.cell?.maxcharge
|
||||
data["health"] = R.health
|
||||
data["max_health"] = R.getMaxHealth()
|
||||
data["light_color"] = R.robot_light_col
|
||||
|
||||
data["weapon_lock"] = R.weapon_lock
|
||||
|
||||
@@ -111,6 +112,11 @@
|
||||
var/mob/living/silicon/robot/R = host
|
||||
|
||||
switch(action)
|
||||
if("set_light_col")
|
||||
var/new_color = params["value"]
|
||||
if(findtext(new_color, GLOB.is_color))
|
||||
R.robot_light_col = new_color
|
||||
. = TRUE
|
||||
if("select_module")
|
||||
R.pick_module()
|
||||
. = TRUE
|
||||
|
||||
@@ -534,8 +534,7 @@
|
||||
onclose(usr, "[name]")
|
||||
if(href_list["flavor_change"])
|
||||
update_flavor_text()
|
||||
// ..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/proc/pull_damage()
|
||||
|
||||
@@ -17,6 +17,14 @@
|
||||
conversion in savefile.dm
|
||||
*/
|
||||
|
||||
/**
|
||||
* Color channel names; this is used in things like character setup, editors, etc.
|
||||
*
|
||||
* * The length of this is also used to sanitize color channel list lengths. This should never be longer than the
|
||||
* maximum number of color channels possible across all sprite accessories.
|
||||
*/
|
||||
GLOBAL_LIST_INIT(fancy_sprite_accessory_color_channel_names, list("Primary", "Secondary", "Tertiary", "Quaternary"))
|
||||
|
||||
/datum/sprite_accessory
|
||||
|
||||
var/icon // the icon file the accessory is located in
|
||||
@@ -44,6 +52,12 @@
|
||||
|
||||
var/list/hide_body_parts = list() //Uses organ tag defines. Bodyparts in this list do not have their icons rendered, allowing for more spriter freedom when doing taur/digitigrade stuff.
|
||||
|
||||
/**
|
||||
* Gets the number of color channels we have.
|
||||
*/
|
||||
/datum/sprite_accessory/proc/get_color_channel_count()
|
||||
return do_colouration ? 1 : 0
|
||||
|
||||
/*
|
||||
////////////////////////////
|
||||
/ =--------------------= /
|
||||
|
||||
@@ -18,6 +18,18 @@
|
||||
|
||||
//species_allowed = list(SPECIES_EVENT1, SPECIES_EVENT2, SPECIES_EVENT3) //Removing Polaris whitelits, ones we need are defined in our files
|
||||
|
||||
/**
|
||||
* Gets the number of color channels we have.
|
||||
*/
|
||||
/datum/sprite_accessory/ears/get_color_channel_count()
|
||||
if(!do_colouration)
|
||||
return 0
|
||||
. = 1
|
||||
if(extra_overlay)
|
||||
. += 1
|
||||
if(extra_overlay2)
|
||||
. += 1
|
||||
|
||||
/datum/sprite_accessory/ears/shadekin
|
||||
name = "Shadekin Ears, colorable"
|
||||
desc = ""
|
||||
@@ -527,4 +539,4 @@
|
||||
do_colouration = 1
|
||||
color_blend_mode = ICON_MULTIPLY
|
||||
extra_overlay = "zorgoia_inner"
|
||||
extra_overlay2 = "zorgoia_tips"
|
||||
extra_overlay2 = "zorgoia_tips"
|
||||
|
||||
Reference in New Issue
Block a user