Exiled-Team / EXILED

A high-level plugin framework for SCP: Secret Laboratory servers. It offers an event system for developers to hook in order to manipulate or change game code, or implement their own functions.
https://www.exiled.to/
Other
273 stars 180 forks source link

[BUG] No error when trying to parse duplicate keys in plugin config dictionary #1905

Closed Misaka-ZeroTwo closed 7 months ago

Misaka-ZeroTwo commented 1 year ago

When there is a Dictionary<TKey, TValue> for a plugin's config, and you put a duplicate key value in the plugin config file, EXILED will reset the plugin's config without saying anything (no WARN or ERROR messages are printed in console. A backup file is not created, it just wipes it silently.)

Exiled Version: 7.0.0-rc.5

Example:

    OneToOne:
    - original: Scp173
      new: Scp096
      chance: 100
      keep_inventory: true
    OneToOne:
    - original: Scp096
      new: Scp939
      chance: 100
      keep_inventory: true
    OneToOne:
    - original: Scp939
      new: Scp049
      chance: 100
      keep_inventory: true
    OneToOne:
    - original: Scp049
      new: Scp106
      chance: 100
      keep_inventory: true
ALEXWARELLC commented 1 year ago

Ooo, maybe something I can actually do.

Do you want an error message or what?

Misaka-ZeroTwo commented 1 year ago

Ooo, maybe something I can actually do.

Do you want an error message or what?

There should be an error when it happens, and a backup file should be created.

ALEXWARELLC commented 1 year ago

There should be an error when it happens, and a backup file should be created.

OK. I'll get started on that. Thanks.

ALEXWARELLC commented 1 year ago

2087

Is this what you wanted?

Misaka-ZeroTwo commented 1 year ago

2087

Is this what you wanted?

That will not solve the issue.

ALEXWARELLC commented 1 year ago

Where is this happening as I'm not sure where to look as everything seems to do the same thing.

ALEXWARELLC commented 7 months ago

Does this occur now?