Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeform map edges #2541

Closed
DorpsGek opened this issue Jan 15, 2009 · 3 comments
Closed

Freeform map edges #2541

DorpsGek opened this issue Jan 15, 2009 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Yexo opened the ticket and wrote:

This patch removes the need for the map edges to be water. It introduces a new patch setting that when enabled allows users to terraform and build at the tiles at the edges just as with other tiles. I've also added a new drop down menu in the new game window where you can which edges are generated with water (only available with TerraGenesis).

It works by making the tiles at the north borders MP_VOID tiles, just like the tiles at the south border. The patch setting can be enabled/disabled during a game, but only if the tiles at the north border are empty and at sea level. As long as the patch setting is disabled, the behavior is unchanged from current behavior.

Patch is against r15086. Thanks to SmatZ for fixing several (mostly graphical) problems.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2541
@DorpsGek
Copy link
Member Author

SmatZ wrote:

Hello, while r15080 changed the behaviour, so now it is not possible to terraform southern edges with your patch. (in fact, it can be reverted by your patch)

I get 4 warnings:
src/settings.cpp:1110: warning: unused variable ‘h’
src/settings.cpp:1118: warning: unused variable ‘h’
src/settings.cpp:1126: warning: unused variable ‘h’
src/settings.cpp:1134: warning: unused variable ‘h’

Is any part commitable on its own? So trunk works fine with that change and diff gets smaller :-)

- if (!IsValidTile(tile)) return CMD_ERROR;
+ if (tile != 0 && !IsValidTile(tile) && ((cmd != CMD_LEVEL_LAND && cmd != CMD_TERRAFORM_LAND) || tile >= MapSize())) return CMD_ERROR;
Maybe this is partly a hack, but... hard to say how other commands behave with IsTileType(tile, MP_VOID). But it would be nice to get rid of it...


This comment was imported from FlySpray: https://bugs.openttd.org/task/2541#comment5338

@DorpsGek
Copy link
Member Author

Yexo wrote:

  1. Fixed the warnigns in settings.cpp
  2. Terraforming the southern edges is possible again
  3. Fixed an assert when terraforming the south-east edge in the scenario editor.
  4. Changed command.cpp: I've introduced DC_ALL_TILES and CMD_ALL_TILES to indicate a command can be executed on MP_VOID tiles.
  5. Some minor changes in the AI api, in AIMap (to allow terraforming map edges by AIs).

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2541#comment5357

@DorpsGek
Copy link
Member Author

Yexo closed the ticket.

Reason for closing: Implemented

In 15190


This comment was imported from FlySpray: https://bugs.openttd.org/task/2541

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant