Open EstevanTH opened 4 years ago
This is a side effect of the string caching keyvalues do, which is case-insensitive. Changing the cache to be case sensitive would increase game instability since that cache is limited to 4MB.
I could change the Lua bindings to use the built-in growing cache, but it should cause a performance drop for those 2 functions and I cannot say how it will affect the rest of the engine.
Thanks!
In my case, I could easily deal with this behavior, but I suppose it is worth a note on the wiki. I think I should add this note.
Details
Hi.
The functions
util.KeyValuesToTable()
andutil.KeyValuesToTablePreserveOrder()
rename the key"maxdxlevel"
into"MaxDxLevel"
despite thepreserveKeyCase
argument beingtrue
.The function
util.TableToKeyValues()
does not have this problem.Steps to reproduce
Run this example script and see the magic:
The output is:
Greetings
Thanks!
Momo ❤️