Closed Meldexun closed 4 months ago
I had previously populated the map before appending the number, moved it for testing, and forgot to move it back, woops.
The problem with the event result being used as it is, means if any mod changes the name it will likely have the number afterwards, nullifying the point of the mixin, but I guess I could only find RLTweaker and Xaeros using the event so it shouldn't be too big of an issue.
The NameGenerator mixin calls
rlmixins$usedNamesMap.getInt(name)
to get how often a name has been used, then appends that number to the name and then callsthis.rlmixins$usedNamesMap.put(name, count+1)
to update how often the name has been used. The problem is that it uses the "base" name without any number appended when callinggetInt
but then uses the name with the number appended when callingput
. This results in thegetName
method always returning the base name with one appended when the base name has been used one or more times.This PR fixes this issue and also fixes the result of the
GenerateWaystoneNameEvent
being ignored.