Commit Graph

94 Commits (0aed5bf7d7558e209ea57e277a85c408176147b6)

Author SHA1 Message Date
smatz 0c10006907 (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 15 years ago
frosch 0d782b0f96 (svn r16498) -Codechange: Remove hardly used HASBITS. 15 years ago
rubidium da5661a0c8 (svn r16393) -Codechange: move VehicleRail to Train. 15 years ago
rubidium c4b627af42 (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train 15 years ago
rubidium 80e94b9bb1 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 15 years ago
smatz 70aab8bf04 (svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too 15 years ago
smatz 8808f3beea (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 15 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
yexo 31eff1d4c3 (svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct 15 years ago
frosch afe547448e (svn r15692) -Fix [FS#2721]: Just sell the old engines after autorenew/replace. Don't bother about trains exceeding the trainlimit, which will be sold anyway. 16 years ago
smatz c2834412f7 (svn r15680) -Cleanup: remove redundant comment 16 years ago
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
frosch 1358756071 (svn r14442) -Fix (r14406): Typo causing problems in rare cases. 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
frosch 1032dbe142 (svn r14411) -Fix (r14406): IsFrontEngine() is only valid for trains. 16 years ago
frosch 76c13beef0 (svn r14407) -Cleanup (r14406): Remove a redundant test. (thanks SmatZ) 16 years ago
frosch 67db5087cd (svn r14406) -Fix [FS#Eddi]: Autoreplace did not work for vehicles in free wagon chains. 16 years ago
smatz 5f4ff33ce3 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 16 years ago
rubidium fc62d736f7 (svn r14306) -Codechange: unify the code to draw the vehicle list.
-Fix [FS#2292]: inconsistency between drawn vehicle lists in the vehicle list and group windows.
16 years ago
smatz c9bef19043 (svn r14174) -Fix: since now, we are 'losing' things, not 'loosing' 16 years ago
frosch 0e2736399e (svn r14126) -Codechange (r14125): Add some tabs. 16 years ago
frosch 447d0930f7 (svn r14125) -Fix [FS#2237]: Segfault when autoreplace failed very early.
Note: Proper indenting in next commit.
16 years ago
frosch 11a20379f3 (svn r14091) -Cleanup (r14083): Remove superfluous '#include's. 16 years ago
frosch 9751fbe4dc (svn r14085) -Cleanup (r14083): Remove no longer used functions. 16 years ago
frosch f7826f8a37 (svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel. 16 years ago
frosch 4eae917c1c (svn r14037) -Fix (r8610): The autoreplace gui showed vehicle types for replacement which CmdSetAutoReplace() did not accept. 16 years ago
frosch 731685cf64 (svn r14031) -Fix (r13850): Determining the refit cargo did not work, when the old vehicle did not carry anything but the new one did. 16 years ago
frosch 1f31e117f0 (svn r13850) -Fix [FS#2146]: Fix resp. implement refitting of articulated vehicles during autoreplace. 16 years ago
smatz aae2aa64c4 (svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that 16 years ago
smatz 447ec39f49 (svn r13691) -Codechange: make it easier to determine whether a command is ran in the context of autoreplace or not 16 years ago
rubidium 9717e1ef07 (svn r13146) -Codechange: vehicle_base.h doesn't need to be included in vehicle_gui.h. 16 years ago
rubidium 76b8970a33 (svn r13100) -Codechange: reduce the amount of parameters passed via AddNewsMessage as there is (for each news message type) a tuple of 4 parameters that is the same for all calls. 16 years ago
bjarni d3650ecb3a (svn r13002) -Fix (r13001): [autoreplace] previous fix broke updating of a pointer to the front vehicle in certain cases
Now it's updated when it's the front vehicle and it's every time it's the front vehicle and only if it's the front vehicle (nomatter if the replacement works or not)
16 years ago
bjarni 02709df7e3 (svn r13001) -Fix [FS#1994](r12913): [autoreplace] we should stop working on vehicles right away if we fail to replace them and certainly not presume their data is valid 16 years ago
bjarni dbf6e344a4 (svn r12940) -Fix [FS#1974](r12913): [autoreplace] a vehicle backup should include the cargo packets in the vehicle as well 16 years ago
bjarni 757de2bdf5 (svn r12913) -Add: ability to backup and restore a player's economic data and data for a vehicle (or chain of vehicles)
Autoreplace uses this with the following benefits:
  -Mass autoreplace (the button in the depot window) will now estimate costs correctly
  -Autoreplace now either replaces correctly or manages to keep the original vehicle (no more broken trains)
  Thanks to Ammler for testing this
16 years ago
bjarni de015fbf90 (svn r12797) -Codechange: [autoreplace] moved wagon removal to a function of it's own 16 years ago
bjarni c360e71e3c (svn r12794) -Doc: added missing doxygen comment in autoreplace_cmd.cpp 16 years ago
bjarni 01549e1574 (svn r12792) -Codechange: [autoreplace] added a function to figure out if a replacement is needed and if so, to which EngineID
It's designed to save a bit of CPU time, specially if the replacement isn't buildable (think autorenew of old vehicle)
16 years ago
bjarni ad3ef0fb26 (svn r12791) -Codechange: [autoreplace] Added a flag parameter (listens for DC_EXEC and DC_QUERY_COST) and included more info when returning CommandCost
This allowed cleaning up the code in MaybeReplaceVehicle()
16 years ago
rubidium 02cdf01507 (svn r12754) -Codechange: split depot.h into depot_map.h, depot_func.h and depot_base.h and remove quite a lot of unneeded (before this) includes of depot.h. 16 years ago
rubidium e68b2088ce (svn r12586) -Codechange: do not access an order's refit variables directly. 16 years ago
rubidium ef2be7d0fc (svn r12490) -Codechange: rename engine.h to engine_func.h and remove unneeded inclusions of engine.h and/or replace them with engine_type.h. 16 years ago
rubidium 4a1035ab95 (svn r12488) -Codechange: split order.h into order_base.h and order_func.h. 16 years ago
rubidium eeabab4555 (svn r12459) -Codechange: split news.h into news_type.h and news_func.h. 16 years ago
bjarni 06c0e5df5a (svn r12421) -Feature: [autoreplace] the autoreplace button in train depots will now also replace wagons even if they aren't connected to a locomotive
fixed estimated cost in CmdDepotMassAutoReplace() (will still not estimate wagon removal profits)
  Made it possible to command CmdDepotMassAutoReplace() to either replace everything or nothing (the button will still happily replace just some of the vehicles if cash premits)
16 years ago