From 4ab93fb50ed052b1ccb7844537c05f44b9e84e0e Mon Sep 17 00:00:00 2001 From: chuga-git <98280110+chuga-git@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:19:04 -0500 Subject: [PATCH] Fixes eye_color runtimes for Drask, Kidan, and Nian (#25856) * null check for eyes * return ternary --- code/modules/mob/living/carbon/human/species/drask.dm | 2 +- code/modules/mob/living/carbon/human/species/grey.dm | 4 +--- code/modules/mob/living/carbon/human/species/kidan.dm | 2 +- code/modules/mob/living/carbon/human/species/moth.dm | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/drask.dm b/code/modules/mob/living/carbon/human/species/drask.dm index fba0d6f97e8..a78692a0216 100644 --- a/code/modules/mob/living/carbon/human/species/drask.dm +++ b/code/modules/mob/living/carbon/human/species/drask.dm @@ -68,4 +68,4 @@ /datum/species/drask/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - return E.eye_color + return E ? E.eye_color : flesh_color diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index 498b739e631..dda1361fb0a 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -89,6 +89,4 @@ /datum/species/grey/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - if(E) - return E.eye_color - return flesh_color + return E ? E.eye_color : flesh_color diff --git a/code/modules/mob/living/carbon/human/species/kidan.dm b/code/modules/mob/living/carbon/human/species/kidan.dm index e0d95de20e5..a9840977fe8 100644 --- a/code/modules/mob/living/carbon/human/species/kidan.dm +++ b/code/modules/mob/living/carbon/human/species/kidan.dm @@ -59,4 +59,4 @@ /datum/species/kidan/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - return E.eye_color + return E ? E.eye_color : flesh_color diff --git a/code/modules/mob/living/carbon/human/species/moth.dm b/code/modules/mob/living/carbon/human/species/moth.dm index 535074cbc19..a492e31c7d5 100644 --- a/code/modules/mob/living/carbon/human/species/moth.dm +++ b/code/modules/mob/living/carbon/human/species/moth.dm @@ -105,7 +105,7 @@ /datum/species/moth/get_species_runechat_color(mob/living/carbon/human/H) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) - return E.eye_color + return E ? E.eye_color : flesh_color /datum/species/moth/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H) if(istype(I, /obj/item/melee/flyswatter) && I.force)