diff --git a/apps/openmw-mp/Script/LuaState.cpp b/apps/openmw-mp/Script/LuaState.cpp index 003374804..09d2472db 100644 --- a/apps/openmw-mp/Script/LuaState.cpp +++ b/apps/openmw-mp/Script/LuaState.cpp @@ -87,43 +87,43 @@ LuaState::LuaState() sol::table Constants = lua->create_named_table("Constants"); - Constants.set_function("GetAttributeCount", []() { + Constants.set_function("getAttributeCount", []() { return ESM::Attribute::Length; }); - Constants.set_function("GetSkillCount", []() { + Constants.set_function("getSkillCount", []() { 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++) if (Misc::StringUtils::ciEqual(name, ESM::Attribute::sAttributeNames[x])) return x; 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++) if (Misc::StringUtils::ciEqual(name, ESM::Skill::sSkillNames[x])) return x; 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) return "invalid"; 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) return "invalid"; return ESM::Skill::sSkillNames[skill]; }); - Constants.set_function("GetEquipmentSize", []() { + Constants.set_function("getEquipmentSize", []() { return MWWorld::InventoryStore::Slots; }); diff --git a/apps/openmw-mp/Settings.cpp b/apps/openmw-mp/Settings.cpp index c10f3d2a4..4716acead 100644 --- a/apps/openmw-mp/Settings.cpp +++ b/apps/openmw-mp/Settings.cpp @@ -12,8 +12,8 @@ void GameSettings::Init(LuaState &lua) { lua.getState()->new_usertype("Settings", - "SetConsoleAllow", &GameSettings::SetConsoleAllow, - "SetDifficulty", &GameSettings::SetDifficulty + "setConsoleAllow", &GameSettings::SetConsoleAllow, + "setDifficulty", &GameSettings::SetDifficulty ); }