Commit Graph

695 Commits (d3b2a576de7db072a3ba2e080abeaa5d2d6aeec6)

Author SHA1 Message Date
Patric Stout d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 4 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 4 months ago
SamuXarick 6588680ccc Revert #6923: start_date parameter is no longer in use
There was an issue with the start_date parameter for AIs. It did not let Random AIs to have their configure button clickable once the game has started, and this was due to the start_date not being pushed into the config.

But now that start_date is no longer in use since #10653, this workaround can be safely removed.
4 months ago
Peter Nelson c0ab436077
Codechange: Store Colours in Colours type. (#11625)
This reduces casts, some magic numbers, and introduces a bit of type-safety.
4 months ago
Rubidium 2d77cf9c80 Codechange: replace StrStartsWith/StrEndsWith with starts_with and ends_with 5 months ago
Rubidium 564441e822 Remove: Debug redirect over network
It does not work for dedicated servers because upon starting the process to
resolve the address to redirect to gets killed. Also with all the async going
on in the network code, the debug redirection will start very late in the
process.
5 months ago
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.
6 months ago
rubidium42 27082f9efa Codechange: pass std::string references to OpenBrowser 6 months ago
Tyler Trahan 1f41e773d6 Codechange: Use consistent name for bay road stops
As of #10494, this is how we describe original dead-end road stops.
6 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
frosch de3f29d7b2 Add: store base graphics parameters in openttd.cfg. 7 months ago
frosch 0b7ecf6102 Codechange: use the shortname as unique id to identify the base graphics in openttd.cfg. 7 months ago
frosch 97df27e41f Codechange: Store base graphics settings in a separate section in openttd.cfg. 7 months ago
Peter Nelson 062c19830b
Fix: OpenTTD can fail to exit on an error due to mutex locks in threads. (#11398) 7 months ago
Peter Nelson 9602de474d Codechange: Use iterators and/or range-for on cargo related loops. 8 months ago
Peter Nelson 49dae08a3b Codechange: Add missing override specifiers. 8 months ago
Tyler Trahan 77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 9 months ago
glx22 3d1c4a8589 Codechange: [Emscripten] Improve syncfs synchronisation on exit/abort 9 months ago
Patric Stout 502414b567
Fix: [Emscripten] config not saved on exit game (#11248)
When changing a Game Option and pressing Exit Game, the changes
were not actually stored. This because the post-mainloop code
was never executed for Emscripten.
9 months ago
Rubidium 40195e689d Change: improve wording of help (host instead of IP) and update man page 10 months ago
Rubidium a8e4d35bde Fix: crash when not passing parameter for -n 10 months ago
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 10 months ago
Henry Wilson a9c65a69d0 Feature: Add config option to set default company secondary colour for new games
This does duplicate translation strings for the colours
10 months ago
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
11 months ago
Patric Stout 4f4810dc28 Fix: store autosave settings under the new names 11 months ago
Loïc Guilloux 55e3dd9409
Cleanup 6298b96: Left-over function declaration (#11072) 11 months ago
Jonathan G Rennison ee8b03e8da
Fix: Crash when failing to load a game into a dedicated server at startup (#11021)
Using the -g switch
12 months ago
Rubidium d4c2043294 Codechange: remove a number of unneeded c_str() calls 12 months ago
Rubidium 4de9b8a988 Codechange: use fmt::format to create desync dump savegames 1 year ago
Rubidium fbd71a9d72 Codechange: replace C-style string processing with C++-style for the listing callbacks 1 year ago
Rubidium 37a3fc4df3 Codechange: replace strstr with more appropriate function 1 year ago
Rubidium 275ebf4509 Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*> 1 year ago
Rubidium c518293135 Codechange: replace printf with fmt::print 1 year ago
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 1 year ago
Rubidium acec34a0fe Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex 1 year ago
Peter Nelson 83f2ad500e Codechange: stdarg.h include not needed as cstdarg is included. 1 year ago
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.
1 year ago
Rubidium 9f2fc860ad Codechange: use std::optional<std::string> for changing the script over char * 1 year ago
Rubidium a312a6c1b2 Codechange: make md5sumToString std::string compatible 1 year ago
Peter Nelson 00bf42353a Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
1 year ago
Rubidium 1f3b7e2efd Codechange: use std::string instead of stredup for saveload error messages 1 year ago
Rubidium ee723f26ba Codechange: Make FileToSaveLoad's title std::string and simplify assignments 1 year ago
Rubidium ef3beef7e9 Codechange: use fmt::format_to instead of seprintf to write the savegame info 1 year ago
Patric Stout f5fad88723
Change: base autosaves intervals on real time (instead of game time) (#10655)
There are two fundamental issues with autosave:
- When fast-forwarding, it saves way too often
- When paused, it never saves

Both makes no sense. Autosaves are meant to prevent you from
accidentally losing your work. The emphasis on "your" work.

To solve both issues, the autosave now works on real time. You
can select every 10 / 30 / 60 / 120 minutes, which are similar to
what the setting was in game-months.

When you pause, autosaving will stop. Unless you make any change
to the game; then it will continue to make autosaves, even so
the game is paused. Unpausing / pausing resets this mechanism.
1 year ago
Charles Pigott 80bd5ad727
Codechange: Use std::strto* variants everywhere (#10720) 1 year ago
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 1 year ago
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Rubidium f5f6306af3 Codechange: use string/fmt instead of printf for ShowInfo(F) 1 year ago
PeterN d5f9e04a55
Change: Failure to load a savegame is critical. (#10682)
Marking the error message critical ensures it is queued if multiple errors occured.
1 year ago