News:

Want to praise Simutrans?
Your feedback is important for us ;D.

groundobj placement tools

Started by Leartin, December 31, 2020, 12:03:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

Groundobj placement tool - as a dialog to pick a groundobj or to place a random groundobj depending on the climate.

Things to note:
Instead of just showing the number of seasons, it specifies "has snow" and seasons-1 - This is different than eg. trees, but I think it's a better way to display the number of seasons to a player. (since "snowy" isn't thought of as a season normally)
The price is currently just a number. There must be a function somewhere for displaying currency, since it changes depending on settings, but I didn't find that yet.  [EDIT: it's convert_money() from finance.h]

For some reason, flat groundobj have two phases. I don't know why - so I just accept that only those with more than two phases are fit for slopes. (the groundobj won't be placed on slopes unless the groundobj has more than 2 phases.) A better way to do this would be to check for each slope whether a corresponding graphic exists, but I don't think there are any slope-groundobj in any paksets, so it seems too much.

menuconf.tab is for pak64 and adds the new tools in the editor (shows icons of tree builder)

EDIT: Reuploaded patch, something was wrong with the other file. However, it now contains a line to use the climate filter, so it kind of requires the climate filter patch https://forum.simutrans.com/index.php/topic,20660
EDIT2: Updated patch file again to fit with changes to the other dialogs.
Code (New strings for the translator) Select

groundobj builder
Has Snow
Has slope graphics
Can be overgrown
[go]price

"[go]price" was chosen since "price" already existed for vehicles, and there might be a different term required.

prissi

Incorporated in 9538 (with small changes due to broken references of the other patch), thanks