diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp index 75b588ce0..35d4042ee 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -566,6 +566,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) LUABIND_FUNC(isFullyPatched), LUABIND_FUNC(getSheetType), LUABIND_FUNC(getSheetShape), + LUABIND_FUNC(getCharacterSheetScale), LUABIND_FUNC(getSheetFamily), LUABIND_FUNC(getSheetName), LUABIND_FUNC(getFameIndex), @@ -3493,7 +3494,15 @@ std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet) return ""; } +// *************************************************************************** +float CLuaIHMRyzom::getCharacterSheetScale(const std::string &sheet) +{ + const CEntitySheet *sheetPtr = SheetMngr.get(CSheetId(sheet)); + const CCharacterSheet *charSheet = dynamic_cast(sheetPtr); + if (charSheet) return charSheet->Scale; + return 1; +} // *************************************************************************** std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet) diff --git a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h index f8db32363..d574efb68 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h @@ -205,6 +205,7 @@ private: static bool isFullyPatched(); static std::string getSheetType(const std::string &sheet); static std::string getSheetShape(const std::string &sheet); + static float getCharacterSheetScale(const std::string &sheet); static std::string getSheetFamily(const std::string &sheet); static std::string getSheetName(uint32 sheetId); static sint32 getFameIndex(const std::string &factionName);