Table of Contents

Class TitlePoolRegistry

Namespace
FishMMO.Shared.NameGeneration
Assembly
FishMMO.Shared.dll

The loaded TitlePoolTemplates and the per-race merge of a race's own titles and places with every pool that serves its category. Holds no data of its own: pools register as they load. Pools are kept in name order and merged race-first, so the merged list — and therefore every seeded title — is identical on every peer whatever the load order.

public static class TitlePoolRegistry
Inheritance
TitlePoolRegistry
Inherited Members

Properties

All

Every registered pool, in name order.

public static IReadOnlyList<TitlePoolTemplate> All { get; }

Property Value

IReadOnlyList<TitlePoolTemplate>

Count

public static int Count { get; }

Property Value

int

Methods

Clear()

public static void Clear()

Invalidate()

Drops every cached merge. Called whenever a race or pool registers or changes.

public static void Invalidate()

PlacesFor(RaceTemplate)

A race's own places followed by every serving pool's, de-duplicated.

public static string[] PlacesFor(RaceTemplate race)

Parameters

race RaceTemplate

Returns

string[]

PoolsFor(string)

Pools that serve a category, in name order.

public static List<TitlePoolTemplate> PoolsFor(string category)

Parameters

category string

Returns

List<TitlePoolTemplate>

Register(TitlePoolTemplate)

public static void Register(TitlePoolTemplate pool)

Parameters

pool TitlePoolTemplate

TitlesFor(RaceTemplate)

A race's own titles followed by those of every pool serving its category, each list de-duplicated case-insensitively. The race's own titles come first so its flavour is never lost to a pool; a race with no pools gets its own titles back unchanged. Trades are the one exception: a race with AllowGenericOccupations off takes none from a pool, so a slime is no more a pool's ferryman than the grammar's potter.

public static RaceTitles TitlesFor(RaceTemplate race)

Parameters

race RaceTemplate

Returns

RaceTitles

Unregister(TitlePoolTemplate)

public static void Unregister(TitlePoolTemplate pool)

Parameters

pool TitlePoolTemplate

Events

Changed

Raised when a pool registers or unregisters; merged results are rebuilt lazily.

public static event Action Changed

Event Type

Action