Skip to main content

DecraftingDeck

A class in Root.Township, Alta.Crafting.

A station where a crafted item is held and hit with a chisel to knock attached parts off one at a time.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private TwoStepLever leverLever shown pulled when an item is already loaded.
private PickupHolder pickupHolderHolder the item goes into.

Methods​

MemberWhat it is
override void Initialize()Hooks the holder so held pickups become the decraft target; clients also add the filter.
override void InitializeAsServer(SpawnData spawnData)Server: if an item is already in the holder, holds it, sets the lever and makes it the target.
1 private and internal method
MemberWhat it is
private void PickupFilter(Pickup pickup, ref bool isValid)Only accepts crafted pickups that aren't assembly parts.