1
0
forked from noxious/server

asset mngr stuff

This commit is contained in:
2024-06-29 22:39:14 +02:00
parent 93adb85253
commit 6f6fddd861
10 changed files with 661 additions and 15 deletions

View File

@ -14,6 +14,11 @@ interface IPayload {
export default function (socket: TSocket, io: Server) {
socket.on('gm:tile:list', async (data: any, callback: (response: string[]) => void) => {
if (socket.character?.role !== 'gm') {
console.log(`---Character #${socket.character?.id} is not a game master.`);
return;
}
// get root path
const folder = path.join(process.cwd(), 'public', 'tiles');