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

Feature: add setting to disable news about competitor's accidents #9638

Closed

Conversation

@grenoult
Copy link
Contributor

@grenoult grenoult commented Oct 20, 2021

Motivation / Problem

During a game of OpenTTD with many competitors, we can receive a lot of news regarding competitors vehicles involved in accidents. This is especially true when vehicles have low reliability and are rarely replaced:

  • road vehicles breaking down on a rail crossing then being crashed by a train,
  • airplanes failing to land on an airport and crashing.

This PR addresses the issue of receiving too many news regarding competitors vehicle crash where it doesn't bring any value or meaning to the main player. As a OpenTTD player, I want to know when my vehicles are involved in a crash but I may choose to not receive notification if competitors vehicles are destroyed.

Description

A new setting has been added "Accidents of competitor's vehicles". It's "Full" by default. When turned off, no news will be generated when a competitor vehicle is involved in a crash. When it's "Summary", only the short version will be displayed at the bottom of the screen.
A crash, in the context of this PR, is when a road vehicle is hit by a train or when an airplane misses landing at an airport.

  • Full: A news item is generated when setting is Full (by default) and a competitor vehicle is crashed (in this example, a plane crash):
    image

  • Summary: Short news are generated when setting is "Summary" and a competitor vehicle (red) is crashed by a train:
    image

  • Off: no news are generated when a competitor vehicle is crashed when settings is "Off"
    image

Limitations

  • other crashes, such as UFOs and similar events are ignored as part of this PR. This has been left out because it's rare enough to cause a disruption to the player. That being said, one could argue we could update this in this PR and I could update it (probably in another PR) if requested.

Checklist for review

  • This PR adds a new translation in english.txt file. From the documentation, nothing else is required at this stage.
@frosch123
Copy link
Member

@frosch123 frosch123 commented Oct 20, 2021

For "arrival of first vehicle" and "production changes of industries" there are separate settings with "full"/"summary"/"off".
Shouldn't this apply to "accidents" as well?
I guess "disasters" (ufos etc) would be a separate setting as well then.

src/settings_type.h Outdated Show resolved Hide resolved
@grenoult
Copy link
Contributor Author

@grenoult grenoult commented Oct 21, 2021

For "arrival of first vehicle" and "production changes of industries" there are separate settings with "full"/"summary"/"off". Shouldn't this apply to "accidents" as well? I guess "disasters" (ufos etc) would be a separate setting as well then.

Good point @frosch123 , I'll update my PR, thanks.

To make this setting more consistent with the other settings, moved to a enum type (full, summary, off) and close to Accident / Disasters settings
@grenoult grenoult marked this pull request as ready for review Oct 23, 2021
@grenoult grenoult changed the title Disable competitor accident news patch Feature: add setting to disable news about competitor's accidents Oct 24, 2021
@grenoult grenoult closed this Oct 24, 2021
@grenoult
Copy link
Contributor Author

@grenoult grenoult commented Oct 24, 2021

Closing this branch. A new PR has been created with correct commit messages: #9653

@LordAro
Copy link
Member

@LordAro LordAro commented Oct 24, 2021

(For future reference, you can fix this with rebasing without having to open a new PR/make a new branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants