Hi, first I just want to say that I like your additions to the game!
But I have been a tiny bit annoyed by all the new additions to the construction menu (āPaint [horizontal/vertical] wall [red/blue/green]ā etc).
So I have been trying to figure out a way to do it simpler/cleaner.
Iām currently not very familiar with CDDAās code, but Iāve looked around and I think it should be possible (and relatively easy) to do something like the following (for now Iāll concentrate on the wall painting part) :
- In the json files, have only 2 options: āPaint horizontal wallā and āPaint vertical wallā (it might also be possible to combine them into just āPaint wallā).
- For each entry, have each paint as an optional component, so that in the menu you get that you need āRed paint OR Yellow paint OR Blue paintā etc. (The āStart vehicle constructionā entry uses this approach.) This eliminates having one entry for each color - instead the player can choose from the colors they have available.
- Now, instead of having different terrain types for each color (i.e. āt_wall_v_wā, āt_wall_v_rā etc.) you could have a post_special function which just sets the color of the wall to the chosen paint color, and voila, the wall should show up in the color youāve chosen to paint it! One might also add a flag to indicate that the wall has been painted, so that when you e(x)amine the wall it could show āwall (red)ā, but thatās not very important I guess.
I havenāt looked deeply into it, but a quick look makes me think this could be done relatively easily. But maybe youāve already considered it and decided against it?
The only problem I see is that this will probably not play well with tiles, since as far as I can tell tiles are directly related to the terrain id, and therefore currently needs a separate wall tile for each color, right? One solution could be to make tiles aware of the color attribute, and apply a color overlay to walls flagged as painted, but that might be a lot of work and maybe not a good solution? - I havenāt looked at the tiles code.
If this is a good idea I could give it a shot.