From dd3a4cd44aa6cc77cb4dfad7c19d3e4157cad319 Mon Sep 17 00:00:00 2001 From: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Date: Sun, 12 Jun 2022 17:39:03 -0700 Subject: [PATCH] Make scientist outfit in antag icons consistent (#67746) Fixes an inconsistency where the antag icon would sometimes generate differently. --- code/modules/antagonists/brother/brother.dm | 2 +- code/modules/jobs/job_types/scientist.dm | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm index ec83e7e5bae..60e92327564 100644 --- a/code/modules/antagonists/brother/brother.dm +++ b/code/modules/antagonists/brother/brother.dm @@ -49,7 +49,7 @@ brother1_icon.Blend(icon('icons/effects/blood.dmi', "maskblood"), ICON_OVERLAY) brother1_icon.Shift(WEST, 8) - var/icon/brother2_icon = render_preview_outfit(/datum/outfit/job/scientist, brother2) + var/icon/brother2_icon = render_preview_outfit(/datum/outfit/job/scientist/consistent, brother2) brother2_icon.Blend(icon('icons/effects/blood.dmi', "uniformblood"), ICON_OVERLAY) brother2_icon.Shift(EAST, 8) diff --git a/code/modules/jobs/job_types/scientist.dm b/code/modules/jobs/job_types/scientist.dm index 99b62de0fa1..2978c9572e9 100644 --- a/code/modules/jobs/job_types/scientist.dm +++ b/code/modules/jobs/job_types/scientist.dm @@ -53,9 +53,19 @@ /datum/outfit/job/scientist/pre_equip(mob/living/carbon/human/H) ..() - if(prob(0.4)) + try_giving_horrible_tie() + +/datum/outfit/job/scientist/proc/try_giving_horrible_tie() + if (prob(0.4)) neck = /obj/item/clothing/neck/tie/horrible /datum/outfit/job/scientist/get_types_to_preload() . = ..() . += /obj/item/clothing/neck/tie/horrible + +/// A version of the scientist outfit that is guaranteed to be the same every time +/datum/outfit/job/scientist/consistent + name = "Scientist - Consistent" + +/datum/outfit/job/scientist/consistent/try_giving_horrible_tie() + return