Commit Graph

317 Commits (e82333cf77861fd78ef156f97865b5f17ae38e4b)

Author SHA1 Message Date
frosch 3222ace3e1 (svn r19215) -Codechange: Add Order::GetLocation() to deduplicate code. 15 years ago
frosch 945d2c08e0 (svn r19210) -Fix: GetDestination() is invalid for nearest-depot orders. 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
yexo d669801f1d (svn r18807) -Codechange: introduce AirportSpec and move several non-statemachine-related variables to there 15 years ago
rubidium b2e9b5d612 (svn r18683) -Fix: it's not an other 15 years ago
yexo 1520aab5b2 (svn r18660) -Cleanup: remove useless function 15 years ago
rubidium 277794e26b (svn r18615) -Fix: conditional orders were seen as 'valid' and as such aircraft with only conditional orders did not crash 15 years ago
smatz 29606c0de6 (svn r18412) -Fix [FS#3350]: don't allow sending ships to rail waypoints and trains to buyos (Hirundo) 15 years ago
rubidium fac2f8ce1a (svn r18404) -Codechange: link drive through stops better together
-Feature: make penalty for road stop occupancy user configurable
-Fix [FS#1944]: road vehicles would not pick an empty drive through stop. Now they will *if* the penalty for driving around is less than the occupancy penalty
-Fix [FS#1495]: long (articulated) road vehicles could block loading of others when the following road vehicle already got 'permission' to go to the next bay even when it could not reach it
-Change: improve the throughput of the drive through road stops by letting them stop closer together
15 years ago
rubidium 0ef0e13795 (svn r18385) -Cleanup: remove the now unneeded multistop slot management code 15 years ago
frosch 59f9163e37 (svn r18381) -Codechange: Add RoadVehicle::IsBus() to simplify some stuff. 15 years ago
frosch 2265202d77 (svn r18380) -Fix (r9301): One could not share orders between buses carrying different cargos. 15 years ago
rubidium 37056b564c (svn r18204) -Codechange: introduce a type for Ticks and use it; furthermore document some related variables/functions 15 years ago
frosch 79627b4f89 (svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium e9624fe0cc (svn r17682) -Codechange: remove erroneous space before some commas 15 years ago
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 15 years ago
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 15 years ago
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 15 years ago
rubidium a8d768cf6e (svn r17384) -Fix [FS#2859]: remove all order window state changes out of the drawing routine and call them immediately when changes happen instead of on the next OnPaint. This prevents pressing buttons when they should've been already disabled. 15 years ago
smatz 100ae8efcc (svn r17292) -Codechange: use unified ToPercent() function to convert fract numbers to percents 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz c5533ae470 (svn r17168) -Codechange: apply coding style to if and while statements 15 years ago
rubidium 4b2592dbc0 (svn r17062) -Change: unify the naming of some 125 strings 15 years ago
rubidium e473e69ba4 (svn r16976) -Codechange: remove WaypointID and MAX_LENGTH constants in favour of their Station variants 15 years ago
rubidium 7440ec7a73 (svn r16947) -Codechange: use TileArea instead of train_tile, trainst_w and trainst_h. 15 years ago
rubidium c3d2c47faa (svn r16940) -Codechange: make the pathfinders behave the same when finding waypoints or stations, i.e. don't force exactly one destination tile for a waypoint 15 years ago
rubidium cb0409fe52 (svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h 15 years ago
rubidium 68ead6b84f (svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
15 years ago
rubidium 2547ba9517 (svn r16802) -Fix [FS#3031]: service orders didn't behave like conditional orders; if a train doesn't need service it didn't completely skip the order, it would first send the vehicle towards the depot and would then realise it doesn't need to go there making it possible that the vehicle leaves that station on the wrong side. 15 years ago
rubidium 3b8d0621a2 (svn r16785) -Codechange: make ships going to buoys use OT_GOTO_WAYPOINT too 15 years ago
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 15 years ago
smatz 0045096403 (svn r16640) -Codechange: move roadstop stuff to separate files 15 years ago
yexo 548a605263 (svn r16613) -Fix [NewGRF]: some of the var action 2 80+ variables contained wrong results due to OpenTTD codechanges 15 years ago
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
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 15 years ago
smatz ab5a51d462 (svn r16475) -Codechange: move code invalidating Vehicle::last_station_visited to more logical place 15 years ago
rubidium 62a2dff61e (svn r16457) -Fix [FS#2925]: skipping a 'nearest depot order' because none could be found could cause multiple orders to get skipped 15 years ago
yexo 0d56cfabfa (svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them. 15 years ago
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 15 years ago
rubidium 86710c5185 (svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle 15 years ago
rubidium d37b840cf3 (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate 15 years ago
rubidium c882248348 (svn r16388) -Codechange: move u.air to Aircraft 15 years ago
rubidium ada3067960 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 15 years ago
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 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
frosch 677ea100b3 (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 15 years ago
frosch d518b3d0ac (svn r16199) -Codechange: Pass OrderNonStopFlags also to MakeGoToDepotOrder().
-Fix: 'Go non-stop to nearest depot'-orders did not work wrt. the 'non-stop' part.
-Fix: Adding 'Go to nearest depot'-orders did not respect the default setting for 'non-stop'.
15 years ago
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
yexo 61d883e7e5 (svn r16107) -Add [NoAI]: AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders 15 years ago
frosch aecddf5cbe (svn r16063) -Fix (r13752): MOF_COND_DESTINATION was not accepted by CmdModifyOrder(). (only used by AI) 15 years ago
rubidium 5790293af6 (svn r16037) -Feature: allow (per order) to let a train stop at the near end, middle or far end of a platform from the point of view of the driver of the train that enters the station. 15 years ago
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium b7c7a1f701 (svn r15354) -Fix (r14803): first shared of a vehicle could be NULL making it impossible to (share-)clone the vehicle. 16 years ago
Yexo 3cf7255c4f (svn r15333) -Fix: AIs weren't restricted to a maximum length for ship orders. 16 years ago
frosch de9a6fc90b (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz e00cf92f47 (svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
16 years ago
rubidium 6c880d1c20 (svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow) 16 years ago
rubidium 7878405a12 (svn r14954) -Fix [FS#1890]: sharing/cloning/inserting of orders that the/a vehicle (in the shared list) can't go to (wrong station type etc) 16 years ago
rubidium 3d6c09b38d (svn r14952) -Codechange: unify the "can vehicle go to station" tests 16 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
glx c7959ce2a9 (svn r14840) -Cleanup: remove duplicate includes 16 years ago
smatz 9a09e5c4a0 (svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow) 16 years ago
rubidium e557c88667 (svn r14830) -Fix [FS#2495]: overflow of number of orders per vehicle (based on patch by Swallow) 16 years ago
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
rubidium 11c25a72fa (svn r14813) -Codechange: use uint instead of 'just' unsigned. 16 years ago
rubidium 0d54db5f9f (svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus) 16 years ago
rubidium d428da5a35 (svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus) 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
smatz 419f6e099f (svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo) 16 years ago
rubidium f28992719d (svn r14616) -Fix [FS#2424]: a nearest depot order should be "equal" to the resolved nearest depot order; otherwise we keep resolving the nearest depot order every tick. 16 years ago
rubidium 2209c6a344 (svn r14601) -Fix: the nearest depot and stop in depot orders didn't work together (the vehicle didn't stop). 16 years ago
smatz f28172c5f4 (svn r14577) -Fix [FS#2403]: vehicle didn't respect its 'refit in nearest depot' order (Swallow) 16 years ago
rubidium ffe155bb2a (svn r14547) -Fix: order pool seemed to look full when it was not as it only checked whether it was possible to allocate a new block of pool items instead of checking for free pool items. 16 years ago
rubidium 42df5cbc03 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus) 16 years ago
rubidium 1d2fbbc8a7 (svn r14449) -Fix [FS#2338]: service at nearest depot acted like go to nearest depot. 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
smatz 6987e6015a (svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
16 years ago
smatz 5f4ff33ce3 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 16 years ago
smatz 9174c19291 (svn r14319) -Fix (r10760): use operator delete when deleting an order, so order pool fills up a bit slower 16 years ago
peter1138 45ce441a55 (svn r14317) -Fix (r13662) [FS#2298]: Order distance processing for conditional orders on ships treated v->orders as an array, and didn't use the correct next order. 16 years ago
frosch ef60a4cf35 (svn r14179) -Fix (r1): RemoveOrderFromAllVehicles() did not mark enough windows dirty. 16 years ago
frosch 7ce75961b4 (svn r14178) -Fix [FS#2256]: Do not evaluate GetDestination() for go-to-nearest-depot-orders. 16 years ago
smatz c9bef19043 (svn r14174) -Fix: since now, we are 'losing' things, not 'loosing' 16 years ago
belugas 7dc212edeb (svn r14135) -Codechange: Add owner to waypoints. Previously, it was guessed from rail underneath it. 16 years ago
frosch f625ecbeba (svn r14134) -Fix (r12667, r13579) [FS#2245]: Update 'current_order' when changing 'cur_order_index'. 16 years ago
rubidium 99efe9aaae (svn r14097) -Fix [FS#2085]: one couldn't get a list of vehicles sharing an order when the number of orders was 0; you could see that the vehicles had a shared order though. 16 years ago
rubidium abd9f74871 (svn r14096) -Codechange: merge the shared order's vehicle list management to a single location. 16 years ago
rubidium 2f7c20eccd (svn r14092) -Cleanup (r14083): dead code, i.e. unused function. 16 years ago
rubidium 0dfaa88c1e (svn r13949) -Codechange [YAPP]: Declare the functions for processing conditional orders as non-static. (michi_cc) 16 years ago
rubidium b607b51d93 (svn r13753) -Cleanup (r13752): save before commit instead of the other way around is usually better. 16 years ago
rubidium a6e314bbba (svn r13752) -Fix [FS#2130]: correctly restore conditional orders when they are put 'into' backup. 16 years ago
rubidium 0f4d9a8e49 (svn r13704) -Fix: make timetables work more sensible when used in conjunction with conditional orders, i.e. make it possibly to tell how long to travel to the next destination if you jump. 16 years ago
rubidium 7ed892411a (svn r13662) -Fix [FS#2113]: crash when adding conditional orders to ships. 16 years ago
rubidium 7e50278d8e (svn r13633) -Fix: restoring 'service at depot X' orders from the order backup failed. 16 years ago
rubidium 525c964f53 (svn r13579) -Fix [FS#2088]: process the order coming after a conditional order, otherwise the vehicle would already leaving the station before it knows where the next destination is, making it leave in the wrong way. However, after processing as many conditional orders as there are in the order list it will stop processing them in order to not create an infinite loop. 16 years ago
rubidium fd0be850fe (svn r13358) -Codechange: split next order determination and conditional order processing functionality from the order handling. Patch based on work by michi_cc. 16 years ago
rubidium 923e21129c (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 16 years ago
rubidium 5c5ee7eb57 (svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings. 16 years ago
smatz 51ca426c4b (svn r13254) -Fix: waypoint orders could have invalid flags set after conversion 16 years ago
smatz 9fa52f7316 (svn r13253) -Codechange: simplify conversion of old orders a bit 16 years ago
smatz f9e7fa4c88 (svn r13252) -Fix: when converting orders from older savegames, set 'Unload and leave empty' for 'Unload' orders 16 years ago
rubidium 4625695653 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
16 years ago
rubidium 9defec7876 (svn r13165) -Codechange: replace some RebuildXXXList/ResortXXXList+InvalidateWindowXXX with InvalidateWindowXXXData. 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
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
rubidium a1e77073fe (svn r12949) -Fix [FS#1978]: no loading/no unloading orders were 'forgotten' during manual replaces. 16 years ago
rubidium d1ddff90d9 (svn r12935) -Fix [FS#1975]: vehicles forget their manual depot order when stopping at a station. Now we just pass through the station without stopping when a vehicle has been given a depot order. 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
smatz 9fc355fca5 (svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup 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
smatz 059e94e355 (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used 16 years ago
smatz 9488db56d4 (svn r12745) -Codechange: a bit of naming conventions, introduce Is*DepotTile() 16 years ago
frosch 7ba1d9076f (svn r12716) -Fix: Do not compare StationIDs with DepotIDs or WaypointIDs. 16 years ago
rubidium 4f0bfa91ab (svn r12696) -Fix: loading ancient savegames could result in invalid orders in order lists with all related problems. 16 years ago
rubidium e8ee93b593 (svn r12689) -Feature: non-stop(or rather no non-stop) and via orders for road vehicles. 16 years ago
rubidium 9349767e1d (svn r12681) -Fix [FS#1921]: aircraft stopping mid-air. 16 years ago
rubidium ed43ffe435 (svn r12678) -Fix [FS#1918]: when a road vehicle has a tram only stop multiple times in a row in it's orders, only the first one would be skipped. 16 years ago
rubidium ed250cc7b5 (svn r12670) -Add: unconditional/always order 'jump/skip' variable. 16 years ago
rubidium 8410bff078 (svn r12668) -Fix (12667): swapping of variables went wrong. 16 years ago
rubidium ac94b6384b (svn r12667) -Feature: conditional 'skip/jump' orders. 16 years ago
rubidium cebe2001ba (svn r12661) -Add: ability to send a vehicle (using default orders) to the nearest depot. 16 years ago
rubidium ba0a5814c2 (svn r12652) -Codechange: rework the order GUI a little more to make it a little more clear that 'transfer' is just an unload type. 16 years ago
rubidium 6379c30d26 (svn r12650) -Feature: ability to force a vehicle to not load at a station.
-Feature: ability to force a vehicle to not unload at a station.
16 years ago
rubidium 5992dad01f (svn r12648) -Feature: allow four different non-stop types in a single game instead of two. The "TTDP compatible order" setting now only sets the default behaviour of new trains.
-Feature: allow three different load type in a single game instead of two. One can choose full load all and full load any instead of full load being governed by the "full load any" patch setting.
16 years ago
rubidium 70f3413a36 (svn r12641) -Codechange: do not use the same button for two completely distinct tasks, just make an extra button for it and hide them when not needed. 16 years ago
rubidium 82155367f6 (svn r12640) -Codechange: let GetLoadType make a difference between full load and full load any based on the patch setting instead of using the patch setting directly. 16 years ago
rubidium d178345947 (svn r12639) -Fix: order window was not marked dirty on changed orders. 16 years ago
rubidium c41624bb94 (svn r12636) -Codechange: make CmdModifyOrder a little more flexible and remove 'hack' that used the full load flag to set the service if needed flag. 16 years ago
rubidium d8f88f06d4 (svn r12633) -Fix: could not make a (go-to) depot order. 16 years ago
maedhros 85e5053b68 (svn r12630) -Fix (r12600): Missing 'break' made it impossible to add waypoints to vehicle orders. 16 years ago
frosch 96700d5605 (svn r12629) -Codechange: Split VehicleNeedsService() into Vehicle::NeedsServicing() and Vehicle::NeedsAutomaticServicing().
-Fix (r11052): Disable servicing by service-interval if a vehicle has depot orders.
16 years ago
rubidium 71a2dd21fd (svn r12628) -Fix: TTDP compatible non-stop wasn't handled properly. 16 years ago
rubidium f04ecd2e4a (svn r12618) -Codechange: as load and unload type are now split, some case statements got ugly. 16 years ago
rubidium d74c6ffb62 (svn r12617) -Codechange: add type safety to the Order's load and unload types. 16 years ago
rubidium f1cd7ef5ee (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness. 16 years ago
rubidium 77dca1f023 (svn r12608) -Fix [FS#1909]: pressing 'Load' did not cancel the full load order. 16 years ago
rubidium f46ae97d8e (svn r12601) -Fix (r12587): do not reset the index of orders (causes loading ancient savegames to loop infinitively. 16 years ago
rubidium c57a1d74c3 (svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere. 16 years ago
smatz 6af1fb2bdd (svn r12599) -Codechange: force AllocateSafeRaw() to be linked to simplify compiler's decisions about inlining 16 years ago
rubidium d90a041230 (svn r12595) -Codechange: hide Order's flags in the last few cases. 16 years ago
rubidium fb1c4eccd8 (svn r12593) -Codechange: hide Order's flags in most of the code. 16 years ago
rubidium d6623cf654 (svn r12588) -Codechange: do not access the destination of an order directly. 16 years ago
rubidium 8cd1795fe3 (svn r12587) -Codechange: unduplicate some code in the Unpack*Order functions and move the 'normal' case Pack/Unpack to Order. 16 years ago
rubidium e68b2088ce (svn r12586) -Codechange: do not access an order's refit variables directly. 16 years ago
rubidium 5b47f81b0f (svn r12584) -Codechange: do not access the order type directly. 16 years ago