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
glx22
c27afdf3f6
Codechange: Remove FOR_ALL_CHUNK_HANDLERS
...
Co-Authored-By: Patric Stout <truebrain@openttd.org >
2021-06-06 19:35:06 +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
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
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
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
rubidium42
3bb6ce8827
Codechange: use initializer_lists for the settings tables
...
Not using vectors as those require copying from the initializer list and that
makes unique_ptrs to the actual SettingDesc objects later impossible.
2021-05-27 18:49:43 +02:00
rubidium42
425d50372f
Codechange: let SettingDesc extend SettingDescBase
2021-05-27 18:49:43 +02:00
Jonathan G Rennison
0579c8755c
Add tracerestrict action: No PBS signal back PF penalty
2021-05-25 18:50:36 +01:00
Jonathan G Rennison
6d3a1935a0
Fix "(undefined string)" message when SlError called when saving
2021-05-21 02:05:18 +01:00
Jonathan G Rennison
3ecda2b735
Fix handling of SlError when called from game thread
2021-05-20 20:20:45 +01:00
Jonathan G Rennison
a15e26f369
NewGRF: Elide unmasked vehicle callbacks where possible
...
This includes:
* CBID_VEHICLE_32DAY_CALLBACK
* CBID_VEHICLE_REFIT_COST
* CBID_VEHICLE_MODIFY_PROPERTY
This is on a per-property basis
The main benefit of this is to avoid callbacks not handled by the
vehicle's current sprite group from using the full graphics chain as
the "default" branch in the callback switch.
In the case where the graphics chain is long/expensive, a lot of work
had to be done before a callback failure result was eventually returned.
2021-05-18 19:07:44 +01:00
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
2021-05-15 10:16:48 +02:00
rubidium42
ddaedaf32a
Fix: empty undocumented branches
2021-05-15 10:16:10 +02:00
Rubidium
bb9121dbd4
Fix: comparison of narrow type to wide type in loop (potential for infinite loops)
2021-05-15 10:16:10 +02:00
PeterN
66cac92028
Fix #9202 : Invalid test for unset NewGRF override mapping. ( #9226 )
...
(cherry picked from commit 3d9436bd75 )
2021-05-14 18:33:19 +01:00
PeterN
f52da3de3a
Codechange: Don't save unused NewGRF override mappings. ( #9202 )
...
(cherry picked from commit 69e5da0b54 )
2021-05-14 18:15:17 +01:00
William Davis
879de9781b
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
...
(cherry picked from commit 881e1da51d )
2021-05-14 18:15:00 +01:00
Jonathan G Rennison
2e28bc8e6a
Tracerestrict: Add engine class conditional
2021-05-13 23:49:03 +01:00
rubidium42
0f062b3882
Codechange: clean up C-string support from settings
2021-05-13 23:13:17 +02:00
rubidium42
a032714dc4
Codechange: move script settings to std::string
2021-05-13 23:13:17 +02:00
rubidium42
95386dc2b8
Codechange: move misc settings to std::string
2021-05-13 23:13:17 +02:00
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
2021-05-13 00:13:54 +02:00
Patric Stout
b136e65cf9
Change: reworked the debug levels for network facility ( #9251 )
...
It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
2021-05-12 16:34:02 +02:00
PeterN
3d9436bd75
Fix #9202 : Invalid test for unset NewGRF override mapping. ( #9226 )
2021-05-12 09:11:14 +02:00
PeterN
69e5da0b54
Codechange: Don't save unused NewGRF override mappings. ( #9202 )
2021-05-08 11:36:39 +01:00
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
2021-05-08 11:02:30 +01:00
glx22
8333323090
Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops
...
(cherry picked from commit 2feb801e56 )
2021-05-06 21:21:41 +01:00
PeterN
43fe7463ba
Fix: Update text effect size when font zoom is changed. ( #9174 )
...
(cherry picked from commit 18651dd8b1 )
2021-05-06 20:52:00 +01:00
Loïc Guilloux
88bc7bd235
Fix: [MinGW] Set minimum OS version to Windows XP ( #9135 )
...
(cherry picked from commit 356bbbb90a )
2021-05-06 18:25:28 +01:00
Jonathan G Rennison
95ca147445
Add cheat: town local authority ratings fixed as Outstanding
2021-05-05 01:17:54 +01:00
Jonathan G Rennison
a9515456cb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/network/core/os_abstraction.h
# src/network/core/tcp_content.h
# src/network/core/udp.cpp
# src/table/currency_settings.ini
# src/table/settings.h.preamble
2021-05-03 21:59:49 +01:00
glx22
2feb801e56
Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops
2021-05-03 19:46:57 +02:00
PeterN
18651dd8b1
Fix: Update text effect size when font zoom is changed. ( #9174 )
2021-05-02 10:43:14 +01:00
Loïc Guilloux
356bbbb90a
Fix: [MinGW] Set minimum OS version to Windows XP ( #9135 )
2021-04-29 14:26:08 +02:00
Jonathan G Rennison
253772e9af
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# COMPILING.md
# src/console.cpp
# src/console_cmds.cpp
# src/console_internal.h
# src/rev.cpp.in
2021-04-25 02:14:58 +01:00
Jonathan G Rennison
ba418f9d0d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/simplified_chinese.txt
# src/network/core/tcp_content.cpp
# src/network/core/udp.cpp
# src/network/network_server.cpp
# src/saveload/linkgraph_sl.cpp
# src/table/gameopt_settings.ini
2021-04-25 01:23:52 +01:00
peter1138
a05bc04b63
Feature: Per-group wagon removal flag.
2021-04-22 22:57:00 +02:00
peter1138
27a956ba62
Codechange: Replace Group::replace_protection with Group::flags
2021-04-22 22:57:00 +02:00
Jonathan G Rennison
14636d2512
Check multi-tile ID-translated houses after house ID limit change
...
(Or when reloading NewGRFs)
If an overriding house type which newly fit in the limit changed the
tile layout, existing houses on the map could have the wrong layout
See: #243
2021-04-19 23:04:54 +01:00
Jonathan G Rennison
6a3e87114a
Add a min_version parameter to SlXvIsFeatureMissing
2021-04-19 22:51:28 +01:00
Milek7
aade177d79
Fix: Corrupted savegame could cause heap corruption by writing outside link graph edge matrix. ( #9046 )
2021-04-17 19:19:37 +01:00
Milek7
da55286c2c
Fix: Corrupted savegame could crash the game by providing invalid gamelog enums. ( #9045 )
2021-04-17 19:19:18 +01:00
Jonathan G Rennison
b514d29db1
Replace TrainCache::cached_tilt with a flags field
2021-04-15 20:56:45 +01:00
Jonathan G Rennison
cb5c6902db
Fix order dest refcount mismatch warning when loading very old savegames
2021-04-14 20:01:37 +01:00
Jonathan G Rennison
9e3ac646fa
Fix desync warning messages when loading game with non-matching train braking model
2021-04-14 19:56:38 +01:00
Jonathan G Rennison
e623560120
Fix 4c2e42fa: Wrong town caches when loading pre more-houses savegame
2021-04-14 19:49:35 +01:00
Jonathan G Rennison
7faa279250
Fix 26a123b7: Wrong variable size in VENC chunk saver
2021-04-14 19:36:10 +01:00
Jonathan G Rennison
6c62bce1ac
Bump water flooding savegame version and clear states on load
2021-04-13 00:08:05 +01:00
Jonathan G Rennison
737b538492
Bump savegame version, copy town to city multipliers for old savegames
2021-04-12 20:08:05 +01:00