forked from teamnwah/openmw-tes3coop
[Server] Add sendConsoleCommand function to lua api
This commit is contained in:
parent
0e97b769f9
commit
edd883853d
1 changed files with 6 additions and 0 deletions
|
@ -296,6 +296,12 @@ void ObjectController::Init(LuaState &lua)
|
||||||
return lua.getObjectCtrl().sendContainers(player, objects, Utils::getCellFromDescription(cellDescription));
|
return lua.getObjectCtrl().sendContainers(player, objects, Utils::getCellFromDescription(cellDescription));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
objectCtrl.set_function("sendConsoleCommand", [&lua](shared_ptr<Player> player, shared_ptr<vector<shared_ptr<Object>>> objects,
|
||||||
|
const std::string &cellDescription, const std::string &command,
|
||||||
|
bool broadcast) {
|
||||||
|
return lua.getObjectCtrl().sendConsoleCommand(player, objects, Utils::getCellFromDescription(cellDescription),
|
||||||
|
command, broadcast);
|
||||||
|
});
|
||||||
objectCtrl.set_function("requestContainers", [&lua](shared_ptr<Player> player) {
|
objectCtrl.set_function("requestContainers", [&lua](shared_ptr<Player> player) {
|
||||||
lua.getObjectCtrl().requestContainers(player);
|
lua.getObjectCtrl().requestContainers(player);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue