Skip to content

Add season-palette#9

Merged
lethosor merged 2 commits intoDFHack:masterfrom
milochristiansen:season-palette
Nov 27, 2016
Merged

Add season-palette#9
lethosor merged 2 commits intoDFHack:masterfrom
milochristiansen:season-palette

Conversation

@milochristiansen
Copy link
Copy Markdown
Contributor

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 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.
--@ enable = true

local mapingsA = {
["BLACK"] = 0,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, also mappings should have two ps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lethosor
Copy link
Copy Markdown
Member

Nice! I remember seeing this on the forums. +1 for the enable/disable support.

@PeridexisErrant
Copy link
Copy Markdown
Contributor

Please add some documentation to the script too - you can see examples in the repo, or read the docs on docs.

@lethosor
Copy link
Copy Markdown
Member

It's there already, just not in the expected format. I can take care of that.

@lethosor lethosor closed this Nov 27, 2016
@lethosor lethosor reopened this Nov 27, 2016
@lethosor lethosor merged commit 6e457c6 into DFHack:master Nov 27, 2016
lethosor added a commit that referenced this pull request Nov 27, 2016
@lethosor lethosor self-assigned this Nov 27, 2016
@lethosor lethosor added this to the 0.43.03-r1 milestone Nov 27, 2016
@milochristiansen milochristiansen deleted the season-palette branch November 29, 2016 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants