Modular Database Tools

Extracted all inspector code for database inspector into a single class per supported field type and wrote reflection code to invoke them automatically
Removed all Aetheria-specific code from database tools
Database View editor is now abstract and supports arbitrary grouping of entry types; specific users must implement their own database view
This commit is contained in:
Reinier Vens 2021-03-31 04:07:11 +01:00
commit 526a737a4d
72 changed files with 1674 additions and 1624 deletions

View file

@ -6,7 +6,7 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class AutoWeaponData : InstantWeaponData
{
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -83,7 +83,7 @@ public abstract class PersistentBehaviorData
{
}
[InspectableField,
[Inspectable,
Union(0, typeof(GuidedWeaponData)),
Union(1, typeof(LauncherData)),
Union(2, typeof(ReactorData)),
@ -125,7 +125,7 @@ public abstract class PersistentBehaviorData
JsonConverter(typeof(JsonKnownTypesConverter<BehaviorData>)), JsonObject(MemberSerialization.OptIn)]
public abstract class BehaviorData
{
[InspectableField, JsonProperty("group"), Key(0)]
[Inspectable, JsonProperty("group"), Key(0)]
public int Group;
public abstract IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item);

View file

@ -11,10 +11,10 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class CapacitorData : BehaviorData
{
[InspectableField, JsonProperty("capacity"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("capacity"), Key(1), RuntimeInspectable]
public PerformanceStat Capacity = new PerformanceStat();
[InspectableField, JsonProperty("efficiency"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("efficiency"), Key(2), RuntimeInspectable]
public PerformanceStat Efficiency = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -6,43 +6,43 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class ChargedWeaponData : InstantWeaponData
{
[InspectableField, JsonProperty("chargeTime"), Key(21), RuntimeInspectable]
[Inspectable, JsonProperty("chargeTime"), Key(21), RuntimeInspectable]
public PerformanceStat ChargeTime = new PerformanceStat();
[InspectableField, JsonProperty("chargeEnergy"), Key(22), RuntimeInspectable]
[Inspectable, JsonProperty("chargeEnergy"), Key(22), RuntimeInspectable]
public PerformanceStat ChargeEnergy = new PerformanceStat();
[InspectableField, JsonProperty("chargeHeat"), Key(23), RuntimeInspectable]
[Inspectable, JsonProperty("chargeHeat"), Key(23), RuntimeInspectable]
public PerformanceStat ChargeHeat = new PerformanceStat();
[InspectableField, JsonProperty("canFireEarly"), Key(24)]
[Inspectable, JsonProperty("canFireEarly"), Key(24)]
public bool CanFireEarly;
[InspectableField, JsonProperty("failureCharge"), Key(25)]
[Inspectable, JsonProperty("failureCharge"), Key(25)]
public float FailureCharge;
[InspectableField, JsonProperty("failureDamage"), Key(26)]
[Inspectable, JsonProperty("failureDamage"), Key(26)]
public float FailureDamage = 1;
[InspectableField, JsonProperty("chargeDamage"), Key(27)]
[Inspectable, JsonProperty("chargeDamage"), Key(27)]
public float ChargeFiringDamageMultiplier = 1;
[InspectableField, JsonProperty("chargeSpread"), Key(28)]
[Inspectable, JsonProperty("chargeSpread"), Key(28)]
public float ChargeFiringSpreadMultiplier = 1;
[InspectableField, JsonProperty("chargeBurstCount"), Key(29)]
[Inspectable, JsonProperty("chargeBurstCount"), Key(29)]
public float ChargeFiringBurstCountMultiplier = 1;
[InspectableField, JsonProperty("chargeVisibility"), Key(30)]
[Inspectable, JsonProperty("chargeVisibility"), Key(30)]
public float ChargeFiringVisibilityMultiplier = 1;
[InspectableField, JsonProperty("chargeVelocity"), Key(31)]
[Inspectable, JsonProperty("chargeVelocity"), Key(31)]
public float ChargeFiringVelocityMultiplier = 1;
[InspectableField, JsonProperty("chargeHeatMul"), Key(32)]
[Inspectable, JsonProperty("chargeHeatMul"), Key(32)]
public float ChargeFiringHeatMultiplier = 1;
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -8,7 +8,7 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class ConstantWeaponData : WeaponData
{
[InspectablePrefab, JsonProperty("ammoInterval"), Key(17)]

View file

@ -9,10 +9,10 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-10), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-10), RuntimeInspectable]
public class CooldownData : BehaviorData
{
[InspectableField, JsonProperty("cooldown"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("cooldown"), Key(1), RuntimeInspectable]
public PerformanceStat Cooldown = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -7,13 +7,13 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-20), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-20), RuntimeInspectable]
public class EnergyDrawData : BehaviorData
{
[InspectableField, JsonProperty("draw"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("draw"), Key(1), RuntimeInspectable]
public PerformanceStat EnergyDraw = new PerformanceStat();
[InspectableField, JsonProperty("perSecond"), Key(2)]
[Inspectable, JsonProperty("perSecond"), Key(2)]
public bool PerSecond;
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -7,13 +7,13 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10), Inspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10)]
public class HeatData : BehaviorData
{
[InspectableField, JsonProperty("heat"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("heat"), Key(1), RuntimeInspectable]
public PerformanceStat Heat = new PerformanceStat();
[InspectableField, JsonProperty("perSecond"), Key(2)]
[Inspectable, JsonProperty("perSecond"), Key(2)]
public bool PerSecond;
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -6,16 +6,16 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class InstantWeaponData : WeaponData
{
[InspectableField, JsonProperty("count"), Key(17)]
[Inspectable, JsonProperty("count"), Key(17)]
public PerformanceStat Count = new PerformanceStat();
[InspectableField, JsonProperty("burstTime"), Key(18)]
[Inspectable, JsonProperty("burstTime"), Key(18)]
public PerformanceStat BurstTime = new PerformanceStat();
[InspectableField, JsonProperty("cooldown"), Key(19), RuntimeInspectable]
[Inspectable, JsonProperty("cooldown"), Key(19), RuntimeInspectable]
public PerformanceStat Cooldown = new PerformanceStat();
[InspectablePrefab, JsonProperty("ammoInterval"), Key(20)]

View file

@ -7,7 +7,7 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-5), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-5), RuntimeInspectable]
public class ItemUsageData : BehaviorData
{
[InspectableDatabaseLink(typeof(SimpleCommodityData)), JsonProperty("item"), Key(1), RuntimeInspectable]

View file

@ -6,7 +6,7 @@ using MessagePack;
using Newtonsoft.Json;
using Unity.Mathematics;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class LauncherData : LockWeaponData
{
[InspectableAnimationCurve, JsonProperty("guidance"), Key(26)]
@ -18,13 +18,13 @@ public class LauncherData : LockWeaponData
[InspectableAnimationCurve, JsonProperty("liftCurve"), Key(28)]
public float4[] LiftCurve;
[InspectableField, JsonProperty("thrust"), Key(29)]
[Inspectable, JsonProperty("thrust"), Key(29)]
public PerformanceStat Thrust = new PerformanceStat();
[InspectableField, JsonProperty("frequency"), Key(30)]
[Inspectable, JsonProperty("frequency"), Key(30)]
public float DodgeFrequency;
[InspectableField, JsonProperty("missileSpeed"), Key(31), RuntimeInspectable]
[Inspectable, JsonProperty("missileSpeed"), Key(31), RuntimeInspectable]
public PerformanceStat MissileVelocity = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
@ -33,7 +33,7 @@ public class LauncherData : LockWeaponData
}
}
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class GuidedWeaponData : InstantWeaponData
{
[InspectableAnimationCurve, JsonProperty("guidance"), Key(21)]
@ -45,13 +45,13 @@ public class GuidedWeaponData : InstantWeaponData
[InspectableAnimationCurve, JsonProperty("liftCurve"), Key(23)]
public float4[] LiftCurve;
[InspectableField, JsonProperty("thrust"), Key(24)]
[Inspectable, JsonProperty("thrust"), Key(24)]
public PerformanceStat Thrust = new PerformanceStat();
[InspectableField, JsonProperty("frequency"), Key(25)]
[Inspectable, JsonProperty("frequency"), Key(25)]
public float DodgeFrequency;
[InspectableField, JsonProperty("missileSpeed"), Key(26), RuntimeInspectable]
[Inspectable, JsonProperty("missileSpeed"), Key(26), RuntimeInspectable]
public PerformanceStat MissileVelocity = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -6,22 +6,22 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class LockWeaponData : InstantWeaponData
{
[InspectableField, JsonProperty("speed"), Key(21), RuntimeInspectable]
[Inspectable, JsonProperty("speed"), Key(21), RuntimeInspectable]
public PerformanceStat LockSpeed = new PerformanceStat();
[InspectableField, JsonProperty("sensorImpact"), Key(22)]
[Inspectable, JsonProperty("sensorImpact"), Key(22)]
public PerformanceStat SensorImpact = new PerformanceStat();
[InspectableField, JsonProperty("threshold"), Key(23), RuntimeInspectable]
[Inspectable, JsonProperty("threshold"), Key(23), RuntimeInspectable]
public PerformanceStat LockAngle = new PerformanceStat();
[InspectableField, JsonProperty("directionImpact"), Key(24)]
[Inspectable, JsonProperty("directionImpact"), Key(24)]
public PerformanceStat DirectionImpact = new PerformanceStat();
[InspectableField, JsonProperty("decay"), Key(25)]
[Inspectable, JsonProperty("decay"), Key(25)]
public PerformanceStat Decay = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -9,19 +9,19 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10)]
public class MiningToolData : BehaviorData
{
[InspectableField, JsonProperty("dps"), Key(1)]
[Inspectable, JsonProperty("dps"), Key(1)]
public PerformanceStat DamagePerSecond = new PerformanceStat();
[InspectableField, JsonProperty("efficiency"), Key(2)]
[Inspectable, JsonProperty("efficiency"), Key(2)]
public PerformanceStat Efficiency = new PerformanceStat();
[InspectableField, JsonProperty("penetration"), Key(3)]
[Inspectable, JsonProperty("penetration"), Key(3)]
public PerformanceStat Penetration = new PerformanceStat();
[InspectableField, JsonProperty("range"), Key(4)]
[Inspectable, JsonProperty("range"), Key(4)]
public PerformanceStat Range = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -7,10 +7,10 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class RadianceData : BehaviorData
{
[InspectableField, JsonProperty("radiance"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("radiance"), Key(1), RuntimeInspectable]
public PerformanceStat Radiance = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -10,19 +10,19 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class RadiatorData : BehaviorData
{
[InspectableField, JsonProperty("emissivity"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("emissivity"), Key(1), RuntimeInspectable]
public PerformanceStat Emissivity = new PerformanceStat();
[InspectableField, JsonProperty("pumpedHeat"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("pumpedHeat"), Key(2), RuntimeInspectable]
public PerformanceStat PumpedHeat = new PerformanceStat();
[InspectableTemperature, JsonProperty("temperatureFloor"), Key(3), RuntimeInspectable]
public float TemperatureFloor;
[InspectableField, JsonProperty("wasteHeat"), Key(4), RuntimeInspectable]
[Inspectable, JsonProperty("wasteHeat"), Key(4), RuntimeInspectable]
public PerformanceStat WasteHeat = new PerformanceStat();
[InspectableField, JsonProperty("energyUsage"), Key(5), RuntimeInspectable]
[Inspectable, JsonProperty("energyUsage"), Key(5), RuntimeInspectable]
public PerformanceStat EnergyUsage = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -13,16 +13,16 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class ReactorData : BehaviorData
{
[InspectableField, JsonProperty("charge"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("charge"), Key(1), RuntimeInspectable]
public PerformanceStat Charge = new PerformanceStat();
[InspectableField, JsonProperty("efficiency"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("efficiency"), Key(2), RuntimeInspectable]
public PerformanceStat Efficiency = new PerformanceStat();
[InspectableField, JsonProperty("overload"), Key(3), RuntimeInspectable]
[Inspectable, JsonProperty("overload"), Key(3), RuntimeInspectable]
public PerformanceStat OverloadEfficiency = new PerformanceStat();
[InspectableField, JsonProperty("underload"), Key(4), RuntimeInspectable]
[Inspectable, JsonProperty("underload"), Key(4), RuntimeInspectable]
public PerformanceStat ThrottlingFactor = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -10,7 +10,7 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class ReflectorData : BehaviorData
{
[InspectableField, JsonProperty("crossSection"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("crossSection"), Key(1), RuntimeInspectable]
public PerformanceStat CrossSection = new PerformanceStat();
// [InspectableAnimationCurve, JsonProperty("visibility"), Key(1)]

View file

@ -9,16 +9,16 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class ResourceScannerData : BehaviorData
{
[InspectableField, JsonProperty("range"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("range"), Key(1), RuntimeInspectable]
public PerformanceStat Range = new PerformanceStat();
[InspectableField, JsonProperty("minDensity"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("minDensity"), Key(2), RuntimeInspectable]
public PerformanceStat MinimumDensity = new PerformanceStat();
[InspectableField, JsonProperty("scanDuration"), Key(3), RuntimeInspectable]
[Inspectable, JsonProperty("scanDuration"), Key(3), RuntimeInspectable]
public PerformanceStat ScanDuration = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -9,34 +9,34 @@ using Newtonsoft.Json;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class SensorData : BehaviorData
{
[InspectableField, JsonProperty("sensitivity"), Key(3), RuntimeInspectable]
[Inspectable, JsonProperty("sensitivity"), Key(3), RuntimeInspectable]
public PerformanceStat Sensitivity = new PerformanceStat();
[InspectableAnimationCurve, JsonProperty("sensitivityCurve"), Key(4), RuntimeInspectable]
public float4[] SensitivityCurve;
[InspectableField, JsonProperty("pingBoost"), Key(5), RuntimeInspectable]
[Inspectable, JsonProperty("pingBoost"), Key(5), RuntimeInspectable]
public PerformanceStat PingBoost;
[InspectableField, JsonProperty("pingEnergy"), Key(6), RuntimeInspectable]
[Inspectable, JsonProperty("pingEnergy"), Key(6), RuntimeInspectable]
public PerformanceStat PingEnergy;
[InspectableField, JsonProperty("pingVisibility"), Key(7), RuntimeInspectable]
[Inspectable, JsonProperty("pingVisibility"), Key(7), RuntimeInspectable]
public PerformanceStat PingVisibility;
[InspectableField, JsonProperty("pingRange"), Key(8), RuntimeInspectable]
[Inspectable, JsonProperty("pingRange"), Key(8), RuntimeInspectable]
public PerformanceStat PingRange;
[InspectableField, JsonProperty("pingCooldown"), Key(9), RuntimeInspectable]
[Inspectable, JsonProperty("pingCooldown"), Key(9), RuntimeInspectable]
public PerformanceStat PingCooldown;
[InspectableField, JsonProperty("pingDuration"), Key(10)]
[Inspectable, JsonProperty("pingDuration"), Key(10)]
public float PingDuration = 2;
[InspectableField, JsonProperty("pingRadiusExponent"), Key(11)]
[Inspectable, JsonProperty("pingRadiusExponent"), Key(11)]
public float PingRadiusExponent = .5f;
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -10,10 +10,10 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class ShieldData : BehaviorData
{
[InspectableField, JsonProperty("efficiency"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("efficiency"), Key(1), RuntimeInspectable]
public PerformanceStat Efficiency = new PerformanceStat();
[InspectableField, JsonProperty("energy"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("energy"), Key(2), RuntimeInspectable]
public PerformanceStat EnergyUsage = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -7,16 +7,16 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class StatModifierData : BehaviorData
{
[InspectableField, JsonProperty("stat"), Key(1)]
[Inspectable, JsonProperty("stat"), Key(1)]
public StatReference Stat = new StatReference();
[InspectableField, JsonProperty("modifier"), Key(2)]
[Inspectable, JsonProperty("modifier"), Key(2)]
public PerformanceStat Modifier = new PerformanceStat();
[InspectableField, JsonProperty("type"), Key(3)]
[Inspectable, JsonProperty("type"), Key(3)]
public StatModifierType Type;
[InspectableType(typeof(BehaviorData)), JsonProperty("requireBehavior"), Key(4)]
@ -103,12 +103,12 @@ public enum StatModifierType
Multiplier
}
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
public class StatReference
{
[InspectableType(typeof(BehaviorData)), JsonProperty("behavior"), Key(1)]
public string Target;
[InspectableField, JsonProperty("stat"), Key(2)]
[Inspectable, JsonProperty("stat"), Key(2)]
public string Stat;
}

View file

@ -7,7 +7,7 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-25)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-25)]
public class SwitchData : BehaviorData
{
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -7,13 +7,13 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-22)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-22)]
public class ThermotoggleData : BehaviorData
{
[InspectableTemperature, JsonProperty("targetTemp"), Key(1)]
public float TargetTemperature;
[InspectableField, JsonProperty("highPass"), Key(2)]
[Inspectable, JsonProperty("highPass"), Key(2)]
public bool HighPass;
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -10,16 +10,16 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable]
public class ThrusterData : BehaviorData
{
[InspectableField, JsonProperty("thrust"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("thrust"), Key(1), RuntimeInspectable]
public PerformanceStat Thrust = new PerformanceStat();
[InspectableField, JsonProperty("visibility"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("visibility"), Key(2), RuntimeInspectable]
public PerformanceStat Visibility = new PerformanceStat();
[InspectableField, JsonProperty("heat"), Key(3), RuntimeInspectable]
[Inspectable, JsonProperty("heat"), Key(3), RuntimeInspectable]
public PerformanceStat Heat = new PerformanceStat();
[InspectableField, JsonProperty("energy"), Key(4), RuntimeInspectable]
[Inspectable, JsonProperty("energy"), Key(4), RuntimeInspectable]
public PerformanceStat EnergyUsage = new PerformanceStat();
[InspectablePrefab, JsonProperty("Particles"), Key(5)]

View file

@ -7,7 +7,7 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-20)]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-20)]
public class TriggerData : BehaviorData
{
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -10,7 +10,7 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class VelocityConversionData : BehaviorData
{
[InspectableField, JsonProperty("traction"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("traction"), Key(1), RuntimeInspectable]
public PerformanceStat Traction = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -10,7 +10,7 @@ using static Unity.Mathematics.math;
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class VelocityLimitData : BehaviorData
{
[InspectableField, JsonProperty("topSpeed"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("topSpeed"), Key(1), RuntimeInspectable]
public PerformanceStat TopSpeed = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -7,13 +7,13 @@ using System.Linq;
using MessagePack;
using Newtonsoft.Json;
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
public class VisibilityData : BehaviorData
{
[InspectableField, JsonProperty("visibility"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("visibility"), Key(1), RuntimeInspectable]
public PerformanceStat Visibility = new PerformanceStat();
[InspectableField, JsonProperty("visibilityDecay"), Key(2)]
[Inspectable, JsonProperty("visibilityDecay"), Key(2)]
public PerformanceStat VisibilityDecay = new PerformanceStat();
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)

View file

@ -17,10 +17,10 @@ using static Unity.Mathematics.math;
RuntimeInspectable]
public abstract class WeaponData : BehaviorData
{
[InspectableField, JsonProperty("damageType"), Key(1), RuntimeInspectable]
[Inspectable, JsonProperty("damageType"), Key(1), RuntimeInspectable]
public DamageType DamageType;
[InspectableField, JsonProperty("damage"), Key(2), RuntimeInspectable]
[Inspectable, JsonProperty("damage"), Key(2), RuntimeInspectable]
public PerformanceStat Damage = new PerformanceStat();
[RangedFloatInspectable(0,1), JsonProperty("penetration"), Key(3), RuntimeInspectable]
@ -29,10 +29,10 @@ public abstract class WeaponData : BehaviorData
[RangedFloatInspectable(0,1), JsonProperty("damageSpread"), Key(4)]
public PerformanceStat DamageSpread = new PerformanceStat();
[InspectableField, JsonProperty("minRange"), Key(5), RuntimeInspectable]
[Inspectable, JsonProperty("minRange"), Key(5), RuntimeInspectable]
public PerformanceStat MinRange = new PerformanceStat();
[InspectableField, JsonProperty("range"), Key(6), RuntimeInspectable]
[Inspectable, JsonProperty("range"), Key(6), RuntimeInspectable]
public PerformanceStat Range = new PerformanceStat();
[InspectableAnimationCurve, JsonProperty("damageRange"), Key(7), RuntimeInspectable]
@ -62,7 +62,7 @@ public abstract class WeaponData : BehaviorData
[InspectablePrefab, JsonProperty("spread"), Key(15)]
public PerformanceStat Spread = new PerformanceStat();
[InspectableField, JsonProperty("velocity"), Key(16)]
[Inspectable, JsonProperty("velocity"), Key(16)]
public PerformanceStat Velocity = new PerformanceStat();
}