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 401741249..006d45663 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp @@ -471,6 +471,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls) ls.registerFunc("disableContextHelp", disableContextHelp); ls.registerFunc("setWeatherValue", setWeatherValue); ls.registerFunc("getWeatherValue", getWeatherValue); + ls.registerFunc("getContinentSheet", getContinentSheet); ls.registerFunc("getCompleteIslands", getCompleteIslands); ls.registerFunc("displayBubble", displayBubble); ls.registerFunc("getIslandId", getIslandId); @@ -1798,6 +1799,21 @@ int CLuaIHMRyzom::getWeatherValue(CLuaState &ls) return 1; } +int CLuaIHMRyzom::getContinentSheet(CLuaState &ls) +{ + const char *funcName = "getContinentSheet"; + CLuaIHM::checkArgCount(ls, funcName, 0); + if (ContinentMngr.cur()) + { + ls.push(ContinentMngr.cur()->SheetName); + return 1; + } + + ls.push(""); + return 1; +} + + int CLuaIHMRyzom::getUICaller(CLuaState &ls) { //H_AUTO(Lua_CLuaIHM_getUICaller) 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 942a08181..529ef8724 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h +++ b/code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h @@ -64,6 +64,7 @@ private: static int displayChatMessage(CLuaState &ls); static int setWeatherValue(CLuaState &ls); // first value is a boolean to say automatic, second value ranges from of to 1 and gives the weather static int getWeatherValue(CLuaState &ls); // get current real weather value (blend between server driven value & predicted value). Manual weather value is ignored + static int getContinentSheet(CLuaState &ls); static int disableContextHelpForControl(CLuaState &ls); // params: CCtrlBase*. return: none static int disableContextHelp(CLuaState &ls); static int getServerSeason(CLuaState &ls); // get the last season sent by the server