mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user