Commit graph Aetheria/Assets/Scripts/UI/Menu
Author SHA1 Message Date
Meta Vens
68d80968e8 TradeMenu: the Price column shows and sorts by StationServices, and buys go through TryBuy
The column's sort key was the raw design price; it is now the shown price, the sell price while selling. Buy affordability and the credit charge move to StationServices.TryBuy, so a purchase costing exactly the credits held succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 00:47:08 +02:00
Meta Vens
787715ad4a TradeMenu prices every buy through StationServices.BuyPrice; the list column, the quantity cap, the check and the charge agree
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:56:06 +02:00
Meta Vens
c204397cb0 TradeMenu sells and repairs through StationServices; credits seed from the stage or the save
The hardcoded credits initializer and its stale scene serialization go. Buy charges the hull price it checked. Sell is a
mode of the trade list over the selected bay; Repair is a foldout option for the docked ship.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 19:30:34 +02:00
Meta Vens
18e12d81ce Merge master (fire control 12) into codex/moddable-ships 2026-09-30 02:21:09 +02:00
Meta Vens
f935c29b4b Fix console text input and route give through ship commissioning
- ConsoleView appended the control characters text input delivers (\b, \r),
  so Backspace inserted a glyph and Enter's \r got every command refused
  since d503f076 made the parser refuse instead of strip. Control characters
  are no longer text; Backspace deletes like Delete.
- give reports an unknown name or a full cargo bay. A ship hull is refused
  unless docked, and when docked is commissioned through
  ActionGameManager.CommissionShip, the primitive TradeMenu.Buy now uses: a
  bare player ship moored at the docked entity, no docking bay. Non-ship
  hulls are refused.
- Record play smoke results for steps 3-6 and the docking bay finding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 01:04:11 +02:00
Meta Vens
24c2964046 Preview typed mod ship visuals and captured LineArt in Unity 2026-09-26 19:10:44 +02:00
Meta Vens
0c2da217f3 Cut 0: give Entity its own EntitySettings copy, delete the duplicate copies
Entity's constructor now takes a MessagePack round-trip copy of the settings
it is given, so no entity can alias GameplaySettings.DefaultEntitySettings.
That makes ActionGameManager.NewEntitySettings and EntitySerializer.Unpack's
null-coalescing copy redundant; both are deleted, and TradeMenu buys a ship
straight off the template (Entity's ctor copies it).

EntitiesDoNotShareDefaultEntitySettings pins the invariant: writing
ShutdownPerformance on one ship must not move the default for a sibling or
the template (settings-globals-cut.md, Cut 0).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 18:22:22 +02:00
Meta Vens
69801bbb2c Delete the re-mint path and the dead debug menu
Cut A of docs/item-provenance-cut.md. TradeMenuDebug.cs was dead (its
script GUID appears in no scene/prefab/asset and no other .cs names the
type). ItemManager.Instantiate and CreateInstance(SimpleCommodityData,
int) re-rolled quality and dropped provenance on every load; nothing
outside EntitySerializer called them once the instantiate parameter is
gone. EntitySerializer.Unpack/Restore no longer thread an instantiate
flag, so Temperature and Armor are restored unconditionally like every
other caller already got. The starting ship and spawnturret now keep
what the generator built instead of re-minting.

Verification: Aetheria.Shared, tools/AetherDb build green against
CultLib a0813c6; tests/Aetheria.Shared.Tests 29 passed (unchanged); the
four negative greps in the map are empty. Unity compile is still owed
(the editor is open on this project; batchmode was not run per
instructions).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 03:42:12 +02:00
Meta Vens
db83cd290d 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>
2026-09-14 23:09:43 +02:00
Meta Vens
1cd6170d7a Decide loadout affordability in Materialize and test weapon-group unequip (Cut 10 fix)
Materialize, which already charges, now also owns affordability: when credits
are below Price it lists "cannot afford <price> credits" and builds nothing.
The restore menu's separate price < Credits check is deleted; the menu still
shows Loadouts.Price and lists Materialize's failures.

Tests: one credit short builds nothing, leaves credits unchanged and lists the
failure. A fixture gun with an InstantWeapon behavior proves TryUnequip removes
the weapon and its item from every weapon group.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:38:16 +02:00
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