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

Add newheightmapgame command (addresses #2155) #7285

Closed
wants to merge 2 commits into from

Conversation

Berbe
Copy link
Contributor

@Berbe Berbe commented Feb 26, 2019

Work inspired by the latest patch from old FlySpray bug tracker: https://bugs.openttd.org/task/2155/getfile/8568/Heightmap_Console_command.patch:

  • Added newheightmapgame command accepting up to 2 parameters (file name, title or index to load - mandatory, and an optional seed)
  • The short version with no argument reload the current heightmap with a random seed
    Sadly, there is no clean way to have a 2-arguments version where the second one would be the seed, as it would conflict with the 2-arguments version where the integer represent the file ID. Even if file ID was to be discarded, there would be some complicated and dangerous checks to check if the 2nd parameter is a string or an integer that could potentially introduce vulnerabilities.

@Berbe Berbe closed this Feb 26, 2019
@Berbe Berbe reopened this Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant