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:
@@ -16,17 +16,6 @@ public sealed class BattleNodeOptions
|
||||
/// </summary>
|
||||
public TimeSpan WaitingRoomTimeout { get; set; } = TimeSpan.FromSeconds(60);
|
||||
|
||||
/// <summary>
|
||||
/// Dev convenience: when true, matchmaking endpoints that would otherwise park
|
||||
/// a solo poller (returning 3002 RETRY until a partner arrives) instead return
|
||||
/// a Scripted match immediately — equivalent to passing <c>?scripted=1</c> on
|
||||
/// every request. Turn off to test real PvP with two clients. Default false.
|
||||
/// <para>Trade-off: while on, two viewers polling simultaneously each get
|
||||
/// their own Scripted match instead of pairing with each other. Toggling off
|
||||
/// is the only way to get PvP behavior.</para>
|
||||
/// </summary>
|
||||
public bool SoloDefaultsToScripted { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// When true, <see cref="Sessions.Participants.RealParticipant"/> emits per-frame
|
||||
/// diagnostic logs at Information level: <c>[sio-in]</c> on every inbound msg/alive/hand
|
||||
|
||||
@@ -47,9 +47,6 @@ public sealed class MatchingBridge : IMatchingBridge
|
||||
case BattleType.Bot:
|
||||
if (p2 is not null) throw new ArgumentException("Bot must have p2==null.", nameof(p2));
|
||||
break;
|
||||
case BattleType.Scripted:
|
||||
// p2 currently null; future server-driven bot will populate it.
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(type), type, "Unknown BattleType.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user