Tyler Trahan
32b0fb9f6e
Fix #12010 : Use economy timer for vehicle stats minimum age, not calendar ( #12142 )
7 months ago
Peter Nelson
56cf89d189
Change: Use bitmap for free unit ID generation. ( #12165 )
...
This improves performance of finding the next free unit number for a vehicle.
Based loosely on pool's used slot bitmap.
7 months ago
Peter Nelson
f20d241e81
Fix a258833: Don't invalidate station list on vehicle load/unload. ( #12112 )
...
a258833
fixed a bug but as a result causes the station list to be rebuilt every time (once per game tick) a vehicle loads/unloads.
Instead just mark the window for redraw.
7 months ago
Peter Nelson
60dcf3b5e2
Codechange: Rename TownEffect to TownAcceptanceEffect.
...
This makes it clearer that TownEffect only affects acceptance behaviour.
8 months ago
merni-ns
ccaa383e85
Fix #11938 : Check infinite money setting in cases where it was missed ( #11939 )
8 months ago
dP
897b59c158
Add: [GS] Allow to set max loan for each company separately ( #11224 )
8 months ago
merni-ns
5a88027a19
Feature: Infinite money mode ( #11902 )
8 months ago
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
8 months ago
Peter Nelson
400ae65ff2
Codechange: Redefine some cargo-related values in terms of CargoID instead of CargoType.
...
Values used as special filter types are now defined as offsets from NUM_CARGO instead of confusingly reusing CARGO_NO_REFIT/CARGO_AUTO_REFIT types.
9 months ago
EmperorJake
6522351a1f
Feature: Setting to disable the loading speed penalty for trains longer than the station
9 months ago
Tyler Trahan
2a62caa30b
Codechange: Use Ticks for BaseConsist timetable fields
10 months ago
Peter Nelson
a258833aee
Fix 67d071d: WC_STATION_LIST should be invalidated by owner, not station index. ( #11530 )
10 months ago
Peter Nelson
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.
11 months ago
Patric Stout
df400ef84a
Fix: only count distance traveled in vehicles for cargo payment ( #11283 )
...
No longer you can utilize the free (and instant) labour of station
workers, transporting your cargo from one part of the station to
the other. No more!
Based on patch by dP.
1 year ago
PeterN
18e75dbc88
Fix: Don't produce invalid cargo. ( #11314 )
...
Production for secondary industries did not always check that the produced cargo type isn't valid.
1 year ago
Peter Nelson
2fdc22e7ea
Codechange: Shuffle CargoPayment members to reduce padding.
1 year ago
Patric Stout
9c49a61249
Fix: base cargo payment on load/unload tile, instead of station sign location ( #11281 )
1 year ago
Patric Stout
a0f6983be4
Codechange: remove parameter from VehicleCargoList::Reassign that is always INVALID_STATION
1 year ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
1 year ago
Patric Stout
30172fc037
Codechange: cleanup CargoPacket in terms of variable/function names ( #11278 )
...
Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.
1 year ago
Patric Stout
b0e73277d6
Codechange: remove loaded_at_xy from CargoPacket as it was unused ( #11276 )
1 year ago
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
1 year ago
Rubidium
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
1 year ago
rubidium42
9f6fec01cd
Codechange: rename cargo aging days to periods, as they are not really days ( #11112 )
1 year ago
Finn Willard
f23249f8f1
Fix #10917 : Pay loan interest before generating statistics ( #11040 )
1 year ago
Patric Stout
3b1407d240
Feature: allow to do a hostile takeover of an AI company (in singleplayer) ( #10914 )
...
With the removal of the share-system, you could no longer make an
AI disappear in a single player game. At least, not without going
into the console.
1 year ago
PeterN
584faaf064
Change: Reorganise industry accept/produce arrays. ( #10853 )
...
Use a array of struct for each cargo instead of an array for each statistic.
This makes iterating for acceptance and production much simpler.
pct_transported is now calculated when needed.
1 year ago
Peter Nelson
633f19419d
Codechange: Make more use of GetCargoAccepted/ProducedIndex().
1 year ago
Peter Nelson
f177ce7c9a
Codechange: Base CargoArray off std::array.
...
This avoids needing to define array accessors and allows use of
default value initialization.
1 year ago
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
2 years 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.
2 years ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2 years ago
Jonathan G Rennison
10e76b2788
Fix #10032 : Capacities of articulated vehicles in build window
...
See also: #9954
2 years 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 )
3 years ago
Rubidium
c73f578e8c
Codechange: replace magic numbers and C-style arrays with C++-style array for share owners
3 years ago
Rubidium
1c256a4be7
Fix: do not let shares in the company taking over another company disappear
3 years ago
dP
36bee83864
Change: Deliver cargo to the closest industry first ( #9536 )
3 years ago