From e4b2f730c76c119a1c5a086ba255c44395bc20a5 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 31 May 2022 13:12:40 +0000 Subject: [PATCH] Make inventory example runnable in a script --- files/lua_api/openmw/core.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/files/lua_api/openmw/core.lua b/files/lua_api/openmw/core.lua index 659a17beb1..24bddabd6d 100644 --- a/files/lua_api/openmw/core.lua +++ b/files/lua_api/openmw/core.lua @@ -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