Closed Danice123 closed 8 months ago
https://github.com/no00ob/LCSoundTool/blob/4e0a3f1593f21ea75cbcd5b2cfc02dcff91ce5f7/SoundTool.cs#L880-L881
If a mod was to reload a file with the same filename, this throws an ArgumentException: An item with the same key has already been added. Key: XYZ
ArgumentException: An item with the same key has already been added. Key: XYZ
Probably would be more sane to check if this clip is being reloaded and replace the type.
Hypothetical solution
if (result != null) - clipTypes.Add(result.GetName(), audioType); + clipTypes[result.GetName()] = audioType;
Hey! Thanks for letting me know and thank you very much for the fix. I'll merge it into the next update.
https://github.com/no00ob/LCSoundTool/blob/4e0a3f1593f21ea75cbcd5b2cfc02dcff91ce5f7/SoundTool.cs#L880-L881
If a mod was to reload a file with the same filename, this throws an
ArgumentException: An item with the same key has already been added. Key: XYZ
Probably would be more sane to check if this clip is being reloaded and replace the type.
Hypothetical solution