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
Patric Stout
9c49a61249
Fix: base cargo payment on load/unload tile, instead of station sign location ( #11281 )
1 year ago
Patric Stout
d1a0ca67be
Codechange: simplify splitting of CargoPacket ( #11286 )
1 year ago
Patric Stout
9f8c1ea552
Codechange: rename next_station to next_hop to avoid confusing with another next_station
1 year ago
Patric Stout
a0f6983be4
Codechange: remove parameter from VehicleCargoList::Reassign that is always INVALID_STATION
1 year ago
Patric Stout
e6c02ebee6
Fix b0e73277: cargodist information got lost when splitting of cargo ( #11280 )
...
During b0e73277
we removed loaded_at_xy, but I kinda forgot that
it was a union with next_station. Now next_station wasn't copied
anymore, or checked in AreMergable.
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
PeterN
bd150df914
Codechange: Reorder some high-use structs to reduce their size. ( #11201 )
...
This reduces GoodsEntry from 144 to 136 bytes (thereby reducing Station from 9704 bytes to 9192 bytes), and CargoPacket from 40 bytes to 32 bytes.
1 year ago
Patric Stout
c9c9cfa4fd
Codechange: simplify the type of loaded_at_xy / next_station ( #11182 )
...
It was TileOrStationID, most likely to make sure both types in
the union are identical. But as TileIndex is a StrongTypeDef
that becomes a bit weird. So instead, still make sure they are
of equal size, but define their individual types better.
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
Rubidium
4a6fdc8293
Fix: multiplication result converted to larger type
...
Technically unlikely to happen, though uint16 * uint16 get promoted to int and
then stored as uint64; similarly uint * uint16 remains uint and gets stored as
uint64. In both cases the value can get truncated before the change to uint64.
1 year ago
Peter Nelson
e6740046ee
Codechange: Use range-for iteration.
1 year ago
Jonathan G Rennison
37392935dd
Fix #10707 : Incorrect type of days_in_transit in CargoPacket constructor ( #10715 )
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
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
Michael Lutz
b0990fcff7
Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
...
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
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
Charles Pigott
52f3abba6e
Cleanup: Remove unnecessary assert_tcompile macro
4 years ago
glx
5fce5fa300
Codechange: Replace FOR_ALL_CARGOPACKETS with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
fonsinchen
a363b2c317
(svn r26575) -Change [FS#5995]: Add an assert to catch underflowing action counts.
11 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
frosch
858e80f3dd
(svn r26333) -Fix: Compilation without static_assert.
11 years ago
frosch
03169121c2
(svn r26328) -Fix: Warnings and compilation failures.
11 years ago
fonsinchen
88787412b6
(svn r26327) -Fix [FS#5901]: Take care of next_station when reassigning from MTA_DELIVER to MTA_TRANSFER.
11 years ago
fonsinchen
f528d2c592
(svn r25910) -Fix: Guard against empty FlowStats in a few more places.
11 years ago
fonsinchen
bd230f34f4
(svn r25900) -Change [FS#5677]: Allow restricted flows to be picked for kept cargo.
11 years ago
fonsinchen
54db96be43
(svn r25891) -Feature: Use smallstack to allow for multiple next hops when loading and unloading.
11 years ago
fonsinchen
6ce4c1808b
(svn r25715) -Fix: return correct value from StationCargoList::Reserve, fix some documentation and simplify StationCargoList::Load a bit
11 years ago
fonsinchen
3dd811e179
(svn r25434) -Fix: reroute cargo staged for unloading if a link breaks
11 years ago
fonsinchen
c9452bbbff
(svn r25419) -Fix: assign some random other source station to packets which have lost their source
11 years ago
fonsinchen
741c431caa
(svn r25362) -Feature: consider cargo waiting at other stations for rating at the origin station
11 years ago
fonsinchen
04e3eb6fab
(svn r25361) -Feature: distribute cargo according to plan given by linkgraph
11 years ago
rubidium
cdb0a76958
(svn r25012) -Codechange: persistently keep 'reserved' cargo (for full-load improved loading) instead of calculating if for every cycle
12 years ago
rubidium
d6e2a8aa56
(svn r25010) -Codechange: Add general framework for cargo actions, i.e. loading, transfering, delivering and such, to contain this logic in a single place instead of spread around (fonsinchen)
12 years ago
rubidium
71bbc130fc
(svn r25009) -Codechange: refactor bits of cargo packet (lists) to reduce duplicated code (fonsinchen)
12 years ago
rubidium
2795ed5b09
(svn r25008) -Codechange: Make CargoList::Truncate behave similarly to CargoList::MoveTo, i.e. pass the amount to truncate (fonsinchen)
12 years ago
truebrain
1c9bec1999
(svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC)
13 years ago
michi_cc
56b7faed52
(svn r22582) -Fix: Don't increment STL iterators after they've been invalidated.
13 years ago
rubidium
ff143c6708
(svn r22413) -Document: even more stuff
14 years ago
smatz
756cc6cf65
(svn r22116) -Codechange: use PoolBase::Clean() at more places
14 years ago
rubidium
68bc93f950
(svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools
14 years ago
smatz
b4273bcd35
(svn r22023) -Fix: verify we can allocate a CargoPacket and CargoPayment before we actually try to do so
...
-Codechange: increase the limit of number of CargoPayments to match the limit of Vehicles (Rubidium)
14 years ago
rubidium
8017c2a3d7
(svn r21909) -Fix: some missing spaces
14 years ago