A* and move logic improvements
This commit is contained in:
@ -19,12 +19,7 @@ export default function (socket: TSocket, io: Server) {
|
||||
const character = await CharacterRepository.getByUserAndId(socket.user?.id as number, socket.character?.id as number)
|
||||
if (!character) return
|
||||
|
||||
// When 1 arg is provided, only send message. 2 includes a title
|
||||
if (args.length === 1) {
|
||||
return io.emit('notification', { message: args[0] })
|
||||
}
|
||||
|
||||
io.emit('notification', { title: args[0], message: args.slice(1).join(' ') })
|
||||
io.emit('notification', { title: 'Message from GM', message: args.join(' ') })
|
||||
callback(true)
|
||||
} catch (error: any) {
|
||||
console.log(`---Error sending message: ${error.message}`)
|
||||
|
Reference in New Issue
Block a user