Initial commit - lays out the foundation for a more robust limb icon override system. You're welcome.
This commit is contained in:
@@ -104,7 +104,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/fixed_mut_color3 = ""
|
||||
var/whitelisted = 0 //Is this species restricted to certain players?
|
||||
var/whitelist = list() //List the ckeys that can use this species, if it's whitelisted.: list("John Doe", "poopface666", "SeeALiggerPullTheTrigger") Spaces & capitalization can be included or ignored entirely for each key as it checks for both.
|
||||
var/should_draw_citadel = FALSE
|
||||
var/icon_limbs //Overrides the icon used for the limbs of this species. Mainly for downstream, and also because hardcoded icons disgust me. Implemented and maintained as a favor in return for a downstream's implementation of synths.
|
||||
|
||||
///////////
|
||||
// PROCS //
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/insect
|
||||
liked_food = MEAT | FRUIT
|
||||
disliked_food = TOXIC
|
||||
should_draw_citadel = TRUE
|
||||
icon_limbs = DEFAULT_BODYPART_ICON_CITADEL
|
||||
|
||||
/datum/species/insect/spec_death(gibbed, mob/living/carbon/human/H)
|
||||
if(H)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Anthromorph"
|
||||
id = "mammal"
|
||||
default_color = "4B4B4B"
|
||||
should_draw_citadel = TRUE
|
||||
icon_limbs = DEFAULT_BODYPART_ICON_CITADEL
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,HORNCOLOR,WINGCOLOR)
|
||||
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BEAST
|
||||
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "mam_snouts", "deco_wings", "taur", "horns", "legs")
|
||||
@@ -55,7 +55,7 @@
|
||||
id = "xeno"
|
||||
say_mod = "hisses"
|
||||
default_color = "00FF00"
|
||||
should_draw_citadel = TRUE
|
||||
icon_limbs = DEFAULT_BODYPART_ICON_CITADEL
|
||||
species_traits = list(MUTCOLORS,EYECOLOR,LIPS)
|
||||
mutant_bodyparts = list("xenotail", "xenohead", "xenodorsal", "mam_body_markings", "taur", "legs")
|
||||
default_features = list("xenotail"="Xenomorph Tail","xenohead"="Standard","xenodorsal"="Standard", "mam_body_markings" = "Xeno","mcolor" = "0F0","mcolor2" = "0F0","mcolor3" = "0F0","taur" = "None", "legs" = "Digitigrade")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
id = "ipc"
|
||||
say_mod = "beeps"
|
||||
default_color = "00FF00"
|
||||
should_draw_citadel = TRUE
|
||||
icon_limbs = DEFAULT_BODYPART_ICON_CITADEL
|
||||
blacklisted = 0
|
||||
sexes = 0
|
||||
species_traits = list(MUTCOLORS,NOEYES,NOTRANSSTING)
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
var/skin_tone = ""
|
||||
var/body_gender = ""
|
||||
var/species_id = ""
|
||||
var/should_draw_citadel = FALSE
|
||||
var/color_src
|
||||
var/base_bp_icon //Overrides the icon being used for this limb. This is mainly for downstreams, implemented and maintained as a favor in return for implementing synths. And also because should_draw_* for icon overrides was pretty messy. You're welcome.
|
||||
var/should_draw_gender = FALSE
|
||||
var/should_draw_greyscale = FALSE
|
||||
var/species_color = ""
|
||||
var/mutation_color = ""
|
||||
var/no_update = 0
|
||||
@@ -283,9 +283,9 @@
|
||||
|
||||
if(change_icon_to_default)
|
||||
if(status == BODYPART_ORGANIC)
|
||||
icon = DEFAULT_BODYPART_ICON_ORGANIC
|
||||
icon = base_bp_icon ? base_bp_icon : DEFAULT_BODYPART_ICON_ORGANIC
|
||||
else if(status == BODYPART_ROBOTIC)
|
||||
icon = DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
icon = base_bp_icon ? base_bp_icon : DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
|
||||
if(owner)
|
||||
owner.updatehealth()
|
||||
@@ -313,7 +313,8 @@
|
||||
species_id = "husk" //overrides species_id
|
||||
dmg_overlay_type = "" //no damage overlay shown when husked
|
||||
should_draw_gender = FALSE
|
||||
should_draw_greyscale = FALSE
|
||||
color_src = FALSE
|
||||
base_bp_icon = DEFAULT_BODYPART_ICON
|
||||
no_update = TRUE
|
||||
body_markings = "husk" // reeee
|
||||
aux_marking = "husk"
|
||||
@@ -323,11 +324,11 @@
|
||||
|
||||
if(!animal_origin)
|
||||
var/mob/living/carbon/human/H = C
|
||||
should_draw_greyscale = FALSE
|
||||
color_src = FALSE
|
||||
|
||||
var/datum/species/S = H.dna.species
|
||||
base_bp_icon = S.icon_limbs ? S.icon_limbs : DEFAULT_BODYPART_ICON
|
||||
species_id = S.limbs_id
|
||||
should_draw_citadel = S.should_draw_citadel // Citadel Addition
|
||||
species_flags_list = H.dna.species.species_traits
|
||||
|
||||
//body marking memes
|
||||
@@ -342,7 +343,7 @@
|
||||
|
||||
if(S.use_skintones)
|
||||
skin_tone = H.skin_tone
|
||||
should_draw_greyscale = TRUE
|
||||
base_bp_icon = (base_bp_icon == DEFAULT_BODYPART_ICON) ? DEFAULT_BODYPART_ICON_ORGANIC : base_bp_icon
|
||||
else
|
||||
skin_tone = ""
|
||||
|
||||
@@ -354,9 +355,12 @@
|
||||
species_color = S.fixed_mut_color
|
||||
else
|
||||
species_color = H.dna.features["mcolor"]
|
||||
should_draw_greyscale = TRUE
|
||||
base_bp_icon = (base_bp_icon == DEFAULT_BODYPART_ICON) ? DEFAULT_BODYPART_ICON_ORGANIC : base_bp_icon
|
||||
else
|
||||
species_color = ""
|
||||
|
||||
if(base_bp_icon != DEFAULT_BODYPART_ICON)
|
||||
color_src = MUTCOLORS //TODO - Add color matrix support to base limbs
|
||||
|
||||
if("legs" in S.default_features)
|
||||
if(body_zone == BODY_ZONE_L_LEG || body_zone == BODY_ZONE_R_LEG)
|
||||
@@ -462,32 +466,16 @@
|
||||
should_draw_gender = FALSE
|
||||
|
||||
if(is_organic_limb())
|
||||
if(should_draw_greyscale)
|
||||
limb.icon = 'icons/mob/human_parts_greyscale.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
else if(use_digitigrade)
|
||||
limb.icon = base_bp_icon ? base_bp_icon : 'icons/mob/human_parts.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
else if (use_digitigrade)
|
||||
if(base_bp_icon == DEFAULT_BODYPART_ICON_ORGANIC) //Compatibility hack for the current iconset.
|
||||
limb.icon_state = "[digitigrade_type]_[use_digitigrade]_[body_zone]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
limb.icon_state = "[species_id]_[digitigrade_type]_[use_digitigrade]_[body_zone]"
|
||||
else
|
||||
limb.icon = 'icons/mob/human_parts.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
else if(use_digitigrade)
|
||||
limb.icon_state = "[species_id]_[digitigrade_type]_[use_digitigrade]_[body_zone]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
|
||||
// Citadel Start
|
||||
if(should_draw_citadel)
|
||||
limb.icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
else if(use_digitigrade)
|
||||
limb.icon_state = "[species_id]_[digitigrade_type]_[use_digitigrade]_[body_zone]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
|
||||
// Body markings
|
||||
if(!isnull(body_markings))
|
||||
@@ -555,7 +543,7 @@
|
||||
. += marking
|
||||
return
|
||||
|
||||
if(should_draw_greyscale)
|
||||
if(color_src) //TODO - add color matrix support for base species limbs
|
||||
var/draw_color = mutation_color || species_color || (skin_tone && skintone2hex(skin_tone))
|
||||
if(draw_color)
|
||||
limb.color = "#[draw_color]"
|
||||
|
||||
Reference in New Issue
Block a user