CategoryRef
public sealed class CategoryRefNamespace Clipwise.Api
Fluent handle to a declared category. Every Item call lands in it, so the source and category key are stated once.
Properties
Section titled “Properties”Source
Section titled “Source”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.
Methods
Section titled “Methods”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 | |
|---|---|
id | This mod’s own key for the entry, e.g. “headband”. |
itemId | The game’s ItemDefinition.ID, e.g. “b2s_headband_seed”. |
tags | Namespaced filter tags, e.g. new[] { "doodesch.breedtoseed:tier/1" }. |
sortOrder | Position inside the category, lower first. |
sortKey | Text that orders entries inside the category, e.g. “Headband”. Null uses the display name. |
description | Tooltip text. Null shows none. |
precedence | Higher wins when several sources claim the same item; default 0. |
Returns This handle, for chaining.