Jonathan G Rennison
fe730bce31
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/codeql.yml
# .github/workflows/release-linux.yml
# .github/workflows/release-macos.yml
# .github/workflows/release-windows.yml
# src/map.cpp
# src/music/midifile.hpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/yapf/yapf_rail.cpp
# src/pbs.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/saveload/vehicle_sl.cpp
# src/script/api/script_text.cpp
# src/ship_cmd.cpp
# src/train_cmd.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/vehicle_func.h
# src/vehicle_gui.cpp
# src/vehicle_gui_base.h
# src/viewport.cpp
# src/waypoint_cmd.cpp
7 months ago
Tyler Trahan
32b0fb9f6e
Fix #12010 : Use economy timer for vehicle stats minimum age, not calendar ( #12142 )
7 months ago
Jonathan G Rennison
93bf033107
Add whether the vehicle is non-front to the vehicle pool pointer tag
...
Add iteration filters which check this
7 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
7 months ago
Jonathan G Rennison
cfebbfac8c
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/autoreplace_cmd.cpp
# src/company_base.h
# src/company_gui.cpp
# src/cpu.cpp
# src/debug.h
# src/group.h
# src/group_cmd.cpp
# src/house.h
# src/industry.h
# src/newgrf_house.cpp
# src/news_type.h
# src/openttd.cpp
# src/saveload/company_sl.cpp
# src/settings_type.h
# src/sl/oldloader_sl.cpp
# src/story.cpp
# src/table/town_land.h
# src/viewport.cpp
8 months ago
Peter Nelson
be147651d4
Codechange: Replace GroupStatistics' num_engines with std::map. ( #11849 )
...
This removes manual memory management with calloc/free calls, and prevents potentially large arrays being allocated for each group.
(cherry picked from commit 8797cc7ef2
)
8 months ago
Peter Nelson
8797cc7ef2
Codechange: Replace GroupStatistics' num_engines with std::map. ( #11849 )
...
This removes manual memory management with calloc/free calls, and prevents potentially large arrays being allocated for each group.
8 months ago
Peter Nelson
c0ab436077
Codechange: Store Colours in Colours type. ( #11625 )
...
This reduces casts, some magic numbers, and introduces a bit of type-safety.
8 months ago
Jonathan G Rennison
97e6f3062e
Adding of _t to (u)int types, and WChar to char32_t
...
See: eaae0bb5e
9 months ago
Jonathan G Rennison
f034714559
Use StringBuilder for GetString/GetStringWithArgs, as per upstream
...
Update dependent code as required
9 months ago
Jonathan G Rennison
b49f8c6bfc
Avoid O(N^2) in group livery propagation
9 months ago
Jonathan G Rennison
ffff696b4e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/build_vehicle_gui.cpp
# src/cheat_gui.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/date_gui.cpp
# src/engine.cpp
# src/group_cmd.cpp
# src/landscape.cpp
# src/network/network_gui.cpp
# src/newgrf.cpp
# src/saveload/afterload.cpp
# src/script/api/script_date.cpp
# src/sl/oldloader_sl.cpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/strings.cpp
# src/subsidy_gui.cpp
# src/survey.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_game_calendar.h
9 months ago
Peter Nelson
5d2ed80c95
Fix: Changing group parent did not properly update partially-default liveries.
9 months ago
Peter Nelson
bfb4254226
Fix: Changing default livery did not propagate to group liveries.
...
#11614 attempted to address this but did not handle 2CC properly, and changes to the default livery were not handled.
9 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
10 months ago
Peter Nelson
7d4a91ef9e
Cleanup: Remove some unused functions. ( #11429 )
...
These were picked up with cppcheck.
11 months ago
Jonathan G Rennison
a18f3274b4
Rename close window functions to match upstream
1 year 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
1 year ago
PeterN
2a2443dd01
Feature: Create group of vehicles from manage vehicle list button. ( #10890 )
1 year ago
Jonathan G Rennison
d82a050365
Fix template replacement cache update crash in RemoveAllGroupsForCompany
2 years ago
Jonathan G Rennison
1ad77f8697
TBTR: Re-index recursive replacements on group topology changes
2 years ago
rubidium42
1951af07c0
Codechange: do not hide parameters with local variables
2 years ago
Jonathan G Rennison
a9100e93cb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/group_cmd.cpp
# src/lang/korean.txt
# src/lang/simplified_chinese.txt
# src/script/api/script_rail.cpp
# src/tunnelbridge_cmd.cpp
2 years ago
SamuXarick
b2a5ebcfc4
Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI ( #10227 )
...
* Change: Store "all time" and "since minimum age" last year profits on groups
* Fix: Update last year profit for groups when copying vehicle statistics on autoreplace
* Codechange: Refactor profit last year
* Change: Rename some group related items for clarity
* Change: Reorder the fields in GroupStatistics
That way less memory gets wasted.
2 years ago
Jonathan G Rennison
03a9912a2b
Vehicle list commands now take into account cargo type filter
...
Start/stop
Send to depot type commands
Add to new group
Change order target
2 years ago
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
3 years ago
Joan Josep
e890e7db76
Cleanup #9725 : Clean up Doxygen docs and fix typo. ( #9753 )
3 years ago
Michael Lutz
57b82e2e99
Codechange: Don't use globals for story/goal/sign/group command proc return values.
3 years ago
Michael Lutz
e08b3abe7f
Codechange: Un-bitstuff group and autoreplace commands.
3 years ago
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
3 years ago
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.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
Jonathan G Rennison
6c07758cc3
Do name generation at client, fix localisation
...
Use existing group creation command
3 years ago
Andreas Schmitt
5d505f2389
Fix crash and show error message if group creation fails
3 years ago
Andreas Schmitt
05b76aa3f8
Fix single vehicle not being added and wrong town name being used
3 years ago
Andreas Schmitt
8b66ebd4f0
Add auto named group generated when dropping a vehicle onto new group button
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
Jonathan G Rennison
088922b120
Fix poor performance of recursive iteration of group hierarchies
3 years ago
Jonathan G Rennison
253772e9af
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# COMPILING.md
# src/console.cpp
# src/console_cmds.cpp
# src/console_internal.h
# src/rev.cpp.in
3 years ago
peter1138
a05bc04b63
Feature: Per-group wagon removal flag.
3 years ago
peter1138
c56fce70b4
Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG.
3 years ago
peter1138
27a956ba62
Codechange: Replace Group::replace_protection with Group::flags
3 years ago
Jonathan G Rennison
43980639de
Merge branch 'master' into jgrpp
...
# Conflicts:
# .gitignore
# CMakeLists.txt
# src/3rdparty/optional/optional.hpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/misc_gui.cpp
# src/video/sdl2_v.cpp
4 years ago
stormcone
ca65f19b03
Feature: Show group name as part of the default vehicle name.
...
Only if the vehicle is member of a group and does not have a user defined name.
4 years ago
Jonathan G Rennison
a36e77c269
Fix group add/remove/rename not updating template replacement GUI in MP
4 years ago
Jonathan G Rennison
810bfd276e
Add several NewGRF variables to vehicle image callback whitelist
...
Add vehicle flags to control cached image invalidation
Various refactorings
4 years ago
Jonathan G Rennison
f8d6e781ba
Merge branch 'master' into jgrpp
...
# Conflicts:
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj.filters
# src/base_consist.h
# src/company_base.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/openttd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/settings.cpp
# src/signs_base.h
# src/string.cpp
# src/string_func.h
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/town_cmd.cpp
# src/vehicle.cpp
# src/vehicle_cmd.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/null_v.cpp
4 years ago
Michael Lutz
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
4 years ago