Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
1 year ago
Peter Nelson
e6740046ee
Codechange: Use range-for iteration.
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Patric Stout
36a0818bc5
Remove: buying/selling/owning company shares ( #10709 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
dP
e2f1cd44dc
Change: Increase max cargo age and let min cargo payment approach zero. ( #10596 )
...
Co-authored-by: Michael Lutz <michi@icosahedron.de>
1 year ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
1 year ago
Rubidium
b7b7c11b90
Change #10077 : make maximum loan a positive multiple of the loan interval
...
And set the minimum maximum loan to the value of loan interval, so there is
always an amount of money to lend. Compared to being allowed to set max loan
to 0 and never be allowed to lend any money.
1 year ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
1 year ago
Jonathan G Rennison
10e76b2788
Fix #10032 : Capacities of articulated vehicles in build window
...
See also: #9954
1 year ago
SamuXarick
b7abaa55a3
Codechange: Improve performance when calculating company value ( #9901 )
2 years ago
glx22
aeeee9f18e
Fix #9909 , 13528bf: Left-over unused parameter breaks overload resolution
2 years ago
benda
6540948ace
Fix: Company values do not properly account for shares ( #9770 )
...
Co-authored-by: Charles Pigott <charlespigott@googlemail.com>
2 years ago
Charles Pigott
146827c458
Fix #9877 : GS could trigger 'Cost: 0' cost message ( #9878 )
2 years ago
Tyler Trahan
f4ca94d3f6
Codechange: Revenue is not the same as Income
...
Income is revenue minus costs. Let's name things correctly (without breaking the script API).
2 years ago
Tyler Trahan
d220debc6c
Change: Don't pay Property Maintenance on stations when Infrastructure Maintenance is disabled ( #9828 )
2 years ago
Rubidium
c73f578e8c
Codechange: replace magic numbers and C-style arrays with C++-style array for share owners
2 years ago
Rubidium
1c256a4be7
Fix: do not let shares in the company taking over another company disappear
2 years ago
dP
36bee83864
Change: Deliver cargo to the closest industry first ( #9536 )
2 years ago
Niels Martin Hansen
e68bf58989
Codechange: Use anonymous union for vehicle orders/old orders list
2 years ago
Michael Lutz
2e39637db2
Codechange: Don't use a global for the 'not enough cash' message.
3 years ago
Michael Lutz
41fa16f325
Codechange: Don't use globals for return values from vehicle command procs.
3 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
3 years ago
Michael Lutz
21675ec7e2
Codechange: Un-bitstuff vehicle/engine commands.
3 years ago
Michael Lutz
4f3ea3907e
Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
3 years ago
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
3 years ago
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
Rubidium
d83647f9a7
Fix #9440 : negative cargo payments not being handled right
...
Cargo payments were stored as unsigned integer, but cast to int64 during
application of inflation. However, then being multiplied with a uint64
making the result uint64. So in the end the payment that should have been
negative becomes hugely positive.
3 years ago
glx22
a543a4b7bb
Codechange: Remove FOR_EACH_SET_CARGO_ID
3 years ago
rubidium42
9a7750f14e
Codechange: use the constructor for CompanyNewsItem to fill the data instead of a separate function
3 years ago
rubidium42
aa9818db90
Codechange: create a type for the "free_data" of NewsItems and (de)allocate it with new and delete
3 years ago
Patric Stout
ef25afd55a
Fix #9348 , 4d74e51: don't try to sell shares of spectators ( #9349 )
...
"new_owner" can be INVALID_OWNER, and as INVALID_OWNER ==
COMPANY_SPECTATORS, we could end up trying to sell shares of
nobody.
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
Patric Stout
4d74e51907
Fix #9281 : acquire a company uses special bookkeeping to make you rich ( #9300 )
...
When you buy-out a company, you got your shares back. This is
based on company-value, which includes values for the vehicles etc.
In other words, you not only got the vehicles, but you also got
paid to get them back.
Additionally, you also got the loan of the company, but not the
money for the loan (as that is subtracted from the company-value).
Solve this by changing the rules of a buy-out: don't sell your
shares, get the loan AND the balance and get the infrastructure.
3 years ago
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
3 years ago
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
3 years ago
glx22
9a8756d7ed
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
3 years ago
glx22
6b8ad5a9b1
Change: Apply some consistency to singleplayer related comments
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
4 years ago
Michael Lutz
79cb9efa7f
Change: Always apply inflation from 1920 to 2090, no matter the game start year. ( #7589 )
4 years ago
Pavel Stupnikov
9a45a0f535
Feature: Set exclusive access to industry from GS ( #8115 )
4 years ago