forked from noxious/server
worked on wall logics
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user