I have merged this patch into my branch
; details here
. I decided to only add the ability to build houses from the scenario editor, and not from a game script, for the time being, and to lift some building restrictions, such as town zones. I also had to rewrite some parts of the code due to divergences between openttd revision 26400 (against which your latest patch was created) and current trunk, and then between openttd trunk and my branch. Still, most of the work is yours, and I wanted to commend you for such a nicely written patch.
There are some issues I found during review, in case you want to fix them in a future version of your patch:
- In patch 230, file src/terraform_gui.cpp, hunk 5
@@ -711,6 +726,8 @@I think that there is a typo and "WC_SELECT_STATION" should be "WC_SELECT_TOWN". (Note however that openttd trunk has changed the object selection window to a standalone window, so you may want to do the same for the house selection window as I did.)
+ DeleteWindowById(WC_BUILD_HOUSE, 0);
+ DeleteWindowById(WC_SELECT_STATION, 0);
static HotkeyList hotkeys;
- The town selection window is not properly invalidated when towns are created or removed; doing so in the editor while the window is open may lead to weird strings displayed or even crashes.
- Sprite offsets in the default house set are not applied correctly when drawing in the selection window; this is most noticeable with statues. Also, GUI zoom seems to be ignored; look here for how I modified DrawOldHouseTileInGUI.