Make loadouts authored catalog presets with an editor capture command
Loadouts are ship presets (variants) for spawners, not a player feature. - Route Loadout to the catalog; the player store no longer holds it. - Materialize takes no credits: affordability, the charge and Loadouts.Price are deleted, since only the player menu priced loadouts. Availability, key-order product choice, all-or-nothing failures and the weapon-group rules stay. - Delete the InventoryPanel Save Loadout and Restore Loadout entries and RestoreLoadout, which also removes its docking-bay overwrite. - The editor opens the catalog writable in the one process cache, and the editor-only console command capturepreset "<name>" [replace] captures the piloted ship. Loadouts.Commit keys a preset by name, refuses a same-name replace unless asked, and commits conditionally on that key. The single-file store then lands only that record onto the file as it is on disk. An unconditional commit would re-serialize every live catalog instance, including any that play has mutated. - Tests: capture -> commit -> fresh reopen round-trip, explicit replace with no duplicate, and a preset commit that does not persist a mutated live Faction. The money-only tests are removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
e7dd62d02a
commit
db83cd290d
6 changed files with 124 additions and 166 deletions
|
|
@ -6,9 +6,9 @@ using GameCult.Caching.MessagePack;
|
|||
// Aetheria's stores: one home store per type, composed here and nowhere else.
|
||||
public static class AetheriaStores
|
||||
{
|
||||
public static readonly Type[] CatalogTypes = { typeof(ItemData), typeof(Faction), typeof(FactionProductData), typeof(PersonalityAttribute), typeof(NameFile), typeof(InputLayout) };
|
||||
public static readonly Type[] CatalogTypes = { typeof(ItemData), typeof(Faction), typeof(FactionProductData), typeof(PersonalityAttribute), typeof(NameFile), typeof(InputLayout), typeof(Loadout) };
|
||||
public static readonly Type[] RunTypes = { typeof(OrbitData), typeof(BodyData), typeof(SavedZone), typeof(SavedGame) };
|
||||
public static readonly Type[] PlayerTypes = { typeof(PlayerSettings), typeof(Loadout) };
|
||||
public static readonly Type[] PlayerTypes = { typeof(PlayerSettings) };
|
||||
|
||||
// Attaches (hydrates) the catalog read-only unless catalogWritable, then the run and player stores when given.
|
||||
// A read-only catalog throws when a [CultGlobal] type routed to it has no record. A writable catalog is being
|
||||
|
|
|
|||
Loading…
Reference in a new issue