BaseMod
BaseMod copied to clipboard
Request: Disable console case sensitivity
Hey would it be possible to disable case sensitivity in BaseMod's console? So all card strings could be pushed to lower case for comparison? Have not dug through the code so I don't know if that would even be possible, or if it would require a lot of extra code. Perhaps make a hash map of the cards when it loads with their lower case values?
The goal is so that the following 2 lines produce the same result:
deck add BloodForBlood deck add bloodforblood
This isn't as easy as it sounds since the in-game IDs are hardcoded in uppercamelcase. I might look into it eventually.
Is it possible to iterate through the cards that exist? If so, perhaps you could iterate through each card and create a hash map for the dev console where the key is the toLowerCase() equivalent of the ID (however that works in Java) and the value is the actual properly camel cased ID? And then, if that's possible, you could still allow regular camel casing in the console by simply checking first for the ID and then if it fails checking the hash map for a lower case key?
Caveat: I haven't even opened the code for this project once, so please feel free to ignore me. :)
Yeah that would probably work but I'm not likely to get around to this any time soon.