2024-02-25 14:46:47 +00:00
|
|
|
#pragma once
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
#include "StarLua.hpp"
|
|
|
|
#include "StarGameTypes.hpp"
|
2023-07-22 15:01:23 +00:00
|
|
|
#include "StarRpcThreadPromise.hpp"
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
namespace Star {
|
|
|
|
|
|
|
|
STAR_CLASS(UniverseServer);
|
|
|
|
|
|
|
|
namespace LuaBindings {
|
|
|
|
LuaCallbacks makeUniverseServerCallbacks(UniverseServer* universe);
|
|
|
|
|
|
|
|
namespace UniverseServerCallbacks {
|
|
|
|
List<ConnectionId> clientIds(UniverseServer* universe);
|
|
|
|
size_t numberOfClients(UniverseServer* universe);
|
|
|
|
bool isConnectedClient(UniverseServer* universe, ConnectionId arg1);
|
|
|
|
String clientNick(UniverseServer* universe, ConnectionId arg1);
|
|
|
|
Maybe<ConnectionId> findNick(UniverseServer* universe, String const& arg1);
|
|
|
|
void adminBroadcast(UniverseServer* universe, String const& arg1);
|
|
|
|
void adminWhisper(UniverseServer* universe, ConnectionId arg1, String const& arg2);
|
|
|
|
bool isAdmin(UniverseServer* universe, ConnectionId arg1);
|
|
|
|
bool isPvp(UniverseServer* universe, ConnectionId arg1);
|
|
|
|
void setPvp(UniverseServer* universe, ConnectionId arg1, Maybe<bool> arg2);
|
2023-07-24 08:42:55 +00:00
|
|
|
bool isWorldActive(UniverseServer* universe, String const& worldId);
|
|
|
|
StringList activeWorlds(UniverseServer* universe);
|
|
|
|
RpcThreadPromise<Json> sendWorldMessage(UniverseServer* universe, String const& worldId, String const& message, LuaVariadic<Json> args);
|
2024-04-02 02:39:34 +00:00
|
|
|
bool sendPacket(UniverseServer* universe, ConnectionId clientId, String const& packetTypeName, Json const& args);
|
2024-03-21 02:10:22 +00:00
|
|
|
String clientWorld(UniverseServer* universe, ConnectionId clientId);
|
2023-06-20 04:33:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|