Skip to content

Commit

Permalink
Merge pull request #281 from pwatson100/post-v12
Browse files Browse the repository at this point in the history
Corrected bug with Panic autoroll not working.
  • Loading branch information
pwatson100 authored Jul 2, 2024
2 parents 2c0b772 + eeac7e7 commit 7103f06
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 187 deletions.
6 changes: 5 additions & 1 deletion Release_Notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -569,4 +569,8 @@ Corrected layout issue on the Synthetic sheet where Overwatch and Radiation were
Version 3.2.0
FVTT V12 only compatibility.
XP and SP now remain visible all the time to allow for both to be recorded.
Added the Hypoxia, Heatstroke and Gravity Dyspraxia conditions.
Added the Hypoxia, Heatstroke and Gravity Dyspraxia conditions.

Version 3.2.1
Corrected bug with Panic autoroll not working.

66 changes: 41 additions & 25 deletions module/actor/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export class alienrpgActor extends Actor {
whispertarget.push(game.user._id);
}

let blind = false;
blind = false;
if (rollMode == 'blindroll') {
blind = true;
if (!game.user.isGM) {
Expand Down Expand Up @@ -662,18 +662,22 @@ export class alienrpgActor extends Actor {
break;
}
}

ChatMessage.create({
speaker: {
actor: actorId,
},

let chatData = {
user: game.user.id,
speaker: ChatMessage.getSpeaker({
actor: actor.id,
}),
content: chatMessage,
whisper: whispertarget,
roll: customResults.roll,
rolls: [customResults.roll],
sound: CONFIG.sounds.dice,
blind,
});
};
if (['gmroll', 'blindroll'].includes(chatData.rollMode)) {
chatData.whisper = ChatMessage.getWhisperRecipients('GM');
} else if (chatData.rollMode === 'selfroll') {
chatData.whisper = [game.user];
}
ChatMessage.create(chatData);
}
}
}
Expand Down Expand Up @@ -1195,15 +1199,20 @@ export class alienrpgActor extends Actor {
let chatMessage = '';
chatMessage += '<h2>' + game.i18n.localize('ALIENRPG.AcidAttack') + '</h2>';
chatMessage += `<h4><i>` + game.i18n.localize('ALIENRPG.AcidBlood') + `</i></h4>`;
ChatMessage.create({
user: game.user._id,
speaker: {
let chatData = {
user: game.user.id,
speaker: ChatMessage.getSpeaker({
actor: actor.id,
},
}),
rollMode: game.settings.get('core', 'rollMode'),
content: chatMessage,
whisper: game.users.contents.filter((u) => u.isGM).map((u) => u._id),
blind: true,
});
};
if (['gmroll', 'blindroll'].includes(chatData.rollMode)) {
chatData.whisper = ChatMessage.getWhisperRecipients('GM');
} else if (chatData.rollMode === 'selfroll') {
chatData.whisper = [game.user];
}
ChatMessage.create(chatData);
}
}

Expand Down Expand Up @@ -1232,16 +1241,23 @@ export class alienrpgActor extends Actor {
chatMessage += '<h2>' + game.i18n.localize('ALIENRPG.AttackRoll') + '</h2>';
chatMessage += `<h4><i>${table.name}</i></h4>`;
chatMessage += `${customResults.results[0].text}`;
ChatMessage.create({
user: game.user._id,
speaker: {
let chatData = {
user: game.user.id,
speaker: ChatMessage.getSpeaker({
actor: actor.id,
},
roll: customResults.roll,
}),
rolls: [customResults.roll],
rollMode: game.settings.get('core', 'rollMode'),
content: chatMessage,
// whisper: game.users.contents.filter((u) => u.isGM).map((u) => u._id),
// type: CONST.CHAT_MESSAGE_STYLES.ROLL,
});
sound: CONFIG.sounds.dice,
};
if (['gmroll', 'blindroll'].includes(chatData.rollMode)) {
chatData.whisper = ChatMessage.getWhisperRecipients('GM');
} else if (chatData.rollMode === 'selfroll') {
chatData.whisper = [game.user];
}
ChatMessage.create(chatData);
return;
}

async creatureManAttackRoll(actor, dataset) {
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"relationships": {
"systems": [{ "id": "alienrpg" }]
},
"version": "3.2.0",
"version": "3.2.1",

"compatibility": {
"minimum": "12",
Expand Down
Loading

0 comments on commit 7103f06

Please sign in to comment.