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:
@@ -125,7 +125,7 @@ public class Program
|
||||
// BestHTTP's SocketManager parses this as the Socket.IO v2 endpoint URL.
|
||||
opt.NodeServerUrl = "localhost:5148/socket.io/";
|
||||
// Any field in BattleNodeOptions can be overridden via the "BattleNode" section
|
||||
// in appsettings*.json — see appsettings.Development.json for SoloDefaultsToScripted.
|
||||
// in appsettings*.json — see appsettings.Development.json for DiagnosticLogging.
|
||||
builder.Configuration.GetSection("BattleNode").Bind(opt);
|
||||
});
|
||||
// In-process FCFS pair-up for TK2 PvP /do_matching, plus rank-battle's AI-fallback
|
||||
@@ -138,9 +138,8 @@ public class Program
|
||||
new ModePolicy("unlimited_rank_battle", PolicyKind.PvpFirstThenAiFallback),
|
||||
}));
|
||||
builder.Services.AddSingleton<IMatchingPairUpService, InProcessPairUp>();
|
||||
// Single resolver shared by every /do_matching family controller. Owns the scripted-
|
||||
// flag short-circuit + the pair-up → matching_state mapping. Singleton: stateless,
|
||||
// all deps are singletons too.
|
||||
// Single resolver shared by every /do_matching family controller. Owns the
|
||||
// pair-up → matching_state mapping. Singleton: stateless, all deps are singletons too.
|
||||
builder.Services.AddSingleton<IMatchingResolver, MatchingResolver>();
|
||||
// Phase 3: bot roster used by RankBattleController.AiStart to compose oppo_info.
|
||||
// Transient because BotRoster depends on the transient IGlobalsRepository.
|
||||
|
||||
Reference in New Issue
Block a user