Commit Graph

753 Commits (jgrpp)

Author SHA1 Message Date
Patric Stout 364ce76d51 Change: allow pause/unpause console command in single player too (#9342)
(cherry picked from commit 849a10520c)
3 years ago
Jonathan G Rennison 6f16655e6e Add "special events" log. Add console command, include in crash logs. 3 years ago
Jonathan G Rennison 2e022d5194 Move game events to new event_logs header/cpp files 3 years ago
Jonathan G Rennison 1451aa76ff Add console command to dump vehicle info 3 years ago
Jonathan G Rennison 24fdc8331b Add CheckCaches mode to emit a log/save/screenshot on detected issue 3 years ago
Jonathan G Rennison 5ed7aee8d3 Add flags field to CheckCaches for which checks to run
Add header file for CheckCaches
3 years ago
Jonathan G Rennison 8f2582e0ff Update help text for check_caches console command 3 years ago
Jonathan G Rennison fd605e3cf3 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	.github/workflows/commit-checker.yml
#	src/company_cmd.cpp
#	src/console_cmds.cpp
#	src/crashlog.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/indonesian.txt
#	src/lang/japanese.txt
#	src/lang/korean.txt
#	src/lang/swedish.txt
#	src/linkgraph/linkgraphjob.cpp
#	src/linkgraph/mcf.cpp
#	src/network/core/tcp.cpp
#	src/network/core/tcp.h
#	src/network/core/tcp_game.h
#	src/network/core/udp.h
#	src/network/network.cpp
#	src/network/network_admin.cpp
#	src/network/network_admin.h
#	src/network/network_chat_gui.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_func.h
#	src/network/network_internal.h
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf.cpp
#	src/newgrf_station.cpp
#	src/order_gui.cpp
#	src/rail_cmd.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/table/currency_settings.ini
#	src/table/misc_settings.ini
#	src/table/settings.h.preamble
#	src/table/settings.ini
#	src/terraform_cmd.cpp
#	src/timetable_gui.cpp
#	src/train_cmd.cpp
#	src/tree_cmd.cpp
#	src/water_cmd.cpp
3 years ago
Niels Martin Hansen 5e3ed3a05e Add: Console command to list search directories for various things 3 years ago
Jonathan G Rennison 2bd535e834 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/engine_base.h
#	src/gfxinit.cpp
#	src/graph_gui.cpp
#	src/lang/brazilian_portuguese.txt
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/korean.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/portuguese.txt
#	src/lang/russian.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/network/core/address.cpp
#	src/network/core/game_info.h
#	src/network/core/os_abstraction.h
#	src/network/core/udp.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_internal.h
#	src/newgrf_engine.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/string_func.h
#	src/town_gui.cpp
#	src/video/video_driver.cpp
#	src/widget_type.h
3 years ago
Jonathan G Rennison 8a0821c96e Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/network/core/game_info.h
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_internal.h
#	src/network/network_udp.cpp
3 years ago
Jonathan G Rennison 5d351a14d2 Add new signal type: no-entry signal
This is only passable in one direction, but does not have a signal
or show an aspect in the opposite direction

Add a setting for whether this is shown in the signal UI.
Off by default.
3 years ago
Jonathan G Rennison bcffd6157a Fix #314: Typo in find_non_realistic_braking_signal help text 3 years ago
Patric Stout 4c1ea4020d
Change: remove the ability to control "max spectators" (#9466)
Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
3 years ago
Patric Stout b6a116a247
Add: allow setting your server visibility to "invite-only" (#9434)
In this mode you do register to the Game Coordinator, but your
server will not show up in the public server listing. You can give
your friends the invite code of the server with which they can
join.
3 years ago
Patric Stout e4d216e44b Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
3 years ago
rubidium42 fc63432a11 Codechange: improve style/writing of IConsolePrint strings 3 years ago
rubidium42 75afd25e16 Change: do not print the '-' in front of help messages and make help messages more uniform 3 years ago
rubidium42 eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
3 years ago
rubidium42 efd4ba4797 Change: unify the style of console error messages and convert to fmt
Always start with a capital, do not add "ERROR: " in front of it.
3 years ago
rubidium42 de49727ae8 Change: not performing a command is worthy of an error, not a warning
If a command cannot be executed for whatever reason, it makes no sense to call it a warning. Something has been done wrong.
Also make writing of these error message consistent while changing their "type".
3 years ago
Jonathan G Rennison 99d11c482a Merge PR #271 into jgrpp 3 years ago
Jonathan G Rennison 1002c6d9d2 Fix various compiler warnings
See: #267
3 years ago
Andreas Schmitt 5e3a244198 Add topography and industries screenshot types 3 years ago
Patric Stout 849a10520c
Change: allow pause/unpause console command in single player too (#9342) 3 years ago
rubidium42 e3717ae903 Codechange: [ContentInfo] Use std::string instead of string buffers 3 years ago
Rubidium 2606f5409a Fix: leaking file descriptors
(cherry picked from commit 495d73a67f)
3 years ago
rubidium42 fd95736bac Codechange: [Network] Use std::string for server side logic of kicking and banning clients 3 years ago
rubidium42 8b9f1147df Codechange: [Network] Let server changing a client name use std::string 3 years ago
rubidium42 aa5a8fe28a Codechange: use thread safe time functions
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
3 years ago
rubidium42 297d6e20bf Codechange: [Network] Pass passwords as std::string to the network code 3 years ago
rubidium42 98283116fa Codechange: [Network] Make company state password std::string 3 years ago
William Davis 879de9781b Change: Use gender-neutral pronouns in console command messages (and comments) (#9203)
(cherry picked from commit 881e1da51d)
3 years ago
rubidium42 16437b7c0d Codechange: move client name in settings to std::string 3 years ago
rubidium42 cc6c078dec Codechange: move hostnames in settings to std::string 3 years ago
Rubidium 495d73a67f Fix: leaking file descriptors 3 years ago
William Davis 881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) (#9203) 3 years ago
Michael Lutz 2e6cadb005 Fix #9147: Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread.
(cherry picked from commit 1f159f79de)
3 years ago
PeterN 9d72eb02f5 Cleanup: Remove old FiosList helper methods. (#9139)
(cherry-picked from commit f018471b36)
3 years ago
Jonathan G Rennison a9515456cb Merge branch 'master' into jgrpp
# Conflicts:
#	src/network/core/os_abstraction.h
#	src/network/core/tcp_content.h
#	src/network/core/udp.cpp
#	src/table/currency_settings.ini
#	src/table/settings.h.preamble
3 years ago
Michael Lutz 1f159f79de Fix #9147: Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread. 3 years ago
rubidium42 39c51c35f4 Fix #6598: Do not disconnect before company number validation
NetworkClientConnectGame already does a NetworkDisconnect, so no reason to do it here
3 years ago
rubidium42 3bd416bfdb Change: [Console] Show help when passing invalid company number 3 years ago
PeterN f018471b36
Cleanup: Remove old FiosList helper methods. (#9139) 3 years ago
rubidium42 a61696d6c5 Change: [Network] Encapsulate logic about the connection string to the network code (#23) 3 years ago
Patric Stout be37a2cab8 Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
3 years ago
Patric Stout cb2ef1ea4b Codechange: move all NetworkGameInfo related functions to a single file
It currently was a bit scattered over the place. Part of
NetworkGameInfo is also the GRF Identifiers that goes with it.
3 years ago
rubidium42 cbad518bf3 Codechange: [Network] Do not leak os_abstraction.h via network_func 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
Jonathan G Rennison ba418f9d0d Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/simplified_chinese.txt
#	src/network/core/tcp_content.cpp
#	src/network/core/udp.cpp
#	src/network/network_server.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/table/gameopt_settings.ini
3 years ago
Loïc Guilloux 888389c28d
Codechange: Use std::string in console commands/aliases registration, and std::map instead our sorted linked list (#9057)
* Codechange: Use std::string in console commands and aliases registration

* Codechange: Use std::map to register console commands

* Codechange: Use std::map to register console aliases

* Cleanup: Remove now unused function
3 years ago
rubidium42 2e0f3799a8 Change: [Network] Prevent invalid client names being sent to the server when changing it using the console/settings 3 years ago
Patric Stout 31897eaa7d Codechange: split ParseConnectionString into two functions
One also looks for a company, the other doesn't. There were more
uses of the latter than the first, leaving very weird code all
over the place.
3 years ago
Jonathan G Rennison 6a62b94263 Add NewGRF railtype flag to disable realistic braking for vehs of that type
See: #242
3 years ago
Jonathan G Rennison 0422e2fe1e Add misc debug flag for water flooding states 3 years ago
Jonathan G Rennison 253d54ce05 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/french.txt
#	src/network/network_udp.cpp
3 years ago
rubidium42 c4bccd4f70
Fix #8874: show a warning when a NewGRF scan is requested multiple times from the console (#9022) 3 years ago
Jonathan G Rennison 8e92a6844f Add a "misc_debug" console command
Add a flag to open veh window when TrainBrakesOverheatedBreakdown called
3 years ago
Jonathan G Rennison 5e14b54a0c Merge branch 'master' into jgrpp 3 years ago
Patric Stout 5056e963ba Fix #8851: don't allow infinite "exec" depth in script, but limit to 10 deep
This means if you execute a script from a script from a script, ..
for more than 10 times, it bails out now. This should be sufficient
for even the most complex scripts.
3 years ago
Patric Stout 8230cd009d Fix: calling "exec" from script never returned
Example:

exec other.script
echo hello

The "echo" was never executed.
3 years ago
Jonathan G Rennison 4361a6dbf4 Avoid undefined behaviour const_casting std::string c_str()
Use non-const data() instead

See: #224
3 years ago
Patric Stout 970fedd78c Add: make modal windows update more smooth
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.

This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.

It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).

Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
3 years ago
Jonathan G Rennison 9bf6d1407f Add screenshot type: whole map at current zoom level 3 years ago
Jonathan G Rennison d6e2b32132 Merge branch 'master' into jgrpp
# Conflicts:
#	src/screenshot.h
3 years ago
Patric Stout 06a3c0cb26 Fix dddf885f: use IConsoleError to produce console errors 3 years ago
Patric Stout 8c6b5e52fd Add: allow making heightmap screenshot via console 3 years ago
Patric Stout ac5e77ea3b Feature: allow custom width/height of screenshot via console
Reworked how the screenshot command works while keeping it backwards
compatible. It can now more freely understand arguments, and has
the ability to make SC_DEFAULTZOOM screenshots.
3 years ago
Jonathan G Rennison b931df9934 Add debug console command to delete a vehicle ID 3 years ago
Jonathan G Rennison 0df3e785cb Debug: Add console command to dump tile info 3 years ago
Jonathan G Rennison e95216b59d Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/core/geometry_func.cpp
#	src/date.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/settings_type.h
#	src/video/allegro_v.cpp
#	src/video/dedicated_v.cpp
#	src/video/null_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
3 years ago
Jonathan G Rennison 667ca4d0a7 Add help info for gfx_debug and viewport_debug console commands 3 years ago
SamuXarick a4035af337
Codechange: Apply coding style (#8640)
* Fix: Missing or needed spaces

* Codechange: Remove space

* Codechange: Remove space

* Codechange: More missing spaces

* Codechange: Missing spaces

* Codechange: Remove space

* Codechange: Remove space
3 years ago
Jonathan G Rennison 650d5e014e Merge branch 'master' into jgrpp
# Conflicts:
#	src/ai/ai_gui.cpp
#	src/company_cmd.cpp
#	src/lang/estonian.txt
#	src/lang/german.txt
#	src/lang/hungarian.txt
#	src/lang/korean.txt
#	src/lang/slovak.txt
#	src/main_gui.cpp
#	src/video/sdl2_v.cpp
3 years ago
Jonathan G Rennison 7154f8859d Merge tag '1.11.0-beta1' into jgrpp
# Conflicts:
#	src/console_cmds.cpp
#	src/gfx_func.h
#	src/industry.h
#	src/lang/czech.txt
#	src/lang/estonian.txt
#	src/lang/german.txt
#	src/lang/indonesian.txt
#	src/lang/japanese.txt
#	src/lang/norwegian_bokmal.txt
#	src/lang/russian.txt
#	src/lang/slovak.txt
#	src/saveload/saveload.h
#	src/station_gui.cpp
#	src/town_gui.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/waypoint_gui.cpp
3 years ago
Jonathan G Rennison b7ddd486cf Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/aircraft_cmd.cpp
#	src/blitter/32bpp_anim.cpp
#	src/cargopacket.cpp
#	src/cheat_gui.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/core/pool_func.hpp
#	src/date.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/ground_vehicle.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/mcf.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_station.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/station_kdtree.h
#	src/string_func.h
#	src/table/settings.ini
#	src/tgp.cpp
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
#	src/viewport.cpp
#	src/viewport_sprite_sorter_sse4.cpp
#	src/window.cpp
3 years ago
Jonathan G Rennison 6c3e5642f8 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/crashlog.cpp
#	src/fileio.cpp
#	src/fileio_func.h
#	src/fios_gui.cpp
#	src/ini_load.cpp
#	src/ini_type.h
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/network/network_client.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/os/windows/win32.cpp
#	src/road_cmd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/table/settings.ini
#	src/tree_cmd.cpp
#	src/tree_gui.cpp
#	src/vehicle_base.h
#	src/video/cocoa/cocoa_v.mm
#	src/video/cocoa/event.mm
#	src/video/cocoa/wnd_quartz.mm
#	src/viewport.cpp
#	src/widgets/tree_widget.h
3 years ago
Jonathan G Rennison 39df1c49a1 Merge branch 'master' into jgrpp
# Conflicts:
#	src/fileio.cpp
#	src/group_gui.cpp
#	src/industry.h
#	src/lang/korean.txt
#	src/linkgraph/linkgraphjob.cpp
#	src/linkgraph/linkgraphjob.h
#	src/linkgraph/linkgraphschedule.cpp
#	src/linkgraph/linkgraphschedule.h
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/town_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
3 years ago
Jonathan G Rennison ed0ffb6220 Add feature: realistic train braking
Add setting to select train braking model.
3 years ago
glx22 6b8ad5a9b1 Change: Apply some consistency to singleplayer related comments 3 years ago
glx22 07385c3662 Fix: Use the same safety checks as 'stop_ai' for 'reload_ai' 3 years ago
Jonathan G Rennison 1411f878ab
Add: Console command to dump debugging information (#8548) 3 years ago
Patric Stout 760b0cdc11 Change: change console command "restart" and add "reload"
The current "restart" command is now called "reload", as that is
what it does.
The old "restart" command is now called "restart", as that is what
it did.

As this has not been in any official release yet, this shouldn't
harm any kitten.
3 years ago
Jonathan G Rennison d0d2591900 Console: Use flag letters for dumped cargo classes 3 years ago
Jonathan G Rennison 4273ee4cec Console: Add flag summaries to dump road, tram, rail, bridge types 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Jonathan G Rennison ad5a97b7a1 Add console command to dump cargo types 4 years ago
Jonathan G Rennison 3f3d5c106f Console: Add commands for conditional execution from game date 4 years ago
Jonathan G Rennison 5fe5884613 Debug: Add experimental command to switch baseset 4 years ago
Patric Stout 4319d31036 Fix #6468: don't store version of AIs-started-via-console in name
You can do: "startai myai.3", which starts version 3 of "myai".
This is very useful for testing save/load code between different
versions of your AI.

However, when using this syntax, the AI got saved as "myai.3" as
name of the AI, instead of "myai". This caused several problems,
like indicating to the user the AI could not be found, but still
load the AI. But in all cases, the AI never got the chance to
load the saved data, making the whole reason this exists pointless.

By splitting the name and version already in the console command,
the code becomes simpler and AIs started this way now follow the
normal flow after initialization.
4 years ago
Jonathan G Rennison 4da3cfcf56 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/bootstrap_gui.cpp
4 years ago
Patric Stout dddf885fb4
Remove: console command "content select all" (#8363)
The intention of this function was that you could download
everything after a filter was applied; but this never really
took off. Instead, a select few people used this functionality
to download every available package on BaNaNaS. This is not in
the spirit of this service. Additionally, these few people were
good for 70% of the consumed bandwidth of BaNaNaS.
4 years ago
Jonathan G Rennison a20112e48f Add console command to dump desync message log 4 years ago
Jonathan G Rennison f5499852b6 Add debug console command to change rail type map colour 4 years ago
Jonathan G Rennison b86f19c121 Add console command to dump bridge types 4 years ago
Jonathan G Rennison 39ace3bbe4 Add console command to dump road types 4 years ago
Jonathan G Rennison d5cad68292 Add GRF details to dump road types console command 4 years ago
Jonathan G Rennison 22d2b4cc90 Add console command to dump road types 4 years ago
Jonathan G Rennison ffe3c769a3 Add road tile cached one way state, one way road section detection 4 years ago
Jonathan G Rennison b13abd327a Debug: Add road/tram type flag ctl console command 4 years ago
Jonathan G Rennison d29a08dfe1 Add gfx_debug console command 4 years ago
Jonathan G Rennison 2cad094725 Allow sending an empty password to drop settings_access 4 years ago
Jonathan G Rennison bf0bdfdd93 Add sleep debug console command 4 years ago
Jonathan G Rennison e2eed7cb8a Add console command to dump link graph jobs 4 years ago
Jonathan G Rennison e90b39c559 Add console command to get full game date 4 years ago
Jonathan G Rennison 9be6eb92f8 Console: Add network server commands to get/set company pw hashes 4 years ago
Jonathan G Rennison 3b49f892fa Redraw connecting link graph overlay links when moving station sign
Add test console command
4 years ago
Jonathan G Rennison 5b78090a61 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/saveload/town_sl.cpp
#	src/screenshot.h
#	src/script/api/ai/ai_date.hpp.sq
#	src/script/api/ai/ai_marine.hpp.sq
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_date.hpp.sq
#	src/script/api/game/game_marine.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/game/game_window.hpp.sq
#	src/script/api/script_window.hpp
#	src/script/api/template/template_window.hpp.sq
#	src/signal.cpp
#	src/statusbar_gui.cpp
#	src/toolbar_gui.cpp
#	src/viewport.cpp
#	src/viewport_func.h
4 years ago
Jonathan G Rennison 8bf41a6f1d Add setting to show unlisted console commands 4 years ago
Jonathan G Rennison 4ac30471a3 Add debug console command to merge all linkgraph jobs ASAP 4 years ago
TechGeekNZ cf8ea74733 Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake 4 years ago
Miguel Horta 40436019fd Fix: Display banlist's indexes correctly
Bug introduced via commit ab711e6942
4 years ago
Jonathan G Rennison eef6ad7b2a Crash log: Save config file in new crash save chunk 4 years ago
Jonathan G Rennison 850f860f2d Fix dump_load_debug_log console command overwriting data 4 years ago
Jonathan G Rennison 8ef367b126 Add viewport debug commands 4 years ago
Jonathan G Rennison 99e0229860 Merge branch 'master' into jgrpp 4 years ago
Charles Pigott 8800225bdb Fix #7993: Compile warning in kick/ban debug messages 4 years ago
Jonathan G Rennison babe98cdb1 Merge branch 'master' into jgrpp
# Conflicts:
#	src/network/network_server.h
#	src/pathfinder/yapf/yapf_road.cpp
#	src/viewport.cpp
4 years ago
Niels Martin Hansen 805ecd32be Fix 5880f147: Integer width warnings 4 years ago
Bjarni Thor 5880f1479f Feature #7756: Allow server to supply a reason to kicked/banned clients
This commit adds the missing feature of allowing the server owner to
    provide a reason for kicking/banning a client, which the client sees in
    a pop-up window after being kicked. The implementation extends the
    network protocol by adding a new network action called
    NETWORK_ACTION_KICKED that is capable of having an error string, unlike
    the other network error packages.  Additionally, the kick function
    broadcasts a message to all clients about the kicked client and the
    reason for the kick.
4 years ago
Jonathan G Rennison 81a1094cc8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_cmds.cpp
#	src/date.cpp
#	src/economy.cpp
#	src/misc.cpp
#	src/newgrf_house.cpp
4 years ago
Niels Martin Hansen c8779fb311
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
4 years ago
Jonathan G Rennison 7960db35f2 Merge branch 'master' into jgrpp
# Conflicts:
#	config.lib
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj
#	projects/openttd_vs142.vcxproj.filters
#	src/aircraft_cmd.cpp
#	src/base_station_base.h
#	src/core/pool_type.hpp
#	src/disaster_vehicle.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/group.h
#	src/group_cmd.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/network_command.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehiclelist.cpp
#	src/window_type.h
5 years ago
TELK e04ca904a9 Feature: Minimap screenshot 5 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 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 edfd378e93 Merge branch 'master' into jgrpp
# Conflicts:
#	source.list
#	src/blitter/32bpp_anim.cpp
#	src/linkgraph/linkgraphjob.cpp
#	src/order_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_type.h
5 years ago
Jonathan G Rennison 170e71787b Add console commands to dump station flow stats 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Jonathan G Rennison 6562937899 Merge branch 'master' into jgrpp-nrt
# Conflicts:
#	src/console_cmds.cpp
#	src/script/api/script_order.cpp
#	src/station_cmd.cpp
#	src/statusbar_gui.cpp
#	src/town_gui.cpp
5 years ago
Jonathan G Rennison ec892879f4 Add passworded mechanism to change server game settings from client 5 years ago
TELK bcc73bd40d Add: 'getsysdate' console command (#7658)
Add `getsysdate` console command to display system's local time, which is might be useful to check current time in script logging.
5 years ago
Jonathan G Rennison 36eb4165b8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/bridge_map.h
#	src/crashlog.cpp
#	src/industry.h
#	src/linkgraph/linkgraph_type.h
#	src/order_type.h
#	src/saveload/afterload.cpp
#	src/settings.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/table/settings.h.preamble
#	src/train.h
#	src/vehicle.cpp
#	src/viewport.cpp
#	src/viewport_func.h
#	src/widgets/station_widget.h
#	src/zoom_func.h
#	src/zoom_type.h
5 years ago
stormcone 29bdab23f7
Fix: Fix some copy-paste typos. 5 years ago
Jonathan G Rennison 5f44741428 Add console commands to show station and industry windows 5 years ago
Jonathan G Rennison 16e590dc88 Add console command to show town window 5 years ago
Jonathan G Rennison 5a9790a196 Store crash/desync logs in crash/desync savegame
Add console command to dump loaded debug log
5 years ago
Jonathan G Rennison a7de6ec35b Add console command to show map stats 5 years ago
Jonathan G Rennison 6db59fee05 Add console command to highlight tile
Add alias to scroll to and highlight tile
5 years ago
Jonathan G Rennison f37a93cecd Add any output from CheckCaches to desync log 5 years ago
Jonathan G Rennison 257591a32e Add utility function for processing a string buffer by line 5 years ago
Jonathan G Rennison ec1e848a7f Add log of game events since last load and overall
Add console command
Add to crashlog
5 years ago
Jonathan G Rennison 1e51d7af2f Add console command to dump vehicle stats 5 years ago
Jonathan G Rennison da18ec0009 Add debug console commands to bankrupt and delete a company 5 years ago
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison f5747bf753 Merge branch 'master' into jgrpp
# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 5 years ago
Jonathan G Rennison 361758b516 Merge branches 'crashlog_improvements', 'save_ext' into jgrpp
# Conflicts:
#	Makefile.src.in
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj
#	projects/openttd_vs142.vcxproj.filters
#	src/core/smallstack_type.hpp
#	src/linkgraph/linkgraphjob.cpp
#	src/linkgraph/linkgraphjob.h
#	src/misc.cpp
#	src/network/network_udp.cpp
#	src/openttd.cpp
#	src/saveload/saveload.cpp
5 years ago
Jonathan G Rennison d5ee9d34da Merge branch 'cpp-11' into crashlog_improvements
# Conflicts:
#	Makefile.src.in
#	projects/determineversion.vbs
#	source.list
#	src/crashlog.cpp
#	src/misc.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rev.h
#	src/thread/thread.h
#	src/thread/thread_morphos.cpp
#	src/thread/thread_none.cpp
#	src/thread/thread_os2.cpp
#	src/thread/thread_pthread.cpp
#	src/thread/thread_win32.cpp
5 years ago
glx22 a1e492d0d8
Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465) 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
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson aa7ca7fe64 Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Jonathan G Rennison 2fdcc52321 Merge branch 'save_ext' into jgrpp
# Conflicts:
#	Makefile.src.in
#	findversion.sh
#	projects/determineversion.vbs
#	src/lang/dutch.txt
#	src/lang/korean.txt
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/rail.cpp
#	src/rail_cmd.cpp
#	src/saveload/afterload.cpp
#	src/ship_cmd.cpp
#	src/toolbar_gui.cpp
#	src/vehicle.cpp
5 years ago
glx 8e7fe3973f Add: CompanyCtrlAction enum for CMD_COMPANY_CTRL actions 5 years ago
Jonathan G Rennison e735c1a51a Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/autoreplace_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/script_station.hpp
#	src/track_func.h
#	src/vehicle_base.h
6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Jonathan G Rennison 9490f33a6c Merge branch 'master' into crashlog_improvements
# Conflicts:
#	src/console_cmds.cpp
#	src/openttd.cpp
#	src/vehicle.cpp
6 years ago
Jonathan G Rennison 035f5622b9 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_cmds.cpp
#	src/landscape.cpp
#	src/linkgraph/linkgraphschedule.cpp
#	src/openttd.cpp
#	src/roadveh_cmd.cpp
#	src/toolbar_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/viewport.cpp
#	src/window_type.h
6 years ago
Niels Martin Hansen 2a868b9f3b Feature: Framerate display window (#6822)
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
6 years ago
Jonathan G Rennison f42cc19aad Merge branch 'cpp-11' into crashlog_improvements
# Conflicts:
#	Makefile.src.in
#	src/crashlog.cpp
#	src/crashlog.h
6 years ago
keldorkatarn 4955996b35 Remove costly recalculation of a date format we already have.
(cherry picked from commit 6aca18d18252f1c2f6d4a215999b7d7afb7df813)

See #36
6 years ago
Jonathan G Rennison 4cdc253c38 Add dev console command to trigger disaster 6 years ago
Jonathan G Rennison ab6119cb76 Merge branch 'infrastructure_sharing' into jgrpp 6 years ago
Jonathan G Rennison 2c16800454 Add debug console command to show cargo packet deferred payment stats 6 years ago
Jonathan G Rennison bcc456ed37 Add debug console command to show inflation multipliers 6 years ago
Jonathan G Rennison a93cc441a9 Merge branch 'cpp-11' into jgrpp 7 years ago
adf88 be48b325fd (svn r27914) -Fix/Feature: 'unban' console command - fix invalid help text and be more verbose 7 years ago
adf88 56ffa35511 (svn r27914) -Fix/Feature: 'unban' console command - fix invalid help text and be more verbose 7 years ago
adf88 43f162c664 (svn r27913) -Fix: 'unban' console command was not handling IPv6 adresses properly 7 years ago
adf88 f3fbf6beb8 (svn r27913) -Fix: 'unban' console command was not handling IPv6 adresses properly 7 years ago
Jonathan G Rennison adb4463e5e Add console command to check caches. 7 years ago
Jonathan G Rennison e11f295b29 Change console command to unblock heliports to be unlisted. 7 years ago
Jonathan G Rennison 2fbeb29277 Merge branch 'crashlog_improvements' into jgrpp
# Conflicts:
#	src/misc.cpp
#	src/openttd.cpp
7 years ago
Jonathan G Rennison 349ddd90b7 Maintain a circular buffer of recent commands, add to crashlog.
Add console command to dump command log.
Increase max crashlog size.
7 years ago
Jonathan G Rennison 3884ea5da1 Add option for console commands to be unlisted. 7 years ago
Jonathan G Rennison 20a090b077 Show warning dialog if NewGRFs use too many string IDs.
Show when reloading/changing NewGRF config, or starting new game.
8 years ago
Jonathan G Rennison 5e67582a64 Merge branch 'save_ext' into jgrpp
# Conflicts:
#	config.lib
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/saveload.cpp
8 years ago
alberth f286ba8db2 (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 8 years ago
alberth 0adfb1ac6f (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 8 years ago
alberth e735bbebce (svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload. 8 years ago
alberth 6f201ce4a8 (svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload. 8 years ago
alberth a959c0c965 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 8 years ago
alberth 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 8 years ago
alberth c3bed437ee (svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it. 8 years ago
alberth df9a9f074a (svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it. 8 years ago
alberth ec2b2fad58 (svn r27647) -Codechange: Introduce file operations, and use it to replace most of SaveLoadDialogMode 8 years ago
alberth 75ad6d0100 (svn r27647) -Codechange: Introduce file operations, and use it to replace most of SaveLoadDialogMode 8 years ago
alberth 76cd96e709 (svn r27645) -Add: Give console commands their own file list storage. 8 years ago
alberth 5969685954 (svn r27645) -Add: Give console commands their own file list storage. 8 years ago
alberth 8a9e9f838b (svn r27644) -Codechange: Split GetFiosItem into BuildFileList and FindItem, and move both to FileList. 8 years ago
alberth d6cd3b1605 (svn r27644) -Codechange: Split GetFiosItem into BuildFileList and FindItem, and move both to FileList. 8 years ago
alberth 93baf192a0 (svn r27642) -Codechange: FiosGet* file query functions take a destination file list. 8 years ago
alberth caf3379746 (svn r27642) -Codechange: FiosGet* file query functions take a destination file list. 8 years ago