Commit Graph

25671 Commits

Author SHA1 Message Date
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