Container

Part of openmw.types

Usage:

local Container = require('openmw.types').Container

Type types

types.Container

#Container functions

Type Container

Container.baseType

#Lockable

Container.capacity(object)

Returns the capacity of a container

Container.content(object)

Container content.

Container.encumbrance(object)

Returns the total weight of everything in a container

Container.objectIsInstance(object)

Whether the object is a Container.

Container.record(objectOrRecordId)

Returns the read-only #ContainerRecord of a container

Container.records

A read-only list of all #ContainerRecords in the world database.

Type ContainerRecord

ContainerRecord.id

Record id

ContainerRecord.model

VFS path to the model

ContainerRecord.mwscript

MWScript on this container (can be empty)

ContainerRecord.name

Human-readable name

ContainerRecord.weight

capacity of this container

Type types

Field(s)

#Container types.Container

#Container functions

Type Container

Extends #Lockable

Field(s)

#Lockable Container.baseType

#Lockable

Container.capacity(object)

Returns the capacity of a container

Parameter

Return value

#number:

Container.content(object)

Container content.

Parameter

Return value

openmw.core#Inventory:

Container.encumbrance(object)

Returns the total weight of everything in a container

Parameter

Return value

#number:

Container.objectIsInstance(object)

Whether the object is a Container.

Parameter

Return value

#boolean:

Container.record(objectOrRecordId)

Returns the read-only #ContainerRecord of a container

Parameter

  • #any objectOrRecordId :

Return value

#ContainerRecord:

#list<#ContainerRecord> Container.records

A read-only list of all #ContainerRecords in the world database.

Type ContainerRecord

Field(s)

#string ContainerRecord.id

Record id

#string ContainerRecord.model

VFS path to the model

#string ContainerRecord.mwscript

MWScript on this container (can be empty)

#string ContainerRecord.name

Human-readable name

#number ContainerRecord.weight

capacity of this container

Type Lockable