1
0
forked from noxious/server

worked on wall logics

This commit is contained in:
2024-06-15 03:15:03 +02:00
parent 890a4bdb88
commit 893e69244d
6 changed files with 76 additions and 26 deletions

View File

@ -10,6 +10,7 @@ interface IZoneLoad {
width: number;
height: number;
tiles: number[][];
walls: number[][];
}
/**
@ -21,6 +22,8 @@ export default function (socket: TSocket, io: Server) {
socket.on('gm:zone_editor:zone:save', async (data: IZoneLoad) => {
console.log(`---GM ${socket.character?.id} has saved zone via zone editor.`);
console.log(data);
if (!data.zoneId) {
console.log(`---Zone id not provided.`);
return;
@ -38,7 +41,8 @@ export default function (socket: TSocket, io: Server) {
data.name,
data.width,
data.height,
data.tiles
data.tiles,
data.walls
);
zone = await ZoneRepository.getById(data.zoneId);