Conversation
season-palette is a simple script that allows automatic switching of the color palette with the changing seasons. It also provides a Lua function that allows loading arbitrary color palettes.
season-palette.lua
Outdated
| --@ enable = true | ||
|
|
||
| local mapingsA = { | ||
| ["BLACK"] = 0, |
There was a problem hiding this comment.
Not a huge issue, but BLACK = 0 could be cleaner here (or maybe using utils.invert, although I think that starts counting at 1 instead of 0, so it would require more effort elsewhere).
There was a problem hiding this comment.
Oh, also mappings should have two ps.
There was a problem hiding this comment.
I'll fix my "mapings" :)
I use ["string"] as a convention when the key is a string and not an identifier (which is arguably the case here). Do you really think I should change it?
Also I meant to add this to modtools instead of the main list, should I cancel the request and redo it?
There was a problem hiding this comment.
Omitting the brackets results in the keys being strings (except you're essentially restricted to valid identifiers as keys, which isn't an issue here). I suppose it doesn't really matter, though.
This is fine in the main folder because it can be used directly by end-users. modtools is only for mod-oriented utilities that users shouldn't be running directly (well, except for testing purposes).
There was a problem hiding this comment.
Except this script requires between 1 and 5 specially named files in the raw directory of the currently loaded save, so it seems to me that it is more modder territory than user. I guess it's not really a big deal either way, just semantics...
Anyway, I'll fix the tabs in a second.
|
Nice! I remember seeing this on the forums. +1 for the enable/disable support. |
|
Please add some documentation to the script too - you can see examples in the repo, or read the docs on docs. |
|
It's there already, just not in the expected format. I can take care of that. |
season-palette is a simple script that allows automatic switching of the color palette with the changing seasons. It also provides a Lua function that allows loading arbitrary color palettes.