Commit Graph

364 Commits

Author SHA1 Message Date
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
glx 603f625fda Fix f53817987: unsafe mix of type 'TileIndex' and type 'bool' 2019-07-06 15:19:33 +02:00
peter1138 f538179878 Feature: Multi-tile docks and docking points. 2019-06-30 16:46:32 +02:00
Charles Pigott 60e31c7cfa Codechange: Remove OrderTypeByte 2019-04-29 17:40:22 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
peter1138 f656f5e8eb Change: Remove ship max order distance.
It is skipped when NPF is in use.
It is trivial to work around by adding and removing dummy orders.
It is mostly alleviated by the ship path cache in YAPF.
2019-03-31 17:22:54 +01:00
Michael Lutz 2cf7ac2863 Fix #7391, 9b99b95: Don't invalidate go to depot orders of non-aircraft when invalidating hangar orders that happen to share IDs.
This was caused because hangars are referred to by station ID, which is not unique with respect to depot IDs.
2019-03-21 19:15:59 +00:00
PeterN 7f00a420cb
Fix: Runway too short for large aircraft message should not depend on plane crashes setting. (#7325) 2019-03-04 19:00:11 +00:00
Samu 9b99b95955 Fix #6574: Remove go to hangar orders when rebuilding airport
When replacing an airport with another, cancel current orders of type 'go to depot' from aircraft still heading to it if the rebuilt airport doesn't have a hangar (helicopter vs heliport), or if the airplane can't land on the rebuilt airport (airplane vs helistation).

Removes 'go to hangar' orders from all aircraft when replacing an airport with hangar with another without hangar (heliport).
2019-02-27 00:06:57 +01:00
Samu 3e0e3cfac1 Fix: Direct the aircraft to the correct location of the hangar when skipping to a go to hangar order
When manually skipping to a 'go to hangar' order in the order list, while the aircraft is flying, direct the aircraft to the correct location of the hangar.
2019-01-27 12:33:54 +01:00
Peter Nelson 81330b8d6e Change: Add path cache for ships. 2019-01-19 23:11:17 +00:00
Peter Nelson 7af53d7588 Codechange: Use const instead of magic number for ship order distance. Allow slightly further distance when following orders. 2019-01-14 19:57:07 +00:00
Eddi-z 13056aedbc Add: Conditional order for max. reliability (patch by Cirdan, #6360) (#7017) 2019-01-05 22:10:37 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
frosch 86c43ca183 (svn r26694) -Fix (r26547) [FS#6063]: When orders become invalid, reset the waiting time, but keep the travel time. 2014-07-16 22:24:55 +00:00
planetmaker 68af7a843c (svn r26567) -Cleanup: Remove unused StringID offset in orders check 2014-05-06 20:53:08 +00:00
planetmaker 34b1d89dbe (svn r26566) -Add [FS#6009]: Give a warning when a plane's orders tell it to use a runway which is too short for it (3298) 2014-05-06 20:50:58 +00:00
fonsinchen 3ee31a8f89 (svn r26547) -Codechange: Collect order travel and wait times independent of timetables 2014-05-01 14:49:16 +00:00
fonsinchen c915d9fa55 (svn r26546) -Codechange: Make order wait_time, travel_time and max_speed private 2014-05-01 14:48:44 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
frosch 9479963b3b (svn r26357) -Fix [FS#5845]: Some order options do not combine with others. (3298) 2014-02-19 20:56:44 +00:00
fonsinchen 7e91f96b92 (svn r26267) -Fix [FS#5865]: Really fix the infinite recursion problem and always consider all branches of conditional orders as possible next stopping stations. 2014-01-19 09:27:44 +00:00
fonsinchen a5152be795 (svn r26263) -Fix [FS#5865]: Don't run into infinite recursion when getting next stopping station 2014-01-16 20:50:43 +00:00
fonsinchen 54db96be43 (svn r25891) -Feature: Use smallstack to allow for multiple next hops when loading and unloading. 2013-10-20 13:47:58 +00:00
fonsinchen 5c0b766ed9 (svn r25736) -Codechange: move condition prediction out of GetNextStoppingOrder so that we can access both branches in calling code 2013-08-20 21:22:35 +00:00
fonsinchen b98de55d22 (svn r25718) -Fix: return INVALID from GetNextStoppingStation if vehicle would have to unload everything at this same station at the next stop 2013-08-11 11:00:09 +00:00
frosch 840f836704 (svn r25562) -Fix [FS#5633]: If the next order cannot be resolved, reset the current order property instead of leaving it in an intermediate state. 2013-07-05 19:09:18 +00:00
fonsinchen 04e3eb6fab (svn r25361) -Feature: distribute cargo according to plan given by linkgraph 2013-06-09 13:03:48 +00:00
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 2013-05-19 14:22:04 +00:00
frosch 22bb015f3d (svn r25041) -Remove [FS#3764-ish]: ordered refit with subtypes, since the cases where it worked were corner cases rather than the general case. 2013-02-24 16:41:51 +00:00
rubidium 369a6f9d1b (svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138) 2013-02-14 17:06:49 +00:00
peter1138 eec1a0aa11 (svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders. 2013-01-23 18:33:28 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
michi_cc c75962e04c (svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum. 2012-12-20 19:44:02 +00:00
michi_cc bfbf74fe7d (svn r24457) -Fix [FS#5264] (r23087): Changing auto-refit for a 'goto station' order was inadvertently modifying the full load state. 2012-08-03 14:15:52 +00:00
frosch 0ead281439 (svn r24390) -Change [FS#5213]: Allow cloning of orders which are unreachable for the destination vehicle if they were already unreachable for the source vehicle. This makes cloning/autorenewing/autoreplacing behave more smooth during station reconstruction. 2012-07-09 18:45:35 +00:00
frosch 00b3ff80bb (svn r24282) -Codechange: Add AddVehicleAdviceNewsItem function to preemptively deduplicate code. 2012-05-26 14:15:52 +00:00
frosch 70ad670125 (svn r24086) -Fix [FS#5131] (r23504): Cloning orders of aircraft with limited range failed. 2012-04-01 19:56:08 +00:00
michi_cc f2c694c8fb (svn r23947) -Feature: Timetabled maximum travel speeds for non-flying vehicles. 2012-02-14 17:04:06 +00:00
frosch a60f19ae14 (svn r23859) -Fix: Inserting conditional orders for ships checked the wrong orders wrt. maximum distance. 2012-01-27 22:08:51 +00:00
rubidium aa80687b65 (svn r23849) -Fix [FS#5008]: when the network is lagging, you try to copy a vehicle's order but accidentally create a station order and then copy the vehicle's order (before the first command is executed) one could trigger an assertion from the pool. Simplify the ancient code and make it more fool proof, even though it could stop copying a vehicle's orders slightly earlier than it would now... but who has come near that limit and really needed that many orders? 2012-01-25 18:34:38 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
planetmaker 86c1947579 (svn r23511) -Fix [FS#4885] (r23504): Aircraft orders could not be shared anymore when they had no range property declared (Hirundo) 2011-12-13 21:10:43 +00:00
michi_cc 34ffd08a19 (svn r23505) -Add: Indication in the order list if the next destination of an order is out of range. 2011-12-13 00:43:48 +00:00
michi_cc def8e7215b (svn r23504) -Feature: Aircraft range. 2011-12-13 00:43:35 +00:00
rubidium d9b9ac6013 (svn r23464) -Fix [FS#4876]: clear the backed up orders of a removed station as well, otherwise one could create orders to a station that was never in the original backupped orders. For example a road vehicle trying to go to a buoy. 2011-12-09 20:48:13 +00:00
rubidium fb63543e2a (svn r23199) -Fix [FS#4822]: oil rigs that "expired" did not get removed from the station list 2011-11-12 18:06:34 +00:00
michi_cc f200ffa90c (svn r23087) -Feature: Auto-refitting of vehicles during loading at a station when the vehicle allows it. 2011-11-04 00:38:51 +00:00
frosch 4e5d841d66 (svn r22858) -Feature: Conditional order depending on remaining lifetime of a vehicle. (monoid) 2011-08-30 20:21:01 +00:00
rubidium 4836a6e50e (svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid) 2011-08-26 16:39:02 +00:00
frosch 55a21a940d (svn r22620) -Change [FS#4651]: Enforce refit orders to be 'always go to depot' orders; service-only and stop-in-depot orders make no sense with refitting. 2011-07-02 16:45:54 +00:00
frosch f71a96d584 (svn r22589) -Fix [FS#4641]: PBS order forecasting modified the current order index in case of a goto-nearest-depot order and no depot could be found. 2011-06-14 19:19:13 +00:00
planetmaker 43c8cd1d5e (svn r22473) -Codechange: Automatic orders are better called implicit orders as no real order influencing path finding is added 2011-05-18 12:19:58 +00:00
frosch 8dd2f413bd (svn r22331) -Change: When inserting an (automatic) order A in front of an order B, disable modifications of automatic orders for all vehicles currently heading for B as we do not know whether they will reach A or B first. (except for the vehicle causing the insertion of the automatic order itself) 2011-04-16 17:06:59 +00:00
frosch 181fd5e3ab (svn r22330) -Change: When a conditional order triggers and causes skipping to a particular order, disable modifications to automatic orders. till reaching the next real order, as we do not know whether to change the targets of conditional orders when inserting automatic orders. (So, when the vehicle skips to an order and later inserts an automatic order, the conditional order will still point to the same order, so the automatic order will be inserted again the next time.) 2011-04-16 17:02:28 +00:00
frosch 30b4bad60c (svn r22326) -Fix: Destinations of conditional orders were update incorrectly when deleting orders in front of the conditional orders, if the target order wwas the order just before of the conditional order. 2011-04-16 16:26:08 +00:00
smatz 469c448eb0 (svn r22200) -Fix (r21642): removing a station order could stop when removing first automatic order 2011-03-05 13:59:23 +00:00
smatz 756cc6cf65 (svn r22116) -Codechange: use PoolBase::Clean() at more places 2011-02-19 23:05:47 +00:00
yexo 72e027e4d6 (svn r22105) -Fix: crash when copying an orderlist to a vehicle that already had orders 2011-02-18 21:46:45 +00:00
frosch b7713a7e85 (svn r22046) -Fix [FS#4487]: Make sure order indices stay in range when copying, sharing, unsharing or deleting all orders. 2011-02-09 21:40:32 +00:00
frosch 3a787f5a0b (svn r22045) -Codechange: Move cancelling the current loading order on deleting the current order to a separate function. 2011-02-09 21:39:22 +00:00
smatz 364ef8e6e6 (svn r22024) -Fix [FS#4468]: verify we can allocate an OrderList before we actually try to do so (Rubidium) 2011-02-08 18:29:30 +00:00
rubidium 1d0d7635e0 (svn r22021) -Fix (r22019): ofcourse make doesn't notice files are gone, so it doesn't recompile everything that needs to be recompiled... 2011-02-07 22:49:38 +00:00
rubidium 773c6765e6 (svn r21961) -Remove: limitation that not loading and not unloading is mutual exclusive 2011-02-04 16:07:42 +00:00
frosch 49ea0e9092 (svn r21934) -Fix (r21933): The original plan was to run the regression before committing. 2011-01-31 20:56:02 +00:00
frosch a97d52a29a (svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
2011-01-31 20:44:15 +00:00
rubidium 9ca4b629cd (svn r21846) -Codechange: move documentation towards the code to make it more likely to be updated [o-s]. 2011-01-18 23:09:43 +00:00
rubidium bd9f07e5a0 (svn r21809) -Fix [FS#4404]: remove unreached automatic orders as well when reaching an ordered waypoint or depot (fonsinchen) 2011-01-15 18:19:04 +00:00
frosch 716f4e924e (svn r21744) -Fix: Allow Ctrl+Clicking automatic orders for scrolling to their destination. 2011-01-09 13:11:50 +00:00
rubidium e2ef4aff46 (svn r21739) -Fix [FS#4388] (r19657): make clearing refit orders work again 2011-01-07 12:45:12 +00:00
frosch 29a0dd65a9 (svn r21737) -Fix (r1)[FS#4384-ish]: A loading order was also marked as 'not part of orders' when the order before the current order was deleted. 2011-01-06 22:24:02 +00:00
rubidium 28f16a732f (svn r21644) -Change: keep showing "No orders" when the order list is filled with only automatic orders 2010-12-26 13:25:34 +00:00
rubidium 64f04c3a74 (svn r21642) -Feature: concept of automatic station orders; add stub orders for intermediate stations and remove them when not visiting them anymore. This allows you to see what trains visit a station without actually having to order a vehicle to stop at all stations. Based on patch by fonsinchen 2010-12-26 09:03:19 +00:00
rubidium e9a595bda0 (svn r21603) -Codechange: no need to assign something to a variable and then test it for NULL when you're never using it again 2010-12-22 21:19:39 +00:00
rubidium a38a1e7b0d (svn r21602) -Codechange: split actual adding/removing of orders to/from a vehicle's order list from the validation of those (user) commands. Based on patch by fonsinchen 2010-12-22 21:16:34 +00:00
terkhen 79e2b3153d (svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class. 2010-12-14 21:26:03 +00:00
rubidium 23369337c1 (svn r21466) -Codechange: make VehicleHasDepotOrders a function of Vehicle. 2010-12-11 13:48:30 +00:00
alberth ab50f74d7f (svn r21273) -Codechange: Return values should start at the same line. 2010-11-20 15:44:24 +00:00
rubidium 8ce06a09b9 (svn r20600) -Fix [FS#4075]: "downscale" a full load order to a load if possible order when removing the order while the vehicle is loading. This to prevent the vehicle from (possibly) staying forever in the station 2010-08-23 21:21:41 +00:00
rubidium f3864181b6 (svn r20580) -Fix [FS#4039]: go via station and go via waypoint behaved differently when a train went back to the same (unordered) station again 2010-08-20 15:30:21 +00:00
rubidium e89a0fb7f9 (svn r20571) -Codechange: free/reserve some bits in the order commands to increase the vehicle pool limit 2010-08-19 20:39:12 +00:00
rubidium 926594b599 (svn r20547) -Change: the way order backups are performed. Now restoring an order doesn't require up to 765 commands. 2010-08-18 20:48:38 +00:00
rubidium 38ca44594f (svn r20539) -Codechange: make order backups more self-contained. 2010-08-18 15:15:59 +00:00
rubidium 15514baf8b (svn r20498) -Fix [FS#4030]: ignore the non-stop state when comparing one order type to another order type 2010-08-15 13:17:04 +00:00
rubidium cde8a44a11 (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 ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
rubidium 8df78e7a7b (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 be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
frosch 2365a4dea0 (svn r19657) -Fix: Add saneness checks for front vehicles. 2010-04-17 14:55:49 +00:00
frosch 75d4bc947d (svn r19654) -Codechange: Use Extract<> in more places. 2010-04-17 13:31:41 +00:00
alberth 05d705e077 (svn r19494) -Codechange: Remove _error_message. 2010-03-20 17:58:24 +00:00
alberth f05a8635fd (svn r19483) -Codechange: Code layout fixes, and parentheses reduction. 2010-03-20 15:30:57 +00:00
yexo 414071d07f (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 c4a88ce022 (svn r19455) -Codechange: split all airport information in Station to a seperate class 2010-03-18 21:02:20 +00:00
alberth 7cc68f493d (svn r19405) -Codechange: CheckOwnership() returns a CommandCost. 2010-03-13 17:11:28 +00:00
frosch 3222ace3e1 (svn r19215) -Codechange: Add Order::GetLocation() to deduplicate code. 2010-02-22 20:36:20 +00:00
frosch 945d2c08e0 (svn r19210) -Fix: GetDestination() is invalid for nearest-depot orders. 2010-02-22 20:08:16 +00:00
rubidium 82fc28f77f (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