Sooo, i decided today (actually yesterday, past midnight here already
) to get into coding for OTTD, and made this patch.
It changes the behavior of the raise land and lower land tools to be drag- and dropable. I thought this would be nice to have because i always neglected them and used the level land tool instead.
You can still use them to raise or lower a single dot (only that now it's done on mouse_release not mouse_click) - and new: you can drag an area, and the whole area will be leveled to the level of starttile +1 or -1
when you raise or lower, respectively.
Note that it does not
raise/lower each dot exactly by one. I thought about which of the two behaviors i want to make, and took the more level-ish one, because:
1) I think it's more intuitive / useful
2) It was easier to code
Codewise, i decided to give CmdLevelLand a second parameter (it was unused before) that specifies the difference of height to level. e.g. if called with 0, it just levels (old behavior, used by level). if called with -1, it levels to start_tile's height -1 (used by lower). if called with +1 ut levels to start_tile's height +1 (used by raise).
theoretically, you could call it with +5 and it'll still work, leveling all to 5 higher than the start tile. but that is never used.
sooo what do you think? all kinds of reviews welcome
File comment: Lowering a square of 7x2 edges.
AreaTerraform1.png [ 205.69 KiB | Viewed 4540 times ]
File comment: Raising a sqare of 2x8 edges, some are raised more than 1 level, to get the same height overall.
AreaTerraform2.png [ 204.83 KiB | Viewed 4540 times ]
boekabart, dihedral and frosch for your kind help
all who tested this and gave me feedback
edit: Known Bug.
edit: new version.