Commit Graph

530 Commits (fa1e27994dd1284f6fefbe08c47a5c4145ccf00d)

Author SHA1 Message Date
Patric Stout fa1e27994d Feature: allow the use of TURN to connect client and server together
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.

It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
3 years ago
Rubidium 281a65b3e1 Cleanup: simplify some boolean expressions 3 years ago
Tyler Trahan d09210e1c6 Feature: Configurable subsidy duration 3 years ago
Patric Stout feb2ddbefa
Codechange: rename SettingGuiFlag to SettingFlag (#9332)
It is a lovely organicly grown enum, where it started off with
GUI-only flags, and after that a few flags got added that can be
considered GUI-only (the GUI disables/enables based on them), to
only have flags added that has nothing to do with the GUI.

So be less confusing, and rename them to what they do.

Additionally, I took this opportunity to rename 0ISDISABLED to
reflect what it really does.
3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 3 years ago
rubidium42 8372c679e3 Codechange: add helper functions to read an int setting value 3 years ago
rubidium42 86c9ef8134 Codechange: remove SettingDescType in lieu of the actual classes 3 years ago
rubidium42 0d6597a9e6 Codechange: move bits of SettingDesc down to the appropriate sub classes
And by doing so remove the hack where ints were put into pointers so "def" could either be an int or a string
3 years ago
rubidium42 f58611298e Codechange: use IntSettingDesc in the settings GUI 3 years ago
rubidium42 cf6b91f30f Codechange: do not use SettingDescBase directly when not needed 3 years ago
rubidium42 425d50372f Codechange: let SettingDesc extend SettingDescBase 3 years ago
rubidium42 8ffb4122df Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company 3 years ago
rubidium42 65cbde4b30 Codechange: move currency settings to std::string 3 years ago
Peter Nelson 8321ef0061 Codechange: Set specific widgets dirty instead of window. 3 years ago
rubidium42 6bca9e090d Codechange: add SetDParamStr that accepts std::string& 3 years ago
Peter Nelson d32df00b5c Codechange: No longer necessary to manually resize volume sliders. 3 years ago
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 3 years ago
rubidium42 b54d8a49fb Feature: allow non-ASCII currency separators 3 years ago
frosch 37222c3fa2 Change: treat languages as finished, if translations are 75% completed.
Unfinished translations are not auto-picked from the locale.
In release builds, unfinished translations are not offered in the GUI.
Unfinished translations are available in non-release builds, or by editing openttd.cfg.
3 years ago
frosch a9740cef82 Add: show completion progress of languages in the language dropdown for non-release builds. 3 years ago
Patric Stout d50b934bb4 Change: reworked how the Game Option display options are drawn
"Hardware acceleration" was not aligned with its checkbox. So instead
of drawing the labels left and the options right, now draw settings
one by one with a spacer between label and option to get the right
spacing.

Also, use SetPIP instead of repeating a SetPadding for all but
last element.
3 years ago
Patric Stout f0f2073006 Feature: allow a toggle to enable/disable vsync
Vsync should be off by default, as for most players it will be
better to play without vsync. Exception exist, mainly people who
play in fullscreen mode.
3 years ago
Niels Martin Hansen 785e42a6f9 Feature: Volume sliders in Game Options window 3 years ago
Niels Martin Hansen 88c92f7b7c Codechange: Move volume control slider logic to separate functions 3 years ago
Didac Perez Parera ca783d447a
Feature: Button to reset game settings to their default values (#8958) 3 years ago
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.

Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.

Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
3 years ago
Patric Stout 70bc55cfd6 Feature: setting to indicate desert coverage for tropic climate
This is an indication value; the game tries to get as close as it
can, but due to the complex tropic rules, that is unlikely to be
exact.

In the end, it picks a height-level to base the desert/tropic
line on. This is strictly seen not needed, as we can convert any
tile to either. But it is the simplest way to get started with
this without redoing all related functions.
3 years ago
Patric Stout cafe4eed6e Feature: setting to indicate snow coverage for arctic climate (replaces snow line height)
Setting the snow coverage (in % of the map) makes a lot more sense
to the human, while still allowing the niche player to set (by
finding the correct %) a snow line height they like. This makes for
easier defaults, as it decoupled terrain height from amount of snow.

Maps can never be 100% snow, as we do not have sprites for coastal
tiles.

Internally, this calculates the best snow line height to approach
this coverage as close as possible.
3 years ago
Matt Kimber bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn (#8604) 3 years ago
sean 160a5f2fdd
Codechange: Misleading function name for selecting refresh rate (#8836)
Co-authored-by: pnda <43609023+ThePNDA@users.noreply.github.com>
3 years ago
Patric Stout b21ba566ae
Codechange: remove special strings for language and resolutions (#8824)
As OpenTTD grew, we found other ways to do this, and we are no
longer in need for a hack like this.
3 years ago
sean 0464a50ab8
Add: Display refresh rate game option (#8813) 3 years ago
Patric Stout b93d7dd3cb
Add: Option to (dis-)allow accelerated video drivers. (#8819)
The video drivers using the OpenGL backend are currently our only
accelerated drivers. The options defaults to off for macOS builds and
to on everywhere else.

Co-authored-by: Michael Lutz <michi@icosahedron.de>
3 years ago
Patric Stout c3dc27e37e Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
3 years ago
Michael Lutz 46e13313e4 Fix #8731: Always use a 32bpp blitter if font anti-aliasing is enabled. 3 years ago
frosch 5a1fa18509 Change: move the 'road drive side' selection to settings tree, and give it the same 'basic' visibilty as 'signal side'. 3 years ago
frosch c71d0f5e7f Change: move townname generator selection to mapgen GUI. 3 years ago
frosch f513a807db Codechange: move non-GUI code to non-GUI source files. 3 years ago
frosch 4ce941bbc2 Codechange: turn a constant variable into a real constant. 3 years ago
Michael Lutz 33099355b8 Codechange: Re-init GUI zoom only when really changed. 3 years ago
Michael Lutz 22f5aeab07 Feature: Automatic UI and font zoom levels when supported by the OS. 3 years ago
Charles Pigott 188bf0fbc9 Change: Remove disable_unsuitable_building setting
This setting is no longer useful, as you can now always build roads,
canals, etc.
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Kuhnovic a3a7928372
Feature: option to auto remove signals when in the way during rail construction (#8274) 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 3 years ago
Pavel Stupnikov b2895dfcd0
Change: extend the allowed range for max loan setting (#8386) 4 years ago
Pavel Stupnikov c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures (#8282) 4 years ago
Michael Lutz a49fdb7ebb Codechange: Store base set related texts in std::strings. 4 years ago
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 4 years ago