started working on zone manager for backend

This commit is contained in:
2024-04-10 19:11:51 +00:00
parent 846d12078d
commit 0ad4032a9b
5 changed files with 119 additions and 0 deletions

View File

@@ -95,6 +95,17 @@ io.of("admin").on("connection", (socket) => {
}
});
socket.on("set_zone", (zone) => {
if (!loggedIn) {
socket.emit("error", "Not logged in");
return;
}
if(!game.setZone(zone)) {
socket.emit("error", "Error changing zone");
}
})
//User is attempting to add a new team
socket.on("add_team", (teamName) => {
if (!loggedIn) {