OpenTTD

Tasklist

FS#4701 - Hide signs of other companies

Attached to Project: OpenTTD
Opened by Leif Linse (Zuu) - Friday, 29 July 2011, 23:47 GMT
Last edited by Ingo von Borstel (planetmaker) - Monday, 01 August 2011, 18:42 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Version?
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch adds a setting to only show the signs that are owned by the local company.

The idea is that if someone don't like the usage of station names / signs of other companies (human or ai), they can simply hide the signs of the other companies and only show their own ones.


Question 1: Any better setting name than gui.show_only_own_signs?

Question 2: Perhaps add a menu option and/or to somehow to the transparency window? Or stick it in the advanced settings?


Attached: The patch itself and two screenshots that demonstrate the effect of the new setting.
This task depends upon

Closed by  Ingo von Borstel (planetmaker)
Monday, 01 August 2011, 18:42 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r22708. Thanks for the patch
Comment by Leif Linse (Zuu) - Saturday, 30 July 2011, 00:02 GMT
This patch have a coding style issue: Two instances of "if(" that should be "if (".

A new patch has been attached with this coding style fixed. In addition the new patch hides signs from the sign list window as well as in the viewport.
Comment by frosch (frosch) - Saturday, 30 July 2011, 08:07 GMT
Buoys do not have owners, so i guess they should be displayed always.
Comment by Leif Linse (Zuu) - Saturday, 30 July 2011, 08:51 GMT
Hmm, also the oil rig station need to be always visible.
Comment by Leif Linse (Zuu) - Saturday, 30 July 2011, 09:23 GMT
Changes:
- Only hide signs of stations that are owned by a company < MAX_COMPANIES.

Not changed:
- Waypoints. It is only that I by mistake had disabled showing *all* waypoint signs when I took the screenshots for the initial patch upload.


I though about if signs owned by none/town should be hidden as well, but decided that after several bankrupt companies there can often be plenty of signs that you want to hide. For stations on the other hand the signs that show are not from bankrupt companies but from neutral infrastructure.

Comment by Leif Linse (Zuu) - Saturday, 30 July 2011, 10:06 GMT
Changes:
- Use != OWNER_NONE instead of < MAX_COMPANIES.
- Added { and } for an if-statement added by the patch in signs_gui.cpp to comply with coding standard
Comment by Leif Linse (Zuu) - Monday, 01 August 2011, 13:07 GMT
Changes:
- Renamed option from "show only own signs" to "show competitor signs"
- Moved option from _settings_client.gui.* to _display_opt
- New menu item in settings menu: "Show competitor signs and names"

Attached screenshot of menu item.

Reasons:
- It seems to fit well in the settings menu
- In order to make it fit better there, it has been turned into a setting with positive wording.
Comment by Leif Linse (Zuu) - Monday, 01 August 2011, 13:12 GMT
Change:
- Make menu option more parallel with existing ones: "Show competitor signs and names" => "Competitor signs and names displayed"
Comment by Leif Linse (Zuu) - Monday, 01 August 2011, 13:27 GMT
Change:
- Coding style fix - don't use more than one statements on a one-liner case (in a switch).

Loading...