mirror of
https://github.com/KabKebab/GS13.git
synced 2026-02-09 15:17:41 +00:00
@@ -230,6 +230,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/icon/bgstate = "steel"
|
||||
var/list/bgstate_options = list("000", "midgrey", "FFF", "white", "steel", "techmaint", "dark", "plating", "reinforced")
|
||||
|
||||
var/show_mismatched_markings = FALSE //determines whether or not the markings lists should show markings that don't match the currently selected species. Intentionally left unsaved.
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
@@ -446,6 +447,15 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
//Mutant stuff
|
||||
var/mutant_category = 0
|
||||
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
dat += "<h3>Show mismatched markings</h3>"
|
||||
dat += "<a style='display:block;width:100px' href='?_src_=prefs;preference=mismatched_markings;task=input'>[show_mismatched_markings ? "Yes" : "No"]</a>"
|
||||
mutant_category++
|
||||
if(mutant_category >= MAX_MUTANT_ROWS) //just in case someone sets the max rows to 1 or something dumb like that
|
||||
dat += "</td>"
|
||||
mutant_category = 0
|
||||
|
||||
|
||||
if("tail_lizard" in pref_species.default_features)
|
||||
if(!mutant_category)
|
||||
dat += APPEARANCE_CATEGORY_COLUMN
|
||||
@@ -1719,6 +1729,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
|
||||
|
||||
if("mismatched_markings")
|
||||
show_mismatched_markings = !show_mismatched_markings
|
||||
|
||||
if("ipc_screen")
|
||||
var/new_ipc_screen
|
||||
new_ipc_screen = input(user, "Choose your character's screen:", "Character Preference") as null|anything in GLOB.ipc_screens_list
|
||||
@@ -1726,8 +1739,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["ipc_screen"] = new_ipc_screen
|
||||
|
||||
if("ipc_antenna")
|
||||
var/list/snowflake_antenna_list = list()
|
||||
//Potential todo: turn all of THIS into a define to reduce copypasta.
|
||||
for(var/path in GLOB.ipc_antennas_list)
|
||||
var/datum/sprite_accessory/antenna/instance = GLOB.ipc_antennas_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_antenna_list[S.name] = path
|
||||
var/new_ipc_antenna
|
||||
new_ipc_antenna = input(user, "Choose your character's antenna:", "Character Preference") as null|anything in GLOB.ipc_antennas_list
|
||||
new_ipc_antenna = input(user, "Choose your character's antenna:", "Character Preference") as null|anything in snowflake_antenna_list
|
||||
if(new_ipc_antenna)
|
||||
features["ipc_antenna"] = new_ipc_antenna
|
||||
|
||||
@@ -1747,6 +1770,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/tails/human/instance = GLOB.tails_list_human[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_tails_list[S.name] = path
|
||||
var/new_tail
|
||||
@@ -1764,6 +1789,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_tails/instance = GLOB.mam_tails_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_tails_list[S.name] = path
|
||||
var/new_tail
|
||||
@@ -1781,6 +1808,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_snouts/instance = GLOB.snouts_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_snouts_list[S.name] = path
|
||||
var/new_snout
|
||||
@@ -1796,6 +1825,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_snouts/instance = GLOB.mam_snouts_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_mam_snouts_list[S.name] = path
|
||||
var/new_mam_snouts
|
||||
@@ -1887,6 +1918,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/taur/instance = GLOB.taur_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_taur_list[S.name] = path
|
||||
var/new_taur
|
||||
@@ -1905,6 +1938,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/ears/instance = GLOB.ears_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_ears_list[S.name] = path
|
||||
var/new_ears
|
||||
@@ -1918,6 +1953,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_ears/instance = GLOB.mam_ears_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_ears_list[S.name] = path
|
||||
var/new_ears
|
||||
@@ -1931,6 +1968,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/datum/sprite_accessory/mam_body_markings/instance = GLOB.mam_body_markings_list[path]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(!show_mismatched_markings && S.recommended_species && !S.recommended_species.Find(pref_species.id))
|
||||
continue
|
||||
if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(user.client.ckey)))
|
||||
snowflake_markings_list[S.name] = path
|
||||
var/new_mam_body_markings
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(!pref_species)
|
||||
var/rando_race = pick(GLOB.roundstart_races)
|
||||
pref_species = new rando_race()
|
||||
features = random_features()
|
||||
features = random_features(pref_species?.id)
|
||||
age = rand(AGE_MIN,AGE_MAX)
|
||||
|
||||
/datum/preferences/proc/update_preview_icon()
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
var/dimension_y = 32
|
||||
var/center = FALSE //Should we center the sprite?
|
||||
|
||||
//For soft-restricting markings to species IDs
|
||||
var/list/recommended_species
|
||||
|
||||
/datum/sprite_accessory/underwear
|
||||
icon = 'icons/mob/underwear.dmi'
|
||||
var/has_color = FALSE
|
||||
var/has_color = FALSE
|
||||
|
||||
@@ -433,10 +433,12 @@
|
||||
/datum/sprite_accessory/mam_tails
|
||||
color_src = MATRIXED
|
||||
icon = 'modular_citadel/icons/mob/mam_tails.dmi'
|
||||
recommended_species = list("mammal", "slimeperson", "podweak", "felinid", "insect", "avian", "aquatic") //Despite not being mammals, avians and aquatic parts are in the mammal files here.
|
||||
|
||||
/datum/sprite_accessory/mam_tails/none
|
||||
name = "None"
|
||||
icon_state = "none"
|
||||
recommended_species = null
|
||||
|
||||
/datum/sprite_accessory/mam_tails_animated
|
||||
color_src = MATRIXED
|
||||
@@ -707,4 +709,4 @@ datum/sprite_accessory/mam_tails/insect
|
||||
|
||||
/datum/sprite_accessory/mam_tails_animated/wolf
|
||||
name = "Wolf"
|
||||
icon_state = "wolf"
|
||||
icon_state = "wolf"
|
||||
|
||||
@@ -82,6 +82,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
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/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 //
|
||||
|
||||
@@ -654,6 +654,8 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
. += "-robotic"
|
||||
if(BP.use_digitigrade)
|
||||
. += "-digitigrade[BP.use_digitigrade]"
|
||||
if(BP.digitigrade_type)
|
||||
. += "-[BP.digitigrade_type]"
|
||||
if(BP.dmg_overlay_type)
|
||||
. += "-[BP.dmg_overlay_type]"
|
||||
if(BP.body_markings)
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
var/skin_tone = ""
|
||||
var/body_gender = ""
|
||||
var/species_id = ""
|
||||
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 = ""
|
||||
@@ -53,6 +55,8 @@
|
||||
var/auxmarking = ""
|
||||
var/list/auxmarking_color = list()
|
||||
|
||||
var/digitigrade_type
|
||||
|
||||
var/animal_origin = null //for nonhuman bodypart (e.g. monkey)
|
||||
var/dismemberable = 1 //whether it can be dismembered with a weapon.
|
||||
|
||||
@@ -281,9 +285,9 @@
|
||||
|
||||
if(change_icon_to_default)
|
||||
if(status == BODYPART_ORGANIC)
|
||||
icon = DEFAULT_BODYPART_ICON_ORGANIC
|
||||
icon = base_bp_icon || DEFAULT_BODYPART_ICON_ORGANIC
|
||||
else if(status == BODYPART_ROBOTIC)
|
||||
icon = DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
icon = base_bp_icon || DEFAULT_BODYPART_ICON_ROBOTIC
|
||||
|
||||
if(owner)
|
||||
owner.updatehealth()
|
||||
@@ -311,7 +315,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
|
||||
auxmarking = "husk"
|
||||
@@ -321,11 +326,12 @@
|
||||
|
||||
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 || 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
|
||||
@@ -340,7 +346,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 = ""
|
||||
|
||||
@@ -352,18 +358,28 @@
|
||||
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)
|
||||
if(DIGITIGRADE in S.species_traits)
|
||||
digitigrade_type = lowertext(H.dna.features["legs"])
|
||||
else
|
||||
digitigrade_type = null
|
||||
|
||||
if("mam_body_markings" in S.default_features)
|
||||
var/datum/sprite_accessory/Smark
|
||||
Smark = GLOB.mam_body_markings_list[H.dna.features["mam_body_markings"]]
|
||||
if(Smark)
|
||||
body_markings_icon = Smark.icon
|
||||
if(H.dna.features.["mam_body_markings"] != "None")
|
||||
body_markings = lowertext(H.dna.features.["mam_body_markings"])
|
||||
auxmarking = lowertext(H.dna.features.["mam_body_markings"])
|
||||
body_markings = Smark?.icon_state || lowertext(H.dna.features["mam_body_markings"])
|
||||
auxmarking = Smark?.icon_state || lowertext(H.dna.features["mam_body_markings"])
|
||||
else
|
||||
body_markings = "plain"
|
||||
auxmarking = "plain"
|
||||
@@ -428,7 +444,7 @@
|
||||
else
|
||||
. += image(body_markings_icon, "[body_markings]_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else
|
||||
. += image(body_markings_icon, "[body_markings]_digitigrade_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
. += image(body_markings_icon, "[body_markings]_digitigrade_1_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
|
||||
var/image/limb = image(layer = -BODYPARTS_LAYER, dir = image_dir)
|
||||
var/image/aux
|
||||
@@ -453,28 +469,17 @@
|
||||
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 || '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_[use_digitigrade]_[body_zone]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
else
|
||||
limb.icon = 'icons/mob/human_parts.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
limb.icon_state = "[species_id]_digitigrade_[use_digitigrade]_[body_zone]"
|
||||
|
||||
// Citadel Start
|
||||
if(should_draw_citadel && !use_digitigrade)
|
||||
limb.icon = 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
if(should_draw_gender)
|
||||
limb.icon_state = "[species_id]_[body_zone]_[icon_gender]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
else
|
||||
limb.icon_state = "[species_id]_[body_zone]"
|
||||
|
||||
// Body markings
|
||||
if(body_markings)
|
||||
@@ -533,11 +538,11 @@
|
||||
else
|
||||
marking = image(body_markings_icon, "[body_markings]_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
else
|
||||
marking = image(body_markings_icon, "[body_markings]_digitigrade_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
marking = image(body_markings_icon, "[body_markings]_digitigrade_1_[use_digitigrade]_[body_zone]", -MARKING_LAYER, image_dir)
|
||||
. += 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