frosch
50252cb5df
Codechange: Ini(Load|Save)WindowSettings expect a WindowDesc*, no void*. ( #14029 )
2025-04-18 18:44:58 +02:00
Peter Nelson
5b9d171e63
Codechange: Use EnumBitSet for StringValidationSettings. ( #13974 )
2025-04-08 21:19:17 +01:00
frosch
2cdf2bedfa
Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). ( #13962 )
2025-04-07 18:22:47 +02:00
Peter Nelson
6914d99778
Codechange: Split baseset type definitions into separate files.
2025-03-27 18:57:53 +00:00
Peter Nelson
422ff9dbd8
Codechange: Use std::unique_ptr for ai/game config.
2025-03-26 10:54:11 +00:00
Peter Nelson
8b4114d709
Fix #13849 : Settings in old saves could be overridden by defaults. ( #13874 )
...
Resolved by resetting settings to default values before the OPTS and PATS chunks are loaded.
2025-03-23 15:55:55 +00:00
Rubidium
a23dda7ffe
Codechange: use const auto & instead of making a copy
2025-03-08 21:33:17 +01:00
Rubidium
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium
1ffc950e22
Codechange: use prefix operator++ for CompanyID iterations
2025-02-16 14:02:18 +01:00
Peter Nelson
2d7d085e8e
Codechange: Use EncodedString for error messages. ( #13569 )
2025-02-16 10:04:32 +00:00
Rubidium
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson
d9bb002cac
Codechange: Use local parameters for formatting settings values. ( #13487 )
2025-02-07 20:18:03 +00:00
Peter Nelson
6f52a977a8
Codechange: Use EnumBitSet for GRFConfigFlags.
...
This is renamed from `GCF_Flag` didn't match convention.
2025-02-02 10:49:45 +00:00
Peter Nelson
c4c5028862
Codechange: Use EnumBitSet for SettingFlags. ( #13429 )
2025-02-01 15:46:51 +00:00
Peter Nelson
5664b1e2f6
Codechange: Use std::vector for GRFConfig lists. ( #10835 )
...
This replaces the C-style custom managed linked-list and allows use of iterators etc.
2025-01-31 17:09:09 +00:00
Rubidium
4099acb946
Codechange: replace BSWAP32/BSWAP16 with std::byteswap
2025-01-28 19:22:12 +01:00
Peter Nelson
9b947a37b8
Codechange: Pass GRFConfig by reference where feasible. ( #13388 )
...
In places where a GRFConfig is passed by pointer and not checked for nullptr, use a reference instead.
2025-01-26 22:41:08 +00:00
Peter Nelson
3edf19a2c5
Add: Sandbox settings to Sandbox Options window. ( #13268 )
2025-01-14 21:22:19 +00:00
glx22
7493b2d0c1
Codechange: Add callback to IntSettingDesc to support dynamic min/max
2025-01-05 23:31:50 +01:00
Loïc Guilloux
1364b9f641
Fix: Hide company settings from console commands ( #13269 )
2025-01-04 15:13:08 +01:00
Loïc Guilloux
a52923b3b9
Codechange: Make GetDefaultValueCallback() more similar to other setting override callbacks ( #13259 )
2025-01-04 00:17:47 +01:00
Peter Nelson
d38ecd6525
Change: Log changes to sandbox settings. ( #13267 )
...
One of the features of cheats is that there is a record of a cheat being used.
As cheats are slowly ending up in settings instead, add a flag so that changes to these sandbox settings are logged.
2025-01-03 23:12:49 +00:00
Loïc Guilloux
b3660bf24a
Fix: IntSettingDesc may have a callback for default value ( #13240 )
2025-01-03 15:05:56 +01:00
Peter Nelson
3a310f1802
Codechange: Store GRFConfig parameters in a vector. ( #13137 )
...
All GRFConfigs have space allocated for parameters, but only configured GRFConfigs need them.
Using a vector instead means that space is only used when parameters are used.
2024-12-01 15:15:21 +00:00
Rubidium
f2a8e18792
Fix 208952f: incorrect truncation in string setting validation
2024-09-02 22:16:26 +02:00
Rubidium
3094b0ce1d
Feature: admin support for password authentication without sending password
...
Using either password authenticated key exchange (PAKE) or authorized keys
2024-07-01 17:16:55 +02:00
Peter Nelson
b30fe0d7da
Feature: Ctrl-click to toggle favourites in build-pickers.
...
This allows ctrl-click on a type in a build-picker window to remember it
as a favourite. An new filter button to show only favourites makes it
simpler to use these types.
Favourite types are saved locally in favs.cfg, so are remembered between
games.
2024-05-11 02:12:41 +01:00
Rubidium
a313676189
Doc: reason for using ::SendNet over ::Post in few cases
2024-05-09 21:51:26 +02:00
Rubidium
1691b41b54
Codechange: use C++ containers for parsing the settings int lists
2024-04-20 11:57:45 +02:00
Peter Nelson
a28ab8cac2
Codechange: Replace C-style casts to size_t with static_cast. ( #12455 )
...
* Codechange: Replace C-style casts to size_t with static_cast.
This touches only simple value-type casts.
* Codechange: Replace static_cast<size_t>(-1) with SIZE_MAX
Co-authored-by: Rubidium <rubidium@openttd.org>
2024-04-19 20:34:36 +01:00
Rubidium
c544a2be0a
Fix: do not use lengthof() for non C-style arrays
2024-04-06 07:21:31 +02:00
Peter Nelson
2047c27445
Codechange: Move drop down list item definitions to separate header.
...
This reduces the scope of the definitions which are no longer needed to create the common lists.
2024-04-01 22:33:16 +01:00
Peter Nelson
8d312b305b
Codechange: Replace currency macros with functions. ( #12396 )
2024-03-29 14:49:48 +00:00
Rubidium
b7dfa3eb90
Feature: authorized key authentication for rcon
2024-03-17 20:36:25 +01:00
Rubidium
dd532cbc77
Codechange: add setting for authorized/secret/public keys
2024-03-17 19:09:22 +01:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Patric Stout
8f22066b9a
Fix #12147 : reset all saved settings to their default before loading a game ( #12210 )
2024-03-02 16:05:43 +01:00
Patric Stout
d02b1547f6
Remove: setting "no_http_content_downloads" ( #12058 )
...
As we now use HTTPS, it is very likely this will work on most systems.
For systems that do have HTTPS blocked, it will fail instantly,
and it will fallback to TCP anyway. That makes this setting no longer
very useful.
2024-02-11 14:48:12 +00:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Patric Stout
7acf78964f
Remove: "generation_seed" from config, as it was a write-only value ( #11927 )
2024-01-30 17:02:35 +00:00
frosch
17dfc1a49a
Codechange: Replace SF_GUI_NEGATIVE_IS_SPECIAL with a settings value callback.
2024-01-28 14:44:24 +01:00
frosch
9e9a8ca7f6
Codechange: Add callbacks to IntSettingDesc to support dynamic strings for title, help and values.
2024-01-28 14:44:24 +01:00
frosch
022b9e92d2
Codechange: Move settings string formatting into IntSettingDesc members.
2024-01-28 14:44:24 +01:00
Patric Stout
75f21065c9
Codechange: refactor DecodeHexText to a generic purpose ConvertHexToBytes ( #11866 )
...
DecodeHexText() does more than just decoding hex. ConvertHexToBytes()
now only does pure hex decoding. This required a bit of refactoring
for the code using DecodeHexText().
2024-01-22 19:42:47 +01:00
Rubidium
2d77cf9c80
Codechange: replace StrStartsWith/StrEndsWith with starts_with and ends_with
2024-01-17 19:48:22 +01:00
Peter Nelson
54d45a6047
Codechange: Don't keep autosave_interval in std::chrono::minutes.
...
This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type.
Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
2023-12-09 08:13:03 +00:00
Peter Nelson
1071acb483
Codechange: Redundant use of char * and c_str(). ( #11454 )
2023-11-10 00:17:36 +00:00
Rubidium
c6411168d8
Cleanup: missing spaces before continuation * in some comments
2023-11-01 22:56:11 +01:00
frosch
de3f29d7b2
Add: store base graphics parameters in openttd.cfg.
2023-10-31 01:41:50 +01:00
frosch
0b7ecf6102
Codechange: use the shortname as unique id to identify the base graphics in openttd.cfg.
2023-10-31 01:41:50 +01:00