Commit graph Aetheria/Assets/Scripts/ServerShared/StationServices.cs
Author SHA1 Message Date
Meta Vens
73dd96be00 StationServices: a repair share is never below the sell value it adds, rounded in the sell price's own function
Selling floors price * fraction * condition in doubles while repair ceilinged a separate expression, so the two
disagreed by one credit for some prices (GetPrice 360 at durability 7 of 20). SellValue is now the one sell
rounding, and RepairShare charges at least SellValue(whole) - SellValue(worn), so repair-never-profits holds exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 02:08:37 +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
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