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

No error message subtitle for if house can't be replaced while building industry #8167

Open
James103 opened this issue May 24, 2020 · 2 comments
Labels
enhancement Issue would be a good enhancement; we accept Pull Requests! good first issue Good for newcomers

Comments

@James103
Copy link
Contributor

Version of OpenTTD

OpenTTD: 20200509-master
NewGRF (version numbers are as shown in "Version: ???" in newgrf info):

  • Wannaroo Tourist Set (1100)
  • Wannaroo Basic Industries (WRBI 1100)
  • Wannaroo Extra Industries (WRExInd 1000)

Expected result

  • Error message ("can't construct this industry type here") should have a subtitle saying that one or more town buildings couldn't be demolished or that a town building within the industry area is protected.

Actual result

  • Error message does not have a subtitle.

Steps to reproduce

  1. Install and activate the aforementioned NewGRFs.
  2. Make sure the houses from "Wannaroo Tourist Set" (sic) are turned on.
  3. Make sure the City Hall from "Wannaroo Extra Industries" are turned on (optional, but recommended).
  4. Start a new game.
  5. Attempt to fund a City Hall or Bank to replace one of the yellow tourist houses added by Wannaroo Tourist Set.
  6. The error message that appears does not have a subtitle.
@2TallTyler
Copy link
Member

The Wannaroo tourist houses are protected from towns removing them using two NML properties:
building_flags: bitmask(HOUSE_FLAG_PROTECTED);
protection: 1;

(Only one of these properties is actually necessary to protect a house; my town set uses 'protection' linked to switch blocks for logic.)

Protected houses cannot be demolished by a town, which generally occurs when the town wants to build a different house on the tile. However, any player can still bulldoze the house as normal.

Rather than throwing a more descriptive error, I suggest allowing player-funded industries to replace a protected house.

@James103
Copy link
Contributor Author

This is still an issue on 88a046a as described above.
Windows 10, 64-bit (via Steam, OpenGL driver).

@2TallTyler 2TallTyler added good first issue Good for newcomers enhancement Issue would be a good enhancement; we accept Pull Requests! labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue would be a good enhancement; we accept Pull Requests! good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants