Commit Graph

30 Commits (4280c413a6a409ecc6fd37f75226da5db0e26591)

Author SHA1 Message Date
Patric Stout 4280c413a6 Fix: only count distance traveled in vehicles for cargo payment (#11283)
No longer you can utilize the free (and instant) labour of station
workers, transporting your cargo from one part of the station to
the other. No more!

Based on patch by dP.

(cherry picked from commit df400ef84a)
9 months ago
Patric Stout a15847cf4f Codechange: simplify splitting of CargoPacket (#11286)
(cherry picked from commit d1a0ca67be)
9 months ago
Patric Stout 4ee51442d2 Codechange: rename next_station to next_hop to avoid confusing with another next_station
(cherry picked from commit 9f8c1ea552)
9 months ago
Patric Stout f5d685a525 Fix b0e73277: cargodist information got lost when splitting of cargo (#11280)
During b0e73277 we removed loaded_at_xy, but I kinda forgot that
it was a union with next_station. Now next_station wasn't copied
anymore, or checked in AreMergable.

(cherry picked from commit e6c02ebee6)
9 months ago
Patric Stout e5673a1756 Codechange: cleanup CargoPacket in terms of variable/function names (#11278)
Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.

(cherry picked from commit 30172fc037)
9 months ago
Patric Stout 2890127675 Codechange: remove loaded_at_xy from CargoPacket as it was unused (#11276)
(cherry picked from commit b0e73277d6)
9 months ago
Jonathan G Rennison e0e4d7c07e Saveload: De-duplicate handling of wrong length SLXI extra data 9 months ago
Jonathan G Rennison df4c458c29 Add savegame flag for station tile cache flags
Update flags as necessary on load and when reloading GRFs
9 months ago
Jonathan G Rennison c6ce9ce687 Add road vehicle flags for whether any part is on level crossing 9 months ago
Jonathan G Rennison 02aecca5ae Conditional order: Replace "next station" with manually set station 10 months ago
Jonathan G Rennison c11be37fd9 Add xdata2 field to OrderExtraInfo 10 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
Jonathan G Rennison 615c42d357 Reserve vector size when loading station flow stats 10 months ago
Jonathan G Rennison 23ad010d70 Replace remaining uses of std::deque with ring buffers
Cargo packet lists and associated save/load
10 months ago
Jonathan G Rennison 2212191b6c Saveload: Fix missing cast warnings for ship/RV path cache load 10 months ago
Jonathan G Rennison 92e632454e Change ship path cache to be optional and use a ring buffer 10 months ago
Jonathan G Rennison 2ae4e5bdc1 Change road vehicle path cache to be optional and use ring buffers
Show path cache in debug window
10 months ago
Jonathan G Rennison e3021de408 Saveload: Add helper to conditionally save template functor 10 months ago
Jonathan G Rennison f378167951 Saveload: Change SlSaveToVector to be templated, add SlSaveToTempBuffer 10 months ago
Tyler Trahan b012d1100c Fix #10334: Store separate newgrf-safe version of date_of_last_service. (#11124)
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.

Co-authored-by: Peter Nelson <peter1138@openttd.org>
(cherry picked from commit 9a602ff304)
10 months ago
Jonathan G Rennison 2ed98b3b9d Saveload: Add support for upstream savegame version 316 11 months ago
Jonathan G Rennison f6e8ea059d Create fio wrapper for rename file 12 months ago
Jonathan G Rennison c6c69fa3da Add setting for long-term autosaves
A second set of autosaves for whenever the main set wraps around to 0
12 months ago
Jonathan G Rennison d75c489466 Add various missing includes 12 months ago
Jonathan G Rennison 0bf41dc1ff Change gamelog to use std::vector
Move LoadCheckData to its own header
12 months ago
Jonathan G Rennison e1cce4d9f7 Link graph: Store last compression in scaled date ticks
Higher accuracy than using dates at high day legnths
12 months ago
Jonathan G Rennison ead18b2af2 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/3rdparty/md5/md5.h
#	src/3rdparty/squirrel/squirrel/squtils.h
#	src/animated_tile.cpp
#	src/console_func.h
#	src/core/CMakeLists.txt
#	src/core/container_func.hpp
#	src/core/smallstack_type.hpp
#	src/crashlog.cpp
#	src/crashlog.h
#	src/debug.h
#	src/economy.cpp
#	src/gamelog.cpp
#	src/industry_gui.cpp
#	src/lang/catalan.txt
#	src/misc_gui.cpp
#	src/network/network_content.h
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_config.cpp
#	src/newgrf_config.h
#	src/newgrf_gui.cpp
#	src/os/unix/font_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rail_cmd.cpp
#	src/saveload/animated_tile_sl.cpp
#	src/script/api/script_tilelist.cpp
#	src/settings.cpp
#	src/settingsgen/settingsgen.cpp
#	src/sl/oldloader_sl.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/strgen/strgen_base.cpp
#	src/table/settings/gui_settings.ini
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui_base.h
#	src/viewport_sprite_sorter.h
12 months ago
Jonathan G Rennison d09b504bc5 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-source.yml
#	.github/workflows/release.yml
#	CMakeLists.txt
#	COMPILING.md
#	src/ai/ai_core.cpp
#	src/ai/ai_gui.cpp
#	src/bridge_gui.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/CMakeLists.txt
#	src/core/smallmap_type.hpp
#	src/disaster_vehicle.h
#	src/effectvehicle_base.h
#	src/fontcache.cpp
#	src/game/game_core.cpp
#	src/game/game_gui.cpp
#	src/gamelog.cpp
#	src/gamelog_internal.h
#	src/group_gui.cpp
#	src/linkgraph/linkgraph.h
#	src/misc.cpp
#	src/network/core/config.h
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_profiling.cpp
#	src/newgrf_profiling.h
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/openttd.h
#	src/order_gui.cpp
#	src/os/windows/font_win32.cpp
#	src/rail_gui.cpp
#	src/road.cpp
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_controller.cpp
#	src/script/api/script_roadtypelist.cpp
#	src/script/script_config.cpp
#	src/script/script_config.hpp
#	src/script/script_instance.cpp
#	src/script/script_scanner.cpp
#	src/script/squirrel.cpp
#	src/script/squirrel_helper.hpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/table/settings/network_private_settings.ini
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/window_gui.h
12 months ago
Jonathan G Rennison c4c14cb6a7 3rdparty: Update monocypher from 3.1.3 to 4.0.1
Update to match interface changes
1 year ago
Jonathan G Rennison ac2f9a21e8 Move upstream saveload to src/saveload/, move jgrpp saveload to src/sl/
Leave afterload in src/saveload/
1 year ago