rubidium
8234230f9e
(svn r17804) -Codechange: move the CargoPacket 'invalidation' when stations get removed to CargoPacket.
2009-10-18 17:26:10 +00:00
rubidium
be57392ba3
(svn r17801) -Codechange: for StationCargoLists the 'loaded_at_xy' does not matter when merging CargoPackets
2009-10-18 14:30:37 +00:00
rubidium
e553983e39
(svn r17800) -Codechange: first steps into making CargoList a template
2009-10-18 14:28:26 +00:00
rubidium
760a329622
(svn r17795) -Codechange: split cargolist into one for vehicles and one for stations.
2009-10-18 13:39:00 +00:00
rubidium
79a0aca3bc
(svn r17739) -Cleanup: compiler didn't warn about an unused variable, fonsinchen did
2009-10-07 17:46:58 +00:00
rubidium
b7b1224ef3
(svn r17736) -Codechange [FS#3135]: rewrite CargoList::MoveTo; don't require the secondary list, use cache updates instead of rebuilds. This is usually faster because of primarily gradual loading that only moves a (small) part of the cargo each time. Based on patch by fonsinchen.
2009-10-07 08:31:42 +00:00
rubidium
de43874182
(svn r17735) -Codechange: update the cache one inserting/removing CargoPackets from the CargoList via Append/Truncate instead of rebuilding the whole cache. For Append this changes the O(n) cache rebuild into a O(1) cache update. For Truncate no temporary list is needed anymore (based on patch by fonsinchen)
2009-10-07 08:25:12 +00:00
rubidium
702deb8366
(svn r17733) -Codechange: store the 'days in transit' cache as the sum of the days in transit instead of the average; the variable isn't requested that often (primarily station NewGRFs) that the dividing/testing for dividing by 0 step needs to be cached.
2009-10-06 21:24:03 +00:00
rubidium
0a621eae7e
(svn r17732) -Codechange: reorder some variables of cargo packets/cargo lists to get better alignment *and* smaller structs; both from 40 bytes to 32 bytes on 64 bits.
2009-10-06 21:19:20 +00:00
rubidium
27d62a7ec6
(svn r17731) -Codechange: do not cache a boolean which states whether some other variable is not 0.
2009-10-06 21:12:35 +00:00
rubidium
49739b3c67
(svn r17730) -Codechange: do not cache the source of a packet in the cargo list. It's only used for (some) GUI/NewGRF purposes so precalculating it costs more than calculating when it's actually used.
2009-10-06 21:06:26 +00:00
rubidium
10428de7a3
(svn r17727) -Codechange: some coding style and documentation fixes
2009-10-06 19:52:27 +00:00
rubidium
72dd637e92
(svn r17722) -Codechange: simplify the cargopacket constructor; unduplicate if and don't set a value to 0 if it already is 0.
2009-10-06 17:33:01 +00:00
rubidium
9b94441eb8
(svn r17721) -Codechange: replace a magic number with a constant
2009-10-06 17:28:06 +00:00
rubidium
ec3a0dc064
(svn r17720) -Codechange: guard the CargoPacket variables that are cached in CargoLists so they cannot be written from outside the CargoList class (based on patch by fonsinchen)
2009-10-06 17:23:15 +00:00
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
2009-08-21 20:21:05 +00:00
smatz
0502a6df42
(svn r17113) -Change [FS#265][FS#2094][FS#2589]: apply the subsidy when subsidy's destination is in station's catchment area and cargo packets originate from subsidy's source
...
-Change [FS#1134]: subsidies aren't bound to stations after awarding anymore, they still apply to town or industry, no matter what station is used for loading and unloading. Awarded subsidies from older savegames are lost
-Change [NoAI]: due to these changes, AISubsidy::GetSource and AISubsidy::GetDestination now return STATION_INVALID for awarded subsidies
2009-08-08 16:42:55 +00:00
rubidium
d361ecd8f0
(svn r16914) -Codechange: split Station and BaseStation into different files
2009-07-22 11:35:35 +00:00
rubidium
4f99508114
(svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others:
...
* cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder)
* cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore
* industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go
Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
2009-06-29 19:55:36 +00:00
smatz
917e1f4fad
(svn r16459) -Codechange: move definition of several cargopacket accessors to header file
2009-05-29 15:46:55 +00:00
smatz
50624d5c0f
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
2009-05-22 15:13:50 +00:00
smatz
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
2009-05-16 23:34:14 +00:00
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
2009-01-31 20:16:06 +00:00
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
2009-01-04 15:32:25 +00:00
glx
744c9eda2f
(svn r14235) -Fix (r14234): compilation with MSVC was broken
2008-09-03 13:25:56 +00:00
smatz
e25227d709
(svn r14234) -Fix: feeder share was computed wrong when splitting cargo packet
2008-09-03 10:30:07 +00:00
celestar
3546b74e93
(svn r14137) -Codechange: Remove a now unused member of CargoPacket
2008-08-23 09:31:53 +00:00
skidd13
0a178274e2
(svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant
2008-06-27 17:46:43 +00:00
bjarni
63fea0790b
(svn r12940) -Fix [FS#1974](r12913): [autoreplace] a vehicle backup should include the cargo packets in the vehicle as well
2008-05-04 10:05:35 +00:00
smatz
76eaed68a0
(svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining
2008-04-06 23:49:45 +00:00
rubidium
c51b81c247
(svn r12489) -Codechange: split station.h into station_base.h and station_func.h.
2008-03-31 00:06:17 +00:00
peter1138
aefb78fcdf
(svn r12120) -Cleanup: const-ify parameters when checking for same cargopacket source.
2008-02-12 11:46:29 +00:00
rubidium
6edf2d3a1b
(svn r11002) -Codechange: unhackify the cargo packet list saving (a little).
2007-08-30 12:10:32 +00:00
rubidium
e7d2918c0c
(svn r10749) -Codechange: use the generic pool item class as super class for cargo packets, which results in a nice reduction of code duplication.
2007-08-02 10:49:24 +00:00
rubidium
cbd3aca30c
(svn r10743) -Fix: some typos introduces by copy-pasting.
2007-08-01 19:13:42 +00:00
peter1138
7ce52ca8b7
(svn r10404) -Fix (r10266): Adding a cargo packet to cargo list could overflow. Now we detect this and just leave the cargo in its own packet.
2007-07-01 12:25:08 +00:00
rubidium
1b07b27af1
(svn r10297) -Codechange: increase the performance of CargoPacket::AllocateRaw using a very simple "caching" system.
2007-06-23 20:38:28 +00:00
rubidium
fc201d4ad8
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
2007-06-22 11:58:59 +00:00