mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-04 09:21:35 +00:00
[Server] Use lower case for methods
This commit is contained in:
parent
7717f9bece
commit
60fc0bedb8
2 changed files with 9 additions and 9 deletions
|
@ -87,43 +87,43 @@ LuaState::LuaState()
|
||||||
|
|
||||||
sol::table Constants = lua->create_named_table("Constants");
|
sol::table Constants = lua->create_named_table("Constants");
|
||||||
|
|
||||||
Constants.set_function("GetAttributeCount", []() {
|
Constants.set_function("getAttributeCount", []() {
|
||||||
return ESM::Attribute::Length;
|
return ESM::Attribute::Length;
|
||||||
});
|
});
|
||||||
|
|
||||||
Constants.set_function("GetSkillCount", []() {
|
Constants.set_function("getSkillCount", []() {
|
||||||
return ESM::Skill::Length;
|
return ESM::Skill::Length;
|
||||||
});
|
});
|
||||||
|
|
||||||
Constants.set_function("GetAttributeId", [](const string &name) {
|
Constants.set_function("getAttributeId", [](const string &name) {
|
||||||
for (int x = 0; x < ESM::Attribute::Length; x++)
|
for (int x = 0; x < ESM::Attribute::Length; x++)
|
||||||
if (Misc::StringUtils::ciEqual(name, ESM::Attribute::sAttributeNames[x]))
|
if (Misc::StringUtils::ciEqual(name, ESM::Attribute::sAttributeNames[x]))
|
||||||
return x;
|
return x;
|
||||||
return -1;
|
return -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
Constants.set_function("GetSkillId", [](const string &name) {
|
Constants.set_function("getSkillId", [](const string &name) {
|
||||||
for (int x = 0; x < ESM::Skill::Length; x++)
|
for (int x = 0; x < ESM::Skill::Length; x++)
|
||||||
if (Misc::StringUtils::ciEqual(name, ESM::Skill::sSkillNames[x]))
|
if (Misc::StringUtils::ciEqual(name, ESM::Skill::sSkillNames[x]))
|
||||||
return x;
|
return x;
|
||||||
return -1;
|
return -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
Constants.set_function("GetAttributeName", [](unsigned short attribute) -> const string {
|
Constants.set_function("getAttributeName", [](unsigned short attribute) -> const string {
|
||||||
if (attribute >= ESM::Attribute::Length)
|
if (attribute >= ESM::Attribute::Length)
|
||||||
return "invalid";
|
return "invalid";
|
||||||
|
|
||||||
return ESM::Attribute::sAttributeNames[attribute];
|
return ESM::Attribute::sAttributeNames[attribute];
|
||||||
});
|
});
|
||||||
|
|
||||||
Constants.set_function("GetSkillName", [](unsigned short skill) -> const string {
|
Constants.set_function("getSkillName", [](unsigned short skill) -> const string {
|
||||||
if (skill >= ESM::Skill::Length)
|
if (skill >= ESM::Skill::Length)
|
||||||
return "invalid";
|
return "invalid";
|
||||||
|
|
||||||
return ESM::Skill::sSkillNames[skill];
|
return ESM::Skill::sSkillNames[skill];
|
||||||
});
|
});
|
||||||
|
|
||||||
Constants.set_function("GetEquipmentSize", []() {
|
Constants.set_function("getEquipmentSize", []() {
|
||||||
return MWWorld::InventoryStore::Slots;
|
return MWWorld::InventoryStore::Slots;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
void GameSettings::Init(LuaState &lua)
|
void GameSettings::Init(LuaState &lua)
|
||||||
{
|
{
|
||||||
lua.getState()->new_usertype<GameSettings>("Settings",
|
lua.getState()->new_usertype<GameSettings>("Settings",
|
||||||
"SetConsoleAllow", &GameSettings::SetConsoleAllow,
|
"setConsoleAllow", &GameSettings::SetConsoleAllow,
|
||||||
"SetDifficulty", &GameSettings::SetDifficulty
|
"setDifficulty", &GameSettings::SetDifficulty
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue