QuickDrawApplication
A class in Root.Township, Alta.Enchantments.
Server-side quick draw trigger on one item: pulling the tool out of a valid dock charges it, and a good enough hit within the time limit fires the enchantment's effects.
- Listed in Crafting and making
- Inherits or implements
EnchantmentTriggerApplication<QuickDrawTrigger>
Constructors
| Member | What it is |
|---|---|
QuickDrawApplication(EnchantmentApplication enchantment, QuickDrawTrigger settings) | Creates a QuickDrawApplication from enchantment and settings. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private Timeline.IEntry entry | Timeline entry for the pending timeout. |
private TimeSpan nextCharge | Game time before which the trigger can't charge again. |
private ImpactTool tool | The item's impact tool, from the entity or a parent. |
Methods
| Member | What it is |
|---|---|
protected override void ApplyInternal() | Listens for the item being undocked, if it has an impact tool. |
protected override void RemoveInternal() | Stops listening for undocks. |
6 private and internal methods
| Member | What it is |
|---|---|
private void Cancel() | Fires the cancelled events and uncharges when the time to hit runs out. |
private void Charge(Interactor interactor, Pickup pickup, PickupDock dock) | On undock by a player from a valid dock, after the cooldown: listens for hits, fires the charged events and starts the timeout. |
private void Execute() | Fires the executed events; uncharges if the trigger is one hit only. |
private void Proc(ImpactHitWithTool hit, ImpactTool tool) | Invokes the effects with the hit, runs Execute and starts the cooldown. |
private void Uncharge() | Cancels the timeout and stops listening for hits. |
private void ValidateHit(ImpactHitWithTool hit, ImpactTool tool) | Procs when a hit's effectiveness is above the trigger's minimum. |