Skip to content

[FEATURE] Add item-slot lock state and lifecycle events #295

Description

@ifBars

What would you like to see?

Extend S1API.Items.ItemSlotInstance with managed lock state and slot lifecycle events.

The initial API should expose:

  • IsLocked, IsAddLocked, and IsRemovalLocked;
  • a managed snapshot of the active lock reason without exposing its native FishNet owner;
  • locked and unlocked events;
  • item-instance, item-data, and filter-change events where those native callbacks are available.

Why would this help?

ItemSlotInstance currently exposes quantity, item, and quantity mutation, while the native slot has explicit lock states and callbacks used by stations, storage, employee tasks, and multiplayer ownership. Inventory UI and automation mods otherwise have to inspect ItemSlot, ItemSlotLock, and native delegates directly.

Extra Context (Optional)

Keep applying/removing network-owned locks and exposing native NetworkObject instances out of the first version. If authoritative lock mutation is needed later, it should use an S1API-owned handle with explicit lifecycle and ownership rules.

Validate event subscription cleanup, slot reuse, save reload, and host/client lock replication separately on Mono and IL2CPP.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    LowVery minor issue, non gameplay hindering, fix all high prio firstenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions