You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading items, the item IDs should be validated to not cause interference with other mods or the base game. The simplest solution that does take performance into account would be to populate a HashSet with existing item IDs and throwing an exception when attempting to add an item with an ID that's already registered.
The text was updated successfully, but these errors were encountered:
Aren't string ids sufficient here? We already have a decent equals and GetHashCode implementation by default. Dictionary is already using hashes under the hood and associating it with entries.
Edit: This is based off of the assumption that we already populate a Winch AllItems Dictionary
Don't think we've got a local AllItems dictionary, so would need to implement that but wouldn't be difficult.
Would probably be then a case of having an explicit 'Replace' directory which tries to replace loaded assets for replacing base items.
EDIT: Though a specific replace directory would then be a number of duplicate directories, so might be better to consider adding a 'doReplace' attribute or equivalent within items to indicate replacing originals.
When loading items, the item IDs should be validated to not cause interference with other mods or the base game. The simplest solution that does take performance into account would be to populate a HashSet with existing item IDs and throwing an exception when attempting to add an item with an ID that's already registered.
The text was updated successfully, but these errors were encountered: