mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-01 01:41:36 +00:00
Add non-carriable lights to nearby.items
This commit is contained in:
parent
e96864a79c
commit
95bce836ee
5 changed files with 22 additions and 8 deletions
|
@ -112,7 +112,7 @@ namespace MWLua
|
|||
{
|
||||
auto* lua = context.mLua;
|
||||
sol::table api(lua->sol(), sol::create);
|
||||
api["API_REVISION"] = 41;
|
||||
api["API_REVISION"] = 42;
|
||||
api["quit"] = [lua]() {
|
||||
Log(Debug::Warning) << "Quit requested by a Lua script.\n" << lua->debugTraceback();
|
||||
MWBase::Environment::get().getStateManager()->requestQuit();
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#include <sol/sol.hpp>
|
||||
|
||||
#include "../../mwworld/class.hpp"
|
||||
|
||||
#include "types.hpp"
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace MWLua
|
|||
return &mDoorsInScene;
|
||||
if (typeid(cls) == typeid(MWClass::Container))
|
||||
return &mContainersInScene;
|
||||
if (cls.isItem(ptr))
|
||||
if (cls.isItem(ptr) || ptr.mRef->getType() == ESM::REC_LIGH)
|
||||
return &mItemsInScene;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
-- @field [parent=#nearby] openmw.core#ObjectList doors
|
||||
|
||||
---
|
||||
-- Everything that can be picked up in the nearby.
|
||||
-- Everything in the nearby that is derived from @{openmw.types#Item}.
|
||||
-- @field [parent=#nearby] openmw.core#ObjectList items
|
||||
|
||||
---
|
||||
|
|
|
@ -592,10 +592,11 @@
|
|||
-- @field #SkillStats skills
|
||||
|
||||
|
||||
--- @{#Item} functions (all pickable items that can be placed to an inventory or container)
|
||||
--------------------------------------------------------------------------------
|
||||
-- @{#Item} functions (all items that can be placed to an inventory or container)
|
||||
-- @field [parent=#types] #Item Item
|
||||
|
||||
--- Functions for pickable items that can be placed to an inventory or container
|
||||
--- Functions for items that can be placed to an inventory or container
|
||||
-- @type Item
|
||||
|
||||
---
|
||||
|
@ -607,16 +608,26 @@
|
|||
---
|
||||
-- Get this item's current enchantment charge.
|
||||
-- @function [parent=#Item] getEnchantmentCharge
|
||||
-- @param #Item item
|
||||
-- @param openmw.core#GameObject item
|
||||
-- @return #number The charge remaining. -1 if the enchantment has never been used, implying the charge is full. Unenchanted items will always return a value of -1.
|
||||
|
||||
---
|
||||
-- Set this item's enchantment charge.
|
||||
-- @function [parent=#Item] setEnchantmentCharge
|
||||
-- @param #Item item
|
||||
-- @param openmw.core#GameObject item
|
||||
-- @param #number charge
|
||||
|
||||
--- @{#Creature} functions
|
||||
---
|
||||
-- Whether the object is supposed to be carriable. It is true for all items except
|
||||
-- lights without the Carry flag. Non-carriable lights can still be put into
|
||||
-- an inventory with an explicit `object:moveInto` call.
|
||||
-- @function [parent=#Item] isCarriable
|
||||
-- @param openmw.core#GameObject object
|
||||
-- @return #boolean
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- @{#Creature} functions
|
||||
-- @field [parent=#types] #Creature Creature
|
||||
|
||||
---
|
||||
|
|
Loading…
Reference in a new issue