Vixen
c7401864
csharp
public interface IDefinitionRegistry

Where a rule resolves a DefId, and what a live content update swaps.

Read the guide page for this →

Remarks

An interface rather than the class, because the realm, the editor's preview and a test each hand systems a different one, and because a game that wants its own resolution — an overlay, a per-shard override, a recording proxy — should not have to subclass the shipped one.

Fields and properties (2)

Methods (2)

  • bool TryGet<TDefinition>(DefId id, out TDefinition? definition) where TDefinition : Definition

    Finds a definition and checks it is the kind the caller expected.

  • TDefinition Get<TDefinition>(DefId id) where TDefinition : Definition

    Finds a definition, and refuses to carry on without it.

Used by (1)

  • DefinitionRegistryVixen.Gameplay