Commit Graph

224 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison f993e30850 Take cargo refit into account in build vehicle window capacity sort modes 2 weeks 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
3 months ago
Peter Nelson 2fd9096070
Change: Decouple and remove landscape-dependent cargo types. (#11719)
Cargo types of default engines, industries and houses are now specified in terms of label.
3 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
4 months ago
Peter Nelson 952d111b94 Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Jonathan G Rennison 4fac6b295c Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-linux.yml
#	src/base_consist.h
#	src/blitter/32bpp_optimized.cpp
#	src/blitter/32bpp_optimized.hpp
#	src/blitter/32bpp_sse2.hpp
#	src/blitter/8bpp_optimized.hpp
#	src/gfx_func.h
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/linkgraph/linkgraphjob.cpp
#	src/mixer.cpp
#	src/newgrf_callbacks.h
#	src/openttd.cpp
#	src/os/macosx/macos.mm
#	src/os/windows/win32.cpp
#	src/pathfinder/npf/npf.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/sound.cpp
#	src/spritecache.cpp
#	src/spriteloader/spriteloader.hpp
#	src/station_map.h
#	src/timetable_cmd.cpp
#	src/timetable_cmd.h
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui_base.h
#	src/video/opengl.cpp
#	src/video/opengl.h
#	src/viewport.cpp
5 months ago
Peter Nelson cc488ec6c9
Fix ddd609c: Reverse build probability callback was not called for articulated parts. (#11526) 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 2a31095118 Merge branch 'master' into jgrpp
# Conflicts:
#	regression/regression/result.txt
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/console_cmds.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/hotkeys.cpp
#	src/network/core/tcp_connect.cpp
#	src/network/core/tcp_listen.h
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_engine.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_station.cpp
#	src/openttd.cpp
#	src/order_gui.cpp
#	src/os/macosx/osx_main.cpp
#	src/pathfinder/yapf/yapf_node_rail.hpp
#	src/rail_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settingsgen/settingsgen.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_game_calendar.h
#	src/timer/timer_manager.h
#	src/timer/timer_window.cpp
#	src/timetable_cmd.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/vehicle_cmd.h
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_func.h
#	src/window_gui.h
6 months ago
Jonathan G Rennison 9822fa6584
Fix: Trivial autoreplace of mixed cargo articulated engines (#11253)
Do not fail autoreplace/autorenew of mixed cargo articulated engines
due to an inability to refit to mixed cargoes, when no refit is
required because the target engine already has a suitable set of cargoes.
Notably, this allows autorenew (autoreplace to same engine type)
to succeed.
6 months ago
Peter Nelson 7d4a91ef9e
Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
7 months ago
Peter Nelson 2a88e0fab3 Codechange: Use bitmask instead of array for cargo consistency check.
We only need to know if a cargo type is accepted, not how much.
7 months ago
Jonathan G Rennison 7c28ee0213 Autoreplace: Add support for multi-cargo ships 9 months ago
Jonathan G Rennison da35e7bb35 Autoreplace: Handle trivial replacements of mixed cargo articulated engines 9 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)
9 months ago
Tyler Trahan 9a602ff304
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>
9 months ago
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
10 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
11 months ago
Jonathan G Rennison 846737e56a Fix refit in station with articulated vehicles with no capacity in leading part 11 months ago
Jonathan G Rennison 2ed248a61d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/build_vehicle_gui.cpp
#	src/company_gui.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout.cpp
#	src/misc_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_config.h
#	src/newgrf_engine.cpp
#	src/news_gui.cpp
#	src/order_gui.cpp
#	src/roadveh_cmd.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/statusbar_gui.cpp
#	src/table/settings/network_private_settings.ini
#	src/table/settings/network_settings.ini
#	src/toolbar_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
12 months ago
Peter Nelson f177ce7c9a Codechange: Base CargoArray off std::array.
This avoids needing to define array accessors and allows use of
default value initialization.
12 months ago
Peter Nelson 76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Peter Nelson 4a5e413a6c Cleanup: Remove unnecessary VehicleRandomBits()
Simple Random() assignment to byte does the same.
1 year ago
Jonathan G Rennison 8cd7c9559f Multi-part ships: Require feature test to enable callback 16 1 year ago
Jonathan G Rennison 211fdd62b2 Initial support for multi-part (pseudo-articulated) ships 1 year ago
Jonathan G Rennison 10e76b2788 Fix #10032: Capacities of articulated vehicles in build window
See also: #9954
1 year ago
Jonathan G Rennison c7e4dbf2f6 Fix displayed capacities/weights of articulated vehicles in build window
Simplify handling of multi-part capacities and refits

See: https://github.com/OpenTTD/OpenTTD/issues/9954
See: https://github.com/OpenTTD/OpenTTD/issues/10032
2 years ago
Jonathan G Rennison 17d949980f Fix assert fail when building virtual train from engine with invalid cargo 2 years ago
Matt Kimber 9b28b15e67 Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods 3 years ago
Jonathan G Rennison f077c3bf6e Merge branch 'master' into jgrpp 4 years ago
glx b50d77b831 Fix #8064: Incorrect display of refit capacity 4 years ago
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
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 5a2e498182 TBTR: Avoid articulated/rear units being added to tile hash 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
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
5 years ago
peter1138 e6bb90543e Change: Show additional cost and refitted capacity in build vehicle window. 5 years ago
Jonathan G Rennison 56be293107 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_anim_sse2.cpp
#	src/blitter/32bpp_base.cpp
#	src/blitter/32bpp_base.hpp
#	src/ground_vehicle.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/town_cmd.cpp
#	src/vehicle_base.h
#	src/viewport_gui.cppp
6 years ago
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 6 years ago
Jonathan G Rennison 7f10d83a4a Merge branch 'template_train_replacement' into jgrpp
# Conflicts:
#	src/linkgraph/linkgraphjob.cpp
#	src/saveload/extended_ver_sl.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
8 years ago
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 8 years ago
frosch f36539837e (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 8 years ago
Jonathan G Rennison 09291a3b74 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
8 years ago
frosch d188d02384 (svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts. 8 years ago
frosch c9f68ede59 (svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts. 8 years ago
Jonathan G Rennison a1b60bcc85 Fix build and refit cost estimation with artic/multihead vehicles.
Trailing vehicle part refit costs were not being added to the cost
estimate.
9 years ago
rubidium ac269a3f08 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 10 years ago
rubidium 6c2abf0930 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 10 years ago