Update project files for configuration changes. (#14281)

This commit is contained in:
Pieter-Jan Briers
2023-03-06 20:38:07 +01:00
committed by GitHub
parent 9b080c0ef3
commit c5b3f62f6f
18 changed files with 187 additions and 60 deletions

View File

@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
@@ -8,7 +7,6 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<LangVersion>11</LangVersion>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
@@ -25,5 +23,5 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.UnitTesting\Robust.UnitTesting.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
</Project>

View File

@@ -218,10 +218,7 @@ public static class PoolManager
options.CVarOverrides[CCVars.GameDummyTicker.Name] = "true";
}
if (poolSettings.InLobby)
{
options.CVarOverrides[CCVars.GameLobbyEnabled.Name] = "true";
}
options.CVarOverrides[CCVars.GameLobbyEnabled.Name] = poolSettings.InLobby.ToString();
if (poolSettings.DisableInterpolate)
{
@@ -233,6 +230,8 @@ public static class PoolManager
options.CVarOverrides[CCVars.GameMap.Name] = poolSettings.Map;
}
options.CVarOverrides[CCVars.ConfigPresetDevelopment.Name] = "false";
// This breaks some tests.
// TODO: Figure out which tests this breaks.
options.CVarOverrides[CVars.NetBufferSize.Name] = "0";
@@ -647,12 +646,12 @@ public sealed class PoolSettings
/// <summary>
/// If the returned pair must not be reused
/// </summary>
public bool MustNotBeReused => Destructive || NoLoadContent || DisableInterpolate || DummyTicker;
public bool MustNotBeReused => Destructive || NoLoadContent || DisableInterpolate || DummyTicker || NoToolsExtraPrototypes;
/// <summary>
/// If the given pair must be brand new
/// </summary>
public bool MustBeNew => Fresh || NoLoadContent || DisableInterpolate || DummyTicker;
public bool MustBeNew => Fresh || NoLoadContent || DisableInterpolate || DummyTicker || NoToolsExtraPrototypes;
/// <summary>
/// If the given pair must not be connected
@@ -744,6 +743,14 @@ public sealed class PoolSettings
if (ExtraPrototypes != nextSettings.ExtraPrototypes) return false;
return true;
}
// Prototype hot reload is not available outside TOOLS builds,
// so we can't pool test instances that use ExtraPrototypes without TOOLS.
#if TOOLS
private bool NoToolsExtraPrototypes => false;
#else
private bool NoToolsExtraPrototypes => !string.IsNullOrEmpty(ExtraPrototypes);
#endif
}
/// <summary>