mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 22:14:42 +00:00
Merge branch 'lua_restock' into 'master'
Add isRestocking to types.Item See merge request OpenMW/openmw!3383
This commit is contained in:
commit
a0d3313d8d
@ -12,5 +12,7 @@ namespace MWLua
|
|||||||
= [](const Object& object) { return object.ptr().getCellRef().getEnchantmentCharge(); };
|
= [](const Object& object) { return object.ptr().getCellRef().getEnchantmentCharge(); };
|
||||||
item["setEnchantmentCharge"]
|
item["setEnchantmentCharge"]
|
||||||
= [](const GObject& object, float charge) { object.ptr().getCellRef().setEnchantmentCharge(charge); };
|
= [](const GObject& object, float charge) { object.ptr().getCellRef().setEnchantmentCharge(charge); };
|
||||||
|
item["isRestocking"]
|
||||||
|
= [](const Object& object) -> bool { return object.ptr().getRefData().getCount(false) < 0; };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -632,6 +632,13 @@
|
|||||||
-- @param openmw.core#GameObject 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.
|
-- @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.
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Checks if the item restocks.
|
||||||
|
-- Returns true if the object restocks, and false otherwise.
|
||||||
|
-- @function [parent=#Item] isRestocking
|
||||||
|
-- @param openmw.core#GameObject item
|
||||||
|
-- @return #boolean
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Set this item's enchantment charge.
|
-- Set this item's enchantment charge.
|
||||||
-- @function [parent=#Item] setEnchantmentCharge
|
-- @function [parent=#Item] setEnchantmentCharge
|
||||||
|
Loading…
x
Reference in New Issue
Block a user