Skip to content

Class

BoundedIdSet

Generated GDScript class reference for ItemVault.BoundedIdSet.

Status
Current
Version
v1.1
Source updated
2026-09-12
Generated on
2026-10-30

Insertion-ordered set of string keys with a hard capacity bound. Backs the two idempotency ledgers in ItemVault (retained-resource correlation ids in GdscriptInventoryBackend, craft request ids in CraftingService). Both need the same guarantee: a caller can retry a previously-successful operation and must still be recognized as a duplicate, but the bookkeeping must not grow without bound. When the bound is reached the OLDEST key is evicted (FIFO), so the most recent capacity keys are always retained. The previous behavior in both consumers was to clear the entire map, which silently made every tracked id replayable at once and discarded far more history than necessary (#300).

Source: addons/item_vault/backend/bounded_id_set.gd

Syntax

class BoundedIdSet extends RefCounted

Members

NameKindSummary
capacityPropertyMaximum number of keys retained. Oldest-first eviction at the bound.
hasMethod
addMethod
removeMethod
clearMethod
sizeMethod
keysMethod