From cf730f7def6b0bcaf4e84857c7211e3d6ec1a708 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sat, 28 Jun 2025 10:50:44 -0700 Subject: [PATCH] [MIRROR] Handle duped reagent names more strictly (#11118) Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- .../human/species/station/station_special_abilities_ch.dm | 1 + code/unit_tests/reagent_tests.dm | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_ch.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_ch.dm index 1860414663..a6bc02a037 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_ch.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_ch.dm @@ -70,6 +70,7 @@ mob/living/carbon/proc/charmed() //TODO metabolism = REM * 0.8 color = "#8A0829" scannable = 0 + wiki_flag = WIKI_SPOILER /datum/reagent/succubi_aphrodisiac/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(prob(3)) diff --git a/code/unit_tests/reagent_tests.dm b/code/unit_tests/reagent_tests.dm index f5b147da7c..cebd399d37 100644 --- a/code/unit_tests/reagent_tests.dm +++ b/code/unit_tests/reagent_tests.dm @@ -28,9 +28,11 @@ log_unit_test("[Rpath]: Reagents - Reagent ID must be all lowercase.") failed = TRUE - if(collection_name[R.name] && !(R.wiki_flag & WIKI_SPOILER)) // If wiki hidden it's probably intentional! - log_unit_test("[Rpath]: Reagents - WARNING - reagent name \"[R.name]\" is not unique, used first in [collection_name[R.name]]. Is this intentional?") - collection_name[R.name] = R.type + if(!(R.wiki_flag & WIKI_SPOILER)) // If wiki hidden then don't conflict test it against name, used for intentionally copied names like beer2's + if(collection_name[R.name]) + log_unit_test("[Rpath]: Reagents - reagent name \"[R.name]\" is not unique, used first in [collection_name[R.name]].") + failed = TRUE + collection_name[R.name] = R.type if(collection_id[R.id]) log_unit_test("[Rpath]: Reagents - reagent ID \"[R.id]\" is not unique, used first in [collection_id[R.id]].")