Skip to main content

TransferAmountTask

A class in Root.Township, the global namespace.

A game task asset (TransferAmount channel) that counts when a matching prefab is transferred. Created from the Township Tale / Game Tasks menu.

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private List<uint> ignoreHashesPrefab hashes that never count.
private bool isAnyPrefabWhen true, every transfer counts.
private List<uint> targetHashesPrefab hashes that count.

Properties​

MemberWhat it is
override GameActionChannel Channel { get; }Always GameActionChannel.TransferAmount.

Methods​

MemberWhat it is
protected override bool IsValid(TransferAmountArgument argument)True if any prefab is allowed, or the transferred item's hash is in targetHashes and not in ignoreHashes.