Add items
This commit is contained in:
@ -36,7 +36,7 @@ export class SoSUtility extends Entity {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
onSocketMesssage( msg ) {
|
||||
static onSocketMesssage( msg ) {
|
||||
if( !game.user.isGM ) return; // Only GM
|
||||
|
||||
if (msg.name == 'msg_declare_actions' ) {
|
||||
@ -120,10 +120,7 @@ export class SoSUtility extends Entity {
|
||||
/* -------------------------------------------- */
|
||||
static closeAction(event) {
|
||||
let uniqId = event.currentTarget.attributes['data-uniq-id'].value;
|
||||
// Delete message !
|
||||
const toDelete = game.messages.filter(it => it.data.content.includes( uniqId ));
|
||||
toDelete.forEach(it => it.delete());
|
||||
|
||||
|
||||
if ( game.user.isGM ) {
|
||||
game.combat.closeAction( uniqId );
|
||||
} else {
|
||||
@ -294,7 +291,7 @@ export class SoSUtility extends Entity {
|
||||
flipData.uniqId = randomID(16);
|
||||
this.registry[flipData.uniqId] = flipData;
|
||||
let html = await renderTemplate('systems/foundryvtt-shadows-over-sol/templates/chat-damage-request-dodge.html', flipData );
|
||||
ChatMessage.create( { content: html, whisper: [ChatMessage.getWhisperRecipients(flipData.target.actor.name), ChatMessage.getWhisperRecipients("GM") ] } );
|
||||
ChatMessage.create( { content: html, whisper: ChatMessage.getWhisperRecipients(flipData.target.actor.name).concat(ChatMessage.getWhisperRecipients("GM")) } );
|
||||
return; // Wait message response
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user