refactor(battle-node): remove ScriptedBotParticipant and dev-affordance wiring
Deletes the scripted opponent and every entry point that created a BattleType.Scripted session (the ?scripted=1 query opt-in, the SoloDefaultsToScripted toggle, the resolver short-circuit, the WS handler case, the bridge validation arm). Real two-client PvP and the Bot matchmaking-timeout fallback are untouched. ResolveAsync drops its scriptedOptIn parameter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework;
|
||||
using SVSim.BattleNode.Bridge;
|
||||
using SVSim.BattleNode.Sessions;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class InMemoryBattleSessionStoreTests
|
||||
[Test]
|
||||
public void RegisterThenGet_ReturnsRegisteredBattle()
|
||||
{
|
||||
var battle = new PendingBattle("bid-1", BattleType.Scripted, new BattlePlayer(906243102, FixtureCtx()), null);
|
||||
var battle = new PendingBattle("bid-1", BattleType.Bot, new BattlePlayer(906243102, FixtureCtx()), null);
|
||||
_store.RegisterPending(battle);
|
||||
|
||||
Assert.That(_store.TryGetPending("bid-1"), Is.EqualTo(battle));
|
||||
@@ -29,7 +29,7 @@ public class InMemoryBattleSessionStoreTests
|
||||
[Test]
|
||||
public void Remove_ReturnsTrueWhenPresent_FalseWhenAbsent()
|
||||
{
|
||||
_store.RegisterPending(new PendingBattle("bid", BattleType.Scripted, new BattlePlayer(1, FixtureCtx()), null));
|
||||
_store.RegisterPending(new PendingBattle("bid", BattleType.Bot, new BattlePlayer(1, FixtureCtx()), null));
|
||||
Assert.That(_store.RemovePending("bid"), Is.True);
|
||||
Assert.That(_store.RemovePending("bid"), Is.False);
|
||||
}
|
||||
@@ -37,8 +37,8 @@ public class InMemoryBattleSessionStoreTests
|
||||
[Test]
|
||||
public void Register_DuplicateBattleId_OverwritesPrior()
|
||||
{
|
||||
_store.RegisterPending(new PendingBattle("bid", BattleType.Scripted, new BattlePlayer(1, FixtureCtx()), null));
|
||||
_store.RegisterPending(new PendingBattle("bid", BattleType.Scripted, new BattlePlayer(2, FixtureCtx()), null));
|
||||
_store.RegisterPending(new PendingBattle("bid", BattleType.Bot, new BattlePlayer(1, FixtureCtx()), null));
|
||||
_store.RegisterPending(new PendingBattle("bid", BattleType.Bot, new BattlePlayer(2, FixtureCtx()), null));
|
||||
Assert.That(_store.TryGetPending("bid")!.P1.ViewerId, Is.EqualTo(2));
|
||||
}
|
||||
|
||||
@@ -49,3 +49,4 @@ public class InMemoryBattleSessionStoreTests
|
||||
EmblemId: "701441011", DegreeId: "300003", FieldId: 43, IsOfficial: 0,
|
||||
BattleType: 11);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user