Commit Graph

239 Commits

Author SHA1 Message Date
Jonathan G Rennison
c6893388ab Fix order flags collision in OT_GOTO_DEPOT
Move depot wait is timetabled flag to xflags
2024-02-19 00:41:05 +00:00
Jonathan G Rennison
fdd666f66a Merge tag '14.0-beta1' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/squirrel/sqcompiler.cpp
#	src/aircraft.h
#	src/animated_tile.h
#	src/base_consist.h
#	src/cargotype.h
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/engine_gui.cpp
#	src/industry_gui.cpp
#	src/lang/english.txt
#	src/music/extmidi.cpp
#	src/network/core/network_game_info.cpp
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf_industries.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/order_type.h
#	src/os/macosx/misc_osx.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rail_gui.cpp
#	src/rail_gui.h
#	src/roadveh.h
#	src/roadveh_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/script/api/script_town.cpp
#	src/settingsgen/settingsgen.cpp
#	src/ship.h
#	src/ship_cmd.cpp
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/strgen/strgen.h
#	src/table/settings/script_settings.ini
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_cmd.h
#	src/town_gui.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/waypoint_base.h
#	src/widget.cpp
2024-02-18 22:22:29 +00:00
Jonathan G Rennison
7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
2024-02-13 21:34:09 +00:00
Jonathan G Rennison
0ea57528c9 Rename DateTicksScaled to StateTicks
Rename various other related/derived types and variables
2024-02-07 18:36:47 +00:00
Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot (#11945) 2024-02-03 08:04:24 -05:00
Jonathan G Rennison
9bea1e3cc3 Scheduled dispatch: Allow tagging departure slots, add to conditional order 2024-01-28 17:14:03 +00:00
Jonathan G Rennison
6c329871f1 Scheduled dispatch: Add per dispatch slot flags field
Add flag for slot re-use
2024-01-28 01:48:54 +00:00
Jonathan G Rennison
b01fd1607a Re-order various structs to reduce holes/padding 2024-01-24 23:17:53 +00:00
Jonathan G Rennison
9be3dfa69c Scheduled dispatch: Use an invalid value for no last dispatch, not 0 2024-01-22 18:27:28 +00:00
Jonathan G Rennison
5b7689a0aa Scheduled dispatch: Add flag to re-use all dispatch slots 2024-01-22 01:35:04 +00:00
Jonathan G Rennison
041f36d565 Add try to acquire slot order subtype 2024-01-11 21:04:49 +00:00
Jonathan G Rennison
2fc631b15b Rename OT_RELEASE_SLOT to OT_SLOT, use a subtype field 2024-01-11 19:01:25 +00:00
Jonathan G Rennison
3050620189 Merge branch 'master' into jgrpp
# Conflicts:
#	src/autoreplace_cmd.cpp
#	src/build_vehicle_gui.cpp
#	src/cargotype.cpp
#	src/economy.cpp
#	src/engine_gui.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/linkgraph/refresh.cpp
#	src/linkgraph/refresh.h
#	src/newgrf.cpp
#	src/newgrf_airporttiles.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_station.cpp
#	src/newgrf_station.h
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_func.h
#	src/order_gui.cpp
#	src/pathfinder/pathfinder_type.h
#	src/saveload/afterload.cpp
#	src/subsidy_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
2024-01-11 17:55:16 +00:00
Peter Nelson
400ae65ff2 Codechange: Redefine some cargo-related values in terms of CargoID instead of CargoType.
Values used as special filter types are now defined as offsets from NUM_CARGO instead of confusingly reusing CARGO_NO_REFIT/CARGO_AUTO_REFIT types.
2024-01-09 18:56:05 +00:00
Jonathan G Rennison
97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
2024-01-07 17:20:41 +00:00
Jonathan G Rennison
9ea49d6680 Only compile OrderList::DebugCheckSanity when WITH_ASSERT defined 2024-01-02 14:50:33 +00:00
Jonathan G Rennison
03e0ec8276 Strong typedef: Use strong typedefs for date, date tick, minutes types
Add delta types
Adjust/add type conversion functions
Add various utility methods on types
Remove the various minute macros
Fix some minute conversion inconsistencies
2023-12-19 02:39:54 +00:00
Jonathan G Rennison
e9599fd4be Scheduled dispatch: Remove scheduled_dispatch_start_full_date_fract
Use DateTicksScaled
2023-12-17 23:00:45 +00:00
Jonathan G Rennison
88670a230f Merge branch 'master' into jgrpp
# Conflicts:
#	src/articulated_vehicles.cpp
#	src/articulated_vehicles.h
#	src/base_media_base.h
#	src/base_media_func.h
#	src/build_vehicle_gui.cpp
#	src/dock_gui.cpp
#	src/main_gui.cpp
#	src/music_gui.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content.cpp
#	src/newgrf.cpp
#	src/newgrf_roadstop.cpp
#	src/os/windows/string_uniscribe.h
#	src/os/windows/win32.cpp
#	src/rail_gui.cpp
#	src/road.cpp
#	src/road_gui.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.cpp
#	src/strings.cpp
#	src/terraform_gui.cpp
#	src/tests/test_script_admin.cpp
#	src/tests/test_window_desc.cpp
#	src/timer/timer_game_calendar.h
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/viewport.cpp
#	src/widget_type.h
#	src/window.cpp
#	src/window_gui.h
2023-11-29 20:42:29 +00:00
Jonathan G Rennison
0d4d4a9cac Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/3rdparty/squirrel/squirrel/sqclosure.h
#	src/3rdparty/squirrel/squirrel/sqobject.h
#	src/3rdparty/squirrel/squirrel/sqvm.h
#	src/aircraft.h
#	src/airport_gui.cpp
#	src/blitter/32bpp_sse_func.hpp
#	src/blitter/null.hpp
#	src/bridge_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/cargotype.h
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/date_gui.cpp
#	src/depot_gui.cpp
#	src/dock_gui.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/fileio.cpp
#	src/fios.cpp
#	src/fios_gui.cpp
#	src/fontcache/spritefontcache.h
#	src/framerate_gui.cpp
#	src/game/game_text.cpp
#	src/gamelog.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/highscore_gui.cpp
#	src/hotkeys.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/main_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_gui.cpp
#	src/network/core/tcp_game.cpp
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf_airport.cpp
#	src/newgrf_airport.h
#	src/newgrf_airporttiles.cpp
#	src/newgrf_airporttiles.h
#	src/newgrf_animation_base.h
#	src/newgrf_canal.cpp
#	src/newgrf_commons.h
#	src/newgrf_config.cpp
#	src/newgrf_debug_gui.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_engine.h
#	src/newgrf_generic.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/newgrf_industries.cpp
#	src/newgrf_industries.h
#	src/newgrf_industrytiles.cpp
#	src/newgrf_industrytiles.h
#	src/newgrf_object.cpp
#	src/newgrf_object.h
#	src/newgrf_railtype.cpp
#	src/newgrf_railtype.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_roadstop.h
#	src/newgrf_roadtype.cpp
#	src/newgrf_roadtype.h
#	src/newgrf_spritegroup.cpp
#	src/newgrf_spritegroup.h
#	src/newgrf_station.cpp
#	src/newgrf_station.h
#	src/newgrf_town.cpp
#	src/newgrf_town.h
#	src/news_gui.cpp
#	src/object_gui.cpp
#	src/order_gui.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/os/windows/win32.cpp
#	src/os/windows/win32_main.cpp
#	src/pathfinder/npf/npf.cpp
#	src/pathfinder/npf/queue.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/roadveh.h
#	src/saveload/saveload.cpp
#	src/screenshot.cpp
#	src/script/api/script_text.hpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_table.cpp
#	src/signs_cmd.cpp
#	src/signs_gui.cpp
#	src/smallmap_gui.cpp
#	src/smallmap_gui.h
#	src/spriteloader/grf.hpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/station_map.h
#	src/statusbar_gui.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/table/newgrf_debug_data.h
#	src/terraform_gui.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_window.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/transparency_gui.cpp
#	src/vehicle_gui.cpp
#	src/water_cmd.cpp
#	src/waypoint_cmd.cpp
#	src/widget.cpp
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/rail_widget.h
#	src/widgets/terraform_widget.h
#	src/window.cpp
#	src/window_gui.h
2023-11-20 22:27:05 +00:00
Peter Nelson
7d4a91ef9e
Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
2023-11-03 21:21:00 +00:00
frosch
b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
Tyler Trahan
701a61c9af Codechange: Delete date_type.h 2023-09-10 08:40:25 -04:00
Tyler Trahan
77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 2023-09-10 08:40:25 -04:00
Tyler Trahan
fca2b37726 Codechange: Move Ticks into their own class 2023-09-10 08:40:25 -04:00
Jonathan G Rennison
02aecca5ae Conditional order: Replace "next station" with manually set station 2023-08-27 13:47:40 +01:00
Jonathan G Rennison
c11be37fd9 Add xdata2 field to OrderExtraInfo 2023-08-27 10:03:37 +01:00
Rubidium
eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Jonathan G Rennison
ac2f9a21e8 Move upstream saveload to src/saveload/, move jgrpp saveload to src/sl/
Leave afterload in src/saveload/
2023-06-08 00:01:40 +01:00
Jonathan G Rennison
8e2319ad68 Scheduled dispatch: Add button to adjust departure slots 2023-05-09 20:16:36 +01:00
Jonathan G Rennison
b089b561a5 Add departure board via order subtype to remove via for prior terminus 2023-05-05 17:21:44 +01:00
Jonathan G Rennison
211c1ba61d Allow naming scheduled dispatch schedules 2023-04-29 12:19:28 +01:00
Jonathan G Rennison
359fe89d2f Don't use occupancy of unload and leave empty orders for occupancy average 2023-04-09 23:34:29 +01:00
Jonathan G Rennison
23319fbd4a Document uses of xflags and xdata in OrderExtraInfo 2023-04-09 12:48:50 +01:00
Jonathan G Rennison
06e0f39aff Add text label and departure board via orders 2023-04-09 12:48:50 +01:00
Jonathan G Rennison
3b6f7c09ad Allow changing colour of orders in order list and timetable windows 2023-04-08 18:13:35 +01:00
Jonathan G Rennison
2ea1766677 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/commit-checker.yml
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/league_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_object.hpp
#	src/script/squirrel_helper.hpp
#	src/settings_table.cpp
#	src/station_cmd.cpp
#	src/table/settings.h.preamble
#	src/tree_cmd.cpp
#	src/tree_map.h
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
2023-03-04 16:45:05 +00:00
Loïc Guilloux
2a2e51765a
Cleanup 54db96b: Left-over function declaration (#10528) 2023-03-01 23:53:50 +01:00
Jonathan G Rennison
39d38ecf19 Fix incorrect handling of timetable operations on counter and release slot orders
See: #485
2023-02-18 12:34:16 +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
c69ed1711d Allow road vehicle go to station/waypoint orders to have a direction 2022-01-27 01:30:22 +00: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
66ce6c5090 Scheduled dispatch: Add clear schedule GUI function
Add management dropdown box to window
2021-12-18 12:46:25 +00:00
Michael Lutz
211c630cbe Codechange: Un-bitstuff order commands. 2021-12-16 22:28:32 +01:00
Jonathan G Rennison
1e0bea5b8d Replace FindFirstBit/FindFirstBit64 with a single template function 2021-11-01 23:00:44 +00:00
Jonathan G Rennison
e1e7b67270 Fix cargo mask truncation in CargoMaskValueFilter and LinkRefresher::RefreshLinks 2021-11-01 22:10:03 +00:00
Jonathan G Rennison
f54d69a60a Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/economy.cpp
#	src/elrail.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/core/game_info.cpp
#	src/newgrf_station.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/strings_func.h
#	src/table/settings/network_settings.ini
#	src/table/settings/settings.ini
2021-11-01 21:18:24 +00:00