Skip to main content

SmelterRecipeUnlock

A class in Root.Township, the global namespace.

Dock on a smelter that unlocks recipes while a recipe unlock item sits in it. Server only.

Constructors​

MemberWhat it is
SmelterRecipeUnlock()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private PickupDock dockBacking field for Dock.
private ItemSmelterRecipeUnlock unlockThe unlock from the last docked item. Not cleared on undock.
private SmelterUnlockManager unlockManagerThe smelter's unlock manager.

Properties​

MemberWhat it is
PickupDock Dock { get; }The dock the unlock item goes in.

Methods​

MemberWhat it is
void RefreshUnlock()Applies the current unlock to the smelter's unlock manager again.
3 private and internal methods
MemberWhat it is
private void AddUnlock(Interactor interactor, Pickup pickup, PickupDock dock)Server: when an item docks, reads its ItemSmelterRecipeUnlock and unlocks it.
private void Awake()Server: hooks the dock's docked and undocked events.
private void RemoveRecipes(Interactor interactor, Pickup pickup, PickupDock dock)Server: when the item leaves, locks its recipes again.

Used in​

Members of other types that take, return or hold a SmelterRecipeUnlock: