Skip to main content

SpecificCraftTask

A class in Root.Township, the global namespace.

Game task asset that counts crafting where a given item goes into a given slot. An empty prefab list matches anything.

Constructors​

MemberWhat it is
SpecificCraftTask()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

4 private and internal fields
MemberWhat it is
private HashSet<uint> insertPrefabHashesHashes of insertPrefabs.
private List<NetworkPrefab> insertPrefabsItems that count when inserted. Empty means any.
private HashSet<uint> slotPrefabHashesHashes of slotPrefabs.
private List<NetworkPrefab> slotPrefabsSlot prefabs that count. Empty means any.

Properties​

MemberWhat it is
override GameActionChannel Channel { get; }Listens on the CraftItem game action channel.

Methods​

MemberWhat it is
protected override void Initialize()Builds the hash sets from the prefab lists.
protected override bool IsValid(SpecificCraftTaskArgument argument)True when the slot's prefab and the inserted item's prefab both pass their lists.