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

Change: Allow building canal by area outside editor #10173

Merged
merged 1 commit into from Nov 23, 2022

Conversation

2TallTyler
Copy link
Member

Motivation / Problem

In Scenario Editor, we can build canals by area, but in-game we are restricted to building a single-tile-wide canal in one action.

This restriction feels arbitrary and makes building things like this slower:

canal

Description

Remove the arbitrary restriction on building an area of canal tiles outside Scenario Editor.

I believe this follows a precedent set by #9709 and #10027 where we make it easier for players to build more objects or purchased tiles at once.

I can't think of an exploit that limiting canal construction could be trying to prevent, that wouldn't be an issue with other terraforming.

Limitations

It is not possible to build canals diagonally with Ctrl like rivers in Scenario Editor, because the Ctrl key is already used to modify the canal tool to flood dry tiles into sea, when in Scenario Editor on dry sea-level tiles.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@2TallTyler 2TallTyler added the size: trivial This Pull Request is trivial label Nov 14, 2022
@Arastais
Copy link
Contributor

It is not possible to build canals diagonally with Ctrl like rivers in Scenario Editor, because the Ctrl key is already used to modify the canal tool to flood dry tiles into sea, when in Scenario Editor on dry sea-level tiles.

Since building diagonally is quite important, I suggest you move the current functionality to the alt key or to a new button in the gui all together (would require making a new icon, but it can just be the river icon but wider). Adding a button to the gui would also have the benefit of being more clear to the player; you can show an error message for when you're not allowed to flood, and you can't accidentally build a canal instead of flooding because you ctrl-clicked on somewhere that wasn't sea-level, but didn't notice

@2TallTyler
Copy link
Member Author

As I understand it, Alt isn't an option because not all keyboards have such a key. A new button would work, but I'd say that's out of scope for this PR which just unlocks a Scenario Editor feature for in-game use.

Copy link
Member

@PeterN PeterN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough, though might make it slightly harder to build long single-width canals as you have to be more precise.

@2TallTyler 2TallTyler merged commit 0fc7cdb into OpenTTD:master Nov 23, 2022
@2TallTyler 2TallTyler deleted the canal_area branch November 23, 2022 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: trivial This Pull Request is trivial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants