Skip to main content

HeldPickupHandler

A class in Root.Township, the global namespace.

Tracks one pickup a player is holding and the skill inputs registered for it, and passes tool hits to those skills. Created by PlayerToolBasedSkillHelper when an interaction starts.

Constructors​

MemberWhat it is
HeldPickupHandler(Pickup pickup, PlayerToolBasedSkillHelper playerHelper)Creates a HeldPickupHandler from pickup and playerHelper.

Fields​

1 private and internal field
MemberWhat it is
private static HashSet<ISkillInputMethod> inputstoResetShared scratch set of skill inputs to reset after ReceiveHit has run every skill.

Properties​

MemberWhat it is
bool HasTool { get; }True if the pickup has an ImpactTool.
Dictionary<SkillInputStructure, ISkillInputMethod> Inputs { get; }Input methods by input structure, shared by skills that use the same structure.
bool IsUpdating { get; private set; }True while the handler is registered for per-frame updates.
Pickup Pickup { get; }The held pickup.
PlayerToolBasedSkillHelper PlayerHelper { get; }The player's tool skill helper that owns this handler.
Dictionary<IInputBasedSkill, ISkillInputMethod> SkillsToInputs { get; }Which input each registered skill listens to.
ImpactTool Tool { get; }The pickup's ImpactTool, or null.

Methods​

MemberWhat it is
void Clear()Clears every input and deregisters every skill from it.
void DeregisterSkill(IInputBasedSkill skill)Removes one skill. The input is dropped once no skill uses it, and updates stop when no input needs them.
void ReceiveHit(ProgressionPath path, ImpactHitWithTool hitWithTool)Passes a tool hit to each skill. Active inputs whose skill accepts the hit execute it, then reset.
ISkillInputMethod RegisterToInput(IInputBasedSkill skill)Gets or creates the input for a skill's input structure and links the skill to it.
void Update()Updates every input that needs per-frame updates.

Used in​

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

SpecificPickupBasedSkill.ValidatePickup, AreaAttackSkill.ExecuteWithHit, AreaAttackSkill.ValidatePickup, BowStringPullbackInputMethod.handler, BowStringPullbackInputMethod.ISkillInputMethod.Handler, BowStringPullbackInputMethod.ReceiveHit, BowStringPullbackInputMethod.RegisterHandler, DownwardSwingInput.Handler, DownwardSwingInput.ReceiveHit, DownwardSwingInput.RegisterHandler, EmberComposer.ValidatePickup, Gatherer.Dock, Gatherer.DockDelay, Gatherer.ValidatePickup, HandOnSideStructure.IsInPositionInternal, HandPositionInput.Handler, HandPositionInput.ReceiveHit, HandPositionInput.RegisterHandler, HandPositionInputModifier.ModifyIsInPosition, HandPositionStructure.IsInPosition, HandPositionStructure.IsInPositionInternal, HandToHeartInputStructure.IsInPositionInternal, HeartCall.Register, HeartCall.ValidatePickup, HebiosEnchant.ExecuteWithHit, HebiosEnchant.ValidatePickup, IInputBasedSkill.ExecuteWithHit, IInputBasedSkill.ValidatePickup, ISkillInputMethod.Handler, ISkillInputMethod.ReceiveHit, ISkillInputMethod.RegisterHandler, MiningEcho.ExecuteWithHit, MiningEcho.ValidatePickup, PickupBasedSkill.ExecuteWithHit, PickupBasedSkill.Register, PickupBasedSkill.ValidatePickup, PickupBasedSkillModifier.ExecuteWithHit, PickupBasedSkillModifier.ValidatePickup, PickupGrabInputMethod.handler, PickupGrabInputMethod.ISkillInputMethod.Handler, PickupGrabInputMethod.ReceiveHit, PickupGrabInputMethod.RegisterHandler, PlayerToolBasedSkillHelper.ActivateInput, PlayerToolBasedSkillHelper.DeactivateOtherModifiers, PlayerToolBasedSkillHelper.DeregisterUpdate, PlayerToolBasedSkillHelper.HeldInteractables, PlayerToolBasedSkillHelper.RegisterUpdate, PlayerToolBasedSkillHelper.ValidatePickupHandler, PowerCrossSlash.ExecuteWithHit, PowerCrossSlash.ValidatePickup, PowerHit.ExecuteWithHit, PowerHit.ValidatePickup, PowerStinger.ExecuteWithHit, PowerStinger.ValidatePickup, PowerStrike.ExecuteWithHit, PowerStrike.ValidatePickup, RaiseHandStructure.IsInPositionInternal, ShakeInput.Handler, ShakeInput.ReceiveHit, ShakeInput.RegisterHandler and 12 more.