Commit graph Aetheria/tests/Aetheria.Shared.Tests/LootTests.cs
Author SHA1 Message Date
Meta Vens
fa911f2d85 Zone.Entities read-only outside Zone: Admit and Remove are the only membership writers
Entities is a MemberView with no mutating member; Admit installs the death watch with the
membership and refuses a member already present, Remove takes it away with the membership.
The Reset and duplicate-Add bypass paths of the death watch cannot be spelled any more.
Tests move to Admit/Remove; Admit also activates, so the explicit Activate calls that followed
a raw Add are dropped. Unity call sites route through Zone.Remove.

Builds: unverified at this commit (verified in the job at the head).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:13:43 +02:00
Meta Vens
f2bf0c0410 Zone: a death watch exists only for a non-member and is disposed by Remove and Clear; tests for duplicate Add, Clear and the pickup room boundary
WatchDeath returns when the entity already holds a watch, so a duplicate
Entities.Add neither throws nor leaves a second live subscription;
Entities.Clear (ObserveReset) disposes every watch. Adds
AMemberAddedTwiceStillDropsEachItemOnce, AClearedZoneDropsNothingWhenAFormerMemberDies
(finding duplicate-add-leaks-second-watch) and
APickUpOfExactlyTheRoomLeftFitsAndOneMoreChangesNothing (finding
pickup-room-arithmetic-unpinned, from Soul's boundary probe). Unverified
until the Yggdrasil job; no commit here is known not to build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 00:43:12 +02:00
Meta Vens
cc9403ce58 Loot-1 fix batch: whole-or-nothing commodity store, and tests for the Soul s1/s2 findings
EquippedCargoBay.TryStore(SimpleCommodity) now returns false before touching anything when
TryFindSpace says the whole quantity does not fit (its documented contract: true only when ALL
is stored), so Zone.TryPickUp keeps "first accepting bay, otherwise nothing changes" with no
rollback in Zone. Tests: refused pickup of a stackable item changes nothing; a stack plus free
cell stores whole; first accepting bay; headings cover the circle; the loot stream is not the
mine stream; dock/undock and jump drop once and only in the zone the ship is in.
Untested on this commit: not yet built (verify job follows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:51:45 +02:00
Meta Vens
6130eb7d04 LootTests: a station is active once built, so the pickup taker's second bay is equipped before Activate
Station() activates the entity and TryEquip refuses while active; the second Crate at (2,2) failed for that reason, not a hull rule. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:30:30 +02:00
Meta Vens
ca19deab68 LootTests: the pickup taker is an unstocked two-bay station, as the StationServices fixture builds one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 05:33:27 +02:00
Meta Vens
c34f72e3d5 LootTests: the station's bay goes in first, as the StationServices fixture does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:55:37 +02:00
Meta Vens
43b8db6bcd LootTests: the pickup test uses a two-bay station and a non-stacking item
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:52:27 +02:00
Meta Vens
7d2276a708 LootTests: fixture fixes (zone radius for the well, six pieces of gear, a hitting shot, second bay by cell)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:37:38 +02:00
Meta Vens
5a72c6f5c8 LootTests: the ledger holds lots for every minted ship (previous commit's tests failed on it)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:32:16 +02:00
Meta Vens
fa4467e9a3 Loot 1 (simulation): Zone owns floating items, rolls death drops on SimulationDice, expires them and commits pickups
Zone.Release is the one adder, StepFloatingItems and TryPickUp the only removers; DropLoot runs from the one
death subscription before the entity leaves the zone. Three C# default settings. Unity's drop path is untouched
(loot-1-present deletes it). Not yet built or run at this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 04:00:08 +02:00