[Server] Add sendConsoleCommand function to lua api

sol2-server-rewrite
Koncord 7 years ago
parent 0e97b769f9
commit edd883853d

@ -296,6 +296,12 @@ void ObjectController::Init(LuaState &lua)
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) {
lua.getObjectCtrl().requestContainers(player);
});

Loading…
Cancel
Save