From 1ff0809a271314ca8bec4bb2b69a23d578a61a59 Mon Sep 17 00:00:00 2001 From: Guti <32563288+TheCaramelion@users.noreply.github.com> Date: Wed, 8 Oct 2025 17:22:00 +0200 Subject: [PATCH] Symptoms (#18546) Co-authored-by: Cameron Lennox --- code/modules/autowiki/page/symptom.dm | 36 +++++++++++++++++++++++++++ vorestation.dme | 1 + 2 files changed, 37 insertions(+) create mode 100644 code/modules/autowiki/page/symptom.dm diff --git a/code/modules/autowiki/page/symptom.dm b/code/modules/autowiki/page/symptom.dm new file mode 100644 index 00000000000..29aedd32103 --- /dev/null +++ b/code/modules/autowiki/page/symptom.dm @@ -0,0 +1,36 @@ +/datum/autowiki/symptom + page = "Template:Autowiki/Content/Symptoms" + +/datum/autowiki/symptom/generate() + var/output = "" + + var/list/template_list = list() + + for(var/the_symptom in subtypesof(/datum/symptom)) + var/datum/symptom/symptom = new the_symptom + + if(symptom.level < 0) // Skip base/admin symptoms + continue + + template_list["name"] = escape_value(symptom.name) + template_list["stealth"] = symptom.stealth + template_list["resistance"] = symptom.resistance + template_list["speed"] = symptom.stage_speed + template_list["transmission"] = symptom.transmission + template_list["level"] = symptom.level + template_list["effect"] = escape_value(symptom.desc) + template_list["thresholds"] = length(symptom.threshold_descs) ? generate_thresholds(symptom.threshold_descs) : "None" + + output += include_template("Autowiki/SymptomTemplate", template_list) + + return include_template("Autowiki/SymptomTableTemplate", list("content" = output)) + +/datum/autowiki/symptom/proc/generate_thresholds(var/list/thresholds) + var/compiled_thresholds = "" + + for(var/threshold in thresholds) + var/description = thresholds[threshold] + if(length(threshold)) + compiled_thresholds += "
  • [threshold]: [description]
  • " + + return compiled_thresholds diff --git a/vorestation.dme b/vorestation.dme index 7748e26f8b2..d41395539c3 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2175,6 +2175,7 @@ #include "code\modules\asset_cache\transports\webroot_transport.dm" #include "code\modules\autowiki\autowiki.dm" #include "code\modules\autowiki\page\base.dm" +#include "code\modules\autowiki\page\symptom.dm" #include "code\modules\autowiki\page\techweb.dm" #include "code\modules\awaymissions\bluespaceartillery.dm" #include "code\modules\awaymissions\corpse.dm"