Commit Graph

610 Commits

Author SHA1 Message Date
Jonathan G Rennison
540cec2af5 Add setting to allow auto-fill signal dragging to skip over stations/waypoints 2023-12-19 22:25:05 +00:00
Jonathan G Rennison
bf7dfc595f Command: Fix desync debug command exec/fail log messages
Include full aux data, do not truncate, escape command text
2023-12-19 18:50:43 +00:00
Jonathan G Rennison
4689113553 Debug: De-duplicate formatting of hex dates for desync/random logging 2023-12-19 17:55:57 +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
c76a5ed638 Timetable: Remove timetable_start_subticks, use DateTicksScaled 2023-12-17 23:00:44 +00:00
Patric Stout
19bbcb180d Change: base autosaves intervals on real time (instead of game time) (#10655)
There are two fundamental issues with autosave:
- When fast-forwarding, it saves way too often
- When paused, it never saves

Both makes no sense. Autosaves are meant to prevent you from
accidentally losing your work. The emphasis on "your" work.

To solve both issues, the autosave now works on real time. You
can select every 10 / 30 / 60 / 120 minutes, which are similar to
what the setting was in game-months.

When you pause, autosaving will stop. Unless you make any change
to the game; then it will continue to make autosaves, even so
the game is paused. Unpausing / pausing resets this mechanism.

(cherry picked from commit f5fad88723)
2023-11-13 18:33:20 +00:00
Jonathan G Rennison
59ea48c541 Scheduled dispatch: Allow moving dispatch schedules in schedule list 2023-09-23 12:05:05 +01:00
Jonathan G Rennison
338dff09a7 Add chicken bit to allow test/exec mismatch for all commands 2023-09-22 17:00:33 +01:00
Jonathan G Rennison
e1606934ae Ignore test/exec cmd mismatch in CmdDepotMassAutoReplace
Due to use of CmdTemplateReplaceVehicle
2023-09-22 16:00:14 +01:00
Michael Lutz
4c6ed36b6a Add: [Script] Game script control of industry production level.
(cherry picked from commit 1c56991213)
2023-09-02 19:26:54 +01:00
mrmbernardi
74c0678015 Feature: [GS] Goal destination can be updated (#10817)
(cherry picked from commit 35ef6c1723)
2023-09-02 19:26:54 +01:00
Jonathan G Rennison
82c9d18b5b Network: Update state checksum with DoCommandP costs 2023-08-28 19:58:17 +01:00
Jonathan G Rennison
3b8d8aeb6a TBTR: Adjust config buttons/text in main window
Clarify refit and depot options
Adjust layout
2023-08-26 23:59:52 +01:00
Jonathan G Rennison
2b44d3302e CommandCost: Change AllocSummaryMessage to std::string SummaryMessage 2023-08-20 22:30:33 +01:00
Jonathan G Rennison
8c1a3c26af Use ring buffers for network _chatmsg_list and _command_queue 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
731a79b224 Fix truncation of dump_command_log console command output 2023-08-04 22:20:36 +01:00
Jonathan G Rennison
f3116eedcf Support 64 bit values in the give money and change bank balance commands
See: #535
2023-06-06 22:09:01 +01:00
Jonathan G Rennison
3151751eda Allow using the money cheat with values greater than 32 bits
See: #536
2023-06-06 21:49:30 +01:00
Jonathan G Rennison
13183d3f13 Add command result flag for whether SetResultData was called
Use for tracerestrict validation result fail offset
2023-05-30 23:41:19 +01:00
Jonathan G Rennison
bac8f032da Re-add company shares 2023-05-30 18:57:42 +01:00
Jonathan G Rennison
7aef72b946 Add static_assert for length of _command_proc_table 2023-05-30 00:49:35 +01:00
Jonathan G Rennison
02fe4af934 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-windows.yml
#	src/company_base.h
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/economy.cpp
#	src/economy_cmd.h
#	src/fios.h
#	src/goal.cpp
#	src/group_gui.cpp
#	src/network/core/config.h
#	src/network/network_admin.cpp
#	src/newgrf_config.cpp
#	src/os/windows/win32.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/story.cpp
#	src/story_base.h
#	src/string.cpp
#	src/table/settings/economy_settings.ini
#	src/tests/CMakeLists.txt
#	src/tests/math_func.cpp
2023-05-30 00:49:24 +01:00
Jonathan G Rennison
cd9930542d GS: Add GSAsyncMode(bool) class to set async mode of script DoCommands
In asynchronous mode, don't wait for result of executed command,
just fire-and-forget, and return estimated cost/result
2023-05-23 22:21:19 +01:00
Jonathan G Rennison
a25e674f06 Add "command" debug category to log commands 2023-05-23 21:35:07 +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
8f92668e22 Scheduled dispatch: Add menu item to append schedules from another vehicle 2023-05-07 20:06:47 +01:00
Jonathan G Rennison
62ecad1b63 Scheduled dispatch: Add menu item to duplicate current schedule 2023-05-07 14:02:37 +01:00
Jonathan G Rennison
31f476220d Allow converting track by individual track pieces instead of whole tiles
Ctrl-click on convert button

See: #509
2023-05-06 16:20:23 +01:00
Jonathan G Rennison
211c1ba61d Allow naming scheduled dispatch schedules 2023-04-29 12:19:28 +01:00
Patric Stout
f5fad88723
Change: base autosaves intervals on real time (instead of game time) (#10655)
There are two fundamental issues with autosave:
- When fast-forwarding, it saves way too often
- When paused, it never saves

Both makes no sense. Autosaves are meant to prevent you from
accidentally losing your work. The emphasis on "your" work.

To solve both issues, the autosave now works on real time. You
can select every 10 / 30 / 60 / 120 minutes, which are similar to
what the setting was in game-months.

When you pause, autosaving will stop. Unless you make any change
to the game; then it will continue to make autosaves, even so
the game is paused. Unpausing / pausing resets this mechanism.
2023-04-27 15:21:29 +00:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Jonathan G Rennison
87fabe99df Allow exchanging a station's name with another station in the same town 2023-04-11 19:22:15 +01:00
Jonathan G Rennison
1707f74d60 TBTR: Refactor template replacement code
Adjust conditions for re-using existing engines in depot
Reduce cost of searching for existing engines in depot
Reduce cost of vehicle chain membership tests
Improve replacement command error handling
Tidy up code in general
2023-03-22 22:19:01 +00:00
Jonathan G Rennison
ae7c86c49d Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	src/industry_cmd.cpp
#	src/industry_cmd.h
#	src/network/core/http_curl.cpp
#	src/network/core/tcp_http.cpp
#	src/network/core/tcp_http.h
#	src/network/network_content.h
#	src/script/api/script_goal.cpp
#	src/script/api/script_industry.cpp
#	src/script/api/script_league.cpp
#	src/script/api/script_story_page.cpp
#	src/script/api/script_town.cpp
#	src/train.h
#	src/train_cmd.cpp
2023-03-04 01:17:27 +00:00
Tyler Trahan
44848f4edf Add: CommandCost supports an optional second error string 2023-03-03 17:11:14 -05:00
Jonathan G Rennison
5e398d9478 Add GUI/command support for >255 station types per station class 2023-02-16 22:33:34 +00:00
Jonathan G Rennison
ae9b416684 Merge branch 'master' into jgrpp
# Conflicts:
#	src/ai/ai_core.cpp
#	src/ai/ai_gui.cpp
#	src/ai/ai_instance.cpp
#	src/console_cmds.cpp
#	src/engine_type.h
#	src/game/game_gui.cpp
#	src/game/game_instance.cpp
#	src/goal.cpp
#	src/goal_cmd.h
#	src/lang/english.txt
#	src/lang/estonian.txt
#	src/network/network_client.cpp
#	src/newgrf.cpp
#	src/newgrf_generic.h
#	src/openttd.cpp
#	src/saveload/saveload.h
#	src/script/api/script_log.cpp
#	src/script/api/script_town.cpp
#	src/settings_table.cpp
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/station_map.h
#	src/strings.cpp
#	src/table/settings/difficulty_settings.ini
#	src/table/settings/gui_settings.ini
#	src/tbtr_template_gui_main.h
#	src/timetable_cmd.cpp
#	src/timetable_cmd.h
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/water_cmd.cpp
2023-02-11 23:05:22 +00:00
Jonathan G Rennison
17f1d92072 Template replacement: Allow naming templates
See: #481
2023-02-06 23:48:46 +00:00
Jonathan G Rennison
5c134e6dd0 Command: Use auxiliary data for league command strings 2022-12-07 21:14:34 +00:00
Jonathan G Rennison
f32733ef22 Command: Replace binary_length field with auxiliary data
Use for CMD_ADD_PLAN_LINE
2022-12-07 21:14:34 +00:00
dP
c91033ac5e Feature: [GS] Scriptable league tables (#10001)
(cherry picked from commit 5e14a20b3b)
2022-12-03 22:28:49 +00:00
Jonathan G Rennison
44c4cc80a1 Fix whitespace in DumpSubCommandLog 2022-12-03 22:28:49 +00:00
Jonathan G Rennison
a608a2592d Add a CommandCost result data field
Allow inlining one of extra_message, tile, result without aux allocation
2022-12-03 22:28:49 +00:00
Jonathan G Rennison
523cf75a7a Change CommandCost success bool to a flags field 2022-12-03 22:28:49 +00:00
dP
5e14a20b3b
Feature: [GS] Scriptable league tables (#10001) 2022-11-26 18:03:03 +01:00
Jonathan G Rennison
1572b66ecf Debug: Show frame counter in command log when networking 2022-11-13 01:08:39 +00:00
Jonathan G Rennison
95a646d09b Fix #449: Town setting override not being allowed for MP admins
When the setting to enable for clients was not enabled
2022-10-31 18:59:08 +00:00
Jonathan G Rennison
a8361cd608 Allow overriding town settings on a per-town basis
Add a setting for whether this is allowed for non-privileged
multiplayer clients
2022-10-23 22:07:51 +01:00
Jonathan G Rennison
e6e9a0c2f3 Show cost/income float over end tile of rail or road construction 2022-10-22 19:56:41 +01:00
Jonathan G Rennison
dd16df976c Include client IDs in network server command logs 2022-10-15 21:11:36 +01:00