mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Splits eye color into two vars | Heterochromia Quirk [MDB IGNORE] (#13390)
* Splits eye color into two vars | Heterochromia Quirk * yesyes * eeee Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
Zephyr
Gandalf
parent
4ed05d2d48
commit
1bc09326d0
@@ -0,0 +1,15 @@
|
||||
/datum/preference/color/heterochromatic
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_key = "heterochromatic"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
|
||||
/datum/preference/color/heterochromatic/is_accessible(datum/preferences/preferences)
|
||||
if (!..(preferences))
|
||||
return FALSE
|
||||
|
||||
return "Heterochromatic" in preferences.all_quirks
|
||||
|
||||
/datum/preference/color/heterochromatic/apply_to_human(mob/living/carbon/human/target, value)
|
||||
for(var/datum/quirk/heterochromatic/hetero_quirk in target.quirks)
|
||||
hetero_quirk.color = value
|
||||
hetero_quirk.link_to_holder()
|
||||
@@ -69,6 +69,7 @@
|
||||
return TRUE
|
||||
|
||||
preferences.all_quirks = new_quirks
|
||||
preferences.character_preview_view?.update_body()
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -87,6 +88,7 @@
|
||||
return TRUE
|
||||
|
||||
preferences.all_quirks = new_quirks
|
||||
preferences.character_preview_view?.update_body()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if (!..(preferences))
|
||||
return FALSE
|
||||
|
||||
return preferences.parent?.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM // SKYRAT EDIT - ORIGINAL: return preferences.parent.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM
|
||||
return preferences.parent && (preferences.parent.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM)
|
||||
|
||||
/datum/preference/choiced/random_name
|
||||
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
|
||||
|
||||
@@ -29,13 +29,25 @@
|
||||
relevant_species_trait = EYECOLOR
|
||||
|
||||
/datum/preference/color/eye_color/apply_to_human(mob/living/carbon/human/target, value)
|
||||
target.eye_color = value
|
||||
var/hetero = target.eye_color_heterochromatic
|
||||
target.eye_color_left = value
|
||||
if(!hetero)
|
||||
target.eye_color_right = value
|
||||
|
||||
var/obj/item/organ/eyes/eyes_organ = target.getorgan(/obj/item/organ/eyes)
|
||||
if (istype(eyes_organ))
|
||||
if (!initial(eyes_organ.eye_color))
|
||||
eyes_organ.eye_color = value
|
||||
eyes_organ.old_eye_color = value
|
||||
if (!eyes_organ || !istype(eyes_organ))
|
||||
return
|
||||
|
||||
if (!initial(eyes_organ.eye_color_left))
|
||||
eyes_organ.eye_color_left = value
|
||||
eyes_organ.old_eye_color_left = value
|
||||
|
||||
if(hetero) // Don't override the snowflakes please
|
||||
return
|
||||
|
||||
if (!initial(eyes_organ.eye_color_right))
|
||||
eyes_organ.eye_color_right = value
|
||||
eyes_organ.old_eye_color_right = value
|
||||
|
||||
/datum/preference/color/eye_color/create_default_value()
|
||||
return random_eye_color()
|
||||
|
||||
Reference in New Issue
Block a user