[Internal] Converting ParsedRule into an implementation detail
altrisi opened this issue ยท 0 comments
Since almost when I started contributing to Carpet, the mess around ParsedRule has always upset me.
I'd like to (if that's not a problem for you) to convert ParsedRule into an implementation detail, by promoting a new base interface for rules instead (obviously with the references to it used in extensions still existing but deprecated and recommending versions that return the interface), and after that cleaning up ParsedRule and maybe SettingsManager a bit, to make their generics a lot more checked and easier to touch (I haven't been able to touch anything around ParsedRule's generics because any time I did it would either make the game crash at random moments or fail to compile in some random line).
I'd also document everything that would end up in that interface, and at the same time I'd try to fix some of its inconsistencies or weird errors that can happen in specific situations when setting invalid values.
This would also allow different rule implementations for extensions, specific rule types in Carpet's manager, and would make it easier to just change things around the settings without breaking everything in existence.
Is it bad if I give it a try? (edit: I have started a prototype)
Note: My intent is NOT to remove ParsedRule
, but to overhaul it a bit.