Skip to content

CategoryRef

public sealed class CategoryRef

Namespace Clipwise.Api

Fluent handle to a declared category. Every Item call lands in it, so the source and category key are stated once.

public string Source { get; }

The registering mod’s reverse-DNS id.

Value E.g. “doodesch.breedtoseed”. Empty when null was passed.

public string Id { get; }

The category’s id within Source.

Value E.g. “bred”. Empty when null was passed.

public string Key { get; }

The canonical "source:id" key this category is addressed by.

Value E.g. “doodesch.breedtoseed:bred”. Pass it as the category of Clipboard.RegisterItem.

public CategoryRef Item(
string id,
string itemId,
string[] tags = null,
int sortOrder = 0,
string sortKey = null,
string description = null,
int precedence = 0)

Place an item in this category. See Clipboard.RegisterItem for the parameters.

Parameter
idThis mod’s own key for the entry, e.g. “headband”.
itemIdThe game’s ItemDefinition.ID, e.g. “b2s_headband_seed”.
tagsNamespaced filter tags, e.g. new[] { "doodesch.breedtoseed:tier/1" }.
sortOrderPosition inside the category, lower first.
sortKeyText that orders entries inside the category, e.g. “Headband”. Null uses the display name.
descriptionTooltip text. Null shows none.
precedenceHigher wins when several sources claim the same item; default 0.

Returns This handle, for chaining.