Commit Graph

282 Commits

Author SHA1 Message Date
Jonathan G Rennison
1bfd96c7f2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/fmt/core.h
#	src/command_type.h
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/landscape.cpp
#	src/network/network.cpp
#	src/newgrf_object.h
#	src/object_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/script/api/script_object.hpp
#	src/script/api/script_town.cpp
#	src/table/object_land.h
#	src/timetable_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
2023-01-15 19:28:37 +00:00
Rubidium
90f1768006 Codechange: add non-nullptr asserts in cases where it should never be nullptr
Though where similar calls are checked for nullptr as in those instances of
the use of that function it can actually return nullptr. In other words, write
down the assumption that the function never returns nullptr in an assert.
2023-01-14 21:15:23 +01:00
Jonathan G Rennison
23dbd6b166 Fix wrong date/tick conversion for manual set timetable start command 2023-01-12 21:00:40 +00:00
Tyler Trahan
8063fcb6e0 Feature: Ctrl-click to bulk edit timetable speeds/waiting times (#10265) 2022-12-25 13:20:31 -05:00
Jonathan G Rennison
3877bb31ef Changing day length or date no longer changes time in minutes
Add offset variables for scaled date ticks.
Adjust offset when changing day length or date, such that scaled
date ticks remain the same.
Store _scaled_tick_counter and scaled date ticks offset in the savagame.
2022-12-16 19:15:46 +00:00
Jonathan G Rennison
f32733ef22 Command: Replace binary_length field with auxiliary data
Use for CMD_ADD_PLAN_LINE
2022-12-07 21:14:34 +00:00
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