Container
Part of openmw.types
Usage:
local Container = require('openmw.types').Container
Type types
| types.Container |
#Container functions |
Type Container
| Container.baseType | |
| 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)
- Container.capacity(object)
-
Returns the capacity of a container
Parameter
-
openmw.core#GameObject object:
Return value
#number:
-
- Container.content(object)
-
Container content.
Parameter
-
openmw.core#GameObject object:
Return value
-
- Container.encumbrance(object)
-
Returns the total weight of everything in a container
Parameter
-
openmw.core#GameObject object:
Return value
#number:
-
- Container.objectIsInstance(object)
-
Whether the object is a Container.
Parameter
-
openmw.core#GameObject object:
Return value
#boolean:
-
- Container.record(objectOrRecordId)
-
Returns the read-only #ContainerRecord of a container
Parameter
-
#any objectOrRecordId:
Return value
-
- #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