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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Button to honk a vehicle's horn #10034

Closed
wants to merge 1 commit into from

Conversation

2TallTyler
Copy link
Member

@2TallTyler 2TallTyler commented Sep 18, 2022

Motivation / Problem

Some transport games (Transport Fever 2, Mashinky) allow the player to honk the horn of a vehicle when riding along. Recently there was some (probably joking) discussion about adding this to OpenTTD, which apparently I took seriously. 馃槃

Description

honk

Adds a horn button to train and ship windows.

Limitations

  • Airplanes don't have horns, so they don't have the button
  • In the original TTD sound pack, road vehicles never honk their horns. In OpenSFX they sometimes do. I chose to not include the button for road vehicles.
  • Sprite suggestions or contributions welcome. 馃檪

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')

@glx22
Copy link
Contributor

glx22 commented Sep 18, 2022

Don't forget to update

static const uint16 OPENTTD_SPRITE_COUNT = 191;

@2TallTyler
Copy link
Member Author

Accidentally drew the sprite too big. Now it's ready for review. 馃槃

@glx22 glx22 added the preview This PR is receiving preview builds label Sep 18, 2022
@DorpsGek DorpsGek temporarily deployed to preview-pr-10034 September 18, 2022 03:18 Inactive
@frosch123
Copy link
Member

_settings_client.sound.vehicle disables vehicle sounds. A button which does nothing is weird, so either that button should somehow ignore the setting, or the setting should disable the button.

src/vehicle_gui.cpp Outdated Show resolved Hide resolved
@DorpsGek DorpsGek temporarily deployed to preview-pr-10034 September 18, 2022 13:35 Inactive
@2TallTyler
Copy link
Member Author

It now plays regardless of _settings_client.sound.vehicle. That said, if the player turns the Effects volume slider all the way down as a way to disable sound effects (instead of disabling them in Settings), they won't hear the horn.

@Kuhnovic
Copy link
Contributor

Kuhnovic commented Oct 7, 2022

Haha I love the idea. It would be even better if you could send the command over the network so that you can honk to other players during multiplayer. Maybe a bit too much work though for a gimmicky feature like this, but it would be fun!

@DorpsGek DorpsGek temporarily deployed to preview-pr-10034 October 17, 2022 22:13 Inactive
@2TallTyler
Copy link
Member Author

Rebased atop #10052, which changed media/baseset/openttd.grf.

Sending horn sounds over the network sounds like an easy way to annoy other players, so I don't think I'll add that. 馃槂

@2TallTyler
Copy link
Member Author

This is too silly a feature to justify adding a button to an already-busy UI. It would get used a few times and then just be in the way. It might be a fun hotkey-only hidden feature if anyone wants to run with it, but that person isn't me right now. 馃檪

@2TallTyler 2TallTyler closed this Oct 23, 2022
@Arastais
Copy link
Contributor

That's unfortunate. Was actually looking forward to this feature 馃槩

@2TallTyler
Copy link
Member Author

Feel free to steal my code and do what you want with it. I think a hotkey would be nice but I wouldn't use it enough to justify the time spent making a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview This PR is receiving preview builds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants