Peter Nelson and GitHub
20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. ( #13551 )
...
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00
Rubidium and rubidium42
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Rubidium and rubidium42
37c215f1fd
Fix #13513 , ec492cb267: std::numeric_limits<CompanyMask> not working causes no vehicles to exist
...
std::numeric_limits<T>::max() returns 0 instead of an error when the type is unknown.
Solve it by implementing and using Set() and All() in BaseBitSet in same way as std::bitset.
2025-02-09 22:50:55 +01:00
Rubidium and rubidium42
ec492cb267
Codechange: make CompanyMask a BaseBitSet implementation
2025-02-09 19:24:51 +01:00
Peter Nelson and Peter Nelson
9a6fc4eb76
Codechange: Use enum class for NewsReferenceType.
2025-02-07 19:36:52 +00:00
Peter Nelson and Peter Nelson
ca75a8ce19
Codechange: Use enum class for NewsType.
2025-02-07 19:36:52 +00:00
Peter Nelson and GitHub
eaa765d615
Codechange: Disentangle news window style from news flags. ( #13482 )
...
This avoids NewsFlags being used as both bitmask and bitstuffed data.
2025-02-07 13:10:39 +00:00
Rubidium and rubidium42
2c7b3bb55d
Codechange: rename ClientIndex to ClientPoolID
2025-02-01 11:15:51 +01:00
Rubidium and rubidium42
4ca1fe6c32
Codechange: replace MAX_UVALUE with std::numeric_limits::max
2025-02-01 01:29:02 +01:00
Rubidium and rubidium42
29129e12fd
Add: [Script] Event for when a company's president name changes
2025-01-14 11:35:35 +01:00
Björn Wärmedal and GitHub
9ab936f76b
Add: [Script] ScriptEventCompanyRename ( #12878 )
2025-01-14 09:24:28 +00:00
Rubidium and rubidium42
65731bb964
Codechange: use SPECSTR_..._END over _LAST, to prevent + 1 everywhere
2025-01-04 21:06:07 +01:00
Peter Nelson and GitHub
e9e603b4fd
Codefix: Company name is a StringID. ( #13224 )
...
StringID was passed to Company's constructor as a uint16_t.
2025-01-01 20:16:59 +00:00
Peter Nelson and GitHub
1e77fd0b61
Codechange: Remove unnecessary 'return_cmd_error` macro. ( #13160 )
...
This macro is a leftover from when errors used to be packed into a single int32_t.
`return CommandCost` is clearer, and doesn't need a macro.
2024-12-08 18:02:30 +00:00
Peter Nelson and GitHub
6f8e30c55d
Codechange: Use unique_ptr throughout instead of new raw pointer for company news data. ( #13148 )
...
The pointer was already captured and converted to a unqiue_ptr, but hidden within the call stack.
This now makes it clearer that the object passed to Add.*NewsItem will become owned by the news item.
2024-12-04 12:18:34 +00:00
Peter Nelson and GitHub
0446123194
Change: Show company finances column if it has any values in it. ( #13112 )
...
This solves finances not being show if the company inauguration date is in the future.
Current period is now always shown in the same position instead of moving for the first 2 years.
2024-11-24 11:59:30 +00:00
Jonathan G Rennison and GitHub
e477706bf5
Codechange: Add AssignBit function to assign the value of a single bit ( #12934 )
...
* Codechange: Add AssignBit function to assign the value of a single bit
* Codechange: Replace various uses of SB with AssignBit
* Codechange: Replace various uses of SB with a constant with SetBit
2024-09-10 08:36:58 -04:00
Kaiden Joy and rubidium42
7a698c7f1c
Fix #12365 : Company Window now displays proper inauguration year and period while in wallclock mode.
2024-08-13 20:13:51 +02:00
Rubidium and rubidium42
fea9ffa808
Codechange: also allow removing clients from the company allow lists
2024-05-22 22:20:10 +02:00
Tyler Trahan and GitHub
9f63b9f65d
Fix #12594 : Give descriptive error when company takeover fails due to vehicle limit ( #12676 )
2024-05-13 10:10:03 -04:00
Rubidium and rubidium42
a313676189
Doc: reason for using ::SendNet over ::Post in few cases
2024-05-09 21:51:26 +02:00
Rubidium and rubidium42
a9318cf653
Cleanup: remove UI for changing the password
2024-05-07 00:03:15 +02:00
Rubidium and rubidium42
66354ab9eb
Codechange: introduce allow list infrastructure for companies
2024-05-07 00:03:15 +02:00
Jonathan G Rennison and rubidium42
11ec156b64
Codechange: Add a priority field to TimerGameTick::TPeriod
...
Use this as the primary sort key for TimerGameTick::TPeriod,
to avoid container sort order changes on timer period saveload.
See: #12509
2024-04-25 20:08:24 +02:00
Loïc Guilloux and GitHub
c5ef47ee09
Codechange: [Script] Use std::unique_ptr for Company::ai_instance ( #12544 )
2024-04-20 16:58:46 +02:00
Peter Nelson and GitHub
197fb00d31
Fix #12395 : Ensure president name widget is tall enough. ( #12419 )
2024-04-04 17:56:16 +01:00
Peter Nelson and GitHub
d683ec0183
Codechange: Move dropdown and slider out of widgets directory. ( #12403 )
...
Also shuffle headers to place widget includes near end.
This leaves the widgets directory solely for defining Widget IDs.
2024-03-31 19:37:16 +01:00
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium and rubidium42
bab5a8a787
Codechange: use std::source_location over __FILE__ and __LINE__ for Backup
2024-03-10 10:14:20 +01:00
Peter Nelson and Peter Nelson
912d7bd80e
Codechange: Give ColourShade values names instead of numbers.
2024-02-25 12:38:07 +00:00
Peter Nelson and Peter Nelson
ae3390fe48
Codechange: Add ColourShade enum.
2024-02-25 12:38:07 +00:00
Peter Nelson and Peter Nelson
0463d4c198
Codechange: Remove direct access to _colour_gradient.
...
Access is now through GetColourGradient, which ensures parameters are in range.
2024-02-25 12:38:07 +00:00
Damian Laczak and rubidium42
49c3215751
Fix #10983 : [AdminPort] Correct order of messages
2024-02-18 15:11:00 +01:00
Loïc Guilloux and GitHub
977aba73be
Change: Store running AI config inside Company ( #12003 )
2024-02-09 22:55:49 +01:00
Jonathan G Rennison and rubidium42
cb13ee90ef
Fix: Second colour vehicle-type default liveries not being updated
...
When changing company default second colour
2024-02-04 07:14:39 +01:00
dP and GitHub
897b59c158
Add: [GS] Allow to set max loan for each company separately ( #11224 )
2024-01-30 19:15:19 +01:00
merni-ns and GitHub
5a88027a19
Feature: Infinite money mode ( #11902 )
2024-01-30 18:01:02 +00:00
Tyler Trahan and GitHub
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
Peter Nelson and GitHub
c0ab436077
Codechange: Store Colours in Colours type. ( #11625 )
...
This reduces casts, some magic numbers, and introduces a bit of type-safety.
2024-01-21 13:23:04 +00:00
Peter Nelson and GitHub
06050f7bb3
Fix: Pass townnameparts as parameter when testing townname based companyname. ( #11685 )
...
Length of returned string could vary and pass/fail the length check with a different
string than the final selection.
2024-01-04 23:10:54 +00:00
Peter Nelson and Peter Nelson
bfb4254226
Fix: Changing default livery did not propagate to group liveries.
...
#11614 attempted to address this but did not handle 2CC properly, and changes to the default livery were not handled.
2023-12-28 23:16:19 +00:00
Peter Nelson and GitHub
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
PeterN and GitHub
acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. ( #11287 )
2023-09-11 08:55:12 +00:00
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
2023-09-10 08:40:25 -04:00
PeterN and GitHub
afc1ea8135
Codechange: Using alias and std::array for company expense storage. ( #11273 )
...
This simplifies passing yearly expenses to functions and use of std algorithms.
2023-09-09 13:15:53 +00:00
Patric Stout and GitHub
07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype ( #11190 )
...
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
2023-08-15 18:12:05 +02:00
Loïc Guilloux and GitHub
02be6ab6ba
Fix #11179 , a979d9c: Don't start more competitors than allowed ( #11185 )
2023-08-11 22:30:01 +02:00
Loïc Guilloux and GitHub
a979d9cdda
Fix #11067 , ed83c4b: Don't start competitors during map generation ( #11069 )
2023-07-29 12:31:33 +02:00
Rubidium and rubidium42
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium and rubidium42
82b434b589
Codechange: rename function to better describe what it is doing
2023-06-12 09:12:11 +02:00