mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 08:37:12 +00:00
Add baseCount
This commit is contained in:
parent
518aa5c6ae
commit
84987450ee
@ -214,6 +214,8 @@ namespace MWLua
|
||||
const ObjectT& o) mutable { return types[getLiveCellRefType(o.ptr().mRef)]; });
|
||||
|
||||
objectT["count"] = sol::readonly_property([](const ObjectT& o) { return o.ptr().getRefData().getCount(); });
|
||||
objectT["baseCount"]
|
||||
= sol::readonly_property([](const ObjectT& o) { return o.ptr().getRefData().getCount(false); });
|
||||
objectT[sol::meta_function::equal_to] = [](const ObjectT& a, const ObjectT& b) { return a.id() == b.id(); };
|
||||
objectT[sol::meta_function::to_string] = &ObjectT::toString;
|
||||
objectT["sendEvent"] = [context](const ObjectT& dest, std::string eventName, const sol::object& eventData) {
|
||||
|
@ -161,6 +161,7 @@
|
||||
-- @field #Cell cell The cell where the object currently is. During loading a game and for objects in an inventory or a container `cell` is nil.
|
||||
-- @field #any type Type of the object (one of the tables from the package @{openmw.types#types}).
|
||||
-- @field #number count Count (>1 means a stack of objects).
|
||||
-- @field #number baseCount Base Count (<1 means a restocking item).
|
||||
-- @field #string recordId Returns record ID of the object in lowercase.
|
||||
|
||||
---
|
||||
|
Loading…
x
Reference in New Issue
Block a user