mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[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>
This commit is contained in:
committed by
GitHub
parent
fcc871ae42
commit
cf730f7def
@@ -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]].")
|
||||
|
||||
Reference in New Issue
Block a user