Facility vocabulary: HardpointType.Facility, FacilityData, RecipeData.Facility, StationKindData.Facilities
HardpointType.Facility is appended after ControlModule (value 13) with ship_cc's names in step: an internal station mount, no anchor, filled only by a kind's Facilities. FacilityData is an inert BehaviorData (union arm 53). RecipeData.Facility (Key 10) and StationKindData.Facilities (Key 3) read unset and empty from older records. HullKindFault refuses a Facility row on a Ship or Turret hull. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6518f260a2
commit
d932484721
11 changed files with 122 additions and 8 deletions
|
|
@ -200,6 +200,7 @@ public interface IPowerConsumer
|
|||
Union(50, typeof(ListenerData)),
|
||||
Union(51, typeof(ScannerData)),
|
||||
Union(52, typeof(LockWeaponData)),
|
||||
Union(53, typeof(FacilityData)),
|
||||
JsonObject(MemberSerialization.OptIn)]
|
||||
public abstract class BehaviorData
|
||||
{
|
||||
|
|
|
|||
26
Assets/Scripts/ServerShared/Behaviors/Facility.cs
Normal file
26
Assets/Scripts/ServerShared/Behaviors/Facility.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using MessagePack;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// The facility gear a station carries to run recipes: a GearData of HardpointType Facility whose Behaviors hold one of these. The type
|
||||
// says where it mounts (a hull's Facility rows), this says it runs recipes. It holds no field of its own: which recipes a facility
|
||||
// runs is derived from RecipeData.Facility, so no list is stored here.
|
||||
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
public class FacilityData : BehaviorData
|
||||
{
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
return new Facility(this, item);
|
||||
}
|
||||
public override Behavior CreateInstance(ConsumableItemEffect item)
|
||||
{
|
||||
return new Facility(this, item);
|
||||
}
|
||||
}
|
||||
|
||||
// The installed facility that will run its recipes (ruling demand-consumed-inputs-processed-by-facilities). It runs nothing until
|
||||
// follow-up facility-production: it is seated, priced and carried, and that is all.
|
||||
public class Facility : Behavior
|
||||
{
|
||||
public Facility(FacilityData data, EquippedItem item) : base(data, item) { }
|
||||
public Facility(FacilityData data, ConsumableItemEffect item) : base(data, item) { }
|
||||
}
|
||||
11
Assets/Scripts/ServerShared/Behaviors/Facility.cs.meta
Normal file
11
Assets/Scripts/ServerShared/Behaviors/Facility.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a65a21b40f2a4daba2b058018ba5e8d7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in a new issue