Skip to main content

ProfessionSkill.ActiveEffect

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Tracks the pooled tool glow effect on one entity and which profession skills currently want it. ProfessionSkill.RequestEffect and ReleaseEffect keep one per entity identifier in a static map.

Constructors​

MemberWhat it is
ActiveEffect(NetworkEntity entity)Creates a ProfessionSkill.ActiveEffect from entity.

Fields​

2 private and internal fields
MemberWhat it is
private NetworkEntity entityThe entity the effect belongs to.
private HashSet<ProfessionSkill> requestedSkillsThe skills currently asking for this effect. The effect is freed when this empties.

Properties​

MemberWhat it is
ToolBasedEffectBase PooledObject { get; private set; }The ToolBasedEffectBase taken from ProgressionSettings.ToolBasedEffect. Null once released.

Methods​

MemberWhat it is
void ForceRelease()Returns the pooled effect to its pool no matter how many skills still want it, and unhooks the destroy event.
bool Release(ProfessionSkill skill)Removes one skill's request. When none are left it returns the effect to the pool and returns true.
bool Request(ProfessionSkill skill)Adds a skill to the set wanting the effect. Returns false if that skill had already asked.
1 private and internal method
MemberWhat it is
private void DestroyRelease(NetworkEntity entity, bool isUnload)Runs when the entity is destroyed by the scene and force-releases its effect through ReleaseEffect.

Used in​

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