Commit Graph

65 Commits (c755fa43d08e5adaad87745769369ec8e5e59915)

Author SHA1 Message Date
rubidium f765b3d6aa (svn r10212) -Fix [FS#723]: money overflow bugs in many locations. 17 years ago
rubidium 8220153e6b (svn r10210) -Codechange: make all money related variables 64 bits, so overflowing them should become a little harder. 17 years ago
rubidium 6900de65b9 (svn r10209) -Fix/Codechange: forgot a few changes of int32 -> Money in the previous commit 17 years ago
rubidium 23727da96f (svn r10208) -Codechange: replace int32 with Money where appropriate. 17 years ago
rubidium 7dda2d93da (svn r10207) -Codechange: remove the redundant player_money in favour of the money64, which is now renamed to player_money. 17 years ago
rubidium 773a7c9cb6 (svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified. 17 years ago
rubidium 3ccc83e640 (svn r10197) -Codechange: replace int32 with CommandCost where appropriate. 17 years ago
rubidium 0b90d5319d (svn r10125) -Fix [FS#865]: under some circumstances the wagons of a train didn't get loaded properly. 17 years ago
maedhros f8ae742da4 (svn r10122) -Codechange: Add a CountBitsSet function and use it to replace some less efficient loops. 17 years ago
maedhros 12b359fa32 (svn r10117) -Fix [FS#863]: When deleting the vehicles of bankrupt players, delete trains as
a whole rather than each part individually, as that leads to invalid tests on
parts that have already been deleted.
17 years ago
maedhros c186f91cbd (svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
road vehicles for those who prefer the technical explanation.
17 years ago
rubidium f73956888f (svn r10084) -Fix [FS#855]: reversing a train when loading at a station crashed. 17 years ago
peter1138 f2e0912ce9 (svn r10062) -Codechange: Don't redraw all station tiles when cargo is added or removed if the station has no custom graphics. 17 years ago
rubidium d255041365 (svn r10058) -Codechange: give some industry variable sensible names (like not telling "last_mo_production" when it is the production of the current month). 17 years ago
maedhros fa548f1a6f (svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type. 17 years ago
rubidium 76b1a66498 (svn r9930) -Fix (r9838): obiwan could cause vehicles to way a long time (2.5 years) at stations. 17 years ago
rubidium 8f0f090c51 (svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13. 17 years ago
belugas 662bee5b12 (svn r9870) -Codechange: Silence two compiler warnings and give proper type to the "type" member of industry struct 17 years ago
belugas c4b90f3137 (svn r9867) -Codechange: Remove data duplication. The exact same values can be found in the industry spec, so take it from there instead. 17 years ago
rubidium b007a3419c (svn r9866) -Codechange: remove the technical one-input-cargo-creates-one-output-cargo limit in the factories, sawmills, steelmills and the ones I'm forgetting to mention right now. Use of this functionality will come later. 17 years ago
rubidium 08be68e0b4 (svn r9841) -Codechange: add a little more type strictness to the vehicle types. 17 years ago
rubidium 0f81140b59 (svn r9840) -Fix (r9838): MSVC is complaining about signedness again (Belugas). 17 years ago
rubidium 49476d46e6 (svn r9838) -Fix: make "improved loading" a proper improved loading instead of loading one (semi-)random vehicle at a time:
- Now it is really FIFO.
 - When there is enough cargo to fill the first vehicle in the queue, the next vehicle in the queue start loading (and the next when ....).
17 years ago
rubidium 07bdd6c3cc (svn r9836) -Codechange: make non-improved loading happen FIFO-ish; generally loading/unloading will happen fifo, but there are no guarantees on the FIFO-ness. For (better) FIFO guarantees you still need to use improved loading. 17 years ago
rubidium 5ae882a184 (svn r9831) -Codechange: more refactoring of the loading/unloading. 17 years ago
rubidium 82ca197a10 (svn r9829) -Codechange: more refactoring of the unloading algorithm. 17 years ago
rubidium e6a6d7ef31 (svn r9815) -Fix (r9761) [FS#769): transfers weren't accounted in the vehicle profits. 17 years ago
rubidium 9a893ebe20 (svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle. 17 years ago
rubidium cc9d811f53 (svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station. 17 years ago
rubidium 53485da02c (svn r9761) -Codechange: refactor cargo payment out of LoadUnloadVehicle. 17 years ago
rubidium 1951817f3b (svn r9683) -Fix [FS#423]: improved loading does not use a huge amount of processing power anymore when having a lot of trains. 17 years ago
peter1138 7df3a94d8f (svn r9638) -Feature: Increase cargo types from 12 to 32 and enable newcargo flag in NewGRF loader. 17 years ago
peter1138 e7cd92f06f (svn r9617) -Codechange: Implement callback for cargo profit calculation 17 years ago
maedhros 3d81de8d7e (svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist. 17 years ago
belugas 7ad3bb257e (svn r9568) -Documentation: doxygen and comment changes: Root of src is finally done. Now, time to start clearing as much as possible 17 years ago
celestar 6f49e4c644 (svn r9541) -Codechange: Safeguard the company-buying routines so that the buying player and the bought player need to be two different entities 17 years ago
truelight fb116653c6 (svn r9533) -Fix [FS#274]: when a company is removed (either via auto-clean, bankrupt, or take over), sell all the shares he has first, then sell the shares all people have on this company, and then remove the company. 17 years ago
peter1138 5a73caa0f7 (svn r9427) -Codechange: remove redundant variable 17 years ago
belugas 691f8578fd (svn r9400) -Codechange: Use some more representative enum names for landscape types. 17 years ago
peter1138 93fe91cc8c (svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops. 17 years ago
peter1138 28717b6bc5 (svn r9257) -Codechange: Use cargo's town effect property for determining subsidy source/target type. 18 years ago
truelight e2eeac06f8 (svn r9071) -Fix [FS#459]: when in networking an other player takes over an AI which is also controlled by a player, move the player with the company to the company who bought out the AI 18 years ago
rubidium 36cea84b11 (svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code). 18 years ago
rubidium 979ccd45ba (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 18 years ago
rubidium 4169bfba06 (svn r9050) -Codechange: Foo(void) -> Foo() 18 years ago
maedhros 878b6fcf37 (svn r9029) -Fix (r7326): Only call the gradual loading amount callback if the bit for it is set in the vehicle's callbackmask. 18 years ago
rubidium 5ec31ebc2b (svn r8979) -Fix (r8978): unsigned vs signed comparisons. 18 years ago
richk cd7b71092b (svn r8978) -Feature: Rewrite of transfer system.
This major feature-fix keeps track of the value of transfers offloaded at a station, and hands on to a loading vehicle a credit note proportionate to the cargo loaded. The transferring vehicle is paid only for the distance it has travelled. eg. B-C in a transfer chain A-B-C-D.
When the final cargo is delivered, these credit notes are cashed, and the final vehicle is paid for A-D minus any credit notes it is carrying. The company bank balance increases by the value of the A-D route.
You still need to set up a profitable route; it is still easy to make a loss on transfers by bad planning. :)
18 years ago
rubidium 5b4b9cbd5c (svn r8969) -Codechange: rework of the player face bits.
- introduce a new format (with backward compatability) that is more clear and needs a much simpler face drawer
 - replace tons of ifs/switches/magic numbers by table lookups
18 years ago
maedhros 2f557f7dc0 (svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status. 18 years ago