refactor(app): compose session and player startup
Move streaming, live-session, hydration, local-player, combat, and teleport construction behind the typed Phase-7 boundary. Add exact-owner runtime bindings and focused spawn-claim classification so partial startup rolls back without retaining old session targets while preserving the accepted construction and frame dependencies. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
3573da12e1
commit
7771c07fb6
31 changed files with 1759 additions and 532 deletions
|
|
@ -24,6 +24,23 @@ public sealed class LiveCombatAttackOperationsTests
|
|||
Assert.Throws<InvalidOperationException>(() => slot.Bind(second));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OwnedBindingReleasesOnlyItsExactOwnerAndAllowsRebind()
|
||||
{
|
||||
var slot = new CombatAttackOperationsSlot();
|
||||
var first = new FakeOperations { CanStartValue = false };
|
||||
var second = new FakeOperations { CanStartValue = true };
|
||||
|
||||
IDisposable firstBinding = slot.BindOwned(first);
|
||||
Assert.Throws<InvalidOperationException>(() => slot.BindOwned(second));
|
||||
|
||||
firstBinding.Dispose();
|
||||
using IDisposable secondBinding = slot.BindOwned(second);
|
||||
firstBinding.Dispose();
|
||||
|
||||
Assert.True(slot.CanStartAttack());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CanStartRequiresLiveWorldBeforeTargetResolution()
|
||||
{
|
||||
|
|
@ -137,7 +154,8 @@ public sealed class LiveCombatAttackOperationsTests
|
|||
|
||||
private sealed class FakeOperations : ICombatAttackOperations
|
||||
{
|
||||
public bool CanStartAttack() => true;
|
||||
public bool CanStartValue { get; init; } = true;
|
||||
public bool CanStartAttack() => CanStartValue;
|
||||
public void PrepareAttackRequest()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue