Commit Graph

279 Commits

Author SHA1 Message Date
rubidium
33c41bbfed (svn r20441) -Fix [FS#4024]: adding "goto nearest depot and stop" orders in one go was denied. This caused both AI adding those orders and backed up order restoration to fail. 2010-08-10 16:45:32 +00:00
frosch
5b86c79fce (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium
8c85b4ce3d (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
rubidium
f10c7255f4 (svn r20229) -Fix [FS#3986]: "Service at nearest depot" behaved the same as "Go to nearest depot" 2010-07-27 21:46:55 +00:00
alberth
137e2b64c9 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
frosch
bf721f39af (svn r19657) -Fix: Add saneness checks for front vehicles. 2010-04-17 14:55:49 +00:00
frosch
ed80045221 (svn r19654) -Codechange: Use Extract<> in more places. 2010-04-17 13:31:41 +00:00
alberth
72d62fd6fc (svn r19494) -Codechange: Remove _error_message. 2010-03-20 17:58:24 +00:00
alberth
8109a0ad7f (svn r19483) -Codechange: Code layout fixes, and parentheses reduction. 2010-03-20 15:30:57 +00:00
yexo
79909cedee (svn r19463) -Codechange: add helper function to determine if an airport has at least one hangar 2010-03-19 09:48:44 +00:00
yexo
22a27d3b62 (svn r19455) -Codechange: split all airport information in Station to a seperate class 2010-03-18 21:02:20 +00:00
alberth
d5fe3f96c7 (svn r19405) -Codechange: CheckOwnership() returns a CommandCost. 2010-03-13 17:11:28 +00:00
frosch
b7bfae70a8 (svn r19215) -Codechange: Add Order::GetLocation() to deduplicate code. 2010-02-22 20:36:20 +00:00
frosch
baeeb024ea (svn r19210) -Fix: GetDestination() is invalid for nearest-depot orders. 2010-02-22 20:08:16 +00:00
rubidium
9467b7c6d6 (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
yexo
84cd40a483 (svn r18807) -Codechange: introduce AirportSpec and move several non-statemachine-related variables to there 2010-01-15 12:08:08 +00:00
rubidium
3de085a143 (svn r18683) -Fix: it's not an other 2010-01-01 18:45:40 +00:00
yexo
cb0cfca653 (svn r18660) -Cleanup: remove useless function 2009-12-29 23:13:36 +00:00
rubidium
257a16a3b1 (svn r18615) -Fix: conditional orders were seen as 'valid' and as such aircraft with only conditional orders did not crash 2009-12-23 18:43:38 +00:00
smatz
472e6404cb (svn r18412) -Fix [FS#3350]: don't allow sending ships to rail waypoints and trains to buyos (Hirundo) 2009-12-05 19:21:43 +00:00
rubidium
0fed86a779 (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
2009-12-04 20:52:19 +00:00
rubidium
6278f0b8a9 (svn r18385) -Cleanup: remove the now unneeded multistop slot management code 2009-12-02 18:18:56 +00:00
frosch
992bc6c345 (svn r18381) -Codechange: Add RoadVehicle::IsBus() to simplify some stuff. 2009-12-02 17:37:02 +00:00
frosch
a3bd5f5234 (svn r18380) -Fix (r9301): One could not share orders between buses carrying different cargos. 2009-12-02 17:35:54 +00:00
rubidium
2e506b04aa (svn r18204) -Codechange: introduce a type for Ticks and use it; furthermore document some related variables/functions 2009-11-21 12:43:09 +00:00
frosch
3cb949a17d (svn r17976) -Codechange: Move CargoClass to cargotype.h and clean up including of newgrf_cargo.h 2009-11-05 19:46:17 +00:00
rubidium
982b8ee5fc (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium
ed8788d581 (svn r17682) -Codechange: remove erroneous space before some commas 2009-10-02 15:13:15 +00:00
rubidium
310465da07 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium
06e490fadc (svn r17567) -Fix: some doxygen warnings 2009-09-18 14:23:58 +00:00
frosch
0e36260337 (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
rubidium
bedc973191 (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. 2009-09-02 17:54:40 +00:00
smatz
a0d0206f2d (svn r17292) -Codechange: use unified ToPercent() function to convert fract numbers to percents 2009-08-27 13:31:26 +00:00
rubidium
99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz
d64bdb138c (svn r17168) -Codechange: apply coding style to if and while statements 2009-08-14 17:11:59 +00:00
rubidium
5bb7b8ad35 (svn r17062) -Change: unify the naming of some 125 strings 2009-08-04 18:04:33 +00:00
rubidium
edf7b21e18 (svn r16976) -Codechange: remove WaypointID and MAX_LENGTH constants in favour of their Station variants 2009-07-28 21:06:38 +00:00
rubidium
58563eafa7 (svn r16947) -Codechange: use TileArea instead of train_tile, trainst_w and trainst_h. 2009-07-25 08:54:19 +00:00
rubidium
eacc809fa4 (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 2009-07-24 15:18:25 +00:00
rubidium
6435dc89fe (svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h 2009-07-22 10:18:19 +00:00
rubidium
100cb17fa8 (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.
2009-07-22 08:59:57 +00:00
rubidium
5e3326d4d7 (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. 2009-07-13 09:18:07 +00:00
rubidium
026f3c8feb (svn r16785) -Codechange: make ships going to buoys use OT_GOTO_WAYPOINT too 2009-07-10 18:30:02 +00:00
smatz
f6a4d61cca (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 2009-06-24 17:39:54 +00:00
smatz
61a42f42c1 (svn r16640) -Codechange: move roadstop stuff to separate files 2009-06-23 21:44:48 +00:00
yexo
3531315322 (svn r16613) -Fix [NewGRF]: some of the var action 2 80+ variables contained wrong results due to OpenTTD codechanges 2009-06-21 10:11:04 +00:00
smatz
af85994f7f (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 2009-06-06 16:54:22 +00:00
alberth
580e478e4e (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
smatz
7cd7be48c3 (svn r16475) -Codechange: move code invalidating Vehicle::last_station_visited to more logical place 2009-05-31 09:33:12 +00:00
rubidium
9f9c1cd29c (svn r16457) -Fix [FS#2925]: skipping a 'nearest depot order' because none could be found could cause multiple orders to get skipped 2009-05-28 21:12:54 +00:00
yexo
f044ad6f80 (svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them. 2009-05-26 21:59:49 +00:00
frosch
eeb3f75cfe (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
rubidium
6cfc38b97c (svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle 2009-05-23 12:27:42 +00:00
rubidium
1ceb349779 (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate 2009-05-22 20:18:45 +00:00
rubidium
4ae19b7451 (svn r16388) -Codechange: move u.air to Aircraft 2009-05-22 20:07:26 +00:00
rubidium
1e853b1226 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 2009-05-22 20:03:26 +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
512db5248e (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 2009-05-18 16:21:28 +00:00
smatz
0c10daa243 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz
d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
frosch
8bb92c110d (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 2009-05-09 13:37:18 +00:00
frosch
ac1b753f9a (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'.
2009-05-02 00:10:24 +00:00
rubidium
5c5b357043 (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. 2009-04-21 23:40:56 +00:00
yexo
cf6adbfe4f (svn r16107) -Add [NoAI]: AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders 2009-04-20 23:49:27 +00:00
frosch
09ad9d5604 (svn r16063) -Fix (r13752): MOF_COND_DESTINATION was not accepted by CmdModifyOrder(). (only used by AI) 2009-04-15 17:37:31 +00:00
rubidium
4c707c7414 (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. 2009-04-12 14:11:14 +00:00
rubidium
5c8cf85613 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium
20cb3a581c (svn r15354) -Fix (r14803): first shared of a vehicle could be NULL making it impossible to (share-)clone the vehicle. 2009-02-05 15:58:42 +00:00
Yexo
9827e5cb57 (svn r15333) -Fix: AIs weren't restricted to a maximum length for ship orders. 2009-02-04 13:52:17 +00:00
frosch
61a893d6fd (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 2009-02-01 17:14:39 +00:00
smatz
9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz
ca45774160 (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
2009-01-13 22:58:03 +00:00
rubidium
c305a35e45 (svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow) 2009-01-11 14:09:09 +00:00
rubidium
905631d9df (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) 2009-01-10 13:00:38 +00:00
rubidium
0543f50181 (svn r14952) -Codechange: unify the "can vehicle go to station" tests 2009-01-10 09:51:14 +00:00
rubidium
28ea38ae55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
glx
c61674221c (svn r14840) -Cleanup: remove duplicate includes 2009-01-04 21:02:59 +00:00
smatz
b1f7ef7076 (svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow) 2009-01-04 17:42:46 +00:00
rubidium
8252bc59e3 (svn r14830) -Fix [FS#2495]: overflow of number of orders per vehicle (based on patch by Swallow) 2009-01-04 15:53:43 +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
rubidium
3ac0875cf6 (svn r14813) -Codechange: use uint instead of 'just' unsigned. 2009-01-03 17:28:22 +00:00
rubidium
f316796629 (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) 2009-01-03 13:52:06 +00:00
rubidium
abd3b8e0d7 (svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus) 2009-01-03 13:20:32 +00:00
rubidium
e83cca7d13 (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
smatz
c88a6199a7 (svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo) 2008-12-26 18:01:15 +00:00
rubidium
965d0428bd (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. 2008-11-23 21:46:27 +00:00
rubidium
155a2ca1f4 (svn r14601) -Fix: the nearest depot and stop in depot orders didn't work together (the vehicle didn't stop). 2008-11-21 18:16:19 +00:00
smatz
09e63d5498 (svn r14577) -Fix [FS#2403]: vehicle didn't respect its 'refit in nearest depot' order (Swallow) 2008-11-11 22:51:27 +00:00
rubidium
c1ed1866a4 (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. 2008-10-30 12:32:32 +00:00
rubidium
4694b10706 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus) 2008-10-24 14:49:45 +00:00
rubidium
d13dff31c4 (svn r14449) -Fix [FS#2338]: service at nearest depot acted like go to nearest depot. 2008-10-08 11:03:43 +00:00
rubidium
e589c7e580 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium
f56e630e5c (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
smatz
a000de8418 (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, ...
2008-09-24 16:40:06 +00:00
smatz
aef674d858 (svn r14337) -Codechange: use CmdRename* and CMD_RENAME_* for vehicle, president and company renaming commands, too 2008-09-15 22:58:41 +00:00
smatz
7bc1b443eb (svn r14319) -Fix (r10760): use operator delete when deleting an order, so order pool fills up a bit slower 2008-09-14 10:32:32 +00:00
peter1138
fb77ced24a (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. 2008-09-14 08:47:18 +00:00
frosch
8c0e108960 (svn r14179) -Fix (r1): RemoveOrderFromAllVehicles() did not mark enough windows dirty. 2008-08-27 19:54:41 +00:00
frosch
b4c0a3efe3 (svn r14178) -Fix [FS#2256]: Do not evaluate GetDestination() for go-to-nearest-depot-orders. 2008-08-27 19:21:01 +00:00
smatz
1294253d68 (svn r14174) -Fix: since now, we are 'losing' things, not 'loosing' 2008-08-25 20:10:45 +00:00