From ee08406e4a89cce2526e4e418c2b4827d3db405b Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Thu, 9 Apr 2026 17:53:59 -0500 Subject: [PATCH] Fixes me destroying the IDC in the last commit (#95695) --- .../antagonists/revenant/revenant_blight.dm | 2 ++ code/modules/library/book.dm | 4 ++-- tgui/packages/tgui/interfaces/IDCBook.tsx | 16 +++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/code/modules/antagonists/revenant/revenant_blight.dm b/code/modules/antagonists/revenant/revenant_blight.dm index ad3e8d92175..2eb8a1d6a49 100644 --- a/code/modules/antagonists/revenant/revenant_blight.dm +++ b/code/modules/antagonists/revenant/revenant_blight.dm @@ -1,5 +1,7 @@ /datum/disease/revblight name = "Unnatural Wasting" + desc = "A strange condition which causes the victim to feel as if they were wasting away, despite being otherwise (almost) perfectly healthy." + form = "Condition" max_stages = 5 stage_prob = 5 spread_flags = DISEASE_SPREAD_NON_CONTAGIOUS diff --git a/code/modules/library/book.dm b/code/modules/library/book.dm index af8c6c7ae8e..97bd3d99d4f 100644 --- a/code/modules/library/book.dm +++ b/code/modules/library/book.dm @@ -433,7 +433,7 @@ "cured_by" = "Varies by symptom combination", "id" = /datum/disease/advance, ) - disease_info += advanced_virus_info + disease_info += list(advanced_virus_info) // validate for(var/list/disease_data as anything in disease_info) @@ -448,7 +448,7 @@ if(!disease_data["desc"]) disease_data["desc"] = "No description recorded - this is an error. Report this lack of research." stack_trace("[type] - [disease_data["id"]] lacks a description!") - if(!disease_data["cured_by"]) + if(!disease_data["cured_by"] && !ispath(disease_data["id"], /datum/symptom)) disease_data["cured_by"] = "Unknown" stack_trace("[type] - [disease_data["id"]] lacks cure information!") diff --git a/tgui/packages/tgui/interfaces/IDCBook.tsx b/tgui/packages/tgui/interfaces/IDCBook.tsx index d07b54869d8..44a17acb4f6 100644 --- a/tgui/packages/tgui/interfaces/IDCBook.tsx +++ b/tgui/packages/tgui/interfaces/IDCBook.tsx @@ -9,7 +9,7 @@ type Disease = { form: string; // used by symptoms and diseases - something like symptom, virus, bacteria, etc agent: string; // used by diseases - the agent that causes the disease, like a virus or bacteria name spread_by: string; // used by diseases - how the disease is spread, like "Airborne" or "Contact" - cured_by: string; // used by symptoms and diseases - how the disease or symptom is cured, like a medicine name or "Unknown" + cured_by: string | null; // used by symptoms and diseases - how the disease or symptom is cured, like a medicine name or "Unknown" illness: string; // used by symptoms - the common illness associated with the symptom, like "Flu" for "Fever" id: string; }; @@ -157,12 +157,14 @@ function renderDSMEntry(entry: BookEntry) { "{entry.illness}" )} - - - Common cures: - {' '} - {entry.cured_by} - + {!!entry.cured_by && ( + + + Common cures: + {' '} + {entry.cured_by} + + )} ) : ( <>