Skip to main content

IProject

An interface in Root.Township, Alta.Crafting.

A recipe in progress on a generic crafting station, built level by level. GenericCraftingProject is the only implementation.

Properties​

MemberWhat it is
int CurrentLevel { get; set; }The level being built now.
bool IsComplete { get; set; }True when every piece of the last level is done.
Dictionary<int, GenericCraftingPiece> MappedPieces { get; }Every piece, by hash.
GenericCraftingRecipe Recipe { get; }The recipe being built.
GenericCraftingStation Station { get; }The station it's on.

Methods​

MemberWhat it is
bool CanRemoveAtLevel(int level)Whether a piece at a level may be taken off without breaking higher levels.
void Clear(bool isReturningMaterials)Clears every piece, optionally dropping their materials.
void Fail(int hash, bool isCritical)Empties a failed piece; a critical one may pop others of its level.
void ReevaluateLevel()Works out the current level and completion from the pieces and enables or disables levels to match.
void SetMaxLevel()Jumps to the last level.
void SetPieceComplete(int hash, IPlayer complettingPlayer)Called when a piece is done. Opens the next level when a level is full, or completes the project and reports the craft task.
void SetupResult(GenericCraftingResult result)Copies each piece's material onto the matching part of the finished item.
void SyncDestroyEffect(IPlayer player, Stream stream, int pieceIndex)Client: plays a piece's destroy effect.
void SyncPiece(IPlayer player, Stream stream, int pieceIndex)Writes or reads one piece's state.
void UpdateRenderers(int rangeLevel)Updates each piece's look for a viewing distance level.

Used in​

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