Commit graph Aetheria/Assets/Scripts/UI/Menu
Author SHA1 Message Date
Meta Vens
89667ca4e7 Offer Save Loadout only for a displayed ship (Cut 10 fix)
The option was added for any displayed entity, stations included, and a null
displayed entity threw when chosen. It is now added only when the displayed
entity is a Ship, the same conditional shape as the Restore Loadout guard.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:29:58 +02:00
Meta Vens
5e5c304e37 Make loadout availability a port and move the charge into Materialize (Cut 10 fix)
Materialize takes isAvailable as a Predicate<FactionProductData>; the restore
menu passes LoadoutGenerator.IsAvailable for the docked station, so generation
and loadouts still share one availability rule. Candidate products are ordered
by record key, so "first available product" no longer depends on dictionary
order. Materialize charges Price through ref credits only when it returns a
ship; RestoreLoadout no longer subtracts on its own.

Tests: a slot that resolves but does not fit builds nothing, charges nothing and
is listed; Price is the sum of design prices and is charged on success; the
first available product in key order builds a slot, a later one is used when
the first is unavailable, and none available fails the slot.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:27:03 +02:00
Meta Vens
00f62acc34 Make loadouts player-store design documents built all-or-nothing (Cut 10)
Loadout.cs owns loadouts: the document, capture, save and materialization.

- Loadout ("aetheria.loadout", player store) holds a hull design ref, and
  per slot a hull cell, a rotation and an EquippableItemData design ref,
  plus weapon groups as slot indices. It names no product, manufacturer,
  unit roll, cargo, faction, position or behaviour state.
- Loadouts.Capture records the hull design and one slot per equipped item
  (gear, cargo bays, docking bays). Entity.Equipment also holds the hull's
  own unit (MapEntity adds EquippedHull); that is Loadout.Hull, not a slot.
- Loadouts.Save is the only writer: one Commit to the player store, reusing
  the existing key for the name.
- Loadouts.Materialize is the only builder of a ship from a loadout. For
  the hull and each slot in order it resolves the design and takes the
  first product in catalog order that LoadoutGenerator.IsAvailable (now
  public) accepts, with no any-manufacturer fallback. Every failing slot is
  listed; units are built only after everything resolved, and any resolve
  or fit failure returns null with no ship, no charge and no write.
- Loadouts.Price is the hull design's price plus each slot design's price.
- InventoryPanel: Save Loadout asks for a name (default: the ship's name)
  and saves the capture. Restore Loadout, shown when docked with saved
  loadouts, lists each with its price, debits credits only after
  Materialize succeeds, then docks the ship as before; a failure opens
  "Loadout cannot be built here" with one line per failing slot.

Tests: new LoadoutTests (3): LoadoutRoundTripsThroughAFreshCache,
LoadoutHoldsNoRunOrGalaxyRefs, MissingDesignReports. Each fails with its
rule mutated out. The fixture hull is 3x3, not the spec's 2x2:
HullData.InteriorCells is Shape.Shrink(), so a 2x2 hull has no interior
cell a cargo bay can occupy.

Builds: headless, 14 tests pass, Unity batchmode compile reports no error CS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:06:06 +02:00
Meta Vens
5c5c3d5e19 Delete the old run, settings, layout and loadout authorities (Cut 10)
The deletion line lands before RunSave, as the spec orders. Deleted, not
demoted:
- PlayerSettings.SavedRun (Key 1 stays unclaimed) and the SavedGame
  constructor that upserted a fresh SavedZone per zone on every save.
- ActionGameManager: the PlayerSettings.msgpack getter, file path and
  writer; the .loadout format (_loadoutPath, Loadouts, SaveLoadout and its
  default-options serializer, the commented loader); OnApplicationQuit and
  SaveState; SaveZone, which had no caller.
- MainMenu's SavedRun Continue branch and both `SavedRun = null` writes.
- InventoryPanel's Save Loadout and Restore Loadout bodies.
- InputDisplayLayout's KeyboardLayouts file reader, ParseJson,
  AssociateInputKeys, SaveLayout and the usings they alone needed.
- AetherDb's Cut 9 importer (Import.cs, legacy-census, import).
- The three-gates note on loading writes; Cut 3 made loading non-writing.
- .gitignore ignores GameData/run.cc and GameData/player.cc instead of
  PlayerSettings.msgpack.

DOES NOT BUILD in Unity: ActionGameManager, MainMenu and InputDisplayLayout
still reference the deleted members until the next commit wires RunSave,
the settings getter and the catalog layout read. Headless builds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 21:51:10 +02:00
Meta Vens
9bdf6ef23f Replace the Database Tools with the Studio and cut Unity over
Cut 8b. The Unity project compiles with 0 errors in 6000.3.24f1 batchmode.

Packages: manifest.json pins org.gamecult.cultlib at cultlib-unity-v1.0.57
and org.gamecult.caching.unity at caching-unity-v1.2.0, next to the 8a
CultMath tag. Aetheria.Shared.Unity references GameCult.CultLib and keeps
noEngineReferences.

The Database Tools (Assets/Scripts/CultCache/Editor) are deleted in this
commit, alongside their five ported drawers in
Assets/Scripts/Editor/CultCacheDrawers.cs, each an
[CultInspectorDrawer] ICultInspectorDrawer:
- InspectableType: popup of the attribute type's [Union] member names,
  writing the string.
- InspectableColor: float3 and float4 through ColorField.
- InspectableAnimationCurve: float4[] and BezierCurve through CurveField.
- InspectableTemperature: Kelvin, Celsius and Fahrenheit fields over one
  value.
- InspectableSchematicShape: size and cell toggles. The old drawer also
  drew the item's schematic texture and tinted hull hardpoints, which need
  the parent document. The tagged Studio hands a drawer only the value, so
  those wait on the Studio exposing the open record.

Unity call sites:
- ActionGameManager opens the catalog through AetheriaStores; Cut 10 adds
  the run and player stores.
- Refs resolve through ItemManager.GetData or Get(ref); orbit, planet and
  belt maps key by CultRecordKey; identity is compared by reference or key.
- The PlayerSettings.msgpack reader and writer, which Cut 10 deletes, pass
  CultDocumentMessagePackSerialization.OptionsFor, since the embedded run
  reaches CultMath values and refs. Keyboard layouts need no resolver and
  keep MessagePack's defaults until Cut 10.
- The input map uses the nested action to binding shape.
- PropertiesPanel reads CultInspectorRangeAttribute.
- NameTools loses its legacy name-file writer.
- Slime compares serialized settings instead of the deleted SHA1 helper.
- FieldDriver drops InspectorHeader.
- .gitignore covers the test project's build output.

Builds: Aetheria.Shared, AetherDb, Aetheria.Shared.Tests (6/6), Unity
batchmode (0 errors).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 19:15:20 +02:00
Meta Vens
4d89c6d932 Fix the sector map label pivot after the CultMath sign swap
CultMath's sign(float) returns int, as HLSL does, so sign(x)/2+.5f became
integer division and pinned the pivot at 0.5. Scale by .5f instead so the
pivot is 0 or 1 again. The other sign( uses in Assets combine the int with
a float by multiplication or compare it against a float threshold, so their
values are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:58:53 +02:00
Meta Vens
2281793154 Convert engine types through CultMath.UnityBridge
CultMath has no implicit conversions to or from Vector*, Quaternion or
Color, so Assembly-CSharp converts explicitly with ToCultMath/ToUnity at
each engine boundary: FieldDriver, GuidedProjectile(Manager),
EntityInstance, ActionGameManager, HullCollider, GridObject, ShipInstance,
ShieldManager, ItemPickup, FieldTester, PlaceUIElementWorldspace,
MapMenuInput, MapRenderer, SectorRenderer and ZoneRenderer. CultMath math
calls that were handed Unity vectors now take converted values;
Vector3.Scale in FieldDriver becomes a float3 product, and ItemPickup's
Vector3.Dot on float3s becomes dot. packages-lock.json records the
cultmath git package at f0605367 and demotes com.unity.mathematics to a
transitive dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:47:33 +02:00
Meta Vens
6140a06a0a Swap Unity.Mathematics usings for CultMath
Every Unity.Mathematics using, alias and qualified name under Assets\Scripts
and tools now names CultMath. The nine `using static ...noise;` lines are
gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor
and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the
float3 colour pair stays because the bridge has none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:39:12 +02:00
Meta Vens
3dcfaf9783 Delete commented-out code blocks
Git keeps the history. SimpleCommodityData records its retired
MessagePack keys so they are not reused against old data.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 22:14:58 +02:00
Meta Vens
7006a6b0dd Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Meta Vens
a330e24d96 Make trade acceptance daemon authoritative 2026-07-15 20:46:05 +01:00
Meta Vens
6f0375f4ad Publish gravity fog through generic Eve fields 2026-07-15 20:17:05 +01:00
Meta Vens
b88bafd9e1 Use managed Verse target copy 2026-07-06 01:29:53 +01:00
Meta Vens
0751d3baa2 Remove RTS vocabulary from Unity map icons 2026-07-05 22:31:10 +01:00
Meta Vens
911bb72f69 Make game viewport authority runtime-neutral 2026-07-05 19:56:18 +01:00
Meta Vens
4d7bb65868 Integrate CultMesh UI and URP cleanup 2026-06-30 19:14:49 +01:00
Meta Vens
4981e9d1fa Fix typed Unity state compile errors 2026-06-29 13:07:24 +01:00
Meta Vens
ab6387fe1e Use managed RTS viewport document handles 2026-06-29 12:54:07 +01:00
Meta Vens
f09c298bcd Remove Unity runtime state call chains 2026-06-29 12:33:48 +01:00
Meta Vens
7285a82cb1 Expose native Unity indexed document access 2026-06-29 12:27:34 +01:00
Meta Vens
988b72d2ba Expose native Unity current document access 2026-06-29 12:17:14 +01:00
Meta Vens
cf5897a98c Expose native Unity docking state access 2026-06-29 12:12:16 +01:00
Meta Vens
ed1ac90b3a Read local story docking through current state 2026-06-29 11:51:21 +01:00
Meta Vens
8b718d0da9 Map inventory docking from typed state 2026-06-29 11:41:32 +01:00
Meta Vens
ca8b5858a2 Read menu docking through current typed state 2026-06-29 11:36:38 +01:00
Meta Vens
c5c7498a14 Collapse menu tabs into MenuPanel 2026-06-29 10:52:47 +01:00
Meta Vens
77c92643e8 Sample map settings through current typed access 2026-06-29 10:40:37 +01:00
Meta Vens
6497636bb2 Sample inventory panel through current typed access 2026-06-29 10:36:52 +01:00
Meta Vens
f47b0f2d7d Sample inventory menu through current typed access 2026-06-29 10:31:54 +01:00
Meta Vens
071c1febbd Sample trade menu through current typed access 2026-06-29 10:24:52 +01:00
Meta Vens
10186bd078 Sample sector renderer through current typed access 2026-06-29 10:20:35 +01:00
Meta Vens
19ca2619c8 Sample sector map through current typed access 2026-06-29 10:16:04 +01:00
Meta Vens
ade95ae5b6 Sample docking state through current typed access 2026-06-29 09:54:19 +01:00
Meta Vens
2941847112 Share Unity docking document access 2026-06-29 09:33:22 +01:00
Meta Vens
29111f74f4 Normalize menu shared document snapshots 2026-06-29 09:25:56 +01:00
Meta Vens
e08819dbbb Normalize inventory typed state reads 2026-06-29 09:21:29 +01:00
Meta Vens
aa45a6bb07 Add named parameterized document access 2026-06-29 07:51:45 +01:00
Meta Vens
c2ef01f8b4 Add named map and zone document access 2026-06-29 07:43:02 +01:00
Meta Vens
6f666fd6cf Add named daemon render document access 2026-06-29 07:36:45 +01:00
Meta Vens
a3d6df3bfd Add named catalog and settings document access 2026-06-29 07:30:21 +01:00
Meta Vens
baac952fe3 Add named entity and refit document access 2026-06-29 07:21:01 +01:00
Meta Vens
7b261aaf47 Add named current docking document access 2026-06-29 07:14:40 +01:00
Meta Vens
ae3c1f9ff2 Use provider UI handle for Unity commands 2026-06-29 06:46:38 +01:00
Meta Vens
d27e8ccee1 Use provider-native observed docking access 2026-06-29 06:35:20 +01:00
Meta Vens
d10da01a69 Expose native Unity runtime state access 2026-06-29 06:10:30 +01:00
Meta Vens
6600df0718 Build trade interaction models directly 2026-06-29 05:49:10 +01:00
Meta Vens
9e89bb0e8b Build trade cargo selector model directly 2026-06-29 05:46:13 +01:00
Meta Vens
80cda5245b Build inventory dropdown model directly 2026-06-29 05:44:24 +01:00
Meta Vens
7714d85583 Build equipped item details directly 2026-06-29 05:38:44 +01:00
Meta Vens
3be8e8fb31 Build cargo item details directly 2026-06-29 05:35:20 +01:00