Bypass configs for heavy behaviors
This commit is contained in:
parent
3877b4b263
commit
70c9e965a1
9 changed files with 166 additions and 223 deletions
|
|
@ -247,6 +247,51 @@ public sealed class RuntimeBehaviorDefinition
|
|||
return _fields.TryGetValue(key, out var value) ? ToPerformanceStat(value) : fallback;
|
||||
}
|
||||
|
||||
public BezierCurve BezierCurve(int key, BezierCurve fallback)
|
||||
{
|
||||
if (!_fields.TryGetValue(key, out var value))
|
||||
{
|
||||
return fallback;
|
||||
}
|
||||
|
||||
return new BezierCurve
|
||||
{
|
||||
Keys = value.Children.Count > 0
|
||||
? value.Children[0].Children.Select(ToFloat4).ToArray()
|
||||
: Array.Empty<float4>()
|
||||
};
|
||||
}
|
||||
|
||||
public StatReference StatReference(int key, StatReference fallback)
|
||||
{
|
||||
if (!_fields.TryGetValue(key, out var value))
|
||||
{
|
||||
return fallback;
|
||||
}
|
||||
|
||||
return new StatReference
|
||||
{
|
||||
Target = ChildString(value, 1),
|
||||
Stat = ChildString(value, 2)
|
||||
};
|
||||
}
|
||||
|
||||
public T Enum<T>(int key, T fallback) where T : struct
|
||||
{
|
||||
if (!_fields.TryGetValue(key, out var value))
|
||||
{
|
||||
return fallback;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(value.StringValue) &&
|
||||
System.Enum.TryParse(value.StringValue, true, out T parsed))
|
||||
{
|
||||
return parsed;
|
||||
}
|
||||
|
||||
return (T)System.Enum.ToObject(typeof(T), checked((int)value.NumberValue));
|
||||
}
|
||||
|
||||
private static PerformanceStat ToPerformanceStat(AetheriaRuntimeBehaviorValue value)
|
||||
{
|
||||
return new PerformanceStat
|
||||
|
|
@ -259,10 +304,20 @@ public sealed class RuntimeBehaviorDefinition
|
|||
};
|
||||
}
|
||||
|
||||
private static float4 ToFloat4(AetheriaRuntimeBehaviorValue value)
|
||||
{
|
||||
return new float4(ChildFloat(value, 0), ChildFloat(value, 1), ChildFloat(value, 2), ChildFloat(value, 3));
|
||||
}
|
||||
|
||||
private static float ChildFloat(AetheriaRuntimeBehaviorValue value, int index)
|
||||
{
|
||||
return value.Children.Count > index ? (float)value.Children[index].NumberValue : 0;
|
||||
}
|
||||
|
||||
private static string ChildString(AetheriaRuntimeBehaviorValue value, int index)
|
||||
{
|
||||
return value.Children.Count > index ? value.Children[index].StringValue ?? "" : "";
|
||||
}
|
||||
}
|
||||
|
||||
[Inspectable]
|
||||
|
|
|
|||
|
|
@ -5,38 +5,6 @@
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[Inspectable]
|
||||
public class RadiatorConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
[Inspectable]
|
||||
public PerformanceStat Emissivity = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat PumpedHeat = new PerformanceStat();
|
||||
|
||||
[InspectableTemperature]
|
||||
public float TemperatureFloor;
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat WasteHeat = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat EnergyUsage = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat ThermalMass = new PerformanceStat();
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Radiator(this, item);
|
||||
}
|
||||
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new Radiator(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class Radiator : Behavior, IAlwaysUpdatedBehavior, IInitializableBehavior
|
||||
{
|
||||
public float RadiatorTemperature { get; private set; }
|
||||
|
|
@ -53,23 +21,34 @@ public class Radiator : Behavior, IAlwaysUpdatedBehavior, IInitializableBehavior
|
|||
private readonly PerformanceStat _energyUsage;
|
||||
private readonly PerformanceStat _thermalMass;
|
||||
|
||||
public Radiator(RadiatorConfig data, EquippedItem item) : base(data, item)
|
||||
public Radiator(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item)
|
||||
{
|
||||
_emissivity = data.Emissivity;
|
||||
_pumpedHeat = data.PumpedHeat;
|
||||
_temperatureFloor = data.TemperatureFloor;
|
||||
_wasteHeat = data.WasteHeat;
|
||||
_energyUsage = data.EnergyUsage;
|
||||
_thermalMass = data.ThermalMass;
|
||||
_emissivity = definition.PerformanceStat(1, new PerformanceStat());
|
||||
_pumpedHeat = definition.PerformanceStat(2, new PerformanceStat());
|
||||
_temperatureFloor = definition.Float(3);
|
||||
_wasteHeat = definition.PerformanceStat(4, new PerformanceStat());
|
||||
_energyUsage = definition.PerformanceStat(5, new PerformanceStat());
|
||||
_thermalMass = definition.PerformanceStat(6, new PerformanceStat());
|
||||
RegisterPerformanceStat(nameof(Emissivity), _emissivity);
|
||||
RegisterPerformanceStat(nameof(PumpedHeat), _pumpedHeat);
|
||||
RegisterPerformanceStat(nameof(WasteHeat), _wasteHeat);
|
||||
RegisterPerformanceStat(nameof(EnergyUsage), _energyUsage);
|
||||
RegisterPerformanceStat("ThermalMass", _thermalMass);
|
||||
}
|
||||
public Radiator(RadiatorConfig data, ConsumableItemEffect item) : base(data, item)
|
||||
|
||||
public Radiator(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item)
|
||||
{
|
||||
_emissivity = data.Emissivity;
|
||||
_pumpedHeat = data.PumpedHeat;
|
||||
_temperatureFloor = data.TemperatureFloor;
|
||||
_wasteHeat = data.WasteHeat;
|
||||
_energyUsage = data.EnergyUsage;
|
||||
_thermalMass = data.ThermalMass;
|
||||
_emissivity = definition.PerformanceStat(1, new PerformanceStat());
|
||||
_pumpedHeat = definition.PerformanceStat(2, new PerformanceStat());
|
||||
_temperatureFloor = definition.Float(3);
|
||||
_wasteHeat = definition.PerformanceStat(4, new PerformanceStat());
|
||||
_energyUsage = definition.PerformanceStat(5, new PerformanceStat());
|
||||
_thermalMass = definition.PerformanceStat(6, new PerformanceStat());
|
||||
RegisterPerformanceStat(nameof(Emissivity), _emissivity);
|
||||
RegisterPerformanceStat(nameof(PumpedHeat), _pumpedHeat);
|
||||
RegisterPerformanceStat(nameof(WasteHeat), _wasteHeat);
|
||||
RegisterPerformanceStat(nameof(EnergyUsage), _energyUsage);
|
||||
RegisterPerformanceStat("ThermalMass", _thermalMass);
|
||||
}
|
||||
|
||||
public override bool Execute(float dt)
|
||||
|
|
|
|||
|
|
@ -9,32 +9,6 @@ using UniRx;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[Inspectable]
|
||||
public class ReactorConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
[Inspectable]
|
||||
public PerformanceStat Charge = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat Efficiency = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat OverloadEfficiency = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat ThrottlingFactor = new PerformanceStat();
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Reactor(this, item);
|
||||
}
|
||||
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new Reactor(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class Reactor : Behavior, IOrderedBehavior, IDisposable
|
||||
{
|
||||
private readonly PerformanceStat _charge;
|
||||
|
|
@ -52,20 +26,29 @@ public class Reactor : Behavior, IOrderedBehavior, IDisposable
|
|||
|
||||
private List<IDisposable> _subscriptions = new List<IDisposable>();
|
||||
|
||||
public Reactor(ReactorConfig data, EquippedItem item) : base(data, item)
|
||||
public Reactor(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item)
|
||||
{
|
||||
_charge = data.Charge;
|
||||
_efficiency = data.Efficiency;
|
||||
_overloadEfficiency = data.OverloadEfficiency;
|
||||
_throttlingFactor = data.ThrottlingFactor;
|
||||
_charge = definition.PerformanceStat(1, new PerformanceStat());
|
||||
_efficiency = definition.PerformanceStat(2, new PerformanceStat());
|
||||
_overloadEfficiency = definition.PerformanceStat(3, new PerformanceStat());
|
||||
_throttlingFactor = definition.PerformanceStat(4, new PerformanceStat());
|
||||
RegisterPerformanceStat("Charge", _charge);
|
||||
RegisterPerformanceStat("Efficiency", _efficiency);
|
||||
RegisterPerformanceStat("OverloadEfficiency", _overloadEfficiency);
|
||||
RegisterPerformanceStat("ThrottlingFactor", _throttlingFactor);
|
||||
FindCapacitors();
|
||||
}
|
||||
public Reactor(ReactorConfig data, ConsumableItemEffect item) : base(data, item)
|
||||
|
||||
public Reactor(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item)
|
||||
{
|
||||
_charge = data.Charge;
|
||||
_efficiency = data.Efficiency;
|
||||
_overloadEfficiency = data.OverloadEfficiency;
|
||||
_throttlingFactor = data.ThrottlingFactor;
|
||||
_charge = definition.PerformanceStat(1, new PerformanceStat());
|
||||
_efficiency = definition.PerformanceStat(2, new PerformanceStat());
|
||||
_overloadEfficiency = definition.PerformanceStat(3, new PerformanceStat());
|
||||
_throttlingFactor = definition.PerformanceStat(4, new PerformanceStat());
|
||||
RegisterPerformanceStat("Charge", _charge);
|
||||
RegisterPerformanceStat("Efficiency", _efficiency);
|
||||
RegisterPerformanceStat("OverloadEfficiency", _overloadEfficiency);
|
||||
RegisterPerformanceStat("ThrottlingFactor", _throttlingFactor);
|
||||
FindCapacitors();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,47 +7,6 @@ using System.Collections.Generic;
|
|||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
|
||||
[Inspectable]
|
||||
public class SensorConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
[Inspectable]
|
||||
public PerformanceStat Sensitivity = new PerformanceStat();
|
||||
|
||||
[InspectableAnimationCurve]
|
||||
public BezierCurve SensitivityCurve;
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat PingBoost;
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat PingEnergy;
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat PingVisibility;
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat PingRange;
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat PingCooldown;
|
||||
|
||||
[Inspectable]
|
||||
public float PingDuration = 2;
|
||||
|
||||
[Inspectable]
|
||||
public float PingRadiusExponent = .5f;
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Sensor(this, item);
|
||||
}
|
||||
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new Sensor(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class Sensor : Behavior, IEventBehavior
|
||||
{
|
||||
private readonly PerformanceStat _sensitivity;
|
||||
|
|
@ -103,30 +62,42 @@ public class Sensor : Behavior, IEventBehavior
|
|||
}
|
||||
}
|
||||
|
||||
public Sensor(SensorConfig data, EquippedItem item) : base(data, item)
|
||||
public Sensor(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item)
|
||||
{
|
||||
_sensitivity = data.Sensitivity;
|
||||
_sensitivityCurve = data.SensitivityCurve;
|
||||
_pingBoost = data.PingBoost;
|
||||
_pingEnergy = data.PingEnergy;
|
||||
_pingVisibility = data.PingVisibility;
|
||||
_pingRange = data.PingRange;
|
||||
_pingCooldownDuration = data.PingCooldown;
|
||||
_pingDuration = data.PingDuration;
|
||||
_pingRadiusExponent = data.PingRadiusExponent;
|
||||
_sensitivity = definition.PerformanceStat(3, new PerformanceStat());
|
||||
_sensitivityCurve = definition.BezierCurve(4, null);
|
||||
_pingBoost = definition.PerformanceStat(5, null);
|
||||
_pingEnergy = definition.PerformanceStat(6, null);
|
||||
_pingVisibility = definition.PerformanceStat(7, null);
|
||||
_pingRange = definition.PerformanceStat(8, null);
|
||||
_pingCooldownDuration = definition.PerformanceStat(9, null);
|
||||
_pingDuration = definition.Float(10, 2);
|
||||
_pingRadiusExponent = definition.Float(11, .5f);
|
||||
RegisterPerformanceStats();
|
||||
}
|
||||
|
||||
public Sensor(SensorConfig data, ConsumableItemEffect item) : base(data, item)
|
||||
public Sensor(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item)
|
||||
{
|
||||
_sensitivity = data.Sensitivity;
|
||||
_sensitivityCurve = data.SensitivityCurve;
|
||||
_pingBoost = data.PingBoost;
|
||||
_pingEnergy = data.PingEnergy;
|
||||
_pingVisibility = data.PingVisibility;
|
||||
_pingRange = data.PingRange;
|
||||
_pingCooldownDuration = data.PingCooldown;
|
||||
_pingDuration = data.PingDuration;
|
||||
_pingRadiusExponent = data.PingRadiusExponent;
|
||||
_sensitivity = definition.PerformanceStat(3, new PerformanceStat());
|
||||
_sensitivityCurve = definition.BezierCurve(4, null);
|
||||
_pingBoost = definition.PerformanceStat(5, null);
|
||||
_pingEnergy = definition.PerformanceStat(6, null);
|
||||
_pingVisibility = definition.PerformanceStat(7, null);
|
||||
_pingRange = definition.PerformanceStat(8, null);
|
||||
_pingCooldownDuration = definition.PerformanceStat(9, null);
|
||||
_pingDuration = definition.Float(10, 2);
|
||||
_pingRadiusExponent = definition.Float(11, .5f);
|
||||
RegisterPerformanceStats();
|
||||
}
|
||||
|
||||
private void RegisterPerformanceStats()
|
||||
{
|
||||
RegisterPerformanceStat("Sensitivity", _sensitivity);
|
||||
RegisterPerformanceStat("PingBoost", _pingBoost);
|
||||
RegisterPerformanceStat("PingEnergy", _pingEnergy);
|
||||
RegisterPerformanceStat("PingVisibility", _pingVisibility);
|
||||
RegisterPerformanceStat("PingRange", _pingRange);
|
||||
RegisterPerformanceStat("PingCooldown", _pingCooldownDuration);
|
||||
}
|
||||
|
||||
public override bool Execute(float dt)
|
||||
|
|
|
|||
|
|
@ -6,31 +6,6 @@ using System;
|
|||
using System.Linq;
|
||||
using GameCult.Aetheria.State.Unity;
|
||||
|
||||
[Inspectable]
|
||||
public class StatModifierConfig : RuntimeBehaviorConfig
|
||||
{
|
||||
[Inspectable]
|
||||
public StatReference Stat = new StatReference();
|
||||
|
||||
[Inspectable]
|
||||
public PerformanceStat Modifier = new PerformanceStat();
|
||||
|
||||
[Inspectable]
|
||||
public StatModifierType Type;
|
||||
|
||||
public string RequireBehavior;
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new StatModifier(this, item);
|
||||
}
|
||||
|
||||
public override Behavior CreateInstance(ConsumableItemEffect consumable)
|
||||
{
|
||||
return new StatModifier(this, consumable);
|
||||
}
|
||||
}
|
||||
|
||||
[Order(-4)]
|
||||
public class StatModifier : Behavior, IInitializableBehavior, IDisposable, IAlwaysUpdatedBehavior
|
||||
{
|
||||
|
|
@ -49,22 +24,26 @@ public class StatModifier : Behavior, IInitializableBehavior, IDisposable, IAlwa
|
|||
public bool Executed => _executed;
|
||||
public int TargetStatCount => _stats?.Length ?? 0;
|
||||
|
||||
public StatModifier(StatModifierConfig data, EquippedItem item) : base(data, item)
|
||||
public StatModifier(RuntimeBehaviorDefinition definition, EquippedItem item) : base(definition, item)
|
||||
{
|
||||
_targetBehaviorKind = data.Stat.Target;
|
||||
_targetStatName = data.Stat.Stat;
|
||||
_modifier = data.Modifier;
|
||||
_type = data.Type;
|
||||
_requiredBehaviorKind = data.RequireBehavior;
|
||||
var stat = definition.StatReference(1, new StatReference());
|
||||
_targetBehaviorKind = stat.Target;
|
||||
_targetStatName = stat.Stat;
|
||||
_modifier = definition.PerformanceStat(2, new PerformanceStat());
|
||||
_type = definition.Enum(3, default(StatModifierType));
|
||||
_requiredBehaviorKind = definition.String(4);
|
||||
RegisterPerformanceStat("Modifier", _modifier);
|
||||
}
|
||||
|
||||
public StatModifier(StatModifierConfig data, ConsumableItemEffect item) : base(data, item)
|
||||
public StatModifier(RuntimeBehaviorDefinition definition, ConsumableItemEffect item) : base(definition, item)
|
||||
{
|
||||
_targetBehaviorKind = data.Stat.Target;
|
||||
_targetStatName = data.Stat.Stat;
|
||||
_modifier = data.Modifier;
|
||||
_type = data.Type;
|
||||
_requiredBehaviorKind = data.RequireBehavior;
|
||||
var stat = definition.StatReference(1, new StatReference());
|
||||
_targetBehaviorKind = stat.Target;
|
||||
_targetStatName = stat.Stat;
|
||||
_modifier = definition.PerformanceStat(2, new PerformanceStat());
|
||||
_type = definition.Enum(3, default(StatModifierType));
|
||||
_requiredBehaviorKind = definition.String(4);
|
||||
RegisterPerformanceStat("Modifier", _modifier);
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
|
|
|
|||
|
|
@ -100,9 +100,13 @@ public class ItemManager
|
|||
case "HeatStorage": return new HeatStorage(definition, item);
|
||||
case "ItemUsage": return new ItemUsage(definition, item);
|
||||
case "MiningTool": return new MiningTool(definition, item);
|
||||
case "Radiator": return new Radiator(definition, item);
|
||||
case "Reactor": return new Reactor(definition, item);
|
||||
case "Reflector": return new Reflector(definition, item);
|
||||
case "ResourceScanner": return new ResourceScanner(definition, item);
|
||||
case "Sensor": return new Sensor(definition, item);
|
||||
case "Shield": return new Shield(definition, item);
|
||||
case "StatModifier": return new StatModifier(definition, item);
|
||||
case "Switch": return new Switch(definition, item);
|
||||
case "Thermotoggle": return new Thermotoggle(definition, item);
|
||||
case "Thruster": return new Thruster(definition, item);
|
||||
|
|
@ -129,9 +133,13 @@ public class ItemManager
|
|||
case "HeatStorage": return new HeatStorage(definition, effect);
|
||||
case "ItemUsage": return new ItemUsage(definition, effect);
|
||||
case "MiningTool": return new MiningTool(definition, effect);
|
||||
case "Radiator": return new Radiator(definition, effect);
|
||||
case "Reactor": return new Reactor(definition, effect);
|
||||
case "Reflector": return new Reflector(definition, effect);
|
||||
case "ResourceScanner": return new ResourceScanner(definition, effect);
|
||||
case "Sensor": return new Sensor(definition, effect);
|
||||
case "Shield": return new Shield(definition, effect);
|
||||
case "StatModifier": return new StatModifier(definition, effect);
|
||||
case "Switch": return new Switch(definition, effect);
|
||||
case "Thermotoggle": return new Thermotoggle(definition, effect);
|
||||
case "Thruster": return new Thruster(definition, effect);
|
||||
|
|
@ -156,10 +164,6 @@ public class ItemManager
|
|||
case "GuidedWeapon": return Configure(new GuidedWeaponConfig(), payload, ApplyGuidedWeaponConfig);
|
||||
case "InstantWeapon": return Configure(new InstantWeaponConfig(), payload, ApplyInstantWeaponConfig);
|
||||
case "Launcher": return Configure(new LauncherConfig(), payload, ApplyLauncherConfig);
|
||||
case "Radiator": return Configure(new RadiatorConfig(), payload, ApplyRadiatorConfig);
|
||||
case "Reactor": return Configure(new ReactorConfig(), payload, ApplyReactorConfig);
|
||||
case "Sensor": return Configure(new SensorConfig(), payload, ApplySensorConfig);
|
||||
case "StatModifier": return Configure(new StatModifierConfig(), payload, ApplyStatModifierConfig);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -191,45 +195,6 @@ public class ItemManager
|
|||
config.Particles = reader.String(13, config.Particles);
|
||||
}
|
||||
|
||||
private static void ApplyRadiatorConfig(RadiatorConfig config, BehaviorPayloadReader reader)
|
||||
{
|
||||
config.Emissivity = reader.PerformanceStat(1, config.Emissivity);
|
||||
config.PumpedHeat = reader.PerformanceStat(2, config.PumpedHeat);
|
||||
config.TemperatureFloor = reader.Float(3, config.TemperatureFloor);
|
||||
config.WasteHeat = reader.PerformanceStat(4, config.WasteHeat);
|
||||
config.EnergyUsage = reader.PerformanceStat(5, config.EnergyUsage);
|
||||
config.ThermalMass = reader.PerformanceStat(6, config.ThermalMass);
|
||||
}
|
||||
|
||||
private static void ApplyReactorConfig(ReactorConfig config, BehaviorPayloadReader reader)
|
||||
{
|
||||
config.Charge = reader.PerformanceStat(1, config.Charge);
|
||||
config.Efficiency = reader.PerformanceStat(2, config.Efficiency);
|
||||
config.OverloadEfficiency = reader.PerformanceStat(3, config.OverloadEfficiency);
|
||||
config.ThrottlingFactor = reader.PerformanceStat(4, config.ThrottlingFactor);
|
||||
}
|
||||
|
||||
private static void ApplySensorConfig(SensorConfig config, BehaviorPayloadReader reader)
|
||||
{
|
||||
config.Sensitivity = reader.PerformanceStat(3, config.Sensitivity);
|
||||
config.SensitivityCurve = reader.BezierCurve(4, config.SensitivityCurve);
|
||||
config.PingBoost = reader.PerformanceStat(5, config.PingBoost);
|
||||
config.PingEnergy = reader.PerformanceStat(6, config.PingEnergy);
|
||||
config.PingVisibility = reader.PerformanceStat(7, config.PingVisibility);
|
||||
config.PingRange = reader.PerformanceStat(8, config.PingRange);
|
||||
config.PingCooldown = reader.PerformanceStat(9, config.PingCooldown);
|
||||
config.PingDuration = reader.Float(10, config.PingDuration);
|
||||
config.PingRadiusExponent = reader.Float(11, config.PingRadiusExponent);
|
||||
}
|
||||
|
||||
private static void ApplyStatModifierConfig(StatModifierConfig config, BehaviorPayloadReader reader)
|
||||
{
|
||||
config.Stat = reader.StatReference(1, config.Stat);
|
||||
config.Modifier = reader.PerformanceStat(2, config.Modifier);
|
||||
config.Type = reader.Enum(3, config.Type);
|
||||
config.RequireBehavior = reader.String(4, config.RequireBehavior);
|
||||
}
|
||||
|
||||
private static void ApplyWeaponConfig(WeaponConfig config, BehaviorPayloadReader reader)
|
||||
{
|
||||
config.DamageType = reader.Enum(1, config.DamageType);
|
||||
|
|
|
|||
Loading…
Reference in a new issue