Patric Stout
a146bcfe93
Change: store length of SL_STRUCTLIST in the savegame
...
This wasn't consistently done, and often variables were used that
were read by an earlier blob. By moving it next to the struct
itself, the code becomes a bit more self-contained and easier to
read.
Additionally, this allows for external tooling to know how many
structs to expect, instead of having to know where to find the
length-field or a hard-coded value that can change at any moment.
3 years ago
SamuXarick
d0bcb9839a
Fix: you could join an AI company in multiplayer via the GUI ( #9369 )
3 years ago
Rubidium
d31a535c87
Cleanup: remove some unneeded c_str() calls
3 years ago
rubidium42
05005dcdfa
Codechange: [Network] Use std::string instead of char[] for the name of the file that is downloading
3 years ago
rubidium42
981cd0197a
Codechange: [Network] Use std::string for the client name in the network server
3 years ago
rubidium42
a8b3afb236
Codechange: [Network] Use string_view for network compatability check
3 years ago
rubidium42
49dcf0c772
Codechange: [Network] Simplify constructing the HTTP request with fmt
3 years ago
rubidium42
53b4786037
Codechange: [Network] Let NetworkError return its std::string instead of a C-string
3 years ago
rubidium42
667301e3ec
Codechange: [Network] Make hostname/client IP return strings instead of a C-string
3 years ago
rubidium42
a91e29b656
Codechange: [Network] Let IsInNetmask use std::string
3 years ago
rubidium42
36705f1dc0
Codechange: [Network] Simplify formatting of network addresses to string
3 years ago
rubidium42
9e32c618f9
Fix: [Network] Determining GetNetworkRevisionString could overflow and underflow its buffer
...
Tagged releases are not affected
3 years ago
Patric Stout
7b135a8269
Codechange: use SLE_STRUCT(LIST) for Linkgraph chunks
3 years ago
Patric Stout
5cd0c65787
Codechange: move Save/Load functions of same chunk next to each other
3 years ago
Patric Stout
af3aba7a88
Codechange: use SLE_STRUCT(LIST) for GameScript chunks
3 years ago
Patric Stout
aa02bf27f6
Codechange: use as much of STNN code for STNS as possible
...
There was a lot of code duplication for no real reason. Now with
SLEG_STRUCT support, we can just re-use the code, hopefully making
it easier for future-us to make changes to this, without breaking
everything for old games.
3 years ago
Patric Stout
0bdca02bdf
Codechange: use SLE_STRUCT(LIST) for Station chunks
3 years ago
Patric Stout
af43fc3d62
Codechange: use SLE_STRUCT(LIST) for Company chunks
3 years ago
Patric Stout
0bb1d2fa8e
Codechange: use SLE_STRUCT(LIST) for Town chunks
3 years ago
Patric Stout
4e4720f217
Codechange: remove the special station/vehicle code from SaveLoad
...
With the new SLEG_STRUCT it is much easier to embed a struct
in a struct, where the sub-struct has limitations on when it is
being used.
This makes both the code easier to read (less magic) and avoids
the SaveLoad needing to know all these things about Stations
and Vehicles.
3 years ago
Patric Stout
4600d289b5
Codechange: ability to store structs and list of structs in savegames
...
The commits following this will use this new functionality.
Currently, a few places do this manually. This has as drawback that
the Save() and Load() code need to be in sync, and that any change
can result in (old) savegames no longer loading. In general, it is
annoying code to maintain.
By putting everything in a description table, and use that for
both Save() and Load(), it becomes easier to see what is going on,
and hopefully less likely for people to make mistakes.
3 years ago
translators
909f3f25bd
Update: Translations from eints
...
spanish (mexican): 9 changes by absay
portuguese (brazilian): 9 changes by Vimerum
3 years ago
Peter Nelson
7385e780ac
Cleanup: nested_array should not be accessed directly.
...
Replace accesses with GetWidget() as documented.
3 years ago
rubidium42
c811d42d0c
Fix a99ac62: fmt's include of cassert breaks our assert logic
3 years ago
translators
721c3fdfb4
Update: Translations from eints
...
vietnamese: 2 changes by KhoiCanDev
german: 9 changes by Wuzzy2
finnish: 1 change by hpiirai
portuguese: 9 changes by azulcosta
3 years ago
rubidium42
fc63432a11
Codechange: improve style/writing of IConsolePrint strings
3 years ago
rubidium42
75afd25e16
Change: do not print the '-' in front of help messages and make help messages more uniform
3 years ago
rubidium42
eb6cdadc4d
Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
...
Also make some strings more consistent with the rest of the console strings.
3 years ago
rubidium42
d9c1d18f2b
Change: improve some of the console messages related to networking (make them more uniform) and convert to fmt
3 years ago
rubidium42
b280a3a0ed
Cleanup: remove IConsoleWarning/IConsoleError helpers
...
Both did not support format parameters, so in many places IConsolePrint(CC_ERROR, "message") was used with a style different from what IConsoleError would do.
3 years ago
rubidium42
efd4ba4797
Change: unify the style of console error messages and convert to fmt
...
Always start with a capital, do not add "ERROR: " in front of it.
3 years ago
rubidium42
de49727ae8
Change: not performing a command is worthy of an error, not a warning
...
If a command cannot be executed for whatever reason, it makes no sense to call it a warning. Something has been done wrong.
Also make writing of these error message consistent while changing their "type".
3 years ago
rubidium42
121b037054
Codechange: remove single use IConsoleDebug
3 years ago
rubidium42
6b757c716a
Codechange: add an IConsolePrint overload that does formatting with fmt
3 years ago
Patric Stout
1e432fbd71
Fix 81062163: for (really) old games, station bus/truck station cache was not updated ( #9366 )
3 years ago
Loïc Guilloux
f86c66cbd7
Codechange: [Actions] Improve MSYS2 setup time ( #9360 )
3 years ago
rubidium42
7d79180040
Codechange: use fmt in DebugPrint where applicable
3 years ago
rubidium42
352dbdd570
Cleanup: remove old DEBUG macro and debug function
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
rubidium42
a99ac62c1a
Codechange: use the fmt library for simpler debug formats
3 years ago
rubidium42
662d8dfc30
Add: minimal set of headers from {fmt} 7.1.3 to 3rdparty
3 years ago
rubidium42
845fded2a0
Fix #9361 , a2051ba: [Network] Off by one in CanWriteToPacket
...
Previously it did not allow writing a byte to a packet that was of size limit - 1 anymore.
3 years ago
rubidium42
bf500c39c9
Codechange: make the name of SettingDesc a std::string
3 years ago
rubidium42
e588923bff
Codechange: add std::string accepting SetDParamStr to ErrorMessageData
3 years ago
rubidium42
ca9c50607e
Codechange: use StrStartsWith/StrEndsWith when finding settings
3 years ago
rubidium42
fed3e3305f
Codechange: add function to determine whether are string starts or ends with a given other string
3 years ago
TELK
2d0abf5a76
Fix #9362 : Hover in online players window was slightly too big ( #9364 )
...
This causes graphical glitches at the bottom of the window.
3 years ago
Michael Lutz
418e0ea85f
Codechange: Use dynamic string list for contents of land info window.
3 years ago
translators
8dd846bad4
Update: Translations from eints
...
norwegian (bokmal): 10 changes by Anolitt
korean: 9 changes by telk5093
russian: 9 changes by Ln-Wolf
finnish: 10 changes by hpiirai
spanish: 8 changes by MontyMontana
french: 9 changes by glx22
3 years ago
rubidium42
71f3c35288
Fix #9353 : [Script] Garbage collecting on priority queues could crash the game
3 years ago