Commit Graph

866 Commits (93bf033107cea9629857ea97f3c364e39f7dad8d)

Author SHA1 Message Date
Jonathan G Rennison 93bf033107 Add whether the vehicle is non-front to the vehicle pool pointer tag
Add iteration filters which check this
3 months ago
Jonathan G Rennison 05e237f8d1 Add wrapper to iterate vehicle pool with vehicle type filter
Without needing to dereference vehicle pointers if using tagged pointers
3 months ago
Jonathan G Rennison 601071744e Fix timetabled waiting in depots
See: #658
3 months ago
Jonathan G Rennison 8581808952 Merge tag '14.0-beta2' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/cargotype.cpp
#	src/console_cmds.cpp
#	src/graph_gui.cpp
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/misc_gui.cpp
#	src/network/network_client.cpp
#	src/newgrf.cpp
#	src/newgrf_town.cpp
#	src/object_cmd.cpp
#	src/openttd.cpp
#	src/pathfinder/water_regions.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/table/build_industry.h
#	src/table/engines.h
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
4 months ago
Jonathan G Rennison 821c5970db Disallow unbunching if auto-separation, scheduled dispatch or per-cargo full load 4 months ago
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
4 months ago
Jonathan G Rennison a48e15dce0 Add wallclock time settings 4 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
4 months ago
Jonathan G Rennison 0ea57528c9 Rename DateTicksScaled to StateTicks
Rename various other related/derived types and variables
4 months ago
Tyler Trahan d0c753465d Fix f6dd505: Remove unneeded error when switching between depot actions 4 months ago
Tyler Trahan f6dd5053a3
Feature: Order flag to unbunch vehicles at depot (#11945) 4 months ago
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 4 months ago
Jonathan G Rennison 9bea1e3cc3 Scheduled dispatch: Allow tagging departure slots, add to conditional order 4 months ago
Jonathan G Rennison 6c329871f1 Scheduled dispatch: Add per dispatch slot flags field
Add flag for slot re-use
4 months ago
Jonathan G Rennison 7db457ad80 Use _scaled_date_ticks in ODATFB_NEAREST_DEPOT rate-limiting 4 months ago
Tyler Trahan fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units (#11341) 5 months ago
Jonathan G Rennison 9be3dfa69c Scheduled dispatch: Use an invalid value for no last dispatch, not 0 5 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 5 months ago
Jonathan G Rennison 5b7689a0aa Scheduled dispatch: Add flag to re-use all dispatch slots 5 months ago
Jonathan G Rennison 461fe116f2 Tracerestrict: Pass vehicle ptr instead of index to Occupy/Vacate
And related functions, to avoid unnecessary vehicle pool lookup
5 months ago
Jonathan G Rennison 041f36d565 Add try to acquire slot order subtype 5 months ago
Jonathan G Rennison 2fc631b15b Rename OT_RELEASE_SLOT to OT_SLOT, use a subtype field 5 months ago
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
5 months ago
Loïc Guilloux 251008663b Fix #11748: Incorrect clamping of negative service interval values (#11749)
(cherry picked from commit f7bd70baec)
5 months ago
Loïc Guilloux f7bd70baec
Fix #11748: Incorrect clamping of negative service interval values (#11749) 5 months ago
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.
5 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
5 months ago
Jonathan G Rennison 107b73c2b8 Merge branch 'master' into jgrpp 5 months ago
SamuXarick 847f3f660d
Fix #10511: Delay 'go to nearest depot' orders (#11548)
Delay the nearest depot order search for a day if the vehicle can't find its destination, which happens when it has already attempted to do so and failed to find a valid destination.
5 months ago
Jonathan G Rennison ea85bbda97 Fix duplicate order not always preserving colour 5 months ago
Jonathan G Rennison 9ea49d6680 Only compile OrderList::DebugCheckSanity when WITH_ASSERT defined 5 months ago
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
6 months ago
Jonathan G Rennison e9599fd4be Scheduled dispatch: Remove scheduled_dispatch_start_full_date_fract
Use DateTicksScaled
6 months ago
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
6 months ago
Jonathan G Rennison fc1c47cbd2 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/crashlog.cpp
#	src/crashlog.h
#	src/date_type.h
#	src/depot_type.h
#	src/landscape.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/pathfinder/npf/npf.cpp
#	src/road_cmd.cpp
#	src/script/api/script_infrastructure.cpp
#	src/stdafx.h
#	src/table/settings/gui_settings.ini
#	src/table/settings/pathfinding_settings.ini
#	src/tests/CMakeLists.txt
7 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Peter Nelson 7d4a91ef9e
Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
7 months ago
Jonathan G Rennison 1e7f31b807 Fix conditional order wait loops not ignoring label orders 9 months ago
Jonathan G Rennison 9ad2f44ab7 Fix conditional order subtype not being reset when changing to time/date 9 months ago
Jonathan G Rennison a18f3274b4 Rename close window functions to match upstream 9 months ago
Tyler Trahan 77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 9 months ago
Tyler Trahan fca2b37726 Codechange: Move Ticks into their own class 9 months ago
Jonathan G Rennison 02aecca5ae Conditional order: Replace "next station" with manually set station 9 months ago
Jonathan G Rennison 691e2dcc69 Fix cargo waiting amount via station not being cleared when station deleted 9 months ago
Jonathan G Rennison c11be37fd9 Add xdata2 field to OrderExtraInfo 9 months ago
Jonathan G Rennison 19835b51ee Move StationCargoList and FlowStatMap out of GoodsEntry struct
Move them into a new GoodsEntryData struct referenced
using a std::unique_ptr from GoodsEntry.
The unique_ptr may be nullptr if the cargo list and flow stat map
are both empty (this is the case for unused cargoes).

This reduces GoodsEntry from 128 to 24 bytes,
and Station from 8680 to 2024 bytes,
(on Linux x86_64).
10 months ago
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 10 months ago
Patric Stout b7acf9e50e
Codechange: use TimerGameCalendar::Year and friends when working with years (#11188) 10 months ago
Tyler Trahan c7b51a8c3a
Codechange: Use proper date types in various places (#11177) 10 months ago
Tyler Trahan 6190f48df0
Codechange: Add a DateToYear function instead of dividing each time (#11173) 10 months ago