Commit Graph

52692 Commits

Author SHA1 Message Date
rubidium42
eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
2021-06-13 15:25:31 +02:00
rubidium42
d9c1d18f2b Change: improve some of the console messages related to networking (make them more uniform) and convert to fmt 2021-06-13 15:25:31 +02:00
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.
2021-06-13 15:25:31 +02:00
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.
2021-06-13 15:25:31 +02:00
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".
2021-06-13 15:25:31 +02:00
rubidium42
121b037054 Codechange: remove single use IConsoleDebug 2021-06-13 15:25:31 +02:00
rubidium42
6b757c716a Codechange: add an IConsolePrint overload that does formatting with fmt 2021-06-13 15:25:31 +02:00
Patric Stout
1e432fbd71 Fix 81062163: for (really) old games, station bus/truck station cache was not updated (#9366) 2021-06-13 13:48:40 +02:00
Loïc Guilloux
f86c66cbd7 Codechange: [Actions] Improve MSYS2 setup time (#9360) 2021-06-13 13:26:45 +02:00
Jonathan G Rennison
229f856327 Merge PR #275 into jgrpp 2021-06-13 11:50:54 +01:00
rubidium42
7d79180040 Codechange: use fmt in DebugPrint where applicable 2021-06-13 12:45:45 +02:00
rubidium42
352dbdd570 Cleanup: remove old DEBUG macro and debug function 2021-06-13 12:45:45 +02:00
rubidium42
55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
rubidium42
a99ac62c1a Codechange: use the fmt library for simpler debug formats 2021-06-13 12:45:45 +02:00
rubidium42
662d8dfc30 Add: minimal set of headers from {fmt} 7.1.3 to 3rdparty 2021-06-13 12:45:45 +02:00
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.
2021-06-13 10:31:02 +02:00
rubidium42
bf500c39c9 Codechange: make the name of SettingDesc a std::string 2021-06-13 10:26:58 +02:00
rubidium42
e588923bff Codechange: add std::string accepting SetDParamStr to ErrorMessageData 2021-06-13 10:26:58 +02:00
rubidium42
ca9c50607e Codechange: use StrStartsWith/StrEndsWith when finding settings 2021-06-13 10:26:58 +02:00
rubidium42
fed3e3305f Codechange: add function to determine whether are string starts or ends with a given other string 2021-06-13 10:26:58 +02:00
TELK
2d0abf5a76 Fix #9362: Hover in online players window was slightly too big (#9364)
This causes graphical glitches at the bottom of the window.
2021-06-13 10:06:50 +02:00
Andreas Schmitt
da4de2c959 Improve lake generation
Prior to this change, lakes could be very small and could also not be deactivated.

This change allows the deactivation of lake creation and the lake size is now the set size +- 25% instead of anything between 0 and lake_size.
2021-06-13 08:15:43 +02:00
Andreas Schmitt
99e32488f2 Add creation of wide rivers 2021-06-13 07:36:41 +02:00
Andreas Schmitt
92dad745c9 Fix a small bug 2021-06-13 06:20:51 +02:00
Andreas Schmitt
ae31da8c82 Correct maximum ratings in strings 2021-06-13 06:14:35 +02:00
Andreas Schmitt
c4c2fedbb1 Refactor station rating and tooltip - multiply vehicle age check by 10 2021-06-13 06:03:03 +02:00
Andreas Schmitt
edf0e8eddd Remove unused code an cleanup more 2021-06-13 03:08:04 +02:00
Andreas Schmitt
2801527895 Cleanup the code a bit 2021-06-13 02:54:57 +02:00
Andreas Schmitt
120149cf99 Add initial implementation from Joker's patch 2021-06-13 02:48:40 +02:00
Jonathan G Rennison
384e8cca89 Fix infra signal total when moving signalled tunnel/bridge to other company
When signal spacing setting differs
2021-06-12 23:41:32 +01:00
Jonathan G Rennison
ad0e085ec7 Fix off by one error in Packet::CanWriteToPacket 2021-06-12 22:47:29 +01:00
Michael Lutz
418e0ea85f Codechange: Use dynamic string list for contents of land info window. 2021-06-12 22:30:38 +02:00
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
2021-06-12 18:56:05 +00:00
rubidium42
71f3c35288 Fix #9353: [Script] Garbage collecting on priority queues could crash the game 2021-06-12 19:58:14 +02:00
Peter Nelson
40cec34836 Change: Skip creating a RealSpriteGroup when there is only one result.
This avoids checking RSG for empty sets every time they are evaluated.
This might alter behaviour in cases of a malformed NewGRF file.
2021-06-12 08:05:59 +01:00
Peter Nelson
f1328db063 Codechange: Deduplicate ResolveReal() for resolvers that don't use real sprite groups.
This may change behaviour when multiple loading/loaded stages are provided, as the various copies checked in different orders, however only one result is expected in these cases anyway.
2021-06-12 08:05:59 +01:00
Jonathan G Rennison
e5696e6b5a Fix owner legend colours when gui.starting_colour setting used 2021-06-12 02:26:34 +01:00
Jonathan G Rennison
99d11c482a Merge PR #271 into jgrpp 2021-06-12 00:31:47 +01:00
Jonathan G Rennison
1002c6d9d2 Fix various compiler warnings
See: #267
2021-06-11 22:54:27 +01:00
Andreas Schmitt
758d71716e Merge pull request #1 from JGRennison/jgrpp
Synchronize with forked repository
2021-06-11 23:13:01 +02:00
translators
c562b4c527 Update: Translations from eints
hindi: 67 changes by ritwikraghav14
2021-06-11 18:54:52 +00:00
Andreas Schmitt
5e3a244198 Add topography and industries screenshot types 2021-06-11 20:14:56 +02:00
Andreas Schmitt
184ade43eb Query before destroying important structures (rail stations and industries)
Prior to this change, the use of NewObjects often lead to the problem of players trying to clear those and accidentally destroying a rail station or (when using magic bulldozer) an industry. This action cannot be undone.

This change shows a query making sure the player actually wants to destroy the station or industry.

NOTE: The switch to a std::function no longer allows for the inequality check in ShowQuery in misc_gui. If this was required a different solution has to be found.
2021-06-11 18:10:46 +02:00
Loïc Guilloux
16ebf7861f Fix 4079c47: Missed a file when removing generated .sq files from the repo (#9350) 2021-06-11 16:59:19 +02:00
Loïc Guilloux
ee5f23382d Fix: [Script] doxygen_filter is very strict about DOXYGEN_API usage (#9351) 2021-06-11 16:40:04 +02:00
Jonathan G Rennison
97d5982cb5 Fix various compiler warnings
See: #267
2021-06-11 00:39:24 +01:00
Jonathan G Rennison
24783c3d26 Tracerestrict: Fix speed unit conversions in GUI 2021-06-11 00:39:24 +01:00
Patric Stout
5b50ae72f8 Fix #9348, 4d74e51: don't try to sell shares of spectators (#9349)
"new_owner" can be INVALID_OWNER, and as INVALID_OWNER ==
COMPANY_SPECTATORS, we could end up trying to sell shares of
nobody.

(cherry picked from commit ef25afd55a)
2021-06-10 23:21:42 +01:00
Patric Stout
ef25afd55a Fix #9348, 4d74e51: don't try to sell shares of spectators (#9349)
"new_owner" can be INVALID_OWNER, and as INVALID_OWNER ==
COMPANY_SPECTATORS, we could end up trying to sell shares of
nobody.
2021-06-11 00:18:20 +02:00
Loïc Guilloux
acb6348ba6 Add: [Actions] msys2/MinGW CI (#8698) 2021-06-10 23:54:52 +02:00