1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-20 15:41:32 +00:00

isactive return bool now

This commit is contained in:
Kuyondo 2025-05-07 11:24:09 +08:00
parent 55107e0913
commit 77bd2250b0

View file

@ -64,7 +64,7 @@ namespace MWLua
= [](SelfObject& self) { return "openmw.self[" + self.toString() + "]"; };
selfAPI["object"] = sol::readonly_property([](SelfObject& self) -> LObject { return LObject(self); });
selfAPI["controls"] = sol::readonly_property([](SelfObject& self) { return &self.mControls; });
selfAPI["isActive"] = [](SelfObject& self) { return &self.mIsActive; };
selfAPI["isActive"] = [](SelfObject& self) -> bool { return self.mIsActive; };
selfAPI["enableAI"] = [](SelfObject& self, bool v) { self.mControls.mDisableAI = !v; };
selfAPI["ATTACK_TYPE"]
= LuaUtil::makeStrictReadOnly(LuaUtil::tableFromPairs<std::string_view, MWMechanics::AttackType>(lua,