mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Added lua enum for attacktypes
This commit is contained in:
parent
70c822d036
commit
7d659ae64c
@ -63,6 +63,8 @@ namespace MWLua
|
||||
selfAPI["controls"] = sol::readonly_property([](SelfObject& self) { return &self.mControls; });
|
||||
selfAPI["isActive"] = [](SelfObject& self) { return &self.mIsActive; };
|
||||
selfAPI["enableAI"] = [](SelfObject& self, bool v) { self.mControls.mDisableAI = !v; };
|
||||
selfAPI["attackType"] = LuaUtil::makeStrictReadOnly(context.mLua->tableFromPairs<std::string_view, int>(
|
||||
{ { "NoAttack", 0 }, { "Chop", 1 }, { "Slash", 2 }, { "Thrust", 3 } }));
|
||||
|
||||
using AiPackage = MWMechanics::AiPackage;
|
||||
sol::usertype<AiPackage> aiPackage = context.mLua->sol().new_usertype<AiPackage>("AiPackage");
|
||||
|
@ -45,7 +45,6 @@ namespace MWMechanics
|
||||
, mSideMovementAngle(0)
|
||||
, mLevel(0)
|
||||
, mAttackingOrSpell(false)
|
||||
, mAttackType("")
|
||||
{
|
||||
for (const ESM::Attribute& attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user