New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better ter/furn copy-from support #73211
base: master
Are you sure you want to change the base?
Conversation
What do you mean by paint meta data? My interest stems from the issue of "terrain" completely overwriting information about the actual terrain, and thus making it impossible to restore the actual terrain when the "terrain" is removed (you have to hard code some best guess). |
Basically I have a local branch that makes it so piant can be applied to any terrain with a PAINTABLE flag (and consequently removed by a chipper still) without changing the id of the terrain itself, just the visual stuff it displays. For mapgen I think I'm looking at doing it as a |
Can we also inherit colour? I see no reason to have to repeat it every time. |
Yes? |
Ok going through all our ter/furn in this PR is enormous scope creep I think I'll dial this back to just C++ and removing redundant JSON stuff and do abstract/copy-from stuff in seperate follow-up PRs |
b30b99c
to
6beff79
Compare
Summary
Infrastructure "Better ter/furn copy from support, remove legacy alias code"
Purpose of change
copy-from good
Fixes #54702
Describe the solution
Requires #73268 to save me touching No Hope mapgen for no reason
Requires #73415 because I decided it was better to make it a seperate PR
More copy-from support:
"symbol"
supports copy-fromTRANSPARENT flag inherits correctly
"flags"
support extend/delete"connect_groups"
,"connects_to"
and"rotates_to"
support copy-fromRemoves remaining redundant aliases and alias code
Removes LINE_OXOX and LINE_XOXO handling replacing it with better generic unicode character handling. Currently changes symbols to what they were already using but when I add abstracts I'll probably make most walls # instead.
Removes legacy connects_to/rotates_to flag support.
Will attempt to ensure you can overwrite
"bash"
's,"deconstruct"
's and"pry"
's"ter_set"
/"result"
without redefining the other values for stuff like doors where that's the main difference while allowing ie"bash": { }
to correctly default all the fields inherited.May add tests to check stuff like the above works.
Will likely update inheritance docsNvm I forgot how atrocious our existing inheritance docs were for a momentWas originally going to add abstract terrains/furniture to cut alot of json bloat but I'll now do that in future PRs
May remove legacy connects_to/rotates_to flag support if applying the necessary JSON changes in this PR isn't too much otherwise I'll leave it till after the follow-up PRs adding copy-from to alot of existing ter/furnWill add abstract versions of basic terrain (probably just walls/windows/doors/floors/roofs for now)Moves painted walls to their own file bc they were taking up half the fileCorrects several discrepancies between similar terrainsDescribe alternatives you've considered
Testing
Additional context
I'd still like to make paint metadata instead of needing to have individual terrains/furniture but the save/load side of things isn't easy
NTS: Check using copy-from with an id of the wrong type (ter with furn or vice versa) throws an error. (While this could theoretically be supported I don't think it would be a good idea)