From 92242a3d5420dd08e2900921d704d625ccce0cc5 Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Sun, 18 Feb 2024 13:20:58 -0600 Subject: [PATCH] Simplify --- apps/openmw/mwlua/types/item.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/openmw/mwlua/types/item.cpp b/apps/openmw/mwlua/types/item.cpp index ff05c3f232..7d6a5975e2 100644 --- a/apps/openmw/mwlua/types/item.cpp +++ b/apps/openmw/mwlua/types/item.cpp @@ -25,14 +25,7 @@ namespace MWLua item["isRestocking"] = [](const Object& object) -> bool { return object.ptr().getCellRef().getCount(false) < 0; }; - item["isCarriable"] = [](const Object& object) -> bool { - if (object.ptr().getClass().isItem(object.ptr())) - { - return true; - } - return object.ptr().mRef->getType() == ESM::REC_LIGH - && (object.ptr().get()->mBase->mData.mFlags & ESM::Light::Carry) != 0; - }; + item["isCarriable"] = [](const Object& object) -> bool { return object.ptr().getClass().isItem(object.ptr()); }; addItemDataBindings(item, context); }