Jonathan G Rennison
38c2fa3b66
Add a change counter value special order type
2022-10-13 20:09:20 +01:00
Jonathan G Rennison
71b6d7a502
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/arabic_egypt.txt
# src/station_cmd.cpp
# src/station_cmd.h
# src/timetable_cmd.cpp
# src/train_cmd.cpp
2022-07-30 20:38:34 +01:00
Nicolas Chappe
6d154e72dd
Fix #8584 : Vehicles with shared orders getting invalid or unexpected start dates
2022-07-24 09:28:01 +02:00
Jonathan G Rennison
4991309018
Fix timetable autofill activation when scheduled dispatch is active
2022-05-17 20:31:21 +01:00
Jonathan G Rennison
ad47275d53
Disabling timetable automation without ctrl no longer clears timetable
2022-05-17 19:41:11 +01:00
Jonathan G Rennison
e5a421b65a
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/economy.cpp
# src/linkgraph/refresh.cpp
# src/order_cmd.cpp
# src/saveload/vehicle_sl.cpp
# src/station.cpp
# src/station_base.h
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/vehicle_cmd.cpp
2022-03-04 18:17:44 +00:00
Niels Martin Hansen
e68bf58989
Codechange: Use anonymous union for vehicle orders/old orders list
2022-02-15 20:01:10 +01:00
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
2022-02-02 21:30:15 +01:00
Jonathan G Rennison
91ed26415e
Fix manual setting of conditional order jump taken travel times
2022-01-15 15:33:34 +00:00
Jonathan G Rennison
543433218c
Ensure that timetable and scheduled dispatch windows redrawn as required
...
Reduce inefficient window and shared order list iteration
2022-01-15 00:21:31 +00:00
Jonathan G Rennison
21ef4902c6
Show predicted scheduled dispatch arr/dep times in timetable window
2022-01-14 22:53:55 +00:00
Jonathan G Rennison
ff3473fe6a
Add support for multiple scheduled dispatch schedules per order list
2022-01-13 19:46:43 +00:00
Jonathan G Rennison
9e1a78c86e
Clear order wait times when changing to a non-stopping order
2022-01-12 19:43:51 +00:00
Jonathan G Rennison
dd312ef9a4
Remove asserts on input from CmdChangeTimetable
2022-01-12 19:43:51 +00:00
Michael Lutz
2637c06f88
Codechange: Un-bitstuff timetable commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
2021-12-16 22:28:32 +01:00
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
2021-12-16 22:28:32 +01:00
Jonathan G Rennison
4e25fa199c
Add a "default" mode to TT autofill rounding setting, set as default
...
Use game ticks per minute or day ticks
2021-12-03 12:10:30 +00:00
Jonathan G Rennison
2fc35aed2f
Fix #300 : Toggling auto separation does not redraw sched dispatch enable button
2021-07-17 21:02:05 +01:00
Jonathan G Rennison
1002c6d9d2
Fix various compiler warnings
...
See: #267
2021-06-11 22:54:27 +01:00
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
2021-05-29 19:02:18 +02:00
Jonathan G Rennison
8a814bbfe3
Add release slot train order
2021-02-10 22:30:22 +00:00
Jonathan G Rennison
b7ddd486cf
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/aircraft_cmd.cpp
# src/blitter/32bpp_anim.cpp
# src/cargopacket.cpp
# src/cheat_gui.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/core/pool_func.hpp
# src/date.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/ground_vehicle.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/german.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/mcf.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf_engine.cpp
# src/newgrf_station.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_common.hpp
# src/saveload/saveload.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/station_kdtree.h
# src/string_func.h
# src/table/settings.ini
# src/tgp.cpp
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/viewport_sprite_sorter_sse4.cpp
# src/window.cpp
2021-02-01 17:07:34 +00:00
Jonathan G Rennison
ac5b0d8017
Fix crash in auto-separation when all orders removed
2021-01-25 02:21:02 +00:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Jonathan G Rennison
6e17f9bf5d
Use p3 for order indices which don't fit into p1
...
Fix insert/modify order overflowing p1
Don't use text field for change timetable
2020-10-17 17:25:44 +01:00
Jonathan G Rennison
bbbda0739b
Add third DoCommand parameter p3
2020-10-17 17:25:44 +01:00
Jonathan G Rennison
6dd7b2869c
Increase per-vehicle order limit to 64k
...
See: #110
2020-10-12 23:48:54 +01:00
Jonathan G Rennison
1f5de8b82c
Auto separation: Remove circular linked list, use new algorithm
2020-07-09 02:15:16 +01:00
Jonathan G Rennison
c81c805856
Timetable auto: Add an absolute threshold for congestion detection
...
In addition to existing proportional threshold
2020-07-07 20:28:56 +01:00
Jonathan G Rennison
73340fc112
Timetable auto: Clear timetabled flag with travel time when congested
2020-07-07 20:20:46 +01:00
Jonathan G Rennison
3a65346abc
Timetable auto: Skip congestion check for depot service orders
2020-07-07 20:20:12 +01:00
Jonathan G Rennison
b7a9f9901a
Auto-separation: Do not clear separation on congestion
...
Clear timetable started, and do no separate using vehicles
without timetable started
2020-07-07 18:21:41 +01:00
Jonathan G Rennison
fdd8ae2b9b
Whitespace fix
2020-07-07 18:13:53 +01:00
Jonathan G Rennison
cd89b246a7
Reset vehicle lateness when auto-timetable jam detected
2020-07-06 17:27:15 +01:00
Jonathan G Rennison
efaeb9e182
Scheduled dispatch: Fix wrong order index for getting dispatch wait time
...
See: #141
2020-04-09 22:26:06 +01:00
Jonathan G Rennison
3f49f1b749
Scheduled dispatch: Fix wrong type in GetScheduledDispatchTime
2020-04-09 22:25:33 +01:00
Jonathan G Rennison
53032a8473
Scheduled dispatch: Fix lateness when waiting time at dispatch point change
...
See: #141
2020-04-09 22:25:33 +01:00
Jonathan G Rennison
a72b4881a0
Scheduled dispatch: Fix double dispatch request when no timetable set
...
See: #141
2020-04-09 21:27:09 +01:00
Jonathan G Rennison
bca0187aaf
Schedule dispatch: Warn about and ignore departure slots outside the duration
2020-02-09 23:17:19 +00:00
Jonathan G Rennison
9917a1daef
Scheduled dispatch: Add hints about dispatch order to timetable window
...
Adjust condition for dispatch order
2020-01-29 00:25:09 +00:00
Jonathan G Rennison
98d76832fc
Scheduled dispatch: Do not require timetable to be fully timetabled
2020-01-28 19:21:56 +00:00
Jonathan G Rennison
e53e960c50
Scheduled dispatch: Improvements to handling first order wait times
2020-01-27 20:31:12 +00:00
Jonathan G Rennison
f79ec13852
Timetable automation: Bias wait time adjustments in positive direction
...
Remove case where wait time is set directly when it is less than half
the current value, this is still used for travel times.
2020-01-17 18:45:45 +00:00
Jonathan G Rennison
7f2e6fb597
Exclude waypoint orders from set timetabled wait time for all orders
...
See #125
2020-01-03 14:01:24 +00:00
Jonathan G Rennison
cbdd9f84d8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_gui.cpp
# src/lang/korean.txt
# src/video/sdl2_v.cpp
# src/video/sdl2_v.h
# src/window.cpp
# src/window_gui.h
2019-11-12 18:43:10 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Jonathan G Rennison
f9a8c3da46
Fix locked wait times not being preserved when moving orders to new station
2019-09-15 11:37:10 +01:00
Jonathan G Rennison
a7cfe167a3
Handle case where vehicles have same unitnumber in VehicleTimetableSorter
2019-05-27 13:07:49 +01:00
Jonathan G Rennison
bd2fdde759
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/sort_func.hpp
# src/rail_cmd.cpp
# src/timetable_cmd.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
2019-04-23 08:11:52 +01:00
glx
ebd4f32d15
Cleanup: remove core/sort_func.hpp as it's not used anymore
2019-04-18 21:49:34 +02:00
Jonathan G Rennison
0d93ecb6bf
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/alloc_type.hpp
# src/group_gui.cpp
# src/newgrf.cpp
# src/saveload/economy_sl.cpp
# src/saveload/map_sl.cpp
# src/station_cmd.cpp
2019-04-16 18:03:08 +01:00
glx
801cbea9cc
Codechange: use std::sort() for all std::vector types
2019-04-13 12:49:18 +01:00
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
2019-04-11 18:14:13 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Jonathan G Rennison
58433c7667
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/smallmap_type.hpp
# src/lang/korean.txt
# src/network/network_content.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
2019-03-30 20:45:58 +00:00
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
2019-03-28 00:09:33 +01:00
Jonathan G Rennison
ba34ec7ade
Merge branch 'master' into jgrpp
...
Replace build and refit, and group collapse implementations
Fix template creation build and refit
# Conflicts:
# Makefile.bundle.in
# config.lib
# src/animated_tile.cpp
# src/blitter/32bpp_anim.hpp
# src/blitter/32bpp_base.hpp
# src/blitter/8bpp_base.hpp
# src/blitter/null.hpp
# src/build_vehicle_gui.cpp
# src/command.cpp
# src/command_func.h
# src/console_gui.cpp
# src/core/smallstack_type.hpp
# src/date.cpp
# src/debug.cpp
# src/genworld_gui.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/lang/korean.txt
# src/linkgraph/linkgraph_gui.h
# src/main_gui.cpp
# src/misc_gui.cpp
# src/network/core/game.h
# src/network/core/packet.cpp
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network_content.cpp
# src/network/network_type.h
# src/network/network_udp.cpp
# src/newgrf_house.h
# src/openttd.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/os/unix/crashlog_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/osk_gui.cpp
# src/pathfinder/opf/opf_ship.cpp
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/smallmap_gui.h
# src/station_base.h
# src/station_cmd.cpp
# src/table/gameopt_settings.ini
# src/table/newgrf_debug_data.h
# src/table/settings.ini
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/vehiclelist.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
2019-03-27 18:12:04 +00:00
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
2019-03-26 20:15:57 +00:00
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson
2bc2de9034
Codechange: Replaced SmallVector::Find() with std::find()
2019-03-26 20:15:57 +00:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
2019-03-26 20:15:57 +00:00
Jonathan G Rennison
a67dc210b3
Fix vehicle ID truncation in CmdAutomateTimetable
2019-03-08 18:36:21 +00:00
Jonathan G Rennison
32353fdf03
Fix handling, display and input of hhmm times in timetables
...
With high ticks/min and day length values
2019-01-30 20:46:36 +00:00
Jonathan G Rennison
0e3986c39c
Extend timetable wait/travel times from 16 to 32 bits wide
2018-10-22 19:12:38 +01:00
Jonathan G Rennison
ce6d6db4d5
Fix setting timetable leave early flag of current order
2018-09-10 04:54:56 +01:00
Jonathan G Rennison
6578d94e63
Add support for timetabled wait times at waypoints
2018-08-14 12:35:05 +01:00
Jonathan G Rennison
e55a327c09
Enable locking timetable travel times
2018-08-13 01:42:14 +01:00
Jonathan G Rennison
5344ec1931
Add a "leave early" order timetable flag
...
Re-arrange timetable GUI slightly.
Add an "extra" drop-down item.
2018-08-13 01:40:17 +01:00
Jonathan G Rennison
3ed5d8f09f
Add mechanism to lock wait times in timetable against autofill/automate changes
2018-07-19 00:32:24 +01:00
Jonathan G Rennison
71852c3f37
Fix timetable auto-separation with go via station orders
2018-05-04 00:21:43 +01:00
Jonathan G Rennison
78838ee2a2
Add freight train load/unload mode: through load
2018-03-26 20:12:50 +01:00
Jonathan G Rennison
bb6b8d8cd6
Increase verbosity of some assertion failure messages
2018-01-29 00:18:49 +00:00
Jonathan G Rennison
218085c535
Timetable: Implement autofill/automate for taken conditional orders.
...
Fix wrong timetable values being set after using skip or send to depot.
Add timetabled flag for conditional order branch taken travel time.
2017-12-18 01:26:27 +00:00
Jonathan G Rennison
4528004bb8
Call UpdateScheduledDispatch() at first waiting, even when not travelling.
...
This is so that the schedule start point is advanced if a train
arrives at the first waiting point before but leaves at or after the
schedule end time.
2017-05-31 19:03:25 +01:00
innocenat
0b8f0e64ec
Scheduled Dispatch feature
...
Code is tested and run well on small-ish train network. Not tested extensively.
2017-05-30 01:37:08 +07:00
Jonathan G Rennison
6ec8722258
Minor fixes and refactoring of timetable automation set/clear command.
2017-01-24 19:21:00 +00:00
Jonathan G Rennison
375b069f82
Replace day length scaled tick macros with global variables.
...
This is to avoid needing to expensively re-calculate them all the time.
Instead update them by incrementing.
2016-09-10 01:03:48 +01:00
Jonathan G Rennison
d8a083b666
Allow timetable start dates to be set with full precision.
...
This avoids rounding of start dates when using minutes and
day length > 1.
2016-05-11 21:31:31 +01:00
Jonathan G Rennison
4c5173b6bf
Merge branch 'auto_timetables-sx' into jgrpp
...
# Conflicts:
# src/lang/english.txt
# src/saveload/afterload.cpp
# src/saveload/extended_ver_sl.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/table/company_settings.ini
# src/vehicle.cpp
2016-05-08 01:13:35 +01:00
Jonathan G Rennison
d59252d15b
Timetable auto separation is now per vehicle, with a company default.
...
Remove global on-off setting.
Add button to timetable GUI.
Add company setting to control default for new vehicles.
Fix automate, start date, change time and autofill buttons
being shown enabled for other companies' vehicles.
2016-05-08 01:12:07 +01:00
Jonathan G Rennison
efcdd6c36f
Remove global automated timetable setting.
2016-05-06 23:33:12 +01:00
Jonathan G Rennison
ff5ee52b94
Add a company setting to control auto-fill timetable rounding.
2016-05-06 23:16:17 +01:00
Jonathan G Rennison
c0cc72ad96
Implement change timetable waiting time for all stations.
...
Loosely based on http://www.tt-forums.net/viewtopic.php?f=32&t=50274
2016-03-02 22:36:21 +00:00
Jonathan G Rennison
d9466fa424
Merge branch 'auto_timetables-sx' into jgrpp
...
Fix day length scaling issue.
# Conflicts:
# src/timetable_cmd.cpp
2016-01-30 16:23:38 +00:00
Jonathan G Rennison
b43c08857b
Merge branch 'auto_timetables' into auto_timetables-sx
...
# Conflicts:
# src/saveload/saveload.h
2016-01-30 16:05:56 +00:00
Jonathan G Rennison
712d5e9c66
Fix set distributed timetable start not working when using minutes.
...
Remove WALLCLOCK_NETWORK_COMPATIBLE, it's a pain and not useful.
Whitespace fixes.
2016-01-30 16:02:05 +00:00
Jonathan G Rennison
c877e10272
Avoid set distributed timetable start setting start dates in the past.
...
Adjust start dates for vehicles before the base one forward by one
timetable duration if they would start before the present date.
Whitespace/format fixes.
2016-01-30 15:20:48 +00:00
Jonathan G Rennison
b24f540ac4
Fix distribution of shared order timetable start dates.
...
(Ctrl-click on start date in timetable GUI)
This is due to a scaling issue.
(cherry picked from commit 37140f0038
)
2016-01-19 19:32:53 +00:00
Jonathan G Rennison
64f408dd32
Merge branch 'auto_timetables-sx' into jgrpp
2016-01-19 19:32:37 +00:00
Jonathan G Rennison
4d368c24ed
Merge branch 'auto_timetables' into auto_timetables-sx
2016-01-19 19:29:26 +00:00
Jonathan G Rennison
2d3a75e3c0
Revert "Fix distribution of shared order timetable start dates."
...
This reverts commit 37140f0038
.
This is in the wrong branch.
2016-01-19 19:28:32 +00:00
Jonathan G Rennison
cd23d17745
Merge branch 'auto_timetables-sx' into jgrpp
...
Conflicts:
src/vehicle.cpp
2015-11-30 22:32:29 +00:00
Jonathan G Rennison
9eb07b4a77
Merge branch 'auto_timetables' into auto_timetables-sx
2015-11-30 22:31:08 +00:00
Jonathan G Rennison
d2b87485fb
When clearing auto timetables, mark times as undefined rather than 0.
...
Fix unautomate timetable having reversed ctrl key behaviour,
update tooltip string with ctrl behaviour.
Minor comment/whitespace fixes.
2015-11-30 22:28:38 +00:00
Jonathan G Rennison
a7e9c9ce65
Fix ClearSeparation() not being called when auto-separation disabled.
...
This can causes crashes if auto-separation is re-enabled as the
next/prev separation ptrs can end up dangling.
2015-11-30 22:28:20 +00:00
Jonathan G Rennison
b47c8825e7
Merge branch 'auto_timetables-sx' into jgrpp
2015-11-01 01:56:16 +00:00
Jonathan G Rennison
fe598efde5
Merge branch 'auto_timetables' into auto_timetables-sx
2015-11-01 01:56:06 +00:00
Jonathan G Rennison
37140f0038
Fix distribution of shared order timetable start dates.
...
(Ctrl-click on start date in timetable GUI)
This is due to a scaling issue.
2015-11-01 01:55:46 +00:00