Mega Placement
Megas now have unique placement algorithms for their home sectors PerformanceStats can be marked as simple to hide heat and durability PerformanceStats automatically hide exponents when min and max are the same Some behaviors now have options to spread their effects over time
This commit is contained in:
parent
98371fc453
commit
61072de924
19 changed files with 352 additions and 80 deletions
44
Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs
Normal file
44
Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using MessagePack;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
public class ResourceScannerData : BehaviorData
|
||||
{
|
||||
[InspectableField, JsonProperty("range"), Key(1)]
|
||||
public PerformanceStat Range = new PerformanceStat();
|
||||
|
||||
[InspectableField, JsonProperty("minDensity"), Key(2)]
|
||||
public PerformanceStat MinimumDensity = new PerformanceStat();
|
||||
|
||||
public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item)
|
||||
{
|
||||
return new ResourceScanner(context, this, entity, item);
|
||||
}
|
||||
}
|
||||
|
||||
public class ResourceScanner : IBehavior
|
||||
{
|
||||
private ResourceScannerData _data;
|
||||
|
||||
private Entity Entity { get; }
|
||||
private Gear Item { get; }
|
||||
private GameContext Context { get; }
|
||||
|
||||
public BehaviorData Data => _data;
|
||||
|
||||
public ResourceScanner(GameContext context, ResourceScannerData data, Entity entity, Gear item)
|
||||
{
|
||||
_data = data;
|
||||
Entity = entity;
|
||||
Item = item;
|
||||
Context = context;
|
||||
}
|
||||
|
||||
public bool Update(float delta)
|
||||
{
|
||||
// TODO: Implement resource scanners!
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue