diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index f50bf5855..4e60cd283 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 86332e8da..c99a6b007 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -181,23 +181,23 @@ public class ActionGameManager : MonoBehaviour } } - public RuntimeEntityBlueprint CreateRuntimeBlueprint(AetheriaRuntimeLoadoutTemplateSnapshot template) + public EntityConstructionBlueprint CreateEntityConstructionBlueprint(AetheriaRuntimeLoadoutTemplateSnapshot template) { - var blueprint = CreateRuntimeBlueprint(template.RootEntity); + var blueprint = CreateEntityConstructionBlueprint(template.RootEntity); if (blueprint != null && string.IsNullOrWhiteSpace(blueprint.Name)) blueprint.Name = template.Name; return blueprint; } - private RuntimeEntityBlueprint CreateRuntimeBlueprint(AetheriaRuntimeEntityLoadoutSnapshot entity) + private EntityConstructionBlueprint CreateEntityConstructionBlueprint(AetheriaRuntimeEntityLoadoutSnapshot entity) { var hull = CreateEquippableLoadoutItem(entity.Hull); if (hull == null) return null; - RuntimeEntityBlueprint blueprint = string.Equals(entity.Kind, "orbital", StringComparison.OrdinalIgnoreCase) - ? new RuntimeOrbitalEntityBlueprint() - : new RuntimeShipBlueprint + EntityConstructionBlueprint blueprint = string.Equals(entity.Kind, "orbital", StringComparison.OrdinalIgnoreCase) + ? new OrbitalEntityConstructionBlueprint() + : new ShipConstructionBlueprint { Direction = new float2(0, 1) }; @@ -213,7 +213,7 @@ public class ActionGameManager : MonoBehaviour blueprint.DockingBayAssignments = entity.DockingBayAssignments.ToArray(); blueprint.WeaponGroups = entity.WeaponGroups.Select(group => group.ToArray()).ToArray(); blueprint.Children = entity.Children - .Select(CreateRuntimeBlueprint) + .Select(CreateEntityConstructionBlueprint) .Where(child => child != null) .ToArray(); return blueprint; @@ -260,7 +260,6 @@ public class ActionGameManager : MonoBehaviour var instance = ItemManager.CreateCraftedInstance(typedItem, (float)item.Quality); if (instance is EquippableItem equippable) { - equippable.Enabled.Value = item.Enabled; if (item.Durability > 0) equippable.Durability = (float)item.Durability; } @@ -458,7 +457,7 @@ public class ActionGameManager : MonoBehaviour }; } - private AetheriaRuntimeLoadoutTemplateCommit ProjectLoadoutTemplate(RuntimeEntityBlueprint blueprint) + private AetheriaRuntimeLoadoutTemplateCommit ProjectLoadoutTemplate(EntityConstructionBlueprint blueprint) { return new AetheriaRuntimeLoadoutTemplateCommit { @@ -468,12 +467,12 @@ public class ActionGameManager : MonoBehaviour }; } - private AetheriaRuntimeEntityLoadoutCommit ProjectEntityLoadout(RuntimeEntityBlueprint blueprint) + private AetheriaRuntimeEntityLoadoutCommit ProjectEntityLoadout(EntityConstructionBlueprint blueprint) { return new AetheriaRuntimeEntityLoadoutCommit { Name = blueprint.Name ?? "", - Kind = blueprint is RuntimeShipBlueprint ? "ship" : blueprint is RuntimeOrbitalEntityBlueprint ? "orbital" : "entity", + Kind = blueprint is ShipConstructionBlueprint ? "ship" : blueprint is OrbitalEntityConstructionBlueprint ? "orbital" : "entity", CorporationLegacyId = blueprint.Faction == Guid.Empty ? "" : blueprint.Faction.ToString("D"), Hull = ProjectLoadoutItem(blueprint.Hull), Equipment = ProjectSlots(blueprint.Equipment), @@ -527,7 +526,7 @@ public class ActionGameManager : MonoBehaviour Quality = item is CraftedItemInstance crafted ? crafted.Quality : 1.0, Durability = item is EquippableItem equippable ? equippable.Durability : 1.0, Quantity = item is SimpleCommodity commodity ? commodity.Quantity : 1, - Enabled = item is not EquippableItem enabledItem || enabledItem.Enabled.Value + Enabled = true }; } @@ -1277,7 +1276,7 @@ public class ActionGameManager : MonoBehaviour return CurrentGalaxy?.Factions == null || faction == null ? -1 : Array.IndexOf(CurrentGalaxy.Factions, faction); } - public void QueueRuntimeLoadoutTemplateCommit(RuntimeEntityBlueprint blueprint) + public void QueueRuntimeLoadoutTemplateCommit(EntityConstructionBlueprint blueprint) { var loadout = ProjectLoadoutTemplate(blueprint); LoadoutTemplates.RemoveAll(template => template.Name == loadout.Name); @@ -1711,7 +1710,7 @@ public class ActionGameManager : MonoBehaviour nearestFaction, .5f); - var turret = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); + var turret = EntityConstructionBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); turret.Position.xz = _currentEntity.Position.xz + ItemManager.Random.NextFloat2Direction() * ItemManager.Random.NextFloat(50, 500); turret.Zone = Zone; @@ -1743,7 +1742,7 @@ public class ActionGameManager : MonoBehaviour // // for (int i = 0; i < 8; i++) // { - // var ship = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateShipLoadout(), true); + // var ship = EntityConstructionBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateShipLoadout(), true); // ship.Position.xz = _currentEntity.Position.xz + // ItemManager.Random.NextFloat2Direction() * ItemManager.Random.NextFloat(50, 500); // ship.Zone = Zone; @@ -1753,7 +1752,7 @@ public class ActionGameManager : MonoBehaviour // // for (int i = 0; i < 8; i++) // { - // var turret = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); + // var turret = EntityConstructionBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); // turret.Position.xz = _currentEntity.Position.xz + // ItemManager.Random.NextFloat2Direction() * ItemManager.Random.NextFloat(50, 500); // turret.Zone = Zone; @@ -1918,7 +1917,7 @@ public class ActionGameManager : MonoBehaviour SectorMap.QueueZoneReveal(CurrentGalaxy.Entrance.AdjacentZones.Prepend(CurrentGalaxy.Entrance)); PopulateLevel(CurrentGalaxy.Entrance); var loadoutGenerator = new LoadoutGenerator(ref ItemManager.Random, ItemManager, RuntimeCatalog, CurrentGalaxy, Zone.GalaxyZone, IsTutorial ? CurrentGalaxy.ResolveFaction(Settings.TutorialGenerationSettings.ProtagonistFaction) : null, 2); - var ship = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint( + var ship = EntityConstructionBlueprintProjector.InstantiateFromBlueprint( ItemManager, Zone, loadoutGenerator.GenerateShipLoadout(data => string.IsNullOrEmpty(Settings.StartingHullName) || data.Name==Settings.StartingHullName ), diff --git a/Assets/Scripts/Gameplay/ShipInstance.cs b/Assets/Scripts/Gameplay/ShipInstance.cs index bdb05f7d7..f22e37d89 100644 --- a/Assets/Scripts/Gameplay/ShipInstance.cs +++ b/Assets/Scripts/Gameplay/ShipInstance.cs @@ -137,7 +137,7 @@ public class ShipInstance : EntityInstance if (typedItem != null && typedItem.Durability > 0) return (float)typedItem.Durability; - return Math.Max(item.Durability, 1f); + return item is EquippableItem equippable ? Math.Max(equippable.Durability, 1f) : 1f; } private static AetheriaRuntimeCatalogItem FindTypedItem(ItemInstance item) diff --git a/Assets/Scripts/InitialSettings.cs.meta b/Assets/Scripts/InitialSettings.cs.meta deleted file mode 100644 index b033e9c5a..000000000 --- a/Assets/Scripts/InitialSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 642627729ca40a74d865e205a6001bb1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/ServerShared/Corporations.cs b/Assets/Scripts/ServerShared/Corporations.cs index 0a3b5570e..398659923 100644 --- a/Assets/Scripts/ServerShared/Corporations.cs +++ b/Assets/Scripts/ServerShared/Corporations.cs @@ -38,7 +38,7 @@ public class Faction : INamedEntry [Inspectable] public int InfluenceDistance = 4; - [RangedFloat(0, 1)] + [InspectableRangedFloat(0, 1)] public Dictionary Allegiance = new Dictionary(); [InspectableSoundBank] diff --git a/Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs b/Assets/Scripts/ServerShared/EntityConstructionBlueprintProjector.cs similarity index 85% rename from Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs rename to Assets/Scripts/ServerShared/EntityConstructionBlueprintProjector.cs index ef86d9462..3de04d8be 100644 --- a/Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs +++ b/Assets/Scripts/ServerShared/EntityConstructionBlueprintProjector.cs @@ -4,20 +4,20 @@ using System.Collections.Generic; using System.Linq; using Unity.Mathematics; -public static class RuntimeEntityBlueprintProjector +public static class EntityConstructionBlueprintProjector { - public static RuntimeEntityBlueprint CaptureBlueprint(Entity entity) + public static EntityConstructionBlueprint CaptureBlueprint(Entity entity) { - RuntimeEntityBlueprint blueprint; + EntityConstructionBlueprint blueprint; if (entity is OrbitalEntity orbital) - blueprint = new RuntimeOrbitalEntityBlueprint + blueprint = new OrbitalEntityConstructionBlueprint { Orbit = orbital.OrbitId, SecurityLevel = orbital.SecurityLevel, SecurityRadius = orbital.SecurityRadius }; else if (entity is Ship ship) - blueprint = new RuntimeShipBlueprint + blueprint = new ShipConstructionBlueprint { Position = ship.Position, Direction = ship.Direction, @@ -41,19 +41,19 @@ public static class RuntimeEntityBlueprintProjector return blueprint; } - public static Entity InstantiateFromBlueprint(ItemManager itemManager, Zone zone, RuntimeEntityBlueprint blueprint, bool instantiate = false) + public static Entity InstantiateFromBlueprint(ItemManager itemManager, Zone zone, EntityConstructionBlueprint blueprint, bool instantiate = false) { blueprint.Settings ??= itemManager.GameplaySettings.DefaultEntitySettings.Copy(); return blueprint switch { - RuntimeShipBlueprint shipBlueprint => InstantiateFromBlueprint(itemManager, zone, shipBlueprint, instantiate), - RuntimeOrbitalEntityBlueprint orbitalBlueprint => InstantiateFromBlueprint(itemManager, zone, orbitalBlueprint, instantiate), + ShipConstructionBlueprint shipBlueprint => InstantiateFromBlueprint(itemManager, zone, shipBlueprint, instantiate), + OrbitalEntityConstructionBlueprint orbitalBlueprint => InstantiateFromBlueprint(itemManager, zone, orbitalBlueprint, instantiate), _ => null }; } - private static Ship InstantiateFromBlueprint(ItemManager itemManager, Zone zone, RuntimeShipBlueprint blueprint, bool instantiate = false) + private static Ship InstantiateFromBlueprint(ItemManager itemManager, Zone zone, ShipConstructionBlueprint blueprint, bool instantiate = false) { var entity = new Ship(itemManager, zone, instantiate ? (EquippableItem) itemManager.Instantiate(blueprint.Hull) : blueprint.Hull, blueprint.Settings); @@ -64,7 +64,7 @@ public static class RuntimeEntityBlueprintProjector return entity; } - private static OrbitalEntity InstantiateFromBlueprint(ItemManager itemManager, Zone zone, RuntimeOrbitalEntityBlueprint blueprint, bool instantiate = false) + private static OrbitalEntity InstantiateFromBlueprint(ItemManager itemManager, Zone zone, OrbitalEntityConstructionBlueprint blueprint, bool instantiate = false) { var entity = new OrbitalEntity(itemManager, zone, instantiate ? (EquippableItem) itemManager.Instantiate(blueprint.Hull) : blueprint.Hull, blueprint.Orbit, blueprint.Settings); Restore(itemManager, zone, blueprint, entity, instantiate); @@ -74,7 +74,7 @@ public static class RuntimeEntityBlueprintProjector return entity; } - private static void Restore(ItemManager itemManager, Zone zone, RuntimeEntityBlueprint blueprint, Entity entity, bool instantiate = false) + private static void Restore(ItemManager itemManager, Zone zone, EntityConstructionBlueprint blueprint, Entity entity, bool instantiate = false) { entity.Name = blueprint.Name; entity.Faction = zone?.Galaxy?.ResolveFaction(blueprint.Faction); @@ -112,14 +112,14 @@ public static class RuntimeEntityBlueprintProjector } } -public class RuntimeShipBlueprint : RuntimeEntityBlueprint +public class ShipConstructionBlueprint : EntityConstructionBlueprint { public float3 Position; public float2 Direction; public bool IsPlayerShip; } -public class RuntimeOrbitalEntityBlueprint : RuntimeEntityBlueprint +public class OrbitalEntityConstructionBlueprint : EntityConstructionBlueprint { public Guid Orbit; public int Story = -1; @@ -127,7 +127,7 @@ public class RuntimeOrbitalEntityBlueprint : RuntimeEntityBlueprint public float SecurityRadius; } -public abstract class RuntimeEntityBlueprint +public abstract class EntityConstructionBlueprint { public string Name; public EquippableItem Hull; @@ -137,7 +137,7 @@ public abstract class RuntimeEntityBlueprint public int[] DockingBayAssignments; public (int2 position, ItemInstance item)[][] CargoContents; public (int2 position, ItemInstance item)[][] DockingBayContents; - public RuntimeEntityBlueprint[] Children; + public EntityConstructionBlueprint[] Children; public EntitySettings Settings; public Guid Faction; public int[][] WeaponGroups; diff --git a/Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs.meta b/Assets/Scripts/ServerShared/EntityConstructionBlueprintProjector.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs.meta rename to Assets/Scripts/ServerShared/EntityConstructionBlueprintProjector.cs.meta diff --git a/Assets/Scripts/ServerShared/LoadoutGenerator.cs b/Assets/Scripts/ServerShared/LoadoutGenerator.cs index e46beb748..5683eb20d 100644 --- a/Assets/Scripts/ServerShared/LoadoutGenerator.cs +++ b/Assets/Scripts/ServerShared/LoadoutGenerator.cs @@ -55,7 +55,7 @@ public class LoadoutGenerator // PriceExponent = priceExponent; // } - public RuntimeEntityBlueprint GenerateShipLoadout(Predicate hullFilter = null) + public EntityConstructionBlueprint GenerateShipLoadout(Predicate hullFilter = null) { var hullRow = RandomHull(HullType.Ship, hullFilter); if(hullRow==null) @@ -69,10 +69,10 @@ public class LoadoutGenerator var entity = new Ship(ItemManager, null, hull, ItemManager.GameplaySettings.DefaultEntitySettings); entity.Faction = Faction; OutfitEntity(entity); - return RuntimeEntityBlueprintProjector.CaptureBlueprint(entity); + return EntityConstructionBlueprintProjector.CaptureBlueprint(entity); } - public RuntimeOrbitalEntityBlueprint GenerateTurretLoadout() + public OrbitalEntityConstructionBlueprint GenerateTurretLoadout() { var hullRow = RandomHull(HullType.Turret); if(hullRow==null) @@ -84,10 +84,10 @@ public class LoadoutGenerator var entity = new OrbitalEntity(ItemManager, null, hull, Guid.Empty, ItemManager.GameplaySettings.DefaultEntitySettings); entity.Faction = Faction; OutfitEntity(entity); - return RuntimeEntityBlueprintProjector.CaptureBlueprint(entity) as RuntimeOrbitalEntityBlueprint; + return EntityConstructionBlueprintProjector.CaptureBlueprint(entity) as OrbitalEntityConstructionBlueprint; } - public RuntimeOrbitalEntityBlueprint GenerateStationLoadout() + public OrbitalEntityConstructionBlueprint GenerateStationLoadout() { var hullRow = RandomHull(HullType.Station); if(hullRow==null) @@ -130,7 +130,7 @@ public class LoadoutGenerator entity.CanTow = hullRow.HullCanTow; - return RuntimeEntityBlueprintProjector.CaptureBlueprint(entity) as RuntimeOrbitalEntityBlueprint; + return EntityConstructionBlueprintProjector.CaptureBlueprint(entity) as OrbitalEntityConstructionBlueprint; } public AetheriaRuntimeCatalogItem RandomHull(HullType type, Predicate hullFilter = null) diff --git a/Assets/Scripts/ServerShared/Zone.cs b/Assets/Scripts/ServerShared/Zone.cs index f00d6d7ba..710ff610c 100644 --- a/Assets/Scripts/ServerShared/Zone.cs +++ b/Assets/Scripts/ServerShared/Zone.cs @@ -79,7 +79,7 @@ public class Zone foreach (var entityBlueprint in blueprint.Entities) { - var entity = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(_itemManager, this, entityBlueprint); + var entity = EntityConstructionBlueprintProjector.InstantiateFromBlueprint(_itemManager, this, entityBlueprint); Entities.Add(entity); entity.Activate(); if (entity is Ship {IsPlayerShip: false} ship) @@ -102,11 +102,6 @@ public class Zone return agent; } - public void AddOrbit(OrbitData orbit) - { - Orbits.Add(orbit.ID, new Orbit(Settings, orbit)); - } - public void Update(float deltaTime) { _time += deltaTime; diff --git a/Assets/Scripts/ServerShared/ZoneData.cs b/Assets/Scripts/ServerShared/ZoneData.cs index e2636c1bc..5f4c89212 100644 --- a/Assets/Scripts/ServerShared/ZoneData.cs +++ b/Assets/Scripts/ServerShared/ZoneData.cs @@ -15,7 +15,7 @@ public class ZoneConstructionBlueprint { public List Planets = new List(); public List Orbits = new List(); - public List Entities = new List(); + public List Entities = new List(); public float Radius = 2000; public float Mass = 10000; public double Time; diff --git a/Assets/Scripts/StrategyGameManager.csbak.meta b/Assets/Scripts/StrategyGameManager.csbak.meta deleted file mode 100644 index 04d00cfee..000000000 --- a/Assets/Scripts/StrategyGameManager.csbak.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8a3350bbbac7a7e4f9354196f7985fcb -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/UI/HUD/SchematicDisplay.cs b/Assets/Scripts/UI/HUD/SchematicDisplay.cs index 01a759be2..a2f207caa 100644 --- a/Assets/Scripts/UI/HUD/SchematicDisplay.cs +++ b/Assets/Scripts/UI/HUD/SchematicDisplay.cs @@ -283,7 +283,7 @@ public class SchematicDisplay : MonoBehaviour if (typedItem != null && typedItem.Durability > 0) return (float)typedItem.Durability; - return Math.Max(item.Durability, 1f); + return item is EquippableItem equippable ? Math.Max(equippable.Durability, 1f) : 1f; } private static AetheriaRuntimeCatalogItem FindTypedItem(ItemInstance item) diff --git a/Assets/Scripts/UI/HUD/SchematicListElement.cs b/Assets/Scripts/UI/HUD/SchematicListElement.cs index 8f3ffae0f..4d7acbc7a 100644 --- a/Assets/Scripts/UI/HUD/SchematicListElement.cs +++ b/Assets/Scripts/UI/HUD/SchematicListElement.cs @@ -75,6 +75,12 @@ public class SchematicListElement : MonoBehaviour out WeaponFireType fireTypes, out WeaponModifiers modifiers) { + caliber = default; + range = default; + type = default; + fireTypes = default; + modifiers = default; + return Enum.TryParse(weapon.WeaponCaliber, out caliber) && Enum.TryParse(weapon.WeaponRange, out range) && diff --git a/Assets/Scripts/UI/Menu/InventoryPanel.cs b/Assets/Scripts/UI/Menu/InventoryPanel.cs index 27dbdd75c..affd7fb52 100644 --- a/Assets/Scripts/UI/Menu/InventoryPanel.cs +++ b/Assets/Scripts/UI/Menu/InventoryPanel.cs @@ -173,7 +173,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler ContextMenu.AddOption("Save Loadout", () => { - GameManager.QueueRuntimeLoadoutTemplateCommit(RuntimeEntityBlueprintProjector.CaptureBlueprint(_displayedEntity)); + GameManager.QueueRuntimeLoadoutTemplateCommit(EntityConstructionBlueprintProjector.CaptureBlueprint(_displayedEntity)); }); if (GameManager.LoadoutTemplates.Any()) @@ -189,14 +189,14 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler private (string text, Action action, bool enabled) LoadoutOption(AetheriaRuntimeLoadoutTemplateSnapshot template) { - var blueprint = GameManager.CreateRuntimeBlueprint(template); + var blueprint = GameManager.CreateEntityConstructionBlueprint(template); if (blueprint == null) return ($"{template.Name} - unavailable", () => { }, false); var price = blueprint.Price(GameManager.ItemManager); return ($"{template.Name} - {price:n0}", () => { - var entity = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(GameManager.ItemManager, GameManager.Zone, blueprint, true); + var entity = EntityConstructionBlueprintProjector.InstantiateFromBlueprint(GameManager.ItemManager, GameManager.Zone, blueprint, true); entity.SetParent(GameManager.DockedEntity); GameManager.Credits -= price; GameManager.CurrentEntity = entity; @@ -885,7 +885,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler if (typedItem != null && typedItem.Durability > 0) return (float)typedItem.Durability; - return Math.Max(item.Durability, 1f); + return item is EquippableItem equippable ? Math.Max(equippable.Durability, 1f) : 1f; } private Shape GetItemShape(ItemInstance item) diff --git a/Assets/Scripts/UI/Properties Panel/PropertiesPanel.cs b/Assets/Scripts/UI/Properties Panel/PropertiesPanel.cs index d369a92a6..770efef58 100644 --- a/Assets/Scripts/UI/Properties Panel/PropertiesPanel.cs +++ b/Assets/Scripts/UI/Properties Panel/PropertiesPanel.cs @@ -7,6 +7,7 @@ using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Reflection; using GameCult.Aetheria.State.Unity; using TMPro; using UniRx; @@ -378,7 +379,7 @@ public class PropertiesPanel : MonoBehaviour if (typedItem != null && typedItem.Durability > 0) return (float)typedItem.Durability; - return Math.Max(item.Durability, 1f); + return item is EquippableItem equippable ? Math.Max(equippable.Durability, 1f) : 1f; } private static (float minimum, float maximum) GetThermalRange(AetheriaRuntimeCatalogItem typedItem) diff --git a/Assets/Scripts/UnityFormatters.cs.meta b/Assets/Scripts/UnityFormatters.cs.meta deleted file mode 100644 index fee0d9805..000000000 --- a/Assets/Scripts/UnityFormatters.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0592fb576747e3443949d779d01068aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 23b0872d8..fbaa9e621 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -127,7 +127,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. now queues current-zone/current-entity-collection snapshots, current action-bar bindings, and current faction relationship rows through the runtime commit log during run checkpoints; `ZoneConstructionBlueprint` and - `RuntimeEntityBlueprint` remain runtime construction/loadout projections + `EntityConstructionBlueprint` remain one-shot construction/loadout projections rather than durable file formats. Runtime blueprints no longer capture or restore live temperature, armor, max-armor, or hull-conductivity grids; those grids are typed checkpoint state, not loadout/construction template state. @@ -186,7 +186,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. triggers publish pending pulled state, and stat modifiers publish applied/executed flags plus target-stat count. Turret controllers publish initialized weapon count, shot speed, and predictive-aim flag. - `RuntimeEntityBlueprint` still exists for construction/loadout projection, + `EntityConstructionBlueprint` still exists for construction/loadout projection, but those live hull grids and session scalars are not blueprint fields and cannot be restored by the old blueprint projector path. - `Aetheria.State` now defines `AetheriaLoadoutTemplate` as the typed Verse @@ -194,7 +194,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. equipment, cargo bay, docking bay, child-entity, assignment, and weapon-group state through record-key references and typed value slots instead of opaque runtime blueprint serialization. Unity's save/loadout UI now projects its - in-memory `RuntimeEntityBlueprint` into a typed Verse commit command, and + in-memory `EntityConstructionBlueprint` into a typed Verse commit command, and gameplay boot reads typed loadout templates back from `aetheria-world.cc` through `AetheriaRuntimeCatalogStore` before lowering them into runtime construction blueprints for the restore menu. The in-memory list remains a @@ -842,7 +842,7 @@ First Aetheria surfaces to publish: - Done: move TurretController weapon range and shot-speed evaluation behind `Weapon` runtime methods, so turret AI no longer casts weapon config DTOs to decide firing range or predictive aim. - - Done: cut live simulation grids out of `RuntimeEntityBlueprint`; loadout + - Done: cut live simulation grids out of `EntityConstructionBlueprint`; loadout and construction templates no longer capture or restore temperature, armor, max-armor, or hull-conductivity state. - Done: add Unity package readback for canonical typed run, zone, and @@ -1065,7 +1065,7 @@ First Aetheria surfaces to publish: - Done: remove public `GasGiantData`/`SunData` handles from runtime wrappers; wave and light calculations now use copied wrapper fields after construction. - - Done: move saved loadout template ownership off `RuntimeEntityBlueprint`; + - Done: move saved loadout template ownership off `EntityConstructionBlueprint`; `ActionGameManager` keeps typed `AetheriaRuntimeLoadoutTemplateSnapshot` documents and projects blueprints only for pricing, instantiation, and commit boundaries. @@ -1313,16 +1313,20 @@ First Aetheria surfaces to publish: - Done: quarantine the vendored Unity `MessagePack` assembly by disabling asmdef auto-reference; only explicit state-spine assemblies should see it while the Unity CultCache bridge still needs a low-level `.cc` codec. - - Done: demote `ZonePack`/`EntityPack` runtime names to - `RuntimeZoneBlueprint`/`RuntimeEntityBlueprint`, and rename loadout - collections away from save-payload vocabulary. These are now explicitly - runtime construction projections, not portable state authority. + - Done: demote `ZonePack`/`EntityPack` save-payload names to + construction blueprint vocabulary, and rename loadout collections away + from save-payload vocabulary. These are now explicitly construction + projections, not portable state authority. - Done: continue the zone demotion by renaming `RuntimeZoneBlueprint` to `ZoneConstructionBlueprint`; the old intermediate name no longer appears in live Unity source. - - Done: rename the old `EntitySerializer` runtime helper to - `RuntimeEntityBlueprintProjector`; it captures/instantiates runtime - blueprint projections and no longer presents itself as a serializer. + - Done: rename the old `EntitySerializer` helper to + `EntityConstructionBlueprintProjector`; it captures/instantiates + construction blueprint projections and no longer presents itself as a + serializer or runtime-state owner. + - Done: delete the unused `Zone.AddOrbit(OrbitData)` construction-row + writer; zone orbit construction flows through `ZoneConstructionBlueprint` + only. - Done: demote Unity's live `PlayerSettings` runtime object to `RuntimePlayerSettings`; `AetheriaPlayerSettings` remains the typed Verse state document owner, while Unity only keeps a session projection and @@ -1398,8 +1402,9 @@ First Aetheria surfaces to publish: live Unity source has no `EntityPack`, `ShipPack`, `OrbitalEntityPack`, `ZonePack`, `PackedContents`, `PackZone`, `EntitySerializer.Pack`, or `EntitySerializer.Unpack` hits. -- Runtime entity blueprint projection no longer uses the `EntitySerializer` - authority name; live Unity source calls `RuntimeEntityBlueprintProjector`. +- Entity construction blueprint projection no longer uses the `EntitySerializer` + or runtime-state authority names; live Unity source calls + `EntityConstructionBlueprintProjector`. - Unity runtime settings projection is now `RuntimePlayerSettings`; live Unity source has no standalone `PlayerSettings` class/property/method symbols. - Input binding and action-bar edits now queue the same typed player-settings