mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 08:42:23 +00:00
Formatting fixes
This commit is contained in:
parent
dbd7d34120
commit
e54eba7043
@ -1,19 +1,15 @@
|
|||||||
#include "classbindings.hpp"
|
|
||||||
#include "stats.hpp"
|
|
||||||
#include "types/types.hpp"
|
|
||||||
#include <components/esm3/loadclas.hpp>
|
#include <components/esm3/loadclas.hpp>
|
||||||
#include <components/lua/luastate.hpp>
|
#include <components/lua/luastate.hpp>
|
||||||
|
|
||||||
|
#include "classbindings.hpp"
|
||||||
|
#include "luamanagerimp.hpp"
|
||||||
|
#include "stats.hpp"
|
||||||
|
#include "types/types.hpp"
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "luamanagerimp.hpp"
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace sol
|
namespace sol
|
||||||
{
|
{
|
||||||
template <>
|
template <>
|
||||||
@ -45,37 +41,31 @@ namespace MWLua
|
|||||||
classT["majorSkills"] = sol::readonly_property([lua](const ESM::Class& rec) -> sol::table {
|
classT["majorSkills"] = sol::readonly_property([lua](const ESM::Class& rec) -> sol::table {
|
||||||
sol::table res(lua, sol::create);
|
sol::table res(lua, sol::create);
|
||||||
auto skills = rec.mData.mSkills;
|
auto skills = rec.mData.mSkills;
|
||||||
|
|
||||||
for (size_t i = 0; i < skills.size(); ++i)
|
for (size_t i = 0; i < skills.size(); ++i)
|
||||||
{
|
{
|
||||||
ESM::RefId skillId = ESM::Skill::indexToRefId(skills[i][1]);
|
ESM::RefId skillId = ESM::Skill::indexToRefId(skills[i][1]);
|
||||||
res[i + 1] = skillId.serializeText();
|
res[i + 1] = skillId.serializeText();
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
classT["attributes"] = sol::readonly_property([lua](const ESM::Class& rec) -> sol::table {
|
classT["attributes"] = sol::readonly_property([lua](const ESM::Class& rec) -> sol::table {
|
||||||
sol::table res(lua, sol::create);
|
sol::table res(lua, sol::create);
|
||||||
auto attribute = rec.mData.mAttribute;
|
auto attribute = rec.mData.mAttribute;
|
||||||
|
|
||||||
for (size_t i = 0; i < attribute.size(); ++i)
|
for (size_t i = 0; i < attribute.size(); ++i)
|
||||||
{
|
{
|
||||||
ESM::RefId attributeId = ESM::Attribute::indexToRefId(attribute[i]);
|
ESM::RefId attributeId = ESM::Attribute::indexToRefId(attribute[i]);
|
||||||
res[i + 1] = attributeId.serializeText();
|
res[i + 1] = attributeId.serializeText();
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
classT["minorSkills"] = sol::readonly_property([lua](const ESM::Class& rec) -> sol::table {
|
classT["minorSkills"] = sol::readonly_property([lua](const ESM::Class& rec) -> sol::table {
|
||||||
sol::table res(lua, sol::create);
|
sol::table res(lua, sol::create);
|
||||||
auto skills = rec.mData.mSkills;
|
auto skills = rec.mData.mSkills;
|
||||||
|
|
||||||
for (size_t i = 0; i < skills.size(); ++i)
|
for (size_t i = 0; i < skills.size(); ++i)
|
||||||
{
|
{
|
||||||
ESM::RefId skillId = ESM::Skill::indexToRefId(skills[i][0]);
|
ESM::RefId skillId = ESM::Skill::indexToRefId(skills[i][0]);
|
||||||
res[i + 1] = skillId.serializeText();
|
res[i + 1] = skillId.serializeText();
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
classT["specialization"] = sol::readonly_property(
|
classT["specialization"] = sol::readonly_property(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user