Demote legacy runtime cache names
This commit is contained in:
parent
6b435b8f13
commit
e7d33e5e43
29 changed files with 62 additions and 53 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
public abstract class AgentTask : DatabaseEntry
|
||||
public abstract class AgentTask : RuntimeCatalogEntry
|
||||
{
|
||||
public int Priority;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using System.Linq;
|
|||
[Inspectable, Order(-5), RuntimeInspectable]
|
||||
public class ItemUsageData : BehaviorData
|
||||
{
|
||||
[InspectableDatabaseLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(1), RuntimeInspectable]
|
||||
[InspectableRuntimeCatalogLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(1), RuntimeInspectable]
|
||||
public Guid Item;
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public abstract class WeaponData : BehaviorData
|
|||
[InspectablePrefab, RuntimeCatalogKey(11), RuntimeInspectable]
|
||||
public PerformanceStat Visibility = new PerformanceStat();
|
||||
|
||||
[InspectableDatabaseLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(12), RuntimeInspectable]
|
||||
[InspectableRuntimeCatalogLink(typeof(SimpleCommodityData)), RuntimeCatalogKey(12), RuntimeInspectable]
|
||||
public Guid AmmoType;
|
||||
|
||||
[InspectablePrefab, RuntimeCatalogKey(13)]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using System.Collections.Generic;
|
|||
using Unity.Mathematics;
|
||||
|
||||
[LegacyCatalogGroup("Galaxy"), Inspectable]
|
||||
public class Faction : DatabaseEntry, INamedEntry
|
||||
public class Faction : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable]
|
||||
public string Name;
|
||||
|
|
@ -22,7 +22,7 @@ public class Faction : DatabaseEntry, INamedEntry
|
|||
[InspectableTexture]
|
||||
public string Logo;
|
||||
|
||||
[InspectableDatabaseLink(typeof(PersonalityAttribute))]
|
||||
[InspectableRuntimeCatalogLink(typeof(PersonalityAttribute))]
|
||||
public Dictionary<Guid, float> Personality = new Dictionary<Guid, float>();
|
||||
|
||||
// [Inspectable]
|
||||
|
|
@ -34,16 +34,16 @@ public class Faction : DatabaseEntry, INamedEntry
|
|||
[InspectableColor]
|
||||
public float3 SecondaryColor;
|
||||
|
||||
[InspectableDatabaseLink(typeof(NameFile))]
|
||||
[InspectableRuntimeCatalogLink(typeof(NameFile))]
|
||||
public Guid GeonameFile;
|
||||
|
||||
[InspectableDatabaseLink(typeof(HullData))]
|
||||
[InspectableRuntimeCatalogLink(typeof(HullData))]
|
||||
public Guid BossHull;
|
||||
|
||||
[Inspectable]
|
||||
public int InfluenceDistance = 4;
|
||||
|
||||
[InspectableDatabaseLink(typeof(Faction)), RangedFloat(0, 1)]
|
||||
[InspectableRuntimeCatalogLink(typeof(Faction)), RangedFloat(0, 1)]
|
||||
public Dictionary<Guid, float> Allegiance = new Dictionary<Guid, float>();
|
||||
|
||||
[InspectableSoundBank]
|
||||
|
|
@ -63,7 +63,7 @@ public class Faction : DatabaseEntry, INamedEntry
|
|||
}
|
||||
|
||||
[Inspectable]
|
||||
public class NameFile : DatabaseEntry, INamedEntry
|
||||
public class NameFile : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
public string Name;
|
||||
public string[] Names;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using static Unity.Mathematics.noise;
|
|||
using static NoiseFbm;
|
||||
|
||||
[Inspectable, Serializable, LegacyCatalogGroup("Galaxy")]
|
||||
public class GalaxyMapLayerData : DatabaseEntry, INamedEntry
|
||||
public class GalaxyMapLayerData : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable]
|
||||
public float CoreBoost = 1.05f;
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ public class Shape
|
|||
|
||||
}
|
||||
|
||||
public abstract class ItemData : DatabaseEntry, INamedEntry
|
||||
public abstract class ItemData : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(1)]
|
||||
public string Name;
|
||||
|
|
@ -268,7 +268,7 @@ public abstract class ItemData : DatabaseEntry, INamedEntry
|
|||
[InspectableText, RuntimeCatalogKey(2)]
|
||||
public string Description;
|
||||
|
||||
[InspectableDatabaseLink(typeof(Faction)), RuntimeCatalogKey(3)]
|
||||
[InspectableRuntimeCatalogLink(typeof(Faction)), RuntimeCatalogKey(3)]
|
||||
public Guid Manufacturer;
|
||||
|
||||
[Inspectable, RuntimeCatalogKey(4)]
|
||||
|
|
@ -303,7 +303,7 @@ public class SimpleCommodityData : ItemData
|
|||
// public BodyType ResourceBodyType;
|
||||
//
|
||||
// // Link to map(s) controlling density of resource, multiplied together when more than one
|
||||
// [InspectableDatabaseLink(typeof(GalaxyMapLayerData)), RuntimeCatalogKey(7)]
|
||||
// [InspectableRuntimeCatalogLink(typeof(GalaxyMapLayerData)), RuntimeCatalogKey(7)]
|
||||
// public List<Guid> ResourceDensity = new List<Guid>();
|
||||
//
|
||||
// // Controls the lowest value in the resource distribution curve
|
||||
|
|
@ -330,7 +330,7 @@ public abstract class CraftedItemData : ItemData
|
|||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
public class CompoundCommodityData : CraftedItemData
|
||||
{
|
||||
[InspectableDatabaseLink(typeof(PersonalityAttribute)), RuntimeCatalogKey(10)]
|
||||
[InspectableRuntimeCatalogLink(typeof(PersonalityAttribute)), RuntimeCatalogKey(10)]
|
||||
public Dictionary<Guid, float> DemandProfile = new Dictionary<Guid, float>();
|
||||
|
||||
[Inspectable, RuntimeCatalogKey(11)]
|
||||
|
|
@ -613,7 +613,7 @@ public class PerformanceStat
|
|||
}
|
||||
|
||||
[LegacyCatalogGroup("Items"), Inspectable]
|
||||
public class PersonalityAttribute : DatabaseEntry, INamedEntry
|
||||
public class PersonalityAttribute : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
[Inspectable, RuntimeCatalogKey(1)]
|
||||
public string Name;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ using static Unity.Mathematics.math;
|
|||
|
||||
public abstract class ItemInstance
|
||||
{
|
||||
public DatabaseLink<ItemData> Data;
|
||||
public RuntimeCatalogLink<ItemData> Data;
|
||||
public ItemRotation Rotation;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ public class ItemManager
|
|||
{
|
||||
var newItem = new SimpleCommodity
|
||||
{
|
||||
Data = new DatabaseLink<ItemData>{LinkID = item.ID},
|
||||
Data = new RuntimeCatalogLink<ItemData>{LinkID = item.ID},
|
||||
Quantity = count
|
||||
};
|
||||
//ItemData.Add(newItem);
|
||||
|
|
@ -163,13 +163,13 @@ public class ItemManager
|
|||
{
|
||||
return new EquippableItem
|
||||
{
|
||||
Data = new DatabaseLink<ItemData> {LinkID = item.ID}, Quality = quality, Durability = equippableItemData.Durability
|
||||
Data = new RuntimeCatalogLink<ItemData> {LinkID = item.ID}, Quality = quality, Durability = equippableItemData.Durability
|
||||
};
|
||||
}
|
||||
|
||||
var newCommodity = new CompoundCommodity
|
||||
{
|
||||
Data = new DatabaseLink<ItemData>{LinkID = item.ID},
|
||||
Data = new RuntimeCatalogLink<ItemData>{LinkID = item.ID},
|
||||
Quality = quality
|
||||
};
|
||||
return newCommodity;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
using System;
|
||||
|
||||
[LegacyCatalogGroup("Users")]
|
||||
public class PlayerData : DatabaseEntry, INamedEntry
|
||||
public class PlayerData : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
public string Email;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ public class InspectableEnumValuesAttribute : PreferredInspectorAttribute
|
|||
}
|
||||
}
|
||||
|
||||
public class InspectableDatabaseLinkAttribute : PreferredInspectorAttribute
|
||||
public class InspectableRuntimeCatalogLinkAttribute : PreferredInspectorAttribute
|
||||
{
|
||||
public readonly Type EntryType;
|
||||
|
||||
public InspectableDatabaseLinkAttribute(Type entryType)
|
||||
public InspectableRuntimeCatalogLinkAttribute(Type entryType)
|
||||
{
|
||||
EntryType = entryType;
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ public interface INamedEntry
|
|||
string EntryName { get; set; }
|
||||
}
|
||||
|
||||
public abstract class DatabaseEntry
|
||||
public abstract class RuntimeCatalogEntry
|
||||
{
|
||||
public Guid ID = Guid.NewGuid();
|
||||
|
||||
|
|
@ -21,17 +21,17 @@ public abstract class DatabaseEntry
|
|||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is DatabaseEntry entry) return entry.ID == ID;
|
||||
if (obj is RuntimeCatalogEntry entry) return entry.ID == ID;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class DatabaseLink<T> : DatabaseLinkBase where T : ItemData
|
||||
public class RuntimeCatalogLink<T> : RuntimeCatalogLinkBase where T : ItemData
|
||||
{
|
||||
public T Value => ResolveRuntimeItemCatalog<T>(LinkID);
|
||||
}
|
||||
|
||||
public class DatabaseLinkBase
|
||||
public class RuntimeCatalogLinkBase
|
||||
{
|
||||
public Guid LinkID;
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ public class ZonePack
|
|||
public double Time;
|
||||
}
|
||||
|
||||
public abstract class BodyData : DatabaseEntry, INamedEntry
|
||||
public abstract class BodyData : RuntimeCatalogEntry, INamedEntry
|
||||
{
|
||||
public string Name = "";
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ public class Asteroid
|
|||
public float RotationSpeed;
|
||||
}
|
||||
|
||||
public class OrbitData : DatabaseEntry
|
||||
public class OrbitData : RuntimeCatalogEntry
|
||||
{
|
||||
public Guid Parent;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue