Moderator: OpenTTD Developers
Please check this thread in OpenTTD Suggestions for discussion.
Edit: updated patch and screenshot, below.
That's already how it works. You can only change the setting via the GUI if you're the server or running single-player.dihedral wrote:now this has to become a server setting, i.e. set in the server .cfg file, and greyed out for the clients!
I don't think it's worth the complexity of having an extra setting for that. And as others pointed out in the Suggestions thread, this would block a lot of legitimate uses of the leveling tool. E.g., carving a long canyon through hills doesn't screw up the map.dihedral wrote:add an option to specify if this should only take affect when leveling to sea-level, or for leveling land in general
Sea level is always tile height 0. (If you change "sea level" when generating a new world, you're just setting a TerraGenesis parameter... not changing the internal tile height.)dihedral wrote:also make sure that it works when sea-level is not 0 but lets assume 2
and once that works, add a check on the server side, as you clearly will want both sides to wrok together!!!
being able to client side say i want to blow up 20x20 tiles and server only allows 10, it is nicer to have a gui limit in it.
so rather than critisizing... how about just taking it on from here and thinking of this as a good way to start solving the issue ?
@benc: if i am not mistaken it was only you who wanted to only check if leveling to sea level... !!!
I had to work around a clever hack in CmdLevelLand() that blocks the dynamite sound when you try to level an already-flat piece of land. Took me a few to figure it out, so I added some comments explaining what's going on. A cleaner solution might be to be to replace bool success with int32 res in the CommandCallback signature. But that's beyond the scope of this patch.
This patch also fixes a minor bug that hack introduced. If you hold shift to get a cost estimate on leveling an already-flat piece of land, an empty red error message window pops up. The bug exists in r10018 and 0.5.2.
Finally, I added a second patch option for server admins who want to limit all land leveling, not just at sea-level. Setting the limit to 1 effectively disables the leveling tool entirely. Enjoy!
- max_level_limit.png (6.02 KiB) Viewed 5221 times
- (6.41 KiB) Downloaded 466 times
Users browsing this forum: No registered users and 5 guests