Skip to main content

NailIdentifier

A struct in Root.Township, Alta.Crafting.

Identifies one nail on a generic-crafting piece, plus how well it was hit, for sending over the network.

Fields​

MemberWhat it is
static NailIdentifier baseStructShared static instance reused by Setup.
NailHitquality hitQualityHow well the nail was hit.
int nailIndexIndex of the nail on its piece.
int pieceIndexIdentifies the piece the nail belongs to. Despite the name, GenericCraftingPiece fills it with the piece's hash.

Methods​

MemberWhat it is
void Serialize(Stream stream)Reads or writes the piece id, nail index (0 to 15) and hit quality (1 to 3, so Base can't be sent).
static NailIdentifier Setup(int pieceIndex, GenericCraftingNail nail, NailHitquality hitQuality)Fills the shared baseStruct from a piece id, nail and hit quality, and returns a copy.

Used in​

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