Struct ContainerTemplateMixin
Namespace: OblivionMp.Sdk.Common.Archetypes.Mixins
Assembly: OblivionMp.Sdk.Common.dll
A container's record from the game files, which its contents are rolled from.
[ArchetypeMixin]
public readonly struct ContainerTemplateMixin : IArchetypeMixin, IArchetypeQueryable, IEntityShape
Implements
IArchetypeMixin, IArchetypeQueryable, IEntityShape
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
BarterGold
The gold the merchant has for bartering.
public int BarterGold { get; set; }
Property Value
IsOwnedByMerchant
Whether the container holds a merchant's stock.
public bool IsOwnedByMerchant { get; set; }
Property Value
IsRollPending
Whether the container waits to be refilled from this record.
public bool IsRollPending { get; set; }
Property Value
ItemsCount
public int ItemsCount { get; }
Property Value
MerchantRefId
The ref id of the merchant who sells from this container, or 0.
public uint MerchantRefId { get; set; }
Property Value
Respawns
Whether the game refills the container when its cell respawns.
public bool Respawns { get; set; }
Property Value
Methods
AddItems(in BaseContainerItem)
[Changes("ContainerTemplateMixin.Field.Items")]
public void AddItems(in BaseContainerItem value)
Parameters
value BaseContainerItem
ClearItems()
[Changes("ContainerTemplateMixin.Field.Items")]
public void ClearItems()
ContainsItems(in BaseContainerItem)
public bool ContainsItems(in BaseContainerItem value)
Parameters
value BaseContainerItem
Returns
GetItems()
public NativeList<BaseContainerItem>.ReadOnly GetItems()
Returns
NativeList<BaseContainerItem>.ReadOnly
GetItems(int)
public BaseContainerItem GetItems(int index)
Parameters
index int
Returns
BaseContainerItem
InsertItems(int, in BaseContainerItem)
[Changes("ContainerTemplateMixin.Field.Items")]
public void InsertItems(int index, in BaseContainerItem value)
Parameters
index int
value BaseContainerItem
Keep()
This entity, which it already is: a loop over this shape hands over the shape itself.
public ContainerTemplateMixin Keep()
Returns
Remarks
Here so taking something out of a loop reads the same whichever way the loop walks. Whether a shape is walked by chunk follows from what it includes, which the call site cannot see and which changes when an include does.
RemoveAtItems(int)
[Changes("ContainerTemplateMixin.Field.Items")]
public BaseContainerItem RemoveAtItems(int index)
Parameters
index int
Returns
BaseContainerItem
SetItems(in NativeList<BaseContainerItem>)
[Changes("ContainerTemplateMixin.Field.Items")]
public void SetItems(in NativeList<BaseContainerItem> value)
Parameters
value NativeList<BaseContainerItem>
SetItems(int, in BaseContainerItem)
[Changes("ContainerTemplateMixin.Field.Items")]
public void SetItems(int index, in BaseContainerItem value)
Parameters
index int
value BaseContainerItem