Skip to main content

GenericCraftingStation.ClientSideNailHitSync

A struct in Root.Township, Alta.Crafting.

Message a client sends when it hits a nail on a piece in a generic crafting station's project. The server finds the piece and nail and applies the hit.

Constructors​

MemberWhat it is
ClientSideNailHitSync(int pieceIndex, int nailIndex, ImpactHitWithTool impactWithTool)Creates a GenericCraftingStation.ClientSideNailHitSync from pieceIndex, nailIndex and impactWithTool.

Fields​

MemberWhat it is
int channelIndexIndex of the impact channel used on the impactor.
Vector3 directionDirection of the hit.
float effectivenessHit effectiveness from 0 to 1, as reported by the client.
int impactorIndexIndex of the impactor on the tool.
uint impactToolIdentifierEntity identifier of the tool that hit.
int nailIndexWhich nail on the piece was hit (0 to 15).
int pieceHashKey of the piece in the current project's mapped pieces.

Methods​

MemberWhat it is
float GetImpactDamage(ImpactDetector detector)Server: looks up the tool entity and returns its damage on the nail's detector, or 0 if the tool is gone.
void Serialize(Stream stream)Reads or writes the fields to the network stream.

Used in​

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