Limen Framework 0.1 Help

FLimenReplicatedInventoryItemRegistry

Overview

FLimenReplicatedInventoryItemRegistry is a struct used to store and manage items in a replicated inventory. It includes properties for the item class and instance, as well as callbacks for replication events such as adding, removing, and changing items.

Properties

Type

Name

Access

Description

TSoftClassPtr

ItemClass

Public

The class of the item.

TWeakObjectPtr

ItemInstance

Public

A weak pointer to the instance of the item.

Functions

Return Type

Signature

Description

void

PreReplicatedRemove(const FLimenReplicatedInventoryItemRegistryArray& InArraySerializer)

Called right before deleting an element during replication. Asynchronously handles item retrieval if not on the authority server.

void

PostReplicatedAdd(const FLimenReplicatedInventoryItemRegistryArray& InArraySerializer)

Called after adding and serializing a new element. Asynchronously adds the item to the inventory if not on the authority server.

void

PostReplicatedChange(const FLimenReplicatedInventoryItemRegistryArray& InArraySerializer)

Called after updating an existing element with new data. Asynchronously updates the item in the inventory if not on the authority server.

FString

GetDebugString()

Returns a debug string for logging purposes.

FLimenReplicatedInventoryItemRegistryArray

Overview

FLimenReplicatedInventoryItemRegistryArray is a struct that extends FFastArraySerializer to manage an array of item registries. It includes callbacks for replication events such as adding, removing, and changing items.

Properties

Type

Name

Access

Description

TArray

Items

Public

The array of item registries.

TWeakObjectPtr< ULimenInventoryComponent >

Owner

Public

A weak pointer to the owner component.

Functions

Return Type

Signature

Description

bool

NetDeltaSerialize(FNetDeltaSerializeInfo & DeltaParms)

Serializes changes to the array during replication.

void

PreReplicatedRemove(const TArrayView

& RemovedIndices, int32 FinalSize)

Called before removing elements and after the elements themselves are notified. Asynchronously handles slot removals on the game thread.

void

PostReplicatedAdd(const TArrayView

& AddedIndices, int32 FinalSize)

Called after adding all new elements and after the elements themselves are notified. Asynchronously handles slot additions on the game thread.

void

PostReplicatedChange(const TArrayView

& ChangedIndices, int32 FinalSize)

Called after updating all existing elements with new data and after the elements themselves are notified. Asynchronously handles slot item updates on the game thread.

FLimenReplicatedInventorySlot

Overview

FLimenReplicatedInventorySlot is a struct used to store and manage slots in a replicated inventory. It includes properties for the slot name and item, as well as callbacks for replication events such as adding, removing, and changing items.

Properties

Type

Name

Access

Description

FName

SlotName

Public

The name of the slot.

TScriptInterface< ILimenSlotInventoryItem >

Item

Public

A script interface for the item in the slot.

Functions

Return Type

Signature

Description

void

PreReplicatedRemove(const FLimenReplicatedInventorySlotsArray& InArraySerializer)

Called right before deleting an element during replication.

void

PostReplicatedAdd(const FLimenReplicatedInventorySlotsArray& InArraySerializer)

Called after adding and serializing a new element.

void

PostReplicatedChange(const FLimenReplicatedInventorySlotsArray& InArraySerializer)

Called after updating an existing element with new data.

FString

GetDebugString()

Returns a debug string for logging purposes.

bool

operator==(const FName& InSlotName) const

Equality operator comparing the slot name.

bool

operator==(const FLimenReplicatedInventorySlot& Other) const

Equality operator comparing the slot name and item.

bool

operator==(const TScriptInterface< ILimenSlotInventoryItem >& InItem) const

Equality operator comparing the item in the slot.

Usage & Implementation Notes

  • The PreReplicatedRemove, PostReplicatedAdd, and PostReplicatedChange functions are designed to handle replication events asynchronously on the game thread.

  • These structs are used within components like ULimenInventoryComponent and ULimenSlotInventoryComponent to manage inventory data across networked sessions.

22 May 2026