Draft
Conversation
Contributor
|
Autofix has formatted code style violation in this PR. I edit commits locally (e.g: git, github desktop) and want to keep autofix
I do not want the automated commit
If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT. |
Allows lua to declare color_tint_pairs and tint_configs Tiles can now be tinted Declared tint_config and color_tint_pair lua types
Better Docs Added a few more conversions
Collaborator
Author
|
Deferred for SDL3 since this didn't pick up much traction before. I'm not binning anything, no worries. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of change (The Why)
Lua could use some additional help with rendering tiles. We have hard-coded graphical effects for stuff like explosions, projectiles, etc... Why not Lua?
blocked by #8336
Describe the solution (The How)
Implements a (hopefully) robust tile rendering system with handles and 2 layers of cleanup; Time based and reality bubble based.
Describe alternatives you've considered
Really awkward stuff like spawning and de-spawning NPCs with effects or mutations on them where I want to render stuff.
Testing
Will render neat snek




Observe:
Tinted:
Additional context
It doesn't render where you don't have vision.
Effects light shadow effect the tiles.
I did my best to ensure the performance impact wouldn't be too bad even if the mod author plays a bit fast and loose.
Removes tiles that go outside of the reality bubble.
Clears them on game load. They don't get saved, so there's no point in keeping them around. It's up to the mod author to account for this.
While the duration can be set to -1 for permanent, the docs give a fair warning about performance, and the default duration is 1 turn.
Now that #8026 was merged, I can implement standardized tinting behavior.
Currently, you can:
Remove by handle
Remove at position
Clear everything
Considerations
Perhaps this needs to seperate tiles by mod_id so clear_everything doesn't break other mods stuff?
Unsure, since there are so many other ways to do this responsibly on the Lua side.