* Conveyor optimisations - Optimise movement for moving stuff. Better flags + less resolves + slapped parallelrobustjob on it. - Sleeping for entities getting conveyed into walls. * Blocker version * Finish * Final * Mob collisions * impulses * Collision smoothing * Locked in * 30tps working * r * fixes * Best * Fixes + CVars * CVars in place * Pushies * Opt attempt 1 * Revert "Opt attempt 1" This reverts commit 5ccd72dcbea09261a992aa1f7f05df169a1ce676. * Fix mispredicts * Ready-ish * better * Cleanup * Fix conveyor power mispredict * Forgetting to actually do deltas * Fix buckle pushes * Bagel save * Revert "Bagel save" This reverts commit 1b93fda81fb852d89b89b0beae0b80f8a61165f2. * Conveyor resave * Fix prediction * Mob movement rewrite * Bandaid * Working version * Tentatively working * Friction to fix cornering * More fixes * Revert bagel * Revert this * Bad parity * Working * Fixes * Woops * Doc comments * Pen cap cvar * StandingState cleanup and sub * Fix downed mobs * fish * client * Disable pushing on tests * More variables * Movement mods * Mass diff * 1 more tweak * Cvar
78 lines
3.1 KiB
C#
78 lines
3.1 KiB
C#
#nullable enable
|
|
using Content.Shared.CCVar;
|
|
using Robust.Shared;
|
|
using Robust.Shared.Configuration;
|
|
using Robust.UnitTesting;
|
|
|
|
namespace Content.IntegrationTests;
|
|
|
|
// Partial class containing cvar logic
|
|
public static partial class PoolManager
|
|
{
|
|
private static readonly (string cvar, string value)[] TestCvars =
|
|
{
|
|
// @formatter:off
|
|
(CCVars.DatabaseSynchronous.Name, "true"),
|
|
(CCVars.DatabaseSqliteDelay.Name, "0"),
|
|
(CCVars.HolidaysEnabled.Name, "false"),
|
|
(CCVars.GameMap.Name, TestMap),
|
|
(CCVars.AdminLogsQueueSendDelay.Name, "0"),
|
|
(CVars.NetPVS.Name, "false"),
|
|
(CCVars.NPCMaxUpdates.Name, "999999"),
|
|
(CVars.ThreadParallelCount.Name, "1"),
|
|
(CCVars.GameRoleTimers.Name, "false"),
|
|
(CCVars.GameRoleWhitelist.Name, "false"),
|
|
(CCVars.GridFill.Name, "false"),
|
|
(CCVars.PreloadGrids.Name, "false"),
|
|
(CCVars.ArrivalsShuttles.Name, "false"),
|
|
(CCVars.EmergencyShuttleEnabled.Name, "false"),
|
|
(CCVars.ProcgenPreload.Name, "false"),
|
|
(CCVars.WorldgenEnabled.Name, "false"),
|
|
(CCVars.GatewayGeneratorEnabled.Name, "false"),
|
|
(CVars.ReplayClientRecordingEnabled.Name, "false"),
|
|
(CVars.ReplayServerRecordingEnabled.Name, "false"),
|
|
(CCVars.GameDummyTicker.Name, "true"),
|
|
(CCVars.GameLobbyEnabled.Name, "false"),
|
|
(CCVars.ConfigPresetDevelopment.Name, "false"),
|
|
(CCVars.AdminLogsEnabled.Name, "false"),
|
|
(CCVars.AutosaveEnabled.Name, "false"),
|
|
(CVars.NetBufferSize.Name, "0"),
|
|
(CCVars.InteractionRateLimitCount.Name, "9999999"),
|
|
(CCVars.InteractionRateLimitPeriod.Name, "0.1"),
|
|
(CCVars.MovementMobPushing.Name, "false"),
|
|
};
|
|
|
|
public static async Task SetupCVars(RobustIntegrationTest.IntegrationInstance instance, PoolSettings settings)
|
|
{
|
|
var cfg = instance.ResolveDependency<IConfigurationManager>();
|
|
await instance.WaitPost(() =>
|
|
{
|
|
if (cfg.IsCVarRegistered(CCVars.GameDummyTicker.Name))
|
|
cfg.SetCVar(CCVars.GameDummyTicker, settings.UseDummyTicker);
|
|
|
|
if (cfg.IsCVarRegistered(CCVars.GameLobbyEnabled.Name))
|
|
cfg.SetCVar(CCVars.GameLobbyEnabled, settings.InLobby);
|
|
|
|
if (cfg.IsCVarRegistered(CVars.NetInterp.Name))
|
|
cfg.SetCVar(CVars.NetInterp, settings.DisableInterpolate);
|
|
|
|
if (cfg.IsCVarRegistered(CCVars.GameMap.Name))
|
|
cfg.SetCVar(CCVars.GameMap, settings.Map);
|
|
|
|
if (cfg.IsCVarRegistered(CCVars.AdminLogsEnabled.Name))
|
|
cfg.SetCVar(CCVars.AdminLogsEnabled, settings.AdminLogsEnabled);
|
|
|
|
if (cfg.IsCVarRegistered(CVars.NetInterp.Name))
|
|
cfg.SetCVar(CVars.NetInterp, !settings.DisableInterpolate);
|
|
});
|
|
}
|
|
|
|
private static void SetDefaultCVars(RobustIntegrationTest.IntegrationOptions options)
|
|
{
|
|
foreach (var (cvar, value) in TestCvars)
|
|
{
|
|
options.CVarOverrides[cvar] = value;
|
|
}
|
|
}
|
|
}
|