Merge branch 'storyline/s2e1' into yubo

fix_opengl_on_mac
Ulukyn 5 years ago
commit de6418bb9a

@ -464,6 +464,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
ls.registerFunc("getTargetName", getTargetName); ls.registerFunc("getTargetName", getTargetName);
ls.registerFunc("getTargetTitleRaw", getTargetTitleRaw); ls.registerFunc("getTargetTitleRaw", getTargetTitleRaw);
ls.registerFunc("getTargetTitle", getTargetTitle); ls.registerFunc("getTargetTitle", getTargetTitle);
ls.registerFunc("moveToTarget", moveToTarget);
ls.registerFunc("addSearchPathUser", addSearchPathUser); ls.registerFunc("addSearchPathUser", addSearchPathUser);
ls.registerFunc("displaySystemInfo", displaySystemInfo); ls.registerFunc("displaySystemInfo", displaySystemInfo);
ls.registerFunc("displayChatMessage", displayChatMessage); ls.registerFunc("displayChatMessage", displayChatMessage);
@ -1527,6 +1528,18 @@ int CLuaIHMRyzom::getTargetTitle(CLuaState &ls)
return 1; return 1;
} }
// ***************************************************************************
int CLuaIHMRyzom::moveToTarget(CLuaState &ls)
{
CLuaIHM::checkArgCount(ls, "moveToTarget", 0);
CEntityCL *target = getTargetEntity();
if (!target) return 0;
UserEntity->moveTo(UserEntity->selection(), 1.0, CUserEntity::OpenArkUrl);
return 0;
}
// *************************************************************************** // ***************************************************************************
int CLuaIHMRyzom::addSearchPathUser(CLuaState &ls) int CLuaIHMRyzom::addSearchPathUser(CLuaState &ls)
{ {

@ -92,6 +92,7 @@ private:
static int getTargetName(CLuaState &ls); static int getTargetName(CLuaState &ls);
static int getTargetTitleRaw(CLuaState &ls); static int getTargetTitleRaw(CLuaState &ls);
static int getTargetTitle(CLuaState &ls); static int getTargetTitle(CLuaState &ls);
static int moveToTarget(CLuaState &ls);
static int addSearchPathUser(CLuaState &ls); static int addSearchPathUser(CLuaState &ls);
static int getClientCfgVar(CLuaState &ls); static int getClientCfgVar(CLuaState &ls);
static int isPlayerFreeTrial(CLuaState &ls); static int isPlayerFreeTrial(CLuaState &ls);

@ -1682,10 +1682,14 @@ void CUserEntity::moveToAction(CEntityCL *ent)
case CUserEntity::Outpost: case CUserEntity::Outpost:
CLuaManager::getInstance().executeLuaScript("game:outpostBCOpenStateWindow()", 0); CLuaManager::getInstance().executeLuaScript("game:outpostBCOpenStateWindow()", 0);
break; break;
// BuildTotem // BuildTotem
case CUserEntity::BuildTotem: case CUserEntity::BuildTotem:
buildTotem(); buildTotem();
break; break;
// openArkUrl
case CUserEntity::OpenArkUrl:
CLuaManager::getInstance().executeLuaScript("game:openTargetArkUrl()", 0);
break;
default: default:
break; break;
} }

@ -95,6 +95,7 @@ public:
Outpost, Outpost,
BuildTotem, BuildTotem,
MissionRing, MissionRing,
OpenArkUrl,
}; };
public: public:

Loading…
Cancel
Save