Gatherer
A class in Root.Township, the global namespace.
Skill that, when a pouch is thrown, pulls nearby loose pickups of the pouch's docked type into it after a delay. The server docks them; clients show them flying in.
- Listed in Global namespace: E to H
- Inherits or implements
PickupBasedSkill - Derived types
Gatherer.Create - Nested types
Create
Constructors
| Member | What it is |
|---|---|
Gatherer() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
8 private and internal fields
| Member | What it is |
|---|---|
private HashSet<Rigidbody> activeGatherers | Pouches waiting to dock, so they don't gather each other. |
private bool canGatherCraftedPickups | Allows gathering crafted pickups. |
private bool canGatherKinematicPickups | Allows gathering kinematic pickups. |
private float dockDelay | Seconds between letting go and gathering. |
private List<uint> dockedPickupsIdentifiers | Entity IDs of the pickups gathered last time, sent to clients. |
private float dockingRange | Radius gathered around the pouch. |
private Item trainingPouchItem | Training pouch item that also counts as a pouch. |
private Item[] validItems | Docked item types this skill works with. |
Methods
| Member | What it is |
|---|---|
override void Deregister(ISkillInputMethod input) | When an active pouch is let go, starts DockDelay on the player. |
void MovePickupToPouch(PickupDock dock, Pickup pickup) | Client visual: spawns a ghost of the pickup that moves into the pouch's dock. |
override bool ValidatePickup(HeldPickupHandler pickupHandler) | True for a pouch or training pouch whose docked type is in validItems. |
protected override void EffectsRequested(NetworkEntity targetEntity, ToolBasedSkillStatus status, bool isLocalPlayer) | Client: plays the fly-in effect for each docked pickup once it has spawned. |
protected override void RequestToolEffect(NetworkEntity entity) | Starts the skill effect on the pouch's renderers. |
protected override void SerializeInternal(Stream stream) | When the skill was consumed, also syncs the IDs of the pickups that were docked (up to 63). |
3 private and internal methods
| Member | What it is |
|---|---|
private void Dock(HeldPickupHandler handler) | Finds allowed pickups within dockingRange of the pouch, runs the skill and docks them into the pouch. |
private IEnumerator DockDelay(HeldPickupHandler handler) (iterator) | Coroutine: waits dockDelay, then docks if the skill is still unlocked; otherwise turns the effect off. |
private IEnumerable<MeshRenderer> GetPouchRenderers(NetworkEntity pouchEntity) | Pouch renderers, without those of the item docked in it, for the skill effect. |