Commit graph Aetheria/tests/Aetheria.Shared.Tests/StationServicesTests.cs
Author SHA1 Message Date
soul
fb184066b6 Name the gear-room reading GearCellsLeft: StockRoom is a name the role-bay cut retired
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-03 06:13:16 +01:00
soul
05206a83eb Pawned gear stops at the stock share, mines list only their ground's ores, the region and transfer pins say what is true
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-03 04:41:27 +01:00
soul
719035745f Tests follow the role bays: fixtures hold by role, new pins for Role, bulk-only bays, whole-cell shares, Need and the named hull fault
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-03 02:33:43 +01:00
soul
768e07d278 A station buys only goods its installed gear wants, only as far as its bays hold: StationWants, Zenith's ore silo and standing haul order
StationWants.Of derives the wants per call: the draws of each installed recipe facility's run list (Production.Draws, beside Take) and, for a silo-carrying station, the goods of the haul orders that start at its orbit. TrySellPart is gated by it and says NotWanted or NoRoom; OreValue and TrySellOre sell only wanted ore. SiloData is a bay on a Facility row that holds commodity stacks only; HaulOrderData is a run document staged by DemoTerminus (ScenarioStage.Station, HaulOrder). Generated station gear stock stops at half the stock bay (StationStockShare) and skips silos. Facilities authors facility:ore-silo, its NotOffered product and trade-hub's Facilities (economy author Facilities apply; a rerun writes nothing); L-facility accepts a silo. EconomyLoop sells the sortie's hold to the processing station and reports sold, refused and offered value. TradeMenu (outside the dotnet build) reports NotWanted and NoRoom. Tests: fixtures seat a Smelter; new StationWantsTests; DemoLoop re-anchors BaseBuyRatio (cheapest piece Zenith stocks reads 2500, not 15500, once stock stops at half the bay).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 13:23:18 +01:00
soul
9d6de15358 Delete TrySell's absorb branch: a commodity stack sells only through TrySellPart, which pays for the units the bays took and says how many sold
TrySell takes a crafted item only and throws for any ICommodityStack. TrySellPart takes any commodity stack and returns SaleResult (Sold, Offered, Refusal); TrySellOre sums them. The paid-in-full test is deleted with the branch. The wants gate follows in the next commit; callers in tests and tools are repointed there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 13:23:17 +01:00
soul
4ef9a3eaf6 Starting purse 4000: the derived price of the cheapest ballistic design above the starter, rounded up to a thousand
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-28 00:06:07 +01:00
soul
71a07e53bb Fungible commodity tests: merge by design, Extract mints nothing, pre-ruling saves read, sell-ore by ore kind
MiningCut5bTests becomes FungibleCommodityTests; StationServicesTests, HaulFeedTests, ItemTitleTests, RunSaveTests and StationKindDescriptionTests drop their lot clauses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-27 17:11:19 +01:00
soul
34ce6e6719 Gear money rescale: divide gear, consumable and package hull prices by 100 through economy rescale; economy prices reads every price field (aetheria-living-world, cut gear-money-rescale r2)
Equippable and Consumable prices in Aetheria.cc become round(p/100) (half away from zero, floor 1): 74 records, every ratio 100.0; commodities, ammo, missiles and mines keep their batch prices (ruling economy-numbers-are-sim-tuned-knobs). Nakovalnya 60000000 to 600000 through ShipAuthoringStore. StartingCredits 15000000 to 150000. DemoLoopIncomeToCostClosesAfterRescale pins the income-to-cost scale of the demo belt against the base measured before the ore batch. economy rescale is deleted in the next commit; economy prices stays.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-26 17:14:11 +01:00
Nibu
b5cfa3cbea Mining 6 fix: pickup reports the whole stack (read Quantity before TryStore); pin sell-ore Origin and Collected hold fill
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 05:58:28 +00:00
Nibu
1662c53b9c Mining 6 tests: CargoGained from Extract and TryPickUp, HaulFeed, TrySellOre, DemoLoop sells ore in one step
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 05:16:35 +00:00
Nibu
5663361e94 Tests: ore dice keyed by ShotId and DropSeed on both fire paths; TrySell of an unheld commodity pays nothing
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 02:57:50 +00:00
Nibu
5a3324d612 Station market absorbs a sold commodity; DemoLoop mine, sell, repair, buy test
TrySell: a simple commodity always sells (aetheria-release:ruling:station-market-absorbs-sold-commodity). The station bays take as much of the stack as fits, the market absorbs the rest, full price paid. Crafted items still need a bay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 02:06:45 +00:00
soul
cc0c164574 determinism-ledger: every ItemManager states its seed; scatter on the zone's dice
- ItemManager(uint seed, ...) refuses seed 0 and seeds Random from it.
- RunStart.ItemSeed(galaxy, step) is public (formula unchanged), refuses a
  zero result; named steps ArenaStep, StageStep, ContinueStep and NoRunSeed.
- Continue seeds the item stream from the saved run's seed (ContinueStep);
  a scene with no galaxy uses NoRunSeed.
- Zone's unpack scatter draws SimulationDice.For(CombatSeed, ScatterStream,
  1-based pack ordinal), never the item stream.
- Loadout's scratch manager and AetherDb's catalog command take fixed seeds;
  every test and Editor construction gains 1u (mechanical rewrite).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:01:41 +02:00
Meta Vens
0b721d691f Tests: the VerseGrammar global replaces TestCatalogGlobal as the catalog global fixtures author
TestCatalogGlobal existed only to give the test host one [CultGlobal] routed to the catalog. VerseGrammar is the
game's first, so the test-only type is deleted and every fixture authors a VerseGrammar instead (63 call sites; the
missing-global tests assert on aetheria.verse_grammar). Stale comments about the test type are rewritten.
Builds (not yet run when committed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:18:00 +02:00
Meta Vens
daa9a83940 StationServicesTests: pin partial-cell armour wear and a repair fraction above the sell fraction
Armour repair is priced at fractional wear (a fraction of a cell on every cell, and a thousandth of one cell), and
gear repair is priced exactly when RepairFraction exceeds SellFraction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 04:05:50 +02:00
Meta Vens
467a50431a StationServicesTests: armour repair is priced at odd and even hull prices
An armour price one credit low survived: ceil absorbs it at the fixture's even hull price. The armour test now runs
the same wear patterns at five hull prices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 03:01:19 +02:00
Meta Vens
2ac420edec StationServicesTests: pin the repair-sell seam and the armour and gear repair prices
A price and durability sweep (1..3000 by 20, three fraction pairs) and the 360 at 7 of 20 case assert repairing then
selling never nets a credit. Armour tests wear several cells, partial and full strip, different cell values, and
check every cell is restored and the cost is the worn share of the hull price. A gear test pins the repair share at
odd and even prices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 02:08:39 +02:00
Meta Vens
0857dbe15c StationServices: repair mends armour, never costs less than the sell value it restores, and owns the buy commit
RepairCost adds the worn share of hull armour priced as that share of the hull's price, and TryRepair restores it. The per-unit-of-wear charge is the larger of RepairFraction and SellFraction. TryBuy checks credits with the same boundary as TryRepair and charges after delivery. A 100-unit ore sale pins the commodity sell scale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 00:47:07 +02:00
Meta Vens
1a42ac7758 StationServices.BuyPrice: the one number the station charges, which the buy path shows, checks and charges
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:56:05 +02:00
Meta Vens
864bb0c6a4 StationServices tests: hulls five cells square, so a second bay has an interior cell to sit in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:53:10 +02:00
Meta Vens
1baa89645d StationServices tests: a full first station bay does not refuse a sale; worn docking bays are mended
Kills the two survivors Stryker left in StationServices.cs: Any() to All() over the station's bays, and Concat() to Except() over the docking bays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:50:58 +02:00
Meta Vens
c82b28851a StationServices tests: a full first station bay does not refuse a sale; worn docking bays are mended
Kills the two survivors Stryker left in StationServices.cs: Any() to All() over the station's bays, and Concat() to Except() over the docking bays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:49:57 +02:00
Meta Vens
9308f71b78 StationServices tests: a single unit of seven-credit ore sells for three, rounded down
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:43:44 +02:00
Meta Vens
39b6d28f3a StationServices: one engine-free owner for sell price, repair cost and the sale and repair commits
Settings gain SellFraction, RepairFraction and StartingCredits. A sale pays the price scaled by condition and moves the
item into a station bay or refuses with everything unchanged; a repair restores every durability and charges the wear,
or refuses when short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:30:31 +02:00