Peter Nelson
49dae08a3b
Codechange: Add missing override specifiers.
2023-09-25 21:27:45 +01:00
frosch
5733145c59
Cleanup: Remove unneeded parameters.
2023-09-19 22:49:59 +02:00
frosch
b5885295f0
Codechange: Use parameters, which should be used.
2023-09-19 22:49:59 +02:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Rubidium
7ef22af2bb
Codechange: introduce and use function to raise and dirty a set of widgets when they are lowered
2023-09-17 16:03:01 +02:00
Patric Stout
37e2f99c09
Change: store crash logs in JSON format ( #11232 )
2023-09-14 20:13:27 +02:00
Patric Stout
ba67f39db6
Codechange: vendor the nlohmann-json library ( #11290 )
2023-09-13 16:11:34 +02:00
Tyler Trahan
701a61c9af
Codechange: Delete date_type.h
2023-09-10 08:40:25 -04:00
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
2023-09-10 08:40:25 -04:00
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
2023-09-10 08:40:25 -04:00
PeterN
afc1ea8135
Codechange: Using alias and std::array for company expense storage. ( #11273 )
...
This simplifies passing yearly expenses to functions and use of std algorithms.
2023-09-09 13:15:53 +00:00
Patric Stout
5f9b8aaa95
Codechange: [Script] use nlohmann for Squirrel <-> JSON conversion ( #11251 )
2023-09-06 13:14:12 +02:00
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +01:00
Bouke Haarsma
7e54418022
Codechange: workaround CMake/Xcode duplicate file name issue ( #11186 )
...
Having a library with files with the same name isn't supported in CMake's Xcode project file generation: https://gitlab.kitware.com/cmake/cmake/-/issues/20501 . One of the files is renamed to work around this bug.
2023-09-02 19:46:52 +02:00
Patric Stout
ecb4bb5161
Change: for surveys capture more information about the OpenTTD version ( #11244 )
2023-08-30 12:14:32 +02:00
Patric Stout
a3d631ffed
Change: make nlohmann a mandatory library to build OpenTTD ( #11235 )
2023-08-28 19:04:36 +02:00
Patric Stout
abc060525d
Add: calendar date for Survey results
...
This means no heuristics is possible on around which date people
play the game.
2023-08-28 13:02:52 +02:00
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
2023-08-12 18:14:21 +00:00
Patric Stout
01f55eb734
Codechange: introduce week/quarter triggers for TimerGameCalendar ( #11189 )
...
This simplifies code that triggers on these periods.
2023-08-12 16:02:11 +02:00
Tyler Trahan
93069066f9
Codechange: Use auto type when sorting dates ( #11175 )
2023-08-11 08:18:32 -04: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
Rubidium
af9b9327af
Codechange: do not keep local variable for temporary string parameters
2023-07-03 18:08:03 +02:00
Rubidium
0ea3e338ab
Codechange: replace buffer+strecpy with std::string
2023-06-29 17:32:27 +02:00
Rubidium
f333372dd1
Codechange: let IConsoleCmdExec accept std::string
2023-06-29 06:06:15 +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
Rubidium
700241410b
Remove: support for not having getifaddrs
2023-06-27 12:35:07 +02:00
Jonathan G Rennison
4f6d75f97d
Fix #11016 : Defer deletion of client and server game socket handlers
...
This fixes various use after free scenarios in error handling paths
2023-06-25 12:02:32 +01:00
Jonathan G Rennison
19ae88fb63
Fix: Error logging in game and admin server HandlePacket
...
Don't invent a packet type in the log message if we can't/don't
read a packet type at all.
Fix packet type not being logged when appropriate.
2023-06-25 12:02:32 +01:00
Rubidium
836541b41c
Codechange: use SetDParam and CopyOutDParam for tooltips
2023-06-17 10:01:19 +02:00
Owen Rudge
1a3d1bca59
Remove: OS/2 port
2023-06-16 14:29:14 +01:00
Rubidium
d4c2043294
Codechange: remove a number of unneeded c_str() calls
2023-06-15 22:14:45 +02:00
Rubidium
13cdf5fffa
Codechange: use std::filesystem::path for the language file's path
2023-06-08 23:20:28 +02:00
Rubidium
a47de4b2ab
Cleanup: remove DRAW_STRING_BUFFER constant
2023-06-06 18:08:11 +02:00
Rubidium
1fa432ca92
Codechange: replace C-style string building with C++-style building
2023-06-06 18:08:11 +02:00
Rubidium
55dfca1936
Codechange: replace seprintf with C++ style formatting
2023-06-05 23:25:59 +02:00
Rubidium
c158089eff
Codechange: use C++ style methods to combine a Utf8Encoded character and a formatted string
2023-06-04 23:32:02 +02:00
Patric Stout
21adfa7567
Fix: track "memory installed" for surveys less precisely ( #10910 )
...
It turns out, for Windows and Linux having the exact memory allows
for easy tracing of an individual. That is exactly against the idea
of the survey. And honestly, we don't need this precision.
2023-06-03 19:07:56 +00:00
Rubidium
d9f8a4c380
Codechange: use std::string GetString variant
2023-05-31 19:31:09 +02:00
Rubidium
f4b0ac2bd4
Codechange: use std::string for formatting settings
2023-05-24 22:42:01 +02:00
axet
60540f7df6
Change: Allow dedicated server to use threaded saves. ( #10787 )
...
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2023-05-21 19:55:12 +02:00
Rubidium
c518293135
Codechange: replace printf with fmt::print
2023-05-21 15:12:02 +02:00
Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
2023-05-20 16:53:10 +02:00
Rubidium
acec34a0fe
Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex
2023-05-19 11:24:44 +02:00
Rubidium
d9a04ba446
Codechange: make the MD5 hash/digest/checksum variables a std::array
2023-05-19 11:24:44 +02:00
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
2023-05-18 12:18:30 +01:00
Peter Nelson
72018badff
Codechange: Swap SocketList map key/value around.
...
This map is used store socket and address together, and, other than
checking that the address does not already have a socket, the data layout
does not seem particularly important.
However, as address is the key, technically it should not be modified,
and address may self-modify itself during comparisons.
2023-05-18 12:18:30 +01:00
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
2023-05-17 10:14:41 +01:00
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
2023-05-14 23:31:03 +02: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
Patric Stout
8493719cf4
Fix: padding miscalculated for the network-relay and bootstrap-question GUI ( #10827 )
2023-05-14 15:32:45 +00:00