Skip to main content

SpecificSpawnItemTask

A class in Root.Township, the global namespace.

Game task asset that counts items produced by crafting or smelting, filtered by product and by recipe kind.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private SpecificSpawnItemTask.RecipeFilter recipeFilterRecipe kinds that count: followed, not followed, smelt, generic. All by default.
private List<NetworkPrefab> targetPrefabsProducts that count. Empty means any.
private HashSet<uint> targetPrefabsHashesHashes of targetPrefabs.

Properties​

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

Methods​

MemberWhat it is
protected override void Initialize()Builds the hash set from targetPrefabs.
protected override bool IsValid(SpecificSpawnItemTaskArgument argument)True when the recipe kind matches recipeFilter and the product is in targetPrefabs (or the list is empty).