Potion
Part of openmw.types
Usage:
local Potion = require('openmw.types').Potion
Type types
| types.Potion |
#Potion functions |
Type Potion
| Potion.baseType | |
| Potion.createRecordDraft(potion) |
Creates a #PotionRecord without adding it to the world database. |
| Potion.objectIsInstance(object) |
Whether the object is a Potion. |
| Potion.record(objectOrRecordId) |
Returns the read-only #PotionRecord of a potion |
| Potion.records |
A read-only list of all #PotionRecords in the world database. |
Type PotionRecord
| PotionRecord.effects |
The effects (openmw.core#MagicEffectWithParams) of the potion |
| PotionRecord.icon |
VFS path to the icon |
| PotionRecord.id |
Record id |
| PotionRecord.model |
VFS path to the model |
| PotionRecord.mwscript |
MWScript on this potion (can be empty) |
| PotionRecord.name |
Human-readable name |
| PotionRecord.value | |
| PotionRecord.weight |
Type types
Field(s)
- #Potion types.Potion
-
#Potion functions
Type Item
Type Potion
Extends #Item
Potion functions
Field(s)
- Potion.createRecordDraft(potion)
-
Creates a #PotionRecord without adding it to the world database.
Use openmw_world#world.createRecord to add the record to the world.
Parameter
-
#PotionRecord potion: A Lua table with the fields of a PotionRecord.
Return value
#PotionRecord: A strongly typed Potion record.
-
- Potion.objectIsInstance(object)
-
Whether the object is a Potion.
Parameter
-
openmw.core#GameObject object:
Return value
#boolean:
-
- Potion.record(objectOrRecordId)
-
Returns the read-only #PotionRecord of a potion
Parameter
-
#any objectOrRecordId:
Return value
-
- #list<#PotionRecord> Potion.records
-
A read-only list of all #PotionRecords in the world database.
Type PotionRecord
Field(s)
- #list<openmw.core#MagicEffectWithParams> PotionRecord.effects
-
The effects (openmw.core#MagicEffectWithParams) of the potion
- #string PotionRecord.icon
-
VFS path to the icon
- #string PotionRecord.id
-
Record id
- #string PotionRecord.model
-
VFS path to the model
- #string PotionRecord.mwscript
-
MWScript on this potion (can be empty)
- #string PotionRecord.name
-
Human-readable name
- #number PotionRecord.value
- #number PotionRecord.weight