Commit Graph

225 Commits

Author SHA1 Message Date
Tyler Trahan 2bada59193 Feature: Mode to display timetable in seconds 2023-12-11 07:12:45 -05:00
Peter Nelson a05d6ee404 Fix: Ensure saveload type match variable type.
This either changes the saveload definition or changes the variable depending on which makes more sense.
2023-12-09 08:13:03 +00:00
Peter Nelson 54d45a6047 Codechange: Don't keep autosave_interval in std::chrono::minutes.
This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type.

Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
2023-12-09 08:13:03 +00:00
Peter Nelson d4008850e3 Codechange: Ensure function opening `{` is on new line. 2023-11-09 20:15:38 +00:00
mrmbernardi a5c8365aa4
Feature: Setting to disallow level crossings with competitors (#10755) 2023-09-02 12:46:24 +02:00
Henry Wilson a9c65a69d0 Feature: Add config option to set default company secondary colour for new games
This does duplicate translation strings for the colours
2023-07-26 16:22:30 +02:00
MasonGulu 0be27778af
Add: alternative setting for right-click close window option to exclude pinned windows (#10204) 2023-07-19 23:24:22 +02:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Patric Stout 4f4810dc28 Fix: store autosave settings under the new names 2023-07-19 13:17:50 +02:00
Jonathan G Rennison 55c07eed59
Change: Add separate setting for server sent commands per frame limit (#11023)
Set a higher default value for this setting.
Use the higher of this and existing commands per frame limit
setting for server-originating commands, e.g. GS.

This is to support the GSAsyncMode class.
This also avoids undue throttling when more than one
script is in operation (e.g. AIs).
2023-06-27 12:32:45 +01:00
Patric Stout 7634553d22 Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.

When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU

All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
2023-05-14 23:22:02 +02:00
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Patric Stout 36a0818bc5
Remove: buying/selling/owning company shares (#10709) 2023-04-29 10:16:49 +02:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Patric Stout ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" (#10653)
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.

While at it, also ported this part over to the new timer system.
2023-04-16 20:14:22 +02:00
PeterN f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. (#10594)
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2023-04-08 12:26:13 -04:00
Tyler Trahan 2206c73156
Feature: Set a custom number of industries in map generation window (#10340) 2023-01-14 05:12:29 -05:00
stormcone e29547a3a2
Feature: Show the cargoes the vehicles can carry in the vehicle list window (#8304) 2022-11-24 20:58:10 +00:00
Peter Nelson dd90d79e7b Add: Setting to toggle thin vs chunky (scaled) bevels. 2022-11-12 18:28:39 +00:00
Artin Alavi 5d6cdf4385
Feature: Allow AI/GS to be fully modified in scenario editor (#10152) 2022-11-11 23:48:07 +01:00
Tyler Trahan f7eb0ffc37 Feature: Purchase land multiple tiles at a time 2022-10-17 20:41:47 +02:00
Tyler Trahan 3d45bc4abe Feature: Build objects by area 2022-10-16 18:28:08 +02:00
Tyler Trahan e79724ea22
Feature: Alternative linkgraph colour schemes (#9866) 2022-04-25 19:32:55 +02:00
Tyler Trahan f92cf38ab5 Feature: Allow disabling local authority control of company actions 2022-04-02 22:50:28 +02:00
Tyler Trahan 7f0efbe00e
Feature: Remember the last-used signal between games (#9792) 2022-02-02 21:26:46 +00:00
Guillaume Renoult c38af72978
Update: add setting to hide news about competitors vehicle crash (#9653) 2021-11-07 19:54:50 +01:00
Tyler Trahan 7469f00c5b
Feature: Hide block signals in GUI by default (#8688) 2021-09-05 20:22:27 +02:00
Loïc Guilloux 8d2162ba2d
Fix b6a116a: convert server_advertise to server_game_type in config file (#9515) 2021-08-28 14:41:07 +02:00
Patric Stout 4c1ea4020d
Change: remove the ability to control "max spectators" (#9466)
Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
2021-08-10 20:03:13 +02:00
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.
2021-07-20 19:57:23 +02:00
Rubidium 178ea3196b Remove: includes to network/core/config.h from headers when only three cpp files need it 2021-07-11 22:13:59 +02:00
Patric Stout b6a116a247
Add: allow setting your server visibility to "invite-only" (#9434)
In this mode you do register to the Game Coordinator, but your
server will not show up in the public server listing. You can give
your friends the invite code of the server with which they can
join.
2021-07-11 21:57:05 +02:00
Patric Stout e4d216e44b Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
2021-07-11 20:38:42 +02:00
Patric Stout 8a2da49413 Remove: old server listing via Master Server
This removes all UDP from the game except for a local broadcast
to find LAN games.

So long Master Server, and tnx for all the fish!
2021-07-10 20:17:07 +02:00
Tyler Trahan d09210e1c6 Feature: Configurable subsidy duration 2021-06-10 23:26:16 +02:00
Patric Stout e9e4588db1
Codechange: use setting name instead of index for HandleOldDiffCustom() (#9311) 2021-05-30 10:40:59 +02:00
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
rubidium42 2022e34824 Codechange: move locale settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 16437b7c0d Codechange: move client name in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 02fdb5b210 Codechange: move server name/id in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 cc6c078dec Codechange: move hostnames in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 c73d64adf9 Codechange: move passwords in settings to std::string 2021-05-13 23:13:17 +02:00
Patric Stout be37a2cab8 Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
2021-04-29 20:12:11 +02:00
Patric Stout 05612d60ae Remove: "language" field from server/client
The original idea was that people could find a server they could
talk in their native language on. This isn't really used in that
way. There are several reasons for removing this:

- the client also sends his "language" to the server, but nothing
  is doing anything with this.
- flags are a bad way to represent languages, and over the years
  we had several (rightfully) complaints about this.
- most servers have their language set to "All", and prefix the
  servername with the language it is about. This is a much more
  efficient way to do the same.

All in all, this feature should go back to the drawing board.
Maybe it could work in another form, but this form is not it.
2021-04-20 17:24:38 +02:00
Patric Stout f05e2e0d40 Feature: allow setting a custom terrain type to define highest peak
At least, TGP will try to reach it. It heavily depends on the map
if it is reachable at all. But for sure it will do its atmost to
get there!
2021-03-26 12:22:32 +01:00
Patric Stout 45c2c29c35 Add: allow setting the highest mountain for heightmaps
It will add some slack to the map height limit if that was set
to auto.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
Matt Kimber bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn (#8604) 2021-03-13 10:00:53 +01:00