mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 15:40:42 +00:00
Simplify
This commit is contained in:
parent
731095831d
commit
92242a3d54
@ -25,14 +25,7 @@ namespace MWLua
|
|||||||
item["isRestocking"]
|
item["isRestocking"]
|
||||||
= [](const Object& object) -> bool { return object.ptr().getCellRef().getCount(false) < 0; };
|
= [](const Object& object) -> bool { return object.ptr().getCellRef().getCount(false) < 0; };
|
||||||
|
|
||||||
item["isCarriable"] = [](const Object& object) -> bool {
|
item["isCarriable"] = [](const Object& object) -> bool { return object.ptr().getClass().isItem(object.ptr()); };
|
||||||
if (object.ptr().getClass().isItem(object.ptr()))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return object.ptr().mRef->getType() == ESM::REC_LIGH
|
|
||||||
&& (object.ptr().get<ESM::Light>()->mBase->mData.mFlags & ESM::Light::Carry) != 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
addItemDataBindings(item, context);
|
addItemDataBindings(item, context);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user