Skip to main content

ForgedHitEffectOverride

A class in Root.Township, the global namespace.

Per-tool override for forging hit effects and the heat a hit adds. Heart call skills register one against a tool entity, and ForgedModel checks it on each hit.

Constructors​

MemberWhat it is
ForgedHitEffectOverride()Creates a ForgedHitEffectOverride with default values.

Fields​

4 private and internal fields
MemberWhat it is
private PositionRotationEvent coldHitEffect event played on a cold hit.
private float efficiencyToHeatModifierMultiplier from hit effectiveness to heat added.
private PositionRotationEvent hotHitEffect event played on a hot hit.
private static Dictionary<NetworkEntity, ForgedHitEffectOverride> overridesStatic map of tool entity to its active override. Entries stay until Deregister.

Methods​

MemberWhat it is
static void ColdHit(ImpactHitWithTool hitWithTool)Plays the registered cold hit effect at the hit point, if the tool has an override.
static void Deregister(NetworkEntity toolEntity)Removes the tool entity's override.
static float HitHeat(ImpactHitWithTool hitWithTool)Returns hit effectiveness times the heat modifier for the tool, or 0 with no override.
static void HotHit(ImpactHitWithTool hitWithTool)Plays the registered hot hit effect at the hit point, if the tool has an override.
static void Register(NetworkEntity toolEntity, ForgedHitEffectOverride hitOverride)Sets or replaces the override for a tool entity.

Used in​

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