mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 15:06:39 +00:00
Merge branch 'change-inventory-usage-docs' into 'master'
Make inventory example runnable in a script See merge request OpenMW/openmw!1957
This commit is contained in:
commit
a875ac86c0
1 changed files with 5 additions and 3 deletions
|
@ -230,9 +230,11 @@
|
|||
-- @param type (optional) items type (see @{openmw.types#types})
|
||||
-- @return #ObjectList
|
||||
-- @usage
|
||||
-- local type = require('openmw.types')
|
||||
-- local all = inventory:getAll()
|
||||
-- local weapons = inventory:getAll(types.Weapon)
|
||||
-- local types = require('openmw.types')
|
||||
-- local self = require('openmw.self')
|
||||
-- local playerInventory = types.Actor.inventory(self.object)
|
||||
-- local all = playerInventory:getAll()
|
||||
-- local weapons = playerInventory:getAll(types.Weapon)
|
||||
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue