[COOL BUG READ FOR MORE INFO] Fix vaccines not working in chem masters by giving Fungal TB's vaccine (and others) a name + Add unit test for duplicate chem names + Rename fake beer + Ratio (#65241)

Reagents work based off their name. Vaccines and fungal TB's vaccine had the same name.

Renames fake beer from "Beer" to "Beer...?", because it's been used 10 times this entire year and it's obvious it doesn't matter.

Fixes some typos in some other chemical names, where typepaths were not correct.
This commit is contained in:
Mothblocks
2022-03-04 21:15:32 -06:00
committed by GitHub
parent de69e3dbbb
commit 0bab3d1cfb
8 changed files with 26 additions and 10 deletions
+1
View File
@@ -97,6 +97,7 @@
#include "reagent_id_typos.dm"
#include "reagent_mod_expose.dm"
#include "reagent_mod_procs.dm"
#include "reagent_names.dm"
#include "reagent_recipe_collisions.dm"
#include "resist.dm"
#include "say.dm"
+15
View File
@@ -0,0 +1,15 @@
/// Test that all reagent names are different in order to prevent #65231
/datum/unit_test/reagent_names
/datum/unit_test/reagent_names/Run()
var/used_names = list()
for (var/datum/reagent/reagent as anything in subtypesof(/datum/reagent))
var/name = initial(reagent.name)
if (!name)
continue
if (name in used_names)
Fail("[used_names[name]] shares a name with [reagent] ([name])")
else
used_names[name] = reagent