Rubidium
7981fcb297
Codechange: use std::fill_n over memset
2025-05-09 17:20:41 +02:00
frosch
61cec33be2
Codechange: Add 'const' to static variables, which are only initialised once.
2025-05-06 18:29:41 +02:00
Rubidium
f2a32c6d13
Codechange: use std::byte instead of char for calculating arbitrary byte offsets
2025-05-02 23:12:43 +02:00
Rubidium
5ca686261e
Codechange: use std::string_view for the string setting defaults
2025-05-01 23:24:43 +02:00
Rubidium
5c7b04a0c2
Codechange: use std::string_view for 'x-of-many' settings
2025-05-01 23:24:43 +02:00
frosch
316279f4b4
Codechange: Use more std::string_view.
2025-04-30 19:33:56 +02:00
frosch
36ce1f890a
Codechange: Remove c_str, if std::string_view is already accepted.
2025-04-30 19:33:56 +02:00
frosch
afe3dfb3a4
Codechange: Use format instead of to_string.
2025-04-29 20:26:23 +02:00
frosch
98481ecc01
Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger.
2025-04-29 20:14:56 +02:00
frosch
79b2202f2e
Codechange: Use StringConsumer for parsing more strings.
2025-04-29 20:14:56 +02:00
Rubidium
af25eecc15
Codechange: use const for std::string_view where appropriate
2025-04-29 10:15:18 +02:00
Rubidium
d1a7d30572
Codechange: use std::string_view for some settings functions
2025-04-26 16:30:16 +02:00
Rubidium
917ef03e97
Codechange: use std::string_view in IConsole settings API
2025-04-22 19:52:37 +02:00
Rubidium
b279bc37e7
Codechange: use std::string_view to set string settings
2025-04-22 19:52:37 +02:00
Rubidium
fdb8defa64
Codechange: use std::string_view to parse setting values
2025-04-22 19:52:37 +02:00
Loïc Guilloux
305c892b3a
Change: "setting" console command now shows default value ( #14061 )
2025-04-21 16:00:37 +02:00
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