Class SkillCatalog
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
One shared, read-only instance per skill type — the skill's definition, kept alive so that consumers (loot generator, drop tables, UI, save, character creation) can read a skill's metadata without a prefab and without allocating anything per query.
Three layers, deliberately separate: • this catalog — one prototype per type, design values only, never mutated (User is null) • AssetLibrary — the actual Unity assets, cached by address; a prototype only holds addresses • per character — a real instance created when the skill is learned, holding Level/CooldownTimer/…
Building it is cheap: a POCO is a few dozen bytes, not a GameObject.
public static class SkillCatalog
- Inheritance
-
objectSkillCatalog
Properties
- All
Every prototype, in a stable (name-sorted) order.
Methods
- Collect(Func<Skill, bool>, List<Skill>)
Prototypes matching a predicate, e.g. a drop table looking for a rarity band.
- CollectLearnable(List<Skill>)
Prototypes worth showing in the skill list — the replacement for the skill entries that used to come from the prefab scan.
- Get(string)
The prototype for a skill referenced by type name, full type name, or an old prefab/asset address.
- Get(Type)
The prototype for a skill type, or null when the type is not a skill.
- Invalidate()
Drops every prototype (called when content reloads, so patched values are picked up).