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
This commit is contained in:
Jonathan G Rennison
2023-05-30 00:49:14 +01:00
156 changed files with 2979 additions and 4098 deletions

View File

@@ -1780,13 +1780,13 @@ class NIHStationStruct : public NIHelper {
const Station *st = Station::GetIfValid(index);
if (st) {
if (st->industry) {
seprintf(buffer, lastof(buffer), " Neutral industry: %u: %s", st->industry->index, st->industry->GetCachedName());
seprintf(buffer, lastof(buffer), " Neutral industry: %u: %s", st->industry->index, st->industry->GetCachedName().c_str());
output.print(buffer);
}
seprintf(buffer, lastof(buffer), " Nearby industries: %u", (uint) st->industries_near.size());
output.print(buffer);
for (const auto &i : st->industries_near) {
seprintf(buffer, lastof(buffer), " %u: %s, distance: %u", i.industry->index, i.industry->GetCachedName(), i.distance);
seprintf(buffer, lastof(buffer), " %u: %s, distance: %u", i.industry->index, i.industry->GetCachedName().c_str(), i.distance);
output.print(buffer);
}
seprintf(buffer, lastof(buffer), " Station tiles: %u", st->station_tiles);

View File

@@ -44,7 +44,6 @@ static void DeveloperModeChanged(int32 new_value);
static void ScriptMaxOpsChange(int32 new_value);
static bool CheckScriptMaxMemoryChange(int32 &new_value);
static void ScriptMaxMemoryChange(int32 new_value);
static void InvalidateCompanyWindow(int32 new_value);
static void InvalidateCompanyLiveryWindow(int32 new_value);
static void InvalidateNewGRFChangeWindows(int32 new_value);
static void ZoomMinMaxChanged(int32 new_value);
@@ -2509,27 +2508,6 @@ strval = STR_CONFIG_SETTING_ECONOMY_TYPE_ORIGINAL
post_cb = [](auto) { InvalidateWindowClassesData(WC_INDUSTRY_VIEW); }
cat = SC_BASIC
[SDT_BOOL]
var = economy.allow_shares
def = false
str = STR_CONFIG_SETTING_ALLOW_SHARES
strhelp = STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT
post_cb = InvalidateCompanyWindow
[SDT_VAR]
var = economy.min_years_for_shares
type = SLE_UINT8
from = SLV_TRADING_AGE
flags = SF_GUI_0_IS_SPECIAL
def = 6
min = 0
max = 255
interval = 1
str = STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES
strhelp = STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT
strval = STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_VALUE
cat = SC_EXPERT
[SDT_VAR]
var = economy.feeder_payment_share
type = SLE_UINT8