Commit Graph

19077 Commits

Author SHA1 Message Date
Patric Stout f67af5cbe5 Codechange: make it more obvious SlArray supports SLE_VAR_NULL
In the end, the code was already doing the right thing, but a few
functions deep, and not really obvious. When validating what objects
can handle SLE_VAR_NULL, it is nicer to just have this obvious.
2021-06-15 16:45:04 +02:00
Patric Stout d5cda58158 Codechange: use SL_NULL if you want to store null-bytes or load to nothing
Using SL_ARR for this gives us a bit of trouble later on, where we
add a length-field to SL_ARR. This of course is not the intention
of SLE_CONDNULL. So better seperate it.
2021-06-15 16:45:04 +02:00
Patric Stout 0d2e3437e3 Change: switch SL_DEQUE and SL_REFLIST length field to a gamma
The current SaveLoad is a bit inconsistent how long a length field
is. Sometimes it is a 32bit, sometimes a gamma. Make it consistent
across the board by making them all gammas.
2021-06-15 16:45:04 +02:00
Patric Stout 75e7451151 Change: indicate in the savegame if a SL_STRUCT contains any data
This helps external tooling to understand if a SL_STRUCT should
be skipped when reading. Basically, this transforms an SL_STRUCT
into a SL_STRUCTLIST with either 0 or 1 length.
2021-06-15 16:45:04 +02:00
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.
2021-06-15 16:45:04 +02:00
SamuXarick d0bcb9839a
Fix: you could join an AI company in multiplayer via the GUI (#9369) 2021-06-15 14:00:50 +02:00
Rubidium d31a535c87 Cleanup: remove some unneeded c_str() calls 2021-06-15 06:13:00 +02:00
rubidium42 05005dcdfa Codechange: [Network] Use std::string instead of char[] for the name of the file that is downloading 2021-06-15 06:13:00 +02:00
rubidium42 981cd0197a Codechange: [Network] Use std::string for the client name in the network server 2021-06-15 06:13:00 +02:00
rubidium42 a8b3afb236 Codechange: [Network] Use string_view for network compatability check 2021-06-15 06:13:00 +02:00
rubidium42 49dcf0c772 Codechange: [Network] Simplify constructing the HTTP request with fmt 2021-06-15 06:13:00 +02:00
rubidium42 53b4786037 Codechange: [Network] Let NetworkError return its std::string instead of a C-string 2021-06-15 06:13:00 +02:00
rubidium42 667301e3ec Codechange: [Network] Make hostname/client IP return strings instead of a C-string 2021-06-15 06:13:00 +02:00
rubidium42 a91e29b656 Codechange: [Network] Let IsInNetmask use std::string 2021-06-15 06:13:00 +02:00
rubidium42 36705f1dc0 Codechange: [Network] Simplify formatting of network addresses to string 2021-06-15 06:13:00 +02:00
rubidium42 9e32c618f9 Fix: [Network] Determining GetNetworkRevisionString could overflow and underflow its buffer
Tagged releases are not affected
2021-06-14 23:05:18 +02:00
Patric Stout 7b135a8269 Codechange: use SLE_STRUCT(LIST) for Linkgraph chunks 2021-06-14 21:58:05 +02:00
Patric Stout 5cd0c65787 Codechange: move Save/Load functions of same chunk next to each other 2021-06-14 21:58:05 +02:00
Patric Stout af3aba7a88 Codechange: use SLE_STRUCT(LIST) for GameScript chunks 2021-06-14 21:58:05 +02:00
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.
2021-06-14 21:58:05 +02:00
Patric Stout 0bdca02bdf Codechange: use SLE_STRUCT(LIST) for Station chunks 2021-06-14 21:58:05 +02:00
Patric Stout af43fc3d62 Codechange: use SLE_STRUCT(LIST) for Company chunks 2021-06-14 21:58:05 +02:00
Patric Stout 0bb1d2fa8e Codechange: use SLE_STRUCT(LIST) for Town chunks 2021-06-14 21:58:05 +02:00
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.
2021-06-14 21:58:05 +02:00
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.
2021-06-14 21:58:05 +02:00
translators 909f3f25bd Update: Translations from eints
spanish (mexican): 9 changes by absay
portuguese (brazilian): 9 changes by Vimerum
2021-06-14 18:54:53 +00:00
Peter Nelson 7385e780ac Cleanup: nested_array should not be accessed directly.
Replace accesses with GetWidget() as documented.
2021-06-14 17:49:01 +01:00
rubidium42 c811d42d0c Fix a99ac62: fmt's include of cassert breaks our assert logic 2021-06-13 21:02:17 +02:00
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
2021-06-13 18:55:51 +00:00
rubidium42 fc63432a11 Codechange: improve style/writing of IConsolePrint strings 2021-06-13 15:25:31 +02:00
rubidium42 75afd25e16 Change: do not print the '-' in front of help messages and make help messages more uniform 2021-06-13 15:25:31 +02:00
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
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
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
translators c562b4c527 Update: Translations from eints
hindi: 67 changes by ritwikraghav14
2021-06-11 18:54:52 +00: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
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
Tyler Trahan d09210e1c6 Feature: Configurable subsidy duration 2021-06-10 23:26:16 +02:00
glx22 c2db408d5d Fix aa5a8fe28: [MinGW] Wrong define tested (WIN32 vs _WIN32) 2021-06-10 23:17:29 +02:00
glx22 d485b50813 Fix: [MinGW] Ignore wglGetProcAddress() cast warnings 2021-06-10 23:17:29 +02:00
glx22 744a9e4745 Codechange: [WIN32] Add a wrapper around GetProcAddress() 2021-06-10 23:17:29 +02:00
glx22 15f66329c2 Fix: [MinGW] Silence 2 cast warnings 2021-06-10 23:17:29 +02:00
glx22 00e3fddd0c Fix: [MinGW] Unused squirrel code triggering a warning 2021-06-10 23:17:29 +02:00
glx22 b7250a42e1 Fix: [MinGW32] Linking error 2021-06-10 23:17:29 +02:00
glx22 2df48a78cc Fix: [MinGW32] Can't convert lambda to stdcall 2021-06-10 23:17:29 +02:00
glx22 3ca0239985 Fix: [MinGW32] SHGFP_TYPE_CURRENT is now present in win32api 2021-06-10 23:17:29 +02:00
glx22 5d05c4919b Codechange: [WIN32] Reduce manual dynamic loading as WinXP is the minimum version 2021-06-10 23:17:29 +02:00
glx22 f4c7d5577e Codechange: [WIN32] Use VersionHelpers where appropriate 2021-06-10 23:17:29 +02:00
Patric Stout ed3946e295
Add: '-X' option to ignore global folders in the search path (#9341)
This is extreme useful for automated testing. Without this, OpenTTD
will always look in your personal-dir (like ~/.local/share/openttd
or %USER%\Documents\OpenTTD). For most users this is exactly what
we want, that there is a shared place for all their files.

However, for automated testing this is rather annoying, as your
local development files influence the automated test. As such,
'-X' counters this, and only gives the local folders. This is
especially useful in combination with '-x' and '-c'.
2021-06-10 23:13:34 +02:00
rubidium42 2924ac48c5 Fix: [Script] Ensure the saved script strings are properly validated and terminated when being read from the savegame 2021-06-10 22:03:23 +02:00
rubidium42 bb8fd00760 Cleanup: [Network] Remove C-string Recv_string and its last use 2021-06-10 21:53:19 +02:00
rubidium42 ab9b937ab7 Codechange: [Network] Use std::string to get a NewGRF's name 2021-06-10 21:53:19 +02:00
Patric Stout 849a10520c
Change: allow pause/unpause console command in single player too (#9342) 2021-06-10 20:11:50 +02:00
rubidium42 e2417193c9 Cleanup: [ContentInfo] Remove some functions that are not needed anymore 2021-06-10 20:09:44 +02:00
rubidium42 e3717ae903 Codechange: [ContentInfo] Use std::string instead of string buffers 2021-06-10 20:09:44 +02:00
rubidium42 df181bb641 Codechange: [ContentInfo] Use a vector for dependencies instead of custom allocation 2021-06-10 20:09:44 +02:00
rubidium42 9c424ab741 Codechange: [ContentInfo] Use StringList for tags instead of custom allocations 2021-06-10 20:09:44 +02:00
rubidium42 dfb89f3891 Codechange: [ContentInfo] Do not use memset/memcpy to make it possible to use vector/string 2021-06-10 20:09:44 +02:00
rubidium42 6bb3f034e4 Cleanup: [ContentInfo] Remove unused function 2021-06-10 20:09:44 +02:00
Patric Stout 37ae6b8ae3
Add: adhere the autosave_on_exit setting for Null videodriver (#9343)
This is especially useful for automated-testing, to make a save
when the game quits while using "-vnull:ticks=N".
2021-06-10 19:34:53 +02:00
Patric Stout 174952440a Codechange: rework CHTS-chunk save/load to be more like the others 2021-06-10 19:18:24 +02:00
Patric Stout 8f323855b1 Codechange: rename SL_LST to SL_REFLIST to highlight the "reference" part
You can easily mistake SlList / SL_LST to be a list of SL_VAR, but
it is a list of SL_REF. With this rename, it hopefully saves a few
people from "wtf?" moments.
2021-06-10 19:18:24 +02:00
Patric Stout aa6443d57a Codechange: refactor SlList to use SlStorageHelper 2021-06-10 19:18:24 +02:00
Patric Stout 23857af693 Codechange: refactor SlDequeueHelper to work with unsigned and be more generic
Future additions will start using it for std::list too.
2021-06-10 19:18:24 +02:00
Patric Stout a2147d437e Codechange: use wrappers to get Var[Mem|File]Type, instead of GB() 2021-06-10 19:18:24 +02:00
Patric Stout fba86f711f Codechange: move GetVariableAddress inside SlObjectMember
Also move it to static, as nobody else is using it.
2021-06-10 19:18:24 +02:00
Vít Šefl f899772ec2
Fix 2e136285: Crash when CTRL-clicking on a sign (#9345) 2021-06-10 15:49:25 +02:00
translators 37b285ad83 Update: Translations from eints
spanish (mexican): 2 changes by absay
2021-06-09 19:13:47 +00:00
translators 12de256b72 Update: Translations from eints
german: 1 change by Wuzzy2
spanish: 1 change by ilyabakhlin
2021-06-08 19:22:42 +00:00
Patric Stout f997eb6ca4
Fix: compatible NewGRFs in crash-log reported wrong md5 (#9340)
The text suggests it reports the original md5, but it does in fact
report the replaced md5. Now it reports both.
2021-06-08 20:30:44 +02:00
Patric Stout 1e564b333f
Codechange: make [Save|Load]Settings() behave more like other Save/Load code (#9335)
Prepare the full description and send it to SlObject. This does
require some code to be able to read to a SLE_VAR_NULL, like strings
etc, as there is no way to know their length beforehand.
2021-06-07 23:03:12 +02:00
Patric Stout 648ee88a02 Codechange: merge guiflags and flags in settings .ini files
It was rather confusing which one was for what, especially as some
SaveLoad flags were settings-only. Clean up this mess a bit by
having only Setting flags.
2021-06-06 21:45:01 +02:00
Patric Stout 264991dfa5 Codechange: move SLF_NO_NETWORK_SYNC into settings
It is a settings-only flag, so don't pollute SaveLoad code with it.
2021-06-06 21:45:01 +02:00
Patric Stout 414e12d26b Codechange: move SLF_NOT_IN_SAVE into settings
It is a settings-only flag, so don't pollute SaveLoad code with it.
2021-06-06 21:45:01 +02:00
Patric Stout 7572603c9d Codechange: remove the unused SLF_HEX flag 2021-06-06 21:45:01 +02:00
translators d835a42c05 Update: Translations from eints
english (us): 1 change by 2TallTyler
catalan: 5 changes by J0anJosep
2021-06-06 19:37:57 +00:00
glx22 c27afdf3f6 Codechange: Remove FOR_ALL_CHUNK_HANDLERS
Co-Authored-By: Patric Stout <truebrain@openttd.org>
2021-06-06 19:35:06 +02:00
translators 3559e55b91 Update: Translations from eints
spanish (mexican): 1 change by absay
latvian: 2 changes by osprinkis
2021-06-05 19:36:47 +00:00
translators ea23a9cdb6 Update: Translations from eints
korean: 1 change by telk5093
dutch: 1 change by Afoklala
french: 1 change by MalaGaM
2021-06-04 20:11:37 +00:00
translators d816ff0361 Update: Translations from eints
korean: 1 change by telk5093
2021-06-03 20:24:19 +00:00
Patric Stout 5e44da3010
Fix ef991b17: server was trying to free() a packet created with "new CommandPacket()" (#9334) 2021-06-03 22:07:44 +02:00
Patric Stout feb2ddbefa
Codechange: rename SettingGuiFlag to SettingFlag (#9332)
It is a lovely organicly grown enum, where it started off with
GUI-only flags, and after that a few flags got added that can be
considered GUI-only (the GUI disables/enables based on them), to
only have flags added that has nothing to do with the GUI.

So be less confusing, and rename them to what they do.

Additionally, I took this opportunity to rename 0ISDISABLED to
reflect what it really does.
2021-06-03 21:18:29 +02:00
Patric Stout 28e90769f7 Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
2021-06-03 17:30:00 +02:00
Patric Stout f8dd5dd00a Codechange: remove unused assert_msg() macro 2021-06-03 17:30:00 +02:00
translators 48ecc481ee Update: Translations from eints
swedish: 1 change by joeax910
2021-06-01 20:58:39 +00:00
Vít Šefl 30f5938eed Fix b791ffc6: use the correct name in CmdPlantTree 2021-06-01 18:26:35 +02:00
Vít Šefl c936f8b769 Fix b791ffc6: use the correct parameter in CmdSignalTrackHelper 2021-06-01 17:12:06 +02:00
Patric Stout 9fff00ba20
Codechange: C++-ify lists for SaveLoad (#9323)
Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant

As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
2021-05-31 22:26:44 +02:00
translators 956d761e3e Update: Translations from eints
japanese: 1 change by scabtert
2021-05-31 20:18:35 +00:00
Patric Stout 921ab68a48
Codechange: use AsIntSetting()->Read() wrapper if possible (#9324) 2021-05-31 10:56:06 +02:00
translators 043a544248 Update: Translations from eints
korean: 2 changes by telk5093
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by Vimerum
2021-05-30 19:56:14 +00:00
Rubidium 5ded596c80 Fix #9320, 2e136285: nullptr could not be converted to string 2021-05-30 19:59:49 +02:00
rubidium42 4613ababd3 Fix #9316, 64eddaeb: at about 250.000 inhabitants the bridge length limit check overflows 2021-05-30 15:09:18 +02:00
Patric Stout 0c96884700
Codechange: add a wrapper function to find all settings based on prefix (#9312) 2021-05-30 10:55:52 +02:00
Patric Stout e9e4588db1
Codechange: use setting name instead of index for HandleOldDiffCustom() (#9311) 2021-05-30 10:40:59 +02:00
Patric Stout bcd7a7aafe
Codechange: rename _SQ64 into POINTER_IS_64BIT (#9313) 2021-05-30 10:40:03 +02:00
rubidium42 8c273ed598 Codechange: [Network] Let admin-console use std::string(_view) 2021-05-30 10:15:22 +02:00
rubidium42 e58581f1f8 Codechange: [Network] Let admin-game script use std::string 2021-05-30 10:15:22 +02:00
rubidium42 29f2bd27c4 Codechange: [Game] Pass the length instead of '\0' terminating (and undoing that) in the middle of a C-string 2021-05-30 10:15:22 +02:00
rubidium42 8a918ce170 Codechange: [Network] Make admin name and version std::string 2021-05-30 10:15:22 +02:00
rubidium42 97c461d1e7 Fix: limit heightmap sizes to something reasonable to prevent crafted heightmaps to OOM-crash the game 2021-05-30 09:50:38 +02:00
rubidium42 e3c9ed4d15 Codechange: [Network] Use std::string to determine an unique name for clients 2021-05-30 00:01:49 +02:00
rubidium42 806f78aa04 Codechange: [Network] Use std::string to send the client name and rcon commands 2021-05-30 00:01:49 +02:00
rubidium42 fd95736bac Codechange: [Network] Use std::string for server side logic of kicking and banning clients 2021-05-30 00:01:49 +02:00
rubidium42 f0e1cd0129 Codechange: [Network] Let server rcon result use std::string 2021-05-30 00:01:49 +02:00
rubidium42 8b9f1147df Codechange: [Network] Let server changing a client name use std::string 2021-05-30 00:01:49 +02:00
Patric Stout d70fb74ac6
Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
2021-05-29 23:27:01 +02:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
rubidium42 ef991b1772 Codechange: [Network] Use std::string in CommandPacket 2021-05-29 19:02:18 +02:00
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
rubidium42 661728558e Codechange: let IsUnique.* functions accept std::string 2021-05-29 19:02:18 +02:00
rubidium42 b4aedef848 Codechange: add std::string variant of Utf8StringLength 2021-05-29 19:02:18 +02:00
Vít Šefl 0125ba82e8 Fix: Do not send vehicles towards incomplete PF nodes
YAPF could end up in a situation where it sets the best intermediate node
to a node whose construction is never finalized (i.e. it is never added to
the open list). The content of the node would be overwritten in the next
round, potentially sending the vehicle to an unwanted location.
2021-05-29 19:00:47 +02:00
Patric Stout 7713c3e3cc Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value
while in fact the whole reason for your existance is to change it.
2021-05-29 16:23:59 +02:00
Patric Stout 665e3c1f45 Fix: ScriptObject::DoCommand could modify "text" while defined "const"
This could have unwanted side-effects, as it could change the
source for ever and ever.
2021-05-29 16:23:59 +02:00
Patric Stout b0f44d7eb1 Doc: describe what each settings-file is about 2021-05-29 11:27:00 +02:00
Patric Stout e58046c947 Codechange: move all settings.ini files to table/settings 2021-05-29 11:27:00 +02:00
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
2021-05-29 11:21:38 +02:00
Patric Stout 4d74e51907
Fix #9281: acquire a company uses special bookkeeping to make you rich (#9300)
When you buy-out a company, you got your shares back. This is
based on company-value, which includes values for the vehicles etc.
In other words, you not only got the vehicles, but you also got
paid to get them back.

Additionally, you also got the loan of the company, but not the
money for the loan (as that is subtracted from the company-value).

Solve this by changing the rules of a buy-out: don't sell your
shares, get the loan AND the balance and get the infrastructure.
2021-05-29 11:21:30 +02:00
rubidium42 4c0e083128 Cleanup: set the base in the setting templates, instead of defining the base for every setting
This has the added benefit of not getting mistaken that multiple bases can be used for the same SettingTable
2021-05-29 10:32:32 +02:00
rubidium42 4144e949ed Fix: [Network] Prevent an empty server name to be set anywhere 2021-05-29 10:07:30 +02:00
rubidium42 08308d808c Codechange: use separate pre and post callbacks for int settings 2021-05-29 10:07:30 +02:00
rubidium42 e2f5d9e561 Codechange: use separate pre and post callbacks for string settings 2021-05-29 10:07:30 +02:00
rubidium42 ea9715d970 Codechange: split Write_ValidateSetting to get separate functions for making ints valid and writing ints 2021-05-29 10:07:30 +02:00
rubidium42 208952f2ba Codechange: split Write_ValidateSetting to get separate functions for making strings valid and writing strings 2021-05-29 10:07:30 +02:00
translators ce1c60699a Update: Translations from eints
norwegian (bokmal): 3 changes by Anolitt
dutch: 3 changes by Afoklala
portuguese (brazilian): 3 changes by Vimerum
2021-05-28 19:53:19 +00:00
translators 7b5c0b4236 Update: Translations from eints
chinese (traditional): 9 changes by benny30111
english (us): 3 changes by 2TallTyler
2021-05-27 19:38:25 +00:00