ProgressionSlot
A class in Root.Township, the global namespace.
One slot in a profession skill tree: a skill, its cost in points, and the slots it depends on. The tree's Validate fills in the hash and path.
- Listed in Global namespace: P
- Documented in Skills and unlocks
Constructors
| Member | What it is |
|---|---|
ProgressionSlot() | Creates a ProgressionSlot from skill. |
ProgressionSlot(ProfessionSkill skill) | Creates a ProgressionSlot from skill. |
Fields
9 private and internal fields
| Member | What it is |
|---|---|
private uint cost | Backing field for Cost: skill points needed to buy the slot. 1 by default. |
private List<uint> dependencies | Backing field for Dependencies: hashes of slots that must be owned first. |
private uint hash | Backing field for Hash. Made on validate from the skill's hash plus its dependencies' hashes (or a random number). |
private int indentLevel | Cached depth in the tree: one more than the deepest dependency. -1 until worked out. |
private List<ProgressionSlot> inheritSlots | Backing field for InheritSlots: slots that depend on this one. Not serialized; filled by AddInherit. |
private string name | Backing field for Name. Defaults to the skill's name. |
private Vector3 position | Backing field for Position, the slot's place in the skill tree layout. |
private ProfessionSkill skill | Backing field for Skill, the skill this slot grants. |
private Texture2D slotIcon | Backing field for SlotIcon. |
Properties
| Member | What it is |
|---|---|
uint Cost { get; } | Skill points needed to buy it. Default 1. |
List<uint> Dependencies { get; } | Hashes of the slots that must come first. |
uint Hash { get; } | Identifier saved with a player's progress. Made from the skill hash and its dependencies. |
IEnumerable<ProgressionSlot> InheritSlots { get; } | Slots that depend on this one. |
string Name { get; } | Display name. Defaults to the skill's name. |
ProgressionPath Path { get; set; } | The progression path (such as mining or forging) this slot belongs to. |
Vector3 Position { get; } | Position of the slot on the skill tree board. |
ProfessionSkill Skill { get; } | The skill this slot unlocks. |
Texture2D SlotIcon { get; } | Icon shown for the slot. |
Methods
| Member | What it is |
|---|---|
void AddInherit(ProfessionSkillTree tree) | Registers this slot as a follow-on of each slot it depends on. |
void ForceChange() | Nudges the hash by a random amount, giving the slot a new identity. |
int GetIndentLevel(ProfessionSkillTree skillTree) | Depth in the tree: one more than its deepest dependency. Cached. |
void Validate(ProfessionSkillTree skillTree) | Fills in a missing hash and name, sets the path from the tree and recalculates the indent level. |
Used in
Members of other types that take, return or hold a ProgressionSlot:
BoughtSkillOrbReplacer.InitializeSlot, BoughtSkillVisualizer.CallLockedByDependencyEffect, BoughtSkillVisualizer.GetOrbIndex, ISkillOrb.Slot, PathExperience.HasMultipleDependenciesUnlocked, PathExperience.IsSlotAvailable, PathExperience.LockSlot, PathExperience.RecursiveLockSlot, PathExperience.UnlockSlot, PlayerProgressionManager.GetSlots, PlayerProgressionManager.IsSlotAvailable, PlayerProgressionManager.IsSlotPracticed, PlayerProgressionManager.LockSlot, PlayerProgressionManager.UnlockSlot, ProfessionSkillTree.GetSlot, ProfessionSkillTree.slotMap, ProfessionSkillTree.slots, ProfessionSkillTree.Slots, ProgressionSlotContainer.InitializeSlot, ProgressionSlotContainer.Slot, SkillOrb.InitializeSlot, SkillOrb.Slot, SkillOrbEffect.SetSlot, SkillShrine.ApliedSlotTuple.ApliedSlotTuple, SkillShrine.ApliedSlotTuple.Slot.