[SEMI-MODULAR?][TESTMERGE FIRST] Glow in the dark markings/bodyparts/eyes (#8960)
* FUCKIN WOOO * much better * yesssssss * yeetus deletus the merge conflictus dies * fug that was an oops * better * linters are weird * woops I erased tesh tails * better * wingfix Co-authored-by: Gandalf <jzo123@hotmail.com>
@@ -34,8 +34,9 @@
|
||||
#define COLOR_SRC_MATRIXED 4
|
||||
|
||||
// Defines for mutant bodyparts indexes
|
||||
#define MUTANT_INDEX_NAME "name"
|
||||
#define MUTANT_INDEX_COLOR_LIST "color"
|
||||
#define MUTANT_INDEX_NAME "name"
|
||||
#define MUTANT_INDEX_COLOR_LIST "color"
|
||||
#define MUTANT_INDEX_EMISSIVE_LIST "emissive"
|
||||
|
||||
//The color list that is passed to color matrixed things when a person is husked
|
||||
#define HUSK_COLOR_LIST list(list(0.64, 0.64, 0.64, 0), list(0.64, 0.64, 0.64, 0), list(0.64, 0.64, 0.64, 0), list(0, 0, 0, 1))
|
||||
|
||||
@@ -9,3 +9,12 @@
|
||||
var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, EMISSIVE_PLANE, alpha, appearance_flags | EMISSIVE_APPEARANCE_FLAGS)
|
||||
appearance.color = GLOB.em_block_color
|
||||
return appearance
|
||||
|
||||
//SKYRAT EDIT ADDITION
|
||||
/// Creates a mutable appearance glued to the EMISSIVE_PLAN, using the values from a mutable appearance
|
||||
/proc/emissive_appearance_copy(mutable_appearance/to_use, appearance_flags = (RESET_COLOR|KEEP_APART))
|
||||
var/mutable_appearance/appearance = mutable_appearance(to_use.icon, to_use.icon_state, to_use.layer, EMISSIVE_PLANE, to_use.alpha, to_use.appearance_flags | appearance_flags)
|
||||
appearance.color = GLOB.emissive_color
|
||||
appearance.pixel_x = to_use.pixel_x
|
||||
appearance.pixel_y = to_use.pixel_y
|
||||
return appearance
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
/proc/get_alpha_padded_color(color)
|
||||
var/add = color[1] == "#" ? 1 : 0
|
||||
if (length_char(color) == 3+add)
|
||||
return "[color]0"
|
||||
else if (length_char(color) == 6+add)
|
||||
return "[color]00"
|
||||
return null
|
||||
@@ -548,14 +548,62 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key())
|
||||
|
||||
/datum/preference/tri_color
|
||||
abstract_type = /datum/preference/tri_color
|
||||
var/type_to_check = /datum/preference/toggle/allow_mismatched_parts
|
||||
var/actually_check = TRUE
|
||||
|
||||
/datum/preference/tri_color/deserialize(input, datum/preferences/preferences)
|
||||
var/list/input_colors = input
|
||||
return list(sanitize_color(input_colors[1]), sanitize_color(input_colors[2]), sanitize_color(input_colors[3]))
|
||||
return list(sanitize_hexcolor(input_colors[1]), sanitize_hexcolor(input_colors[2]), sanitize_hexcolor(input_colors[3]))
|
||||
|
||||
/datum/preference/tri_color/create_default_value()
|
||||
return list(random_color(), random_color(), random_color())
|
||||
return list("#[random_color()]", "#[random_color()]", "#[random_color()]")
|
||||
|
||||
/datum/preference/tri_color/is_valid(list/value)
|
||||
return islist(value) && value.len == 3 && (findtext(value[1], GLOB.is_color) && findtext(value[2], GLOB.is_color) && findtext(value[3], GLOB.is_color))
|
||||
|
||||
/datum/preference/tri_color/is_accessible(datum/preferences/preferences)
|
||||
if (!actually_check || type == abstract_type)
|
||||
return ..(preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(type_to_check)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if (type == abstract_type)
|
||||
return ..()
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_COLOR_LIST] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
|
||||
/datum/preference/tri_bool
|
||||
abstract_type = /datum/preference/tri_bool
|
||||
var/type_to_check = /datum/preference/toggle/allow_mismatched_parts
|
||||
|
||||
/datum/preference/tri_bool/deserialize(input, datum/preferences/preferences)
|
||||
var/list/input_bools = input
|
||||
return list(sanitize_integer(input_bools[1]), sanitize_integer(input_bools[2]), sanitize_integer(input_bools[3]))
|
||||
|
||||
/datum/preference/tri_bool/create_default_value()
|
||||
return list(FALSE, FALSE, FALSE)
|
||||
|
||||
/datum/preference/tri_bool/is_valid(list/value)
|
||||
return islist(value) && value.len == 3 && isnum(value[1]) && isnum(value[2]) && isnum(value[3])
|
||||
|
||||
/datum/preference/tri_bool/is_accessible(datum/preferences/preferences)
|
||||
if(type == abstract_type)
|
||||
return ..(preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/emissives_allowed = preferences.read_preference(/datum/preference/toggle/allow_emissives)
|
||||
var/part_enabled = preferences.read_preference(type_to_check)
|
||||
return ((passed_initial_check || allowed) && part_enabled && emissives_allowed)
|
||||
|
||||
/datum/preference/tri_bool/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if (type == abstract_type)
|
||||
return ..()
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_EMISSIVE_LIST] = list(sanitize_integer(value[1]), sanitize_integer(value[2]), sanitize_integer(value[3]))
|
||||
|
||||
// SKYRAT EDIT END
|
||||
|
||||
@@ -709,6 +709,15 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
eye_overlay.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(eye_overlay)
|
||||
//SKYRAT EDIT ADDITION
|
||||
if (E && E.is_emissive)
|
||||
var/mutable_appearance/emissive_appearance = emissive_appearance('icons/mob/human_face.dmi', E ? E.eye_icon_state : "eyes_missing", -BODY_LAYER)
|
||||
emissive_appearance.appearance_flags &= ~RESET_TRANSFORM
|
||||
if(OFFSET_FACE in dna.species.offset_features)
|
||||
emissive_appearance.pixel_x += dna.species.offset_features[OFFSET_FACE][1]
|
||||
emissive_appearance.pixel_y += dna.species.offset_features[OFFSET_FACE][2]
|
||||
add_overlay(emissive_appearance)
|
||||
//SKYRAT EDIT END
|
||||
|
||||
dna.species.handle_hair(src)
|
||||
|
||||
|
||||
@@ -33,11 +33,14 @@
|
||||
var/no_glasses
|
||||
/// indication that the eyes are undergoing some negative effect
|
||||
var/damaged = FALSE
|
||||
var/is_emissive = FALSE //SKYRAT EDIT ADDITION
|
||||
|
||||
/obj/item/organ/eyes/Insert(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = FALSE, initialising)
|
||||
. = ..()
|
||||
if(ishuman(eye_owner))
|
||||
var/mob/living/carbon/human/human_owner = eye_owner
|
||||
if (human_owner.emissive_eyes)
|
||||
is_emissive = TRUE
|
||||
old_eye_color = human_owner.eye_color
|
||||
if(eye_color)
|
||||
human_owner.eye_color = eye_color
|
||||
@@ -55,6 +58,8 @@
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/affected_human = owner
|
||||
old_eye_color = affected_human.eye_color
|
||||
if (affected_human.emissive_eyes)
|
||||
is_emissive = TRUE
|
||||
if(eye_color)
|
||||
affected_human.eye_color = eye_color
|
||||
affected_human.regenerate_icons()
|
||||
@@ -81,6 +86,7 @@
|
||||
eye_owner.set_blurriness(0)
|
||||
eye_owner.clear_fullscreen("eye_damage", 0)
|
||||
eye_owner.update_sight()
|
||||
is_emissive = FALSE
|
||||
|
||||
|
||||
/obj/item/organ/eyes/on_life(delta_time, times_fired)
|
||||
|
||||
@@ -85,17 +85,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "penis_color"
|
||||
relevant_mutant_bodypart = "penis"
|
||||
type_to_check = /datum/preference/toggle/penis
|
||||
|
||||
/datum/preference/tri_color/penis/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/penis)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/penis/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["penis"])
|
||||
target.dna.mutant_bodyparts["penis"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["penis"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/penis
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "penis_emissive"
|
||||
relevant_mutant_bodypart = "penis"
|
||||
type_to_check = /datum/preference/toggle/penis
|
||||
|
||||
/datum/preference/toggle/penis_taur_mode
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
@@ -179,17 +176,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "testicles_color"
|
||||
relevant_mutant_bodypart = "testicles"
|
||||
type_to_check = /datum/preference/toggle/testicles
|
||||
|
||||
/datum/preference/tri_color/testicles/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/testicles)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/testicles/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["testicles"])
|
||||
target.dna.mutant_bodyparts["testicles"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["testicles"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/testicles
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "testicles_emissive"
|
||||
relevant_mutant_bodypart = "testicles"
|
||||
type_to_check = /datum/preference/toggle/testicles
|
||||
|
||||
/datum/preference/numeric/balls_size
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
@@ -256,17 +250,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "vagina_color"
|
||||
relevant_mutant_bodypart = "vagina"
|
||||
type_to_check = /datum/preference/toggle/vagina
|
||||
|
||||
/datum/preference/tri_color/vagina/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/vagina)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/vagina/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["vagina"])
|
||||
target.dna.mutant_bodyparts["vagina"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["vagina"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/vagina
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "vagina_emissive"
|
||||
relevant_mutant_bodypart = "vagina"
|
||||
type_to_check = /datum/preference/toggle/vagina
|
||||
|
||||
/datum/preference/toggle/womb
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
@@ -353,17 +344,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "breasts_color"
|
||||
relevant_mutant_bodypart = "breasts"
|
||||
type_to_check = /datum/preference/toggle/breasts
|
||||
|
||||
/datum/preference/tri_color/breasts/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/breasts)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/breasts/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["breasts"])
|
||||
target.dna.mutant_bodyparts["breasts"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["breasts"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/breasts
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "breasts_emissive"
|
||||
relevant_mutant_bodypart = "breasts"
|
||||
type_to_check = /datum/preference/toggle/breasts
|
||||
|
||||
/datum/preference/toggle/breasts_lactation
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"remove_marking" = .proc/remove_marking,
|
||||
"set_organ_aug" = .proc/set_organ_aug,
|
||||
"set_preset" = .proc/set_preset,
|
||||
"change_emissive" = .proc/change_emissive_marking,
|
||||
)
|
||||
var/list/limbs_to_process = list(
|
||||
"l_arm" = "Left Arm",
|
||||
@@ -77,9 +78,10 @@
|
||||
var/marking_count = 0
|
||||
for(var/marking in markings_list)
|
||||
var/name = marking
|
||||
var/color = markings_list[name]
|
||||
var/color = markings_list[name][1]
|
||||
var/emissive = markings_list[name][2]
|
||||
marking_count++
|
||||
fixed_markings += list(list("name" = name, "color" = sanitize_hexcolor(color), "marking_id" = "[limb_slot]_[marking_count]"))
|
||||
fixed_markings += list(list("name" = name, "color" = sanitize_hexcolor(color), "marking_id" = "[limb_slot]_[marking_count]", "emissive" = emissive))
|
||||
return fixed_markings
|
||||
|
||||
/datum/preference_middleware/limbs_and_markings/proc/add_marking(list/params, mob/user)
|
||||
@@ -88,7 +90,7 @@
|
||||
preferences.body_markings[limb_slot] = list()
|
||||
if(preferences.body_markings[limb_slot].len >= MAXIMUM_MARKINGS_PER_LIMB)
|
||||
return
|
||||
preferences.body_markings[limb_slot] += list(GLOB.body_markings_per_limb[limb_slot][1] = "#FFFFFF") // Default to the first in the list for the limb.
|
||||
preferences.body_markings[limb_slot] += list(GLOB.body_markings_per_limb[limb_slot][1] = list("#FFFFFF", FALSE)) // Default to the first in the list for the limb.
|
||||
preferences.character_preview_view.update_body()
|
||||
return TRUE
|
||||
|
||||
@@ -130,7 +132,26 @@
|
||||
) as color | null
|
||||
if(!new_color)
|
||||
return TRUE
|
||||
new_markings[marking_entry_name] = sanitize_hexcolor(new_color) // gets the new color from the picker
|
||||
new_markings[marking_entry_name][1] = sanitize_hexcolor(new_color) // gets the new color from the picker
|
||||
preferences.body_markings[limb_slot] = new_markings
|
||||
preferences.character_preview_view.update_body()
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/preference_middleware/limbs_and_markings/proc/change_emissive_marking(list/params, mob/user)
|
||||
var/limb_slot = params["limb_slot"]
|
||||
var/marking_id = params["marking_id"]
|
||||
var/emissive = !params["emissive"]
|
||||
var/list/markings = preferences.body_markings[limb_slot]
|
||||
var/list/new_markings = list()
|
||||
var/marking_count = 0
|
||||
var/marking_entry_name
|
||||
for(var/marking_entry in markings)
|
||||
marking_count++
|
||||
if(marking_id == "[limb_slot]_[marking_count]")
|
||||
marking_entry_name = marking_entry
|
||||
new_markings[marking_entry] = markings[marking_entry]
|
||||
new_markings[marking_entry_name][2] = sanitize_integer(emissive)
|
||||
preferences.body_markings[limb_slot] = new_markings
|
||||
preferences.character_preview_view.update_body()
|
||||
return TRUE
|
||||
|
||||
@@ -7,16 +7,49 @@
|
||||
/datum/preference/toggle/allow_mismatched_parts/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
|
||||
return TRUE // we dont actually want this to do anything
|
||||
|
||||
/datum/preference/toggle/allow_emissives
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "allow_emissives_toggle" //no 'e' so it goes right after allow_mismatched_parts, not before
|
||||
default_value = FALSE
|
||||
|
||||
/datum/preference/toggle/allow_emissives/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
|
||||
return TRUE // we dont actually want this to do anything
|
||||
|
||||
/datum/preference/tri_color/mutant_colors
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "mutant_colors_color"
|
||||
actually_check = FALSE
|
||||
|
||||
/datum/preference/tri_color/mutant_colors/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.dna.features["mcolor"] = sanitize_hexcolor(value[1])
|
||||
target.dna.features["mcolor2"] = sanitize_hexcolor(value[2])
|
||||
target.dna.features["mcolor3"] = sanitize_hexcolor(value[3])
|
||||
|
||||
/datum/preference/toggle/eye_emissives
|
||||
savefile_key = "eye_emissives"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
relevant_species_trait = EYECOLOR
|
||||
|
||||
/datum/preference/toggle/eye_emissives/apply_to_human(mob/living/carbon/human/target, value)
|
||||
var/obj/item/organ/eyes/eyes_organ = target.getorgan(/obj/item/organ/eyes)
|
||||
target.emissive_eyes = TRUE
|
||||
if (istype(eyes_organ))
|
||||
eyes_organ.is_emissive = value
|
||||
|
||||
/datum/preference/toggle/eye_emissives/create_default_value()
|
||||
return FALSE
|
||||
|
||||
/datum/preference/toggle/eye_emissives/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_emissives)
|
||||
return passed_initial_check && allowed
|
||||
|
||||
|
||||
// Body Markings
|
||||
|
||||
/datum/preference/toggle/body_markings
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
@@ -48,9 +81,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["body_markings"])
|
||||
|
||||
/datum/preference/choiced/body_markings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["body_markings"])
|
||||
target.dna.mutant_bodyparts["body_markings"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["body_markings"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/body_markings/create_default_value()
|
||||
var/datum/sprite_accessory/body_markings/none/default = /datum/sprite_accessory/body_markings/none
|
||||
@@ -61,17 +94,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "body_markings_color"
|
||||
relevant_mutant_bodypart = "body_markings"
|
||||
type_to_check = /datum/preference/toggle/body_markings
|
||||
|
||||
/datum/preference/tri_color/body_markings/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/body_markings)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/body_markings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["body_markings"])
|
||||
target.dna.mutant_bodyparts["body_markings"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["body_markings"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/body_markings
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "body_markings_emissive"
|
||||
relevant_mutant_bodypart = "body_markings"
|
||||
type_to_check = /datum/preference/toggle/body_markings
|
||||
|
||||
/// Tails
|
||||
|
||||
@@ -106,9 +136,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["tail"])
|
||||
|
||||
/datum/preference/choiced/tail/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["tail"])
|
||||
target.dna.mutant_bodyparts["tail"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["tail"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/tail/create_default_value()
|
||||
var/datum/sprite_accessory/tails/none/default = /datum/sprite_accessory/tails/none
|
||||
@@ -119,17 +149,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "tail_color"
|
||||
relevant_mutant_bodypart = "tail"
|
||||
type_to_check = /datum/preference/toggle/tail
|
||||
|
||||
/datum/preference/tri_color/tail/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/tail)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/tail/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["tail"])
|
||||
target.dna.mutant_bodyparts["tail"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["tail"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/tail
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "tail_emissive"
|
||||
relevant_mutant_bodypart = "tail"
|
||||
type_to_check = /datum/preference/toggle/tail
|
||||
|
||||
/// Snouts
|
||||
|
||||
@@ -164,9 +191,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["snout"])
|
||||
|
||||
/datum/preference/choiced/snout/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["snout"])
|
||||
target.dna.mutant_bodyparts["snout"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["snout"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/snout/create_default_value()
|
||||
var/datum/sprite_accessory/snouts/none/default = /datum/sprite_accessory/snouts/none
|
||||
@@ -177,17 +204,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "snout_color"
|
||||
relevant_mutant_bodypart = "snout"
|
||||
type_to_check = /datum/preference/toggle/snout
|
||||
|
||||
/datum/preference/tri_color/snout/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/snout)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/snout/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["snout"])
|
||||
target.dna.mutant_bodyparts["snout"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["snout"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/snout
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "snout_emissive"
|
||||
relevant_mutant_bodypart = "snout"
|
||||
type_to_check = /datum/preference/toggle/snout
|
||||
|
||||
/// Horns
|
||||
|
||||
@@ -222,9 +246,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["horns"])
|
||||
|
||||
/datum/preference/choiced/horns/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["horns"])
|
||||
target.dna.mutant_bodyparts["horns"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["horns"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/horns/create_default_value()
|
||||
var/datum/sprite_accessory/horns/none/default = /datum/sprite_accessory/horns/none
|
||||
@@ -235,17 +259,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "horns_color"
|
||||
relevant_mutant_bodypart = "horns"
|
||||
type_to_check = /datum/preference/toggle/horns
|
||||
|
||||
/datum/preference/tri_color/horns/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/horns)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/horns/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["horns"])
|
||||
target.dna.mutant_bodyparts["horns"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["horns"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/horns
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "horns_emissive"
|
||||
relevant_mutant_bodypart = "horns"
|
||||
type_to_check = /datum/preference/toggle/horns
|
||||
|
||||
/// Ears
|
||||
|
||||
@@ -280,9 +301,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["ears"])
|
||||
|
||||
/datum/preference/choiced/ears/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ears"])
|
||||
target.dna.mutant_bodyparts["ears"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ears"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/ears/create_default_value()
|
||||
var/datum/sprite_accessory/ears/none/default = /datum/sprite_accessory/ears/none
|
||||
@@ -293,17 +314,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ears_color"
|
||||
relevant_mutant_bodypart = "ears"
|
||||
type_to_check = /datum/preference/toggle/ears
|
||||
|
||||
/datum/preference/tri_color/ears/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/ears)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/ears/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ears"])
|
||||
target.dna.mutant_bodyparts["ears"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ears"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/ears
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ears_emissive"
|
||||
relevant_mutant_bodypart = "ears"
|
||||
type_to_check = /datum/preference/toggle/ears
|
||||
|
||||
/// Wings
|
||||
|
||||
@@ -338,9 +356,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["wings"])
|
||||
|
||||
/datum/preference/choiced/wings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["wings"])
|
||||
target.dna.mutant_bodyparts["wings"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["wings"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/wings/create_default_value()
|
||||
var/datum/sprite_accessory/wings/none/default = /datum/sprite_accessory/wings/none
|
||||
@@ -351,17 +369,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "wings_color"
|
||||
relevant_mutant_bodypart = "wings"
|
||||
type_to_check = /datum/preference/toggle/wings
|
||||
|
||||
/datum/preference/tri_color/wings/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/wings)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/wings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["wings"])
|
||||
target.dna.mutant_bodyparts["wings"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["wings"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/wings
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "wings_emissive"
|
||||
relevant_mutant_bodypart = "wings"
|
||||
type_to_check = /datum/preference/toggle/wings
|
||||
|
||||
/// Frills
|
||||
|
||||
@@ -396,9 +411,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["frills"])
|
||||
|
||||
/datum/preference/choiced/frills/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["frills"])
|
||||
target.dna.mutant_bodyparts["frills"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["frills"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/frills/create_default_value()
|
||||
var/datum/sprite_accessory/frills/none/default = /datum/sprite_accessory/frills/none
|
||||
@@ -409,17 +424,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "frills_color"
|
||||
relevant_mutant_bodypart = "frills"
|
||||
type_to_check = /datum/preference/toggle/frills
|
||||
|
||||
/datum/preference/tri_color/frills/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/frills)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/frills/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["frills"])
|
||||
target.dna.mutant_bodyparts["frills"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["frills"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/frills
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "frills_emissive"
|
||||
relevant_mutant_bodypart = "frills"
|
||||
type_to_check = /datum/preference/toggle/frills
|
||||
|
||||
/// Spines
|
||||
|
||||
@@ -454,9 +466,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["spines"])
|
||||
|
||||
/datum/preference/choiced/spines/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["spines"])
|
||||
target.dna.mutant_bodyparts["spines"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["spines"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/spines/create_default_value()
|
||||
var/datum/sprite_accessory/spines/none/default = /datum/sprite_accessory/spines/none
|
||||
@@ -467,17 +479,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "spines_color"
|
||||
relevant_mutant_bodypart = "spines"
|
||||
type_to_check = /datum/preference/toggle/spines
|
||||
|
||||
/datum/preference/tri_color/spines/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/spines)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/spines/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["spines"])
|
||||
target.dna.mutant_bodyparts["spines"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["spines"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/spines
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "spines_emissive"
|
||||
relevant_mutant_bodypart = "spines"
|
||||
type_to_check = /datum/preference/toggle/spines
|
||||
|
||||
/// Legs
|
||||
|
||||
@@ -512,9 +521,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["legs"])
|
||||
|
||||
/datum/preference/choiced/legs/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["legs"])
|
||||
target.dna.mutant_bodyparts["legs"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["legs"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/legs/create_default_value()
|
||||
var/datum/sprite_accessory/legs/none/default = /datum/sprite_accessory/legs/none
|
||||
@@ -525,17 +534,7 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "legs_color"
|
||||
relevant_mutant_bodypart = "legs"
|
||||
|
||||
/datum/preference/tri_color/legs/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/legs)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/legs/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["legs"])
|
||||
target.dna.mutant_bodyparts["legs"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["legs"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
type_to_check = /datum/preference/toggle/legs
|
||||
|
||||
/// Caps
|
||||
|
||||
@@ -570,9 +569,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["caps"])
|
||||
|
||||
/datum/preference/choiced/caps/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["caps"])
|
||||
target.dna.mutant_bodyparts["caps"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["caps"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/caps/create_default_value()
|
||||
var/datum/sprite_accessory/caps/none/default = /datum/sprite_accessory/caps/none
|
||||
@@ -583,17 +582,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "caps_color"
|
||||
relevant_mutant_bodypart = "caps"
|
||||
type_to_check = /datum/preference/toggle/caps
|
||||
|
||||
/datum/preference/tri_color/caps/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/caps)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/caps/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["caps"])
|
||||
target.dna.mutant_bodyparts["caps"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["caps"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/caps
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "caps_emissive"
|
||||
relevant_mutant_bodypart = "caps"
|
||||
type_to_check = /datum/preference/toggle/caps
|
||||
|
||||
/// Moth Antennae
|
||||
|
||||
@@ -628,9 +624,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["moth_antennae"])
|
||||
|
||||
/datum/preference/choiced/moth_antennae/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["moth_antennae"])
|
||||
target.dna.mutant_bodyparts["moth_antennae"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["moth_antennae"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/moth_antennae/create_default_value()
|
||||
var/datum/sprite_accessory/moth_antennae/none/default = /datum/sprite_accessory/moth_antennae/none
|
||||
@@ -641,17 +637,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "moth_antennae_color"
|
||||
relevant_mutant_bodypart = "moth_antennae"
|
||||
type_to_check = /datum/preference/toggle/moth_antennae
|
||||
|
||||
/datum/preference/tri_color/moth_antennae/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/moth_antennae)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/moth_antennae/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["moth_antennae"])
|
||||
target.dna.mutant_bodyparts["moth_antennae"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["moth_antennae"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/moth_antennae
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "moth_antennae_emissive"
|
||||
relevant_mutant_bodypart = "moth_antennae"
|
||||
type_to_check = /datum/preference/toggle/moth_antennae
|
||||
|
||||
/// Moth Markings
|
||||
|
||||
@@ -686,9 +679,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["moth_markings"])
|
||||
|
||||
/datum/preference/choiced/moth_markings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["moth_markings"])
|
||||
target.dna.mutant_bodyparts["moth_markings"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["moth_markings"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/moth_markings/create_default_value()
|
||||
var/datum/sprite_accessory/moth_markings/none/default = /datum/sprite_accessory/moth_markings/none
|
||||
@@ -699,17 +692,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "moth_markings_color"
|
||||
relevant_mutant_bodypart = "moth_markings"
|
||||
type_to_check = /datum/preference/toggle/moth_markings
|
||||
|
||||
/datum/preference/tri_color/moth_markings/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/moth_markings)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/moth_markings/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["moth_markings"])
|
||||
target.dna.mutant_bodyparts["moth_markings"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["moth_markings"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/moth_markings
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "moth_markings_emissive"
|
||||
relevant_mutant_bodypart = "moth_markings"
|
||||
type_to_check = /datum/preference/toggle/moth_markings
|
||||
|
||||
/// Fluff
|
||||
|
||||
@@ -744,9 +734,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["fluff"])
|
||||
|
||||
/datum/preference/choiced/fluff/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["fluff"])
|
||||
target.dna.mutant_bodyparts["fluff"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["fluff"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/fluff/create_default_value()
|
||||
var/datum/sprite_accessory/fluff/moth/none/default = /datum/sprite_accessory/fluff/moth/none
|
||||
@@ -757,75 +747,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "fluff_color"
|
||||
relevant_mutant_bodypart = "fluff"
|
||||
type_to_check = /datum/preference/toggle/fluff
|
||||
|
||||
/datum/preference/tri_color/fluff/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/fluff)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/fluff/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["fluff"])
|
||||
target.dna.mutant_bodyparts["fluff"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["fluff"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
|
||||
/// Head Accessories
|
||||
|
||||
/datum/preference/toggle/head_acc
|
||||
/datum/preference/tri_bool/fluff
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "head_acc_toggle"
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
default_value = FALSE
|
||||
|
||||
/datum/preference/toggle/head_acc/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
|
||||
return TRUE // we dont actually want this to do anything
|
||||
|
||||
/datum/preference/toggle/head_acc/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
return passed_initial_check || allowed
|
||||
|
||||
/datum/preference/choiced/head_acc
|
||||
savefile_key = "feature_head_acc"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
|
||||
/datum/preference/choiced/head_acc/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/head_acc)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/choiced/head_acc/init_possible_values()
|
||||
return assoc_to_keys(GLOB.sprite_accessories["head_acc"])
|
||||
|
||||
/datum/preference/choiced/head_acc/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["head_acc"])
|
||||
target.dna.mutant_bodyparts["head_acc"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["head_acc"]["name"] = value
|
||||
|
||||
/datum/preference/choiced/head_acc/create_default_value()
|
||||
var/datum/sprite_accessory/head_accessory/none/default = /datum/sprite_accessory/head_accessory/none
|
||||
return initial(default.name)
|
||||
|
||||
/datum/preference/tri_color/head_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "head_acc_color"
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
|
||||
/datum/preference/tri_color/head_acc/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/head_acc)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/head_acc/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["head_acc"])
|
||||
target.dna.mutant_bodyparts["head_acc"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["head_acc"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
savefile_key = "fluff_emissive"
|
||||
relevant_mutant_bodypart = "fluff"
|
||||
type_to_check = /datum/preference/toggle/fluff
|
||||
|
||||
/// IPC Screens
|
||||
|
||||
@@ -860,9 +789,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["ipc_screen"])
|
||||
|
||||
/datum/preference/choiced/ipc_screen/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ipc_screen"])
|
||||
target.dna.mutant_bodyparts["ipc_screen"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ipc_screen"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/ipc_screen/create_default_value()
|
||||
var/datum/sprite_accessory/screen/none/default = /datum/sprite_accessory/screen/none
|
||||
@@ -873,17 +802,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ipc_screen_color"
|
||||
relevant_mutant_bodypart = "ipc_screen"
|
||||
type_to_check = /datum/preference/toggle/ipc_screen
|
||||
|
||||
/datum/preference/tri_color/ipc_screen/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/ipc_screen)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/ipc_screen/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ipc_screen"])
|
||||
target.dna.mutant_bodyparts["ipc_screen"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ipc_screen"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/ipc_screen
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ipc_screen_emissive"
|
||||
relevant_mutant_bodypart = "ipc_screen"
|
||||
type_to_check = /datum/preference/toggle/ipc_screen
|
||||
|
||||
/// IPC Antennas
|
||||
|
||||
@@ -918,9 +844,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["ipc_antenna"])
|
||||
|
||||
/datum/preference/choiced/ipc_antenna/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ipc_antenna"])
|
||||
target.dna.mutant_bodyparts["ipc_antenna"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ipc_antenna"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/ipc_antenna/create_default_value()
|
||||
var/datum/sprite_accessory/antenna/none/default = /datum/sprite_accessory/antenna/none
|
||||
@@ -931,17 +857,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ipc_antenna_color"
|
||||
relevant_mutant_bodypart = "ipc_antenna"
|
||||
type_to_check = /datum/preference/toggle/ipc_antenna
|
||||
|
||||
/datum/preference/tri_color/ipc_antenna/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/ipc_antenna)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/ipc_antenna/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ipc_antenna"])
|
||||
target.dna.mutant_bodyparts["ipc_antenna"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ipc_antenna"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/ipc_antenna
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ipc_antenna_emissive"
|
||||
relevant_mutant_bodypart = "ipc_antenna"
|
||||
type_to_check = /datum/preference/toggle/ipc_antenna
|
||||
|
||||
/// IPC Chassis
|
||||
|
||||
@@ -976,9 +899,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["ipc_chassis"])
|
||||
|
||||
/datum/preference/choiced/ipc_chassis/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ipc_chassis"])
|
||||
target.dna.mutant_bodyparts["ipc_chassis"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ipc_chassis"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/ipc_chassis/create_default_value()
|
||||
var/datum/sprite_accessory/ipc_chassis/default = /datum/sprite_accessory/ipc_chassis/none
|
||||
@@ -989,17 +912,7 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "ipc_chassis_color"
|
||||
relevant_mutant_bodypart = "ipc_chassis"
|
||||
|
||||
/datum/preference/tri_color/ipc_chassis/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/ipc_chassis)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/ipc_chassis/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["ipc_chassis"])
|
||||
target.dna.mutant_bodyparts["ipc_chassis"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["ipc_chassis"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
type_to_check = /datum/preference/toggle/ipc_chassis
|
||||
|
||||
/// Neck Accessories
|
||||
|
||||
@@ -1034,9 +947,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["neck_acc"])
|
||||
|
||||
/datum/preference/choiced/neck_acc/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["neck_acc"])
|
||||
target.dna.mutant_bodyparts["neck_acc"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["neck_acc"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/neck_acc/create_default_value()
|
||||
var/datum/sprite_accessory/neck_accessory/none/default = /datum/sprite_accessory/neck_accessory/none
|
||||
@@ -1047,17 +960,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "neck_acc_color"
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
type_to_check = /datum/preference/toggle/neck_acc
|
||||
|
||||
/datum/preference/tri_color/neck_acc/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/neck_acc)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/neck_acc/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["neck_acc"])
|
||||
target.dna.mutant_bodyparts["neck_acc"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["neck_acc"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/neck_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "neck_acc_emissive"
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
type_to_check = /datum/preference/toggle/neck_acc
|
||||
|
||||
/// Skrell Hair
|
||||
|
||||
@@ -1092,9 +1002,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["skrell_hair"])
|
||||
|
||||
/datum/preference/choiced/skrell_hair/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["skrell_hair"])
|
||||
target.dna.mutant_bodyparts["skrell_hair"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["skrell_hair"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/skrell_hair/create_default_value()
|
||||
var/datum/sprite_accessory/skrell_hair/none/default = /datum/sprite_accessory/skrell_hair/none
|
||||
@@ -1105,17 +1015,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "skrell_hair_color"
|
||||
relevant_mutant_bodypart = "skrell_hair"
|
||||
type_to_check = /datum/preference/toggle/skrell_hair
|
||||
|
||||
/datum/preference/tri_color/skrell_hair/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/skrell_hair)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/skrell_hair/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["skrell_hair"])
|
||||
target.dna.mutant_bodyparts["skrell_hair"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["skrell_hair"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/skrell_hair
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "skrell_hair_emissive"
|
||||
relevant_mutant_bodypart = "skrell_hair"
|
||||
type_to_check = /datum/preference/toggle/skrell_hair
|
||||
|
||||
/// Taur
|
||||
|
||||
@@ -1150,9 +1057,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["taur"])
|
||||
|
||||
/datum/preference/choiced/taur/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["taur"])
|
||||
target.dna.mutant_bodyparts["taur"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["taur"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/taur/create_default_value()
|
||||
var/datum/sprite_accessory/taur/none/default = /datum/sprite_accessory/taur/none
|
||||
@@ -1163,17 +1070,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "taur_color"
|
||||
relevant_mutant_bodypart = "taur"
|
||||
type_to_check = /datum/preference/toggle/taur
|
||||
|
||||
/datum/preference/tri_color/taur/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/taur)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/taur/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["taur"])
|
||||
target.dna.mutant_bodyparts["taur"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["taur"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/taur
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "taur_emissive"
|
||||
relevant_mutant_bodypart = "taur"
|
||||
type_to_check = /datum/preference/toggle/taur
|
||||
|
||||
/// Xenodorsal
|
||||
|
||||
@@ -1208,9 +1112,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["xenodorsal"])
|
||||
|
||||
/datum/preference/choiced/xenodorsal/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["xenodorsal"])
|
||||
target.dna.mutant_bodyparts["xenodorsal"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["xenodorsal"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/xenodorsal/create_default_value()
|
||||
var/datum/sprite_accessory/xenodorsal/none/default = /datum/sprite_accessory/xenodorsal/none
|
||||
@@ -1221,17 +1125,14 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "xenodorsal_color"
|
||||
relevant_mutant_bodypart = "xenodorsal"
|
||||
type_to_check = /datum/preference/toggle/xenodorsal
|
||||
|
||||
/datum/preference/tri_color/xenodorsal/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/xenodorsal)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/xenodorsal/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["xenodorsal"])
|
||||
target.dna.mutant_bodyparts["xenodorsal"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["xenodorsal"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/tri_bool/xenodorsal
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "xenodorsal_emissive"
|
||||
relevant_mutant_bodypart = "xenodorsal"
|
||||
type_to_check = /datum/preference/toggle/xenodorsal
|
||||
|
||||
/// Xeno heads
|
||||
|
||||
@@ -1266,9 +1167,9 @@
|
||||
return assoc_to_keys(GLOB.sprite_accessories["xenohead"])
|
||||
|
||||
/datum/preference/choiced/xenohead/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["xenohead"])
|
||||
target.dna.mutant_bodyparts["xenohead"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["xenohead"]["name"] = value
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/xenohead/create_default_value()
|
||||
var/datum/sprite_accessory/xenohead/none/default = /datum/sprite_accessory/xenohead/none
|
||||
@@ -1279,14 +1180,124 @@
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "xenohead_color"
|
||||
relevant_mutant_bodypart = "xenohead"
|
||||
type_to_check = /datum/preference/toggle/xenohead
|
||||
|
||||
/datum/preference/tri_color/xenohead/is_accessible(datum/preferences/preferences)
|
||||
/datum/preference/tri_bool/xenohead
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "xenohead_emissive"
|
||||
relevant_mutant_bodypart = "xenohead"
|
||||
type_to_check = /datum/preference/toggle/xenohead
|
||||
|
||||
|
||||
/// Head Accessories - Unless more get added, this is only able to be applied for one person, a donator only thing
|
||||
|
||||
/datum/preference/toggle/head_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "head_acc_toggle"
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
default_value = FALSE
|
||||
|
||||
/datum/preference/toggle/head_acc/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
|
||||
return TRUE // we dont actually want this to do anything
|
||||
|
||||
/datum/preference/toggle/head_acc/is_accessible(datum/preferences/preferences)
|
||||
var/ckeycheck = preferences?.parent.ckey == "whirlsam"
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/xenohead)
|
||||
return ckeycheck && (passed_initial_check || allowed)
|
||||
|
||||
/datum/preference/choiced/head_acc
|
||||
savefile_key = "feature_head_acc"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
|
||||
/datum/preference/choiced/head_acc/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/head_acc)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/tri_color/xenohead/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts["xenohead"])
|
||||
target.dna.mutant_bodyparts["xenohead"] = list("name" = "None", "color" = list("#FFFFFF", "#FFFFFF", "#FFFFFF"))
|
||||
target.dna.mutant_bodyparts["xenohead"]["color"] = list(sanitize_hexcolor(value[1]), sanitize_hexcolor(value[2]), sanitize_hexcolor(value[3]))
|
||||
/datum/preference/choiced/head_acc/init_possible_values()
|
||||
return assoc_to_keys(GLOB.sprite_accessories["head_acc"])
|
||||
|
||||
/datum/preference/choiced/head_acc/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/head_acc/create_default_value()
|
||||
var/datum/sprite_accessory/head_accessory/none/default = /datum/sprite_accessory/head_accessory/none
|
||||
return initial(default.name)
|
||||
|
||||
/datum/preference/tri_color/head_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "head_acc_color"
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
type_to_check = /datum/preference/toggle/head_acc
|
||||
|
||||
/datum/preference/tri_bool/head_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "head_acc_emissive"
|
||||
relevant_mutant_bodypart = "head_acc"
|
||||
type_to_check = /datum/preference/toggle/head_acc
|
||||
|
||||
/// Neck Accessories - Same as head_acc
|
||||
|
||||
/datum/preference/toggle/neck_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "neck_acc_toggle"
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
default_value = FALSE
|
||||
|
||||
/datum/preference/toggle/neck_acc/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
|
||||
return TRUE // we dont actually want this to do anything
|
||||
|
||||
/datum/preference/toggle/neck_acc/is_accessible(datum/preferences/preferences)
|
||||
var/ckeycheck = preferences?.parent.ckey == "whirlsam"
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
return ckeycheck && (passed_initial_check || allowed)
|
||||
|
||||
/datum/preference/choiced/neck_acc
|
||||
savefile_key = "feature_neck_acc"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
|
||||
/datum/preference/choiced/neck_acc/is_accessible(datum/preferences/preferences)
|
||||
var/passed_initial_check = ..(preferences)
|
||||
var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts)
|
||||
var/part_enabled = preferences.read_preference(/datum/preference/toggle/neck_acc)
|
||||
return ((passed_initial_check || allowed) && part_enabled)
|
||||
|
||||
/datum/preference/choiced/neck_acc/init_possible_values()
|
||||
return assoc_to_keys(GLOB.sprite_accessories["neck_acc"])
|
||||
|
||||
/datum/preference/choiced/neck_acc/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(!target.dna.mutant_bodyparts[relevant_mutant_bodypart])
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart] = list(MUTANT_INDEX_NAME = "None", MUTANT_INDEX_COLOR_LIST = list("#FFFFFF", "#FFFFFF", "#FFFFFF"), MUTANT_INDEX_EMISSIVE_LIST = list(FALSE, FALSE, FALSE))
|
||||
target.dna.mutant_bodyparts[relevant_mutant_bodypart][MUTANT_INDEX_NAME] = value
|
||||
|
||||
/datum/preference/choiced/neck_acc/create_default_value()
|
||||
var/datum/sprite_accessory/neck_accessory/none/default = /datum/sprite_accessory/neck_accessory/none
|
||||
return initial(default.name)
|
||||
|
||||
/datum/preference/tri_color/neck_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "neck_acc_color"
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
type_to_check = /datum/preference/toggle/neck_acc
|
||||
|
||||
/datum/preference/tri_bool/neck_acc
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "neck_acc_emissive"
|
||||
relevant_mutant_bodypart = "neck_acc"
|
||||
type_to_check = /datum/preference/toggle/neck_acc
|
||||
|
||||
@@ -107,5 +107,6 @@
|
||||
if (islist(markings))
|
||||
for (var/marking in markings)
|
||||
for (var/title in markings[marking])
|
||||
markings[marking][title] = sanitize_hexcolor(markings[marking][title])
|
||||
if (!islist(markings[marking][title]))
|
||||
markings[marking][title] = list(sanitize_hexcolor(markings[marking][title]), FALSE)
|
||||
return markings
|
||||
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 1007 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1016 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@@ -61,5 +61,5 @@
|
||||
if(set_name in marking_list)
|
||||
if(!body_markings[zone])
|
||||
body_markings[zone] = list()
|
||||
body_markings[zone][set_name] = BM.get_default_color(features, pref_species)
|
||||
body_markings[zone][set_name] = list(BM.get_default_color(features, pref_species), FALSE)
|
||||
return body_markings
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/obj/item/our_thing = target
|
||||
var/list/finished_list = list()
|
||||
for(var/read_color in 1 to colors.len)
|
||||
finished_list += ReadRGB(get_alpha_padded_color(colors[read_color]))
|
||||
finished_list += ReadRGB("[colors[read_color]]00")
|
||||
var/remaining_count = 3 - length(colors)
|
||||
if(remaining_count > 0)
|
||||
for(var/remaining_color in 1 to remaining_count)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
GLOBAL_LIST_EMPTY(cached_mutant_icon_files)
|
||||
|
||||
/datum/sprite_accessory
|
||||
///Unique key of an accessroy. All tails should have "tail", ears "ears" etc.
|
||||
var/key = null
|
||||
@@ -41,6 +43,8 @@
|
||||
var/list/ckey_whitelist
|
||||
///Whether this feature is genetic, and thus modifiable by DNA consoles
|
||||
var/genetic = FALSE
|
||||
var/uses_emissives = FALSE
|
||||
var/color_layer_names
|
||||
|
||||
/datum/sprite_accessory/New()
|
||||
if(!default_color)
|
||||
@@ -55,6 +59,18 @@
|
||||
factual = FALSE
|
||||
if(color_src == USE_MATRIXED_COLORS && default_color != DEFAULT_MATRIXED)
|
||||
default_color = DEFAULT_MATRIXED
|
||||
if (color_src == USE_MATRIXED_COLORS)
|
||||
color_layer_names = list()
|
||||
if (!GLOB.cached_mutant_icon_files[icon])
|
||||
GLOB.cached_mutant_icon_files[icon] = icon_states(new /icon(icon))
|
||||
for (var/layer in relevent_layers)
|
||||
var/layertext = layer == BODY_BEHIND_LAYER ? "BEHIND" : (layer == BODY_ADJ_LAYER ? "ADJ" : "FRONT")
|
||||
if ("m_[key]_[icon_state]_[layertext]_primary" in GLOB.cached_mutant_icon_files[icon])
|
||||
color_layer_names["1"] = "primary"
|
||||
if ("m_[key]_[icon_state]_[layertext]_secondary" in GLOB.cached_mutant_icon_files[icon])
|
||||
color_layer_names["2"] = "secondary"
|
||||
if ("m_[key]_[icon_state]_[layertext]_tertiary" in GLOB.cached_mutant_icon_files[icon])
|
||||
color_layer_names["3"] = "tertiary"
|
||||
|
||||
/datum/sprite_accessory/proc/is_hidden(mob/living/carbon/human/H, obj/item/bodypart/BP)
|
||||
return FALSE
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
organ_type = /obj/item/organ/ears/mutant
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
recommended_species = list(SPECIES_SYNTHMAMMAL, SPECIES_MAMMAL, SPECIES_HUMAN, SPECIES_SYNTHHUMAN, SPECIES_FELINE, SPECIES_HUMANOID, SPECIES_GHOUL)
|
||||
uses_emissives = TRUE
|
||||
|
||||
/datum/sprite_accessory/ears/mutant/none
|
||||
name = "None"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon_state = "none"
|
||||
|
||||
/datum/sprite_accessory/fluff/moth/is_hidden(mob/living/carbon/human/H, obj/item/bodypart/HD)
|
||||
if(H.head && (H.head.flags_inv & HIDEHAIR) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)) || !HD || HD.status == BODYPART_ROBOTIC)
|
||||
if((H.head && (H.head.flags_inv & HIDEHAIR)) || (H.wear_mask && (H.wear_mask.flags_inv & HIDEHAIR)))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
name = "Horn"
|
||||
icon_state = "rhino"
|
||||
extra = TRUE
|
||||
extra = MUTCOLORS3
|
||||
extra_color_src = MUTCOLORS3
|
||||
|
||||
/datum/sprite_accessory/snouts/mammal/rodent
|
||||
name = "Rodent"
|
||||
@@ -201,7 +201,7 @@
|
||||
name = "Horn (Top)"
|
||||
icon_state = "frhino"
|
||||
extra = TRUE
|
||||
extra = MUTCOLORS3
|
||||
extra_color_src = MUTCOLORS3
|
||||
|
||||
/datum/sprite_accessory/snouts/mammal/fhusky
|
||||
name = "Husky (Top)"
|
||||
|
||||
@@ -12,16 +12,21 @@
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Snout Under"
|
||||
icon_state = "synthliz_under"
|
||||
extra = TRUE
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/synthliz_tert
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Snout Tertiary"
|
||||
icon_state = "synthliz_tert"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/synthliz_tertunder
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Snout Tertiary Under"
|
||||
icon_state = "synthliz_tertunder"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/synthliz_long
|
||||
color_src = USE_ONE_COLOR
|
||||
@@ -42,32 +47,44 @@
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Barless Under"
|
||||
icon_state = "synthliz_barless_under"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/barlessover
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Barless Over"
|
||||
icon_state = "synthliz_barless_over"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/barlesstert
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Barless Tertiary"
|
||||
icon_state = "synthliz_barless_tert"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/barlesstertunder
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Synthetic Lizard - Barless Tertiary Under"
|
||||
icon_state = "synthliz_barless_tertunder"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
//Protogen snoot
|
||||
/datum/sprite_accessory/snouts/synthliz/protogen
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Protogen"
|
||||
icon_state = "protogen"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
/datum/sprite_accessory/snouts/synthliz/protogen_withbolt
|
||||
color_src = USE_MATRIXED_COLORS
|
||||
name = "Protogen - With Bolt"
|
||||
icon_state = "protogen_withbolt"
|
||||
extra = TRUE
|
||||
extra_color_src = USE_MATRIXED_COLORS
|
||||
|
||||
|
||||
//Synth tails
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
if(HS.hardsuit_tail_colors)
|
||||
//Currently this way, when I have more time I'll write a hex -> matrix converter to pre-bake them instead
|
||||
var/list/finished_list = list()
|
||||
finished_list += ReadRGB(get_alpha_padded_color(HS.hardsuit_tail_colors[1]))
|
||||
finished_list += ReadRGB(get_alpha_padded_color(HS.hardsuit_tail_colors[2]))
|
||||
finished_list += ReadRGB(get_alpha_padded_color(HS.hardsuit_tail_colors[3]))
|
||||
finished_list += ReadRGB("[HS.hardsuit_tail_colors[1]]00")
|
||||
finished_list += ReadRGB("[HS.hardsuit_tail_colors[2]]00")
|
||||
finished_list += ReadRGB("[HS.hardsuit_tail_colors[3]]00")
|
||||
finished_list += list(0,0,0,255)
|
||||
for(var/index in 1 to finished_list.len)
|
||||
finished_list[index] /= 255
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
default_color = DEFAULT_PRIMARY
|
||||
recommended_species = list(SPECIES_SYNTHMAMMAL, SPECIES_MAMMAL, SPECIES_LIZARD, SPECIES_INSECT, SPECIES_SYNTHLIZ)
|
||||
relevent_layers = list(BODY_BEHIND_LAYER, BODY_FRONT_LAYER)
|
||||
dimension_x = 46
|
||||
dimension_y = 34
|
||||
center = TRUE
|
||||
|
||||
/datum/sprite_accessory/wings/mammal/bat //TODO: port my sprite from hyper for this one
|
||||
name = "Bat"
|
||||
@@ -217,8 +220,14 @@
|
||||
icon = 'modular_skyrat/master_files/icons/mob/sprite_accessory/wings.dmi'
|
||||
name = "Low wings"
|
||||
icon_state = "low"
|
||||
dimension_x = 46
|
||||
dimension_y = 34
|
||||
center = TRUE
|
||||
|
||||
/datum/sprite_accessory/wings/low_wings_top
|
||||
icon = 'modular_skyrat/master_files/icons/mob/sprite_accessory/wings.dmi'
|
||||
name = "Low wings (Top)"
|
||||
icon_state = "low_top"
|
||||
dimension_x = 46
|
||||
dimension_y = 34
|
||||
center = TRUE
|
||||
|
||||
@@ -11,3 +11,5 @@
|
||||
var/try_hide_mutant_parts = FALSE
|
||||
///The Examine Panel TGUI.
|
||||
var/datum/examine_panel/tgui = new() //create the datum
|
||||
//Whether or not the human has emissive eyes
|
||||
var/emissive_eyes
|
||||
|
||||
@@ -90,7 +90,6 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
H.remove_overlay(BODY_FRONT_LAYER)
|
||||
|
||||
var/g = (H.body_type == FEMALE) ? "f" : "m"
|
||||
|
||||
for(var/bodypart in bodyparts_to_add)
|
||||
var/datum/sprite_accessory/S = bodypart
|
||||
var/key = S.key
|
||||
@@ -103,11 +102,15 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
if(!override_color && S.special_colorize)
|
||||
override_color = S.get_special_render_colour(H, render_state)
|
||||
|
||||
var/color_layer_list = S.color_layer_names
|
||||
if(S.special_icon_case)
|
||||
icon_to_use = S.get_special_icon(H, render_state)
|
||||
else
|
||||
icon_to_use = S.icon
|
||||
|
||||
if (S.special_render_case)
|
||||
color_layer_list = list("1" = "primary", "2" = "secondary", "3" = "tertiary")
|
||||
|
||||
if(S.special_x_dimension)
|
||||
x_shift = S.get_special_x_dimension(H, render_state)
|
||||
else
|
||||
@@ -120,10 +123,13 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
|
||||
for(var/layer in S.relevent_layers)
|
||||
var/layertext = mutant_bodyparts_layertext(layer)
|
||||
|
||||
var/list/mutable_appearance/accessories
|
||||
var/mutable_appearance/accessory_overlay = mutable_appearance(icon_to_use, layer = -layer)
|
||||
|
||||
accessory_overlay.icon_state = "[render_state]_[layertext]"
|
||||
if (S.color_src == USE_MATRIXED_COLORS && color_layer_list)
|
||||
accessory_overlay.icon_state = "[render_state]_[layertext]_primary"
|
||||
accessories = list()
|
||||
|
||||
if(S.center)
|
||||
accessory_overlay = center_image(accessory_overlay, x_shift, S.dimension_y)
|
||||
@@ -141,15 +147,20 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
accessory_overlay.color = mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST][1]
|
||||
if(USE_MATRIXED_COLORS)
|
||||
var/list/color_list = mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST]
|
||||
var/alpha_value = specific_alpha //this is here and not with the alpha setting code below as setting the alpha on a matrix color mutable appearance breaks it (at least in this case)
|
||||
var/list/finished_list = list()
|
||||
finished_list += ReadRGB("[get_alpha_padded_color(color_list[1])]")
|
||||
finished_list += ReadRGB("[get_alpha_padded_color(color_list[2])]")
|
||||
finished_list += ReadRGB("[get_alpha_padded_color(color_list[3])]")
|
||||
finished_list += list(0,0,0,alpha_value)
|
||||
for(var/index in 1 to finished_list.len)
|
||||
finished_list[index] /= 255
|
||||
accessory_overlay.color = finished_list
|
||||
for (var/n in color_layer_list)
|
||||
var/num = text2num(n)
|
||||
var/mutable_appearance/matrixed_acce = mutable_appearance(icon_to_use, layer = -layer)
|
||||
matrixed_acce.icon_state = "[render_state]_[layertext]_[color_layer_list[n]]"
|
||||
matrixed_acce.color = color_list[num]
|
||||
matrixed_acce.alpha = specific_alpha
|
||||
if (S.center)
|
||||
matrixed_acce = center_image(matrixed_acce, x_shift, S.dimension_y)
|
||||
accessories += matrixed_acce
|
||||
if (mutant_bodyparts[key][MUTANT_INDEX_EMISSIVE_LIST] && mutant_bodyparts[key][MUTANT_INDEX_EMISSIVE_LIST][num])
|
||||
var/mutable_appearance/emissive_overlay = emissive_appearance_copy(matrixed_acce)
|
||||
//if (S.center)
|
||||
// emissive_overlay = center_image(emissive_overlay, x_shift, S.dimension_y)
|
||||
accessories += emissive_overlay
|
||||
if(MUTCOLORS)
|
||||
if(fixed_mut_color)
|
||||
accessory_overlay.color = fixed_mut_color
|
||||
@@ -168,7 +179,16 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
accessory_overlay.color = H.eye_color
|
||||
else
|
||||
accessory_overlay.color = override_color
|
||||
standing += accessory_overlay
|
||||
if (accessories)
|
||||
for (var/acces in accessories)
|
||||
standing += acces
|
||||
else
|
||||
standing += accessory_overlay
|
||||
if (mutant_bodyparts[key][MUTANT_INDEX_EMISSIVE_LIST] && mutant_bodyparts[key][MUTANT_INDEX_EMISSIVE_LIST][1])
|
||||
var/mutable_appearance/emissive_overlay = emissive_appearance_copy(accessory_overlay)
|
||||
//if (S.center)
|
||||
// emissive_overlay = center_image(emissive_overlay, x_shift, S.dimension_y)
|
||||
standing += emissive_overlay
|
||||
|
||||
if(S.hasinner)
|
||||
var/mutable_appearance/inner_accessory_overlay = mutable_appearance(S.icon, layer = -layer)
|
||||
@@ -444,17 +464,25 @@ GLOBAL_LIST_EMPTY(customizable_races)
|
||||
if(!(NOEYESPRITES in species_traits))
|
||||
var/obj/item/organ/eyes/E = species_human.getorganslot(ORGAN_SLOT_EYES)
|
||||
var/mutable_appearance/eye_overlay
|
||||
var/mutable_appearance/eye_emissive
|
||||
var/eye_icon = eyes_icon || 'icons/mob/human_face.dmi'
|
||||
if(!E)
|
||||
eye_overlay = mutable_appearance(eye_icon, "eyes_missing", -BODY_LAYER)
|
||||
else
|
||||
eye_overlay = mutable_appearance(eye_icon, E.eye_icon_state, -BODY_LAYER)
|
||||
if (E.is_emissive)
|
||||
eye_emissive = emissive_appearance_copy(eye_overlay)
|
||||
if((EYECOLOR in species_traits) && E)
|
||||
eye_overlay.color = species_human.eye_color
|
||||
if(OFFSET_FACE in species_human.dna.species.offset_features)
|
||||
eye_overlay.pixel_x += species_human.dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_overlay.pixel_y += species_human.dna.species.offset_features[OFFSET_FACE][2]
|
||||
if (eye_emissive)
|
||||
eye_emissive.pixel_x += species_human.dna.species.offset_features[OFFSET_FACE][1]
|
||||
eye_emissive.pixel_y += species_human.dna.species.offset_features[OFFSET_FACE][2]
|
||||
standing += eye_overlay
|
||||
if (eye_emissive)
|
||||
standing += eye_emissive
|
||||
|
||||
//Underwear, Undershirts & Socks
|
||||
if(!(NO_UNDERWEAR in species_traits))
|
||||
|
||||
@@ -67,10 +67,10 @@
|
||||
aux = image(limb.icon, "[aux_zone]", -aux_layer, image_dir)
|
||||
. += aux
|
||||
if(blocks_emissive)
|
||||
var/mutable_appearance/limb_em_block = mutable_appearance(limb.icon, limb.icon_state, plane = EMISSIVE_PLANE, appearance_flags = KEEP_APART)
|
||||
var/mutable_appearance/limb_em_block = mutable_appearance(limb.icon, limb.icon_state, -BODYPARTS_LAYER, plane = EMISSIVE_PLANE, appearance_flags = KEEP_APART)
|
||||
limb_em_block.dir = image_dir
|
||||
limb_em_block.color = GLOB.em_block_color
|
||||
limb.overlays += limb_em_block
|
||||
. += limb_em_block
|
||||
return
|
||||
|
||||
var/draw_color
|
||||
@@ -85,6 +85,19 @@
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = owner
|
||||
|
||||
if(blocks_emissive)
|
||||
var/mutable_appearance/limb_em_block = mutable_appearance(limb.icon, limb.icon_state, -BODYPARTS_LAYER, plane = EMISSIVE_PLANE, appearance_flags = KEEP_APART)
|
||||
limb_em_block.dir = image_dir
|
||||
limb_em_block.color = GLOB.em_block_color
|
||||
. += limb_em_block
|
||||
|
||||
if(aux_zone)
|
||||
var/mutable_appearance/aux_em_block = mutable_appearance(aux.icon, aux.icon_state, -BODYPARTS_LAYER, plane = EMISSIVE_PLANE, appearance_flags = KEEP_APART)
|
||||
aux_em_block.dir = image_dir
|
||||
aux_em_block.color = GLOB.em_block_color
|
||||
. += aux_em_block
|
||||
|
||||
//set specific alpha before setting the markings alpha
|
||||
if (alpha != 255)
|
||||
for (var/ov in .)
|
||||
@@ -97,7 +110,8 @@
|
||||
|
||||
for(var/key in H.dna.species.body_markings[body_zone])
|
||||
var/datum/body_marking/BM = GLOB.body_markings[key]
|
||||
|
||||
if (!BM)
|
||||
continue
|
||||
var/render_limb_string = body_zone
|
||||
switch(body_zone)
|
||||
if(BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
|
||||
@@ -108,13 +122,19 @@
|
||||
var/gendaar = (H.body_type == FEMALE) ? "f" : "m"
|
||||
render_limb_string = "[render_limb_string]_[gendaar]"
|
||||
|
||||
var/mutable_appearance/accessory_overlay = mutable_appearance(BM.icon, "[BM.icon_state]_[render_limb_string]", -BODYPARTS_LAYER)
|
||||
var/mutable_appearance/accessory_overlay
|
||||
var/mutable_appearance/emissive
|
||||
accessory_overlay = mutable_appearance(BM.icon, "[BM.icon_state]_[render_limb_string]", -BODYPARTS_LAYER)
|
||||
accessory_overlay.alpha = H.dna.species.markings_alpha
|
||||
if (H.dna.species.body_markings[body_zone][key][2])
|
||||
emissive = emissive_appearance_copy(accessory_overlay)
|
||||
if(override_color)
|
||||
accessory_overlay.color = override_color
|
||||
else
|
||||
accessory_overlay.color = H.dna.species.body_markings[body_zone][key]
|
||||
accessory_overlay.alpha = H.dna.species.markings_alpha
|
||||
accessory_overlay.color = H.dna.species.body_markings[body_zone][key][1]
|
||||
. += accessory_overlay
|
||||
if (emissive)
|
||||
. += emissive
|
||||
|
||||
if(aux_zone)
|
||||
for(var/key in H.dna.species.body_markings[aux_zone])
|
||||
@@ -122,25 +142,19 @@
|
||||
|
||||
var/render_limb_string = aux_zone
|
||||
|
||||
var/mutable_appearance/accessory_overlay = mutable_appearance(BM.icon, "[BM.icon_state]_[render_limb_string]", -aux_layer)
|
||||
var/mutable_appearance/emissive
|
||||
var/mutable_appearance/accessory_overlay
|
||||
accessory_overlay = mutable_appearance(BM.icon, "[BM.icon_state]_[render_limb_string]", -aux_layer)
|
||||
accessory_overlay.alpha = H.dna.species.markings_alpha
|
||||
if (H.dna.species.body_markings[aux_zone][key][2])
|
||||
emissive = emissive_appearance_copy(accessory_overlay)
|
||||
if(override_color)
|
||||
accessory_overlay.color = override_color
|
||||
else
|
||||
accessory_overlay.color = H.dna.species.body_markings[aux_zone][key]
|
||||
accessory_overlay.alpha = H.dna.species.markings_alpha
|
||||
accessory_overlay.color = H.dna.species.body_markings[aux_zone][key][1]
|
||||
. += accessory_overlay
|
||||
|
||||
if(blocks_emissive)
|
||||
var/mutable_appearance/limb_em_block = mutable_appearance(limb.icon, limb.icon_state, plane = EMISSIVE_PLANE, appearance_flags = KEEP_APART)
|
||||
limb_em_block.dir = image_dir
|
||||
limb_em_block.color = GLOB.em_block_color
|
||||
limb.overlays += limb_em_block
|
||||
|
||||
if(aux_zone)
|
||||
var/mutable_appearance/aux_em_block = mutable_appearance(aux.icon, aux.icon_state, plane = EMISSIVE_PLANE, appearance_flags = KEEP_APART)
|
||||
aux_em_block.dir = image_dir
|
||||
aux_em_block.color = GLOB.em_block_color
|
||||
|
||||
if (emissive)
|
||||
. += emissive
|
||||
|
||||
if(!draw_external_organs)
|
||||
return
|
||||
|
||||
@@ -133,11 +133,11 @@ var/current_turf
|
||||
|
||||
switch(sprite_type.color_src)
|
||||
if(USE_MATRIXED_COLORS)
|
||||
finished_list += ReadRGB("[get_alpha_padded_color(color_list[1])]")
|
||||
finished_list += ReadRGB("[get_alpha_padded_color(color_list[2])]")
|
||||
finished_list += ReadRGB("[get_alpha_padded_color(color_list[3])]")
|
||||
finished_list += ReadRGB("[color_list[1]]00")
|
||||
finished_list += ReadRGB("[color_list[2]]00")
|
||||
finished_list += ReadRGB("[color_list[3]]00")
|
||||
if(USE_ONE_COLOR)
|
||||
var/padded_string = get_alpha_padded_color(color_list[1])
|
||||
var/padded_string = "[color_list[1]]00"
|
||||
finished_list += ReadRGB(padded_string)
|
||||
finished_list += ReadRGB(padded_string)
|
||||
finished_list += ReadRGB(padded_string)
|
||||
|
||||
@@ -287,7 +287,6 @@
|
||||
#include "code\__HELPERS\sorts\InsertSort.dm"
|
||||
#include "code\__HELPERS\sorts\MergeSort.dm"
|
||||
#include "code\__HELPERS\sorts\TimSort.dm"
|
||||
#include "code\__HELPERS\~skyrat_helpers\colors.dm"
|
||||
#include "code\__HELPERS\~skyrat_helpers\is_helpers.dm"
|
||||
#include "code\__HELPERS\~skyrat_helpers\level_traits.dm"
|
||||
#include "code\__HELPERS\~skyrat_helpers\logging.dm"
|
||||
|
||||
@@ -29,6 +29,15 @@ export const Markings = (props, context) => {
|
||||
/>
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Button fill
|
||||
color={marking.emissive ? "good" : "bad"}
|
||||
tooltip="The 'E' is for 'Emissive', meaning does it glow or not. Green for glow, red for no glow."
|
||||
onClick={() => act("change_emissive", { limb_slot: props.limb.slot, marking_id: marking.marking_id, emissive: marking.emissive })}
|
||||
>
|
||||
E
|
||||
</Button>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Button fill
|
||||
color="bad"
|
||||
|
||||
@@ -400,3 +400,26 @@ export const FeatureTriColorInput = (props: FeatureValueProps<string[]>) => {
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
export const FeatureTriBoolInput = (props: FeatureValueProps<boolean[]>) => {
|
||||
const buttonFromValue = (index) => {
|
||||
return (
|
||||
<Stack.Item align="center" fill>
|
||||
<Button.Checkbox
|
||||
checked={!!props.value[index]}
|
||||
onClick={() => {
|
||||
const currentValue = [...props.value];
|
||||
currentValue[index] = !currentValue[index];
|
||||
props.handleSetValue(currentValue);
|
||||
}}
|
||||
/>
|
||||
</Stack.Item>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<Stack align="center" fill>
|
||||
{buttonFromValue(0)}
|
||||
{buttonFromValue(1)}
|
||||
{buttonFromValue(2)}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FeatureDropdownInput, Feature, FeatureNumberInput, CheckboxInput, FeatureTriColorInput, FeatureNumeric, FeatureToggle, FeatureChoiced } from "../../base";
|
||||
import { FeatureDropdownInput, Feature, FeatureNumberInput, CheckboxInput, FeatureTriColorInput, FeatureTriBoolInput, FeatureNumeric, FeatureToggle, FeatureChoiced } from "../../base";
|
||||
|
||||
export const penis_toggle: FeatureToggle = {
|
||||
name: "Penis",
|
||||
@@ -15,6 +15,11 @@ export const penis_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const penis_emissive: Feature<boolean[]> = {
|
||||
name: "Penis Emissives",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const penis_sheath: Feature<string> = {
|
||||
name: "Penis Sheath",
|
||||
component: FeatureDropdownInput,
|
||||
@@ -50,6 +55,11 @@ export const testicles_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const testicles_emissive: Feature<boolean[]> = {
|
||||
name: "Testicles Emissives",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const balls_size: FeatureNumeric = {
|
||||
name: "Testicles Size",
|
||||
component: FeatureNumberInput,
|
||||
@@ -70,6 +80,11 @@ export const vagina_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const vagina_emissive: Feature<boolean[]> = {
|
||||
name: "Vagina Emissives",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const womb_toggle: FeatureToggle = {
|
||||
name: "Womb",
|
||||
component: CheckboxInput,
|
||||
@@ -95,6 +110,11 @@ export const breasts_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const breasts_emissive: Feature<boolean[]> = {
|
||||
name: "Breasts Emissives",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const breasts_lactation_toggle: FeatureToggle = {
|
||||
name: "Breasts Lactation",
|
||||
component: CheckboxInput,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FeatureChoiced, FeatureDropdownInput, Feature, FeatureColorInput, FeatureTextInput, FeatureShortTextInput, CheckboxInput, FeatureTriColorInput, FeatureToggle } from "../../base";
|
||||
import { FeatureChoiced, FeatureDropdownInput, Feature, FeatureColorInput, FeatureTextInput, FeatureShortTextInput, CheckboxInput, FeatureTriColorInput, FeatureTriBoolInput, FeatureToggle } from "../../base";
|
||||
|
||||
export const feature_leg_type: FeatureChoiced = {
|
||||
name: "Leg type",
|
||||
@@ -50,6 +50,18 @@ export const allow_mismatched_parts_toggle: FeatureToggle = {
|
||||
component: CheckboxInput,
|
||||
};
|
||||
|
||||
export const allow_emissives_toggle: FeatureToggle = {
|
||||
name: "Allow Emissives",
|
||||
description: "Time to become a glowstick.",
|
||||
component: CheckboxInput,
|
||||
};
|
||||
|
||||
export const eye_emissives: FeatureToggle = {
|
||||
name: "Eye Emissives",
|
||||
description: "Turn your eyes into sparklers.",
|
||||
component: CheckboxInput,
|
||||
};
|
||||
|
||||
export const mutant_colors_color: Feature<string[]> = {
|
||||
name: "Mutant Colors",
|
||||
description: "Legacy colors for controlling shit.",
|
||||
@@ -74,6 +86,12 @@ export const body_markings_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const body_markings_emissive: Feature<boolean[]> = {
|
||||
name: "Body Markings Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const tail_toggle: FeatureToggle = {
|
||||
name: "Tail",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -92,6 +110,12 @@ export const tail_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const tail_emissive: Feature<boolean[]> = {
|
||||
name: "Tail Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const snout_toggle: FeatureToggle = {
|
||||
name: "Snout",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -110,6 +134,12 @@ export const snout_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const snout_emissive: Feature<boolean[]> = {
|
||||
name: "Snout Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const horns_toggle: FeatureToggle = {
|
||||
name: "Horns",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -128,6 +158,12 @@ export const horns_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const horns_emissive: Feature<boolean[]> = {
|
||||
name: "Horns Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const ears_toggle: FeatureToggle = {
|
||||
name: "Ears",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -146,6 +182,12 @@ export const ears_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const ears_emissive: Feature<boolean[]> = {
|
||||
name: "Ears Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const wings_toggle: FeatureToggle = {
|
||||
name: "Wings",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -164,6 +206,12 @@ export const wings_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const wings_emissive: Feature<boolean[]> = {
|
||||
name: "Wings Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const frills_toggle: FeatureToggle = {
|
||||
name: "Frills",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -182,6 +230,13 @@ export const frills_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const frills_emissive: Feature<boolean[]> = {
|
||||
name: "Frills Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
|
||||
export const spines_toggle: FeatureToggle = {
|
||||
name: "Spines",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -200,6 +255,12 @@ export const spines_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const spines_emissive: Feature<boolean[]> = {
|
||||
name: "Spines Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const legs_toggle: FeatureToggle = {
|
||||
name: "Legs",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -236,6 +297,12 @@ export const caps_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const caps_emissive: Feature<boolean[]> = {
|
||||
name: "Caps Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const moth_antennae_toggle: FeatureToggle = {
|
||||
name: "Moth Antenna",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -254,6 +321,12 @@ export const moth_antennae_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const moth_antennae_emissive: Feature<boolean[]> = {
|
||||
name: "Moth Antennae Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const moth_markings_toggle: FeatureToggle = {
|
||||
name: "Moth Markings",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -272,6 +345,12 @@ export const moth_markings_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const moth_markings_emissive: Feature<boolean[]> = {
|
||||
name: "Moth Markings Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const fluff_toggle: FeatureToggle = {
|
||||
name: "Fluff",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -290,6 +369,12 @@ export const fluff_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const fluff_emissive: Feature<boolean[]> = {
|
||||
name: "Fluff Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const head_acc_toggle: FeatureToggle = {
|
||||
name: "Head Accessories",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -308,6 +393,12 @@ export const head_acc_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const head_acc_emissive: Feature<boolean[]> = {
|
||||
name: "Head Accessories Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const ipc_screen_toggle: FeatureToggle = {
|
||||
name: "IPC Screen",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -326,6 +417,12 @@ export const ipc_screen_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const ipc_screen_emissive: Feature<boolean[]> = {
|
||||
name: "IPC Screen Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const ipc_antenna_toggle: FeatureToggle = {
|
||||
name: "IPC Antenna",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -344,6 +441,12 @@ export const ipc_antenna_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const ipc_antenna_emissive: Feature<boolean[]> = {
|
||||
name: "IPC Antenna Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const ipc_chassis_toggle: FeatureToggle = {
|
||||
name: "IPC Chassis",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -380,6 +483,12 @@ export const neck_acc_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const neck_acc_emissive: Feature<boolean[]> = {
|
||||
name: "Neck Accessories Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const skrell_hair_toggle: FeatureToggle = {
|
||||
name: "Skrell Hair",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -398,6 +507,12 @@ export const skrell_hair_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const skrell_hair_emissive: Feature<boolean[]> = {
|
||||
name: "Skrell Hair Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const taur_toggle: FeatureToggle = {
|
||||
name: "Taur",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -416,6 +531,12 @@ export const taur_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const taur_emissive: Feature<boolean[]> = {
|
||||
name: "Taur Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const xenodorsal_toggle: FeatureToggle = {
|
||||
name: "Xenodorsal",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -434,6 +555,12 @@ export const xenodorsal_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const xenodorsal_emissive: Feature<boolean[]> = {
|
||||
name: "Xenodorsal Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const xenohead_toggle: FeatureToggle = {
|
||||
name: "Xeno Head",
|
||||
description: "Add some lore for your species! Won't show up if there's no custom species.",
|
||||
@@ -452,6 +579,12 @@ export const xenohead_color: Feature<string[]> = {
|
||||
component: FeatureTriColorInput,
|
||||
};
|
||||
|
||||
export const xenohead_emissive: Feature<boolean[]> = {
|
||||
name: "Xenohead Emissives",
|
||||
description: "Want to have a fancy species name? Put it here, or leave it blank.",
|
||||
component: FeatureTriBoolInput,
|
||||
};
|
||||
|
||||
export const skin_tone_toggle: FeatureToggle = {
|
||||
name: "Uses skintone",
|
||||
component: CheckboxInput,
|
||||
|
||||