|
|
@ -565,6 +565,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
|
|
|
|
LUABIND_FUNC(isDynStringAvailable),
|
|
|
|
LUABIND_FUNC(isDynStringAvailable),
|
|
|
|
LUABIND_FUNC(isFullyPatched),
|
|
|
|
LUABIND_FUNC(isFullyPatched),
|
|
|
|
LUABIND_FUNC(getSheetType),
|
|
|
|
LUABIND_FUNC(getSheetType),
|
|
|
|
|
|
|
|
LUABIND_FUNC(getSheetShape),
|
|
|
|
|
|
|
|
LUABIND_FUNC(getCharacterSheetScale),
|
|
|
|
LUABIND_FUNC(getSheetFamily),
|
|
|
|
LUABIND_FUNC(getSheetFamily),
|
|
|
|
LUABIND_FUNC(getSheetName),
|
|
|
|
LUABIND_FUNC(getSheetName),
|
|
|
|
LUABIND_FUNC(getFameIndex),
|
|
|
|
LUABIND_FUNC(getFameIndex),
|
|
|
@ -3469,6 +3471,38 @@ std::string CLuaIHMRyzom::getSheetType(const std::string &sheet)
|
|
|
|
return CEntitySheet::typeToString(sheetPtr->Type);
|
|
|
|
return CEntitySheet::typeToString(sheetPtr->Type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//H_AUTO(Lua_CLuaIHM_getSheetType)
|
|
|
|
|
|
|
|
const CEntitySheet *sheetPtr = SheetMngr.get(CSheetId(sheet));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!sheetPtr)
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sheetPtr->type() == CEntitySheet::ITEM)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CItemSheet *sheet = (CItemSheet*)sheetPtr;
|
|
|
|
|
|
|
|
return sheet->getShape();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (sheetPtr->type() == CEntitySheet::FAUNA)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr);
|
|
|
|
|
|
|
|
return sheet->Body.getItem();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
float CLuaIHMRyzom::getCharacterSheetScale(const std::string &sheet)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const CEntitySheet *sheetPtr = SheetMngr.get(CSheetId(sheet));
|
|
|
|
|
|
|
|
const CCharacterSheet *charSheet = dynamic_cast<const CCharacterSheet*>(sheetPtr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (charSheet) return charSheet->Scale;
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet)
|
|
|
|
std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet)
|
|
|
|