diff --git a/Release_Notes.txt b/Release_Notes.txt index b20817c..c941fdc 100644 --- a/Release_Notes.txt +++ b/Release_Notes.txt @@ -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. \ No newline at end of file +Added the Hypoxia, Heatstroke and Gravity Dyspraxia conditions. + +Version 3.2.1 +Corrected bug with Panic autoroll not working. + \ No newline at end of file diff --git a/module/actor/actor.js b/module/actor/actor.js index 8938058..1d8d07b 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -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) { @@ -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); } } } @@ -1195,15 +1199,20 @@ export class alienrpgActor extends Actor { let chatMessage = ''; chatMessage += '

' + game.i18n.localize('ALIENRPG.AcidAttack') + '

'; chatMessage += `

` + game.i18n.localize('ALIENRPG.AcidBlood') + `

`; - 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); } } @@ -1232,16 +1241,23 @@ export class alienrpgActor extends Actor { chatMessage += '

' + game.i18n.localize('ALIENRPG.AttackRoll') + '

'; chatMessage += `

${table.name}

`; 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) { diff --git a/system.json b/system.json index 2741aac..cc6be7d 100644 --- a/system.json +++ b/system.json @@ -13,7 +13,7 @@ "relationships": { "systems": [{ "id": "alienrpg" }] }, - "version": "3.2.0", + "version": "3.2.1", "compatibility": { "minimum": "12", diff --git a/templates/actor/crt/spacecraft-sheet.html b/templates/actor/crt/spacecraft-sheet.html index a0525c6..931a2ca 100644 --- a/templates/actor/crt/spacecraft-sheet.html +++ b/templates/actor/crt/spacecraft-sheet.html @@ -1,161 +1,154 @@
- - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
- - {{!--General Tab --}} -
-
- - -
-
-

{{localize "ALIENRPG.Name"}}

-

- -

{{localize "ALIENRPG.MODEL"}}

- - -

{{localize "ALIENRPG.Manufacturer"}}

- - -

{{localize "ALIENRPG.MODULES"}}

- - -

{{localize "ALIENRPG.ARMAMENTS"}}

- - -

{{localize "ALIENRPG.AI"}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {{#times system.DAMcurrent}} - - {{/times}} - {{#times system.DAMlost}} - - {{/times}} -
-
-
{{> "systems/alienrpg/templates/actor/crt/tabs/sCraft-minor-crit.html" }}
-
{{> "systems/alienrpg/templates/actor/crt/tabs/sCraft-major-crit.html" }}
-
-
- -

{{localize "ALIENRPG.CREW"}}

-
-
- - - - -
-
-
- {{#each actor.system.crew.occupants}} -
- -
- {{!-- Name --}} -
{{actor.name}}
- - {{!-- Position --}} -
- -
- - {{#ife position 'PILOT'}} -

{{localize 'ALIENRPG.Skillpiloting'}}

- {{/ife}} - - {{#ife position 'SENSOROP'}} -

{{localize 'ALIENRPG.Skillcomtech'}}

- {{/ife}} - - - - {{!-- Buttons --}} - -
-
- {{else}} -
{{localize 'ALIENRPG.EmptyCrew'}}
- {{/each}} -
-
- -
-

{{localize "ALIENRPG.ARMAMENTS"}}

-
{{> "systems/alienrpg/templates/actor/tabs/spacecraft-armaments.html" sections=inventory}}
-
-
-
-
- - {{!-- Biography Tab --}} -
{{editor system.notes target="system.notes" button=true owner=owner editable=true}}
- - {{!-- Owned Items Tab --}} - -
{{> "systems/alienrpg/templates/actor/tabs/spacecraft-inventory.html" sections=inventory}}
- - -
{{> "systems/alienrpg/templates/actor/tabs/spacecraft-combat-phases.html" sections=combatphases}}
- - {{!-- Image Tab --}} -
- - -
-
- -
\ No newline at end of file + {{!-- Sheet Tab Navigation --}} + + + {{!-- Sheet Body --}} +
+ {{!--General Tab --}} +
+
+ +
+
+

{{localize "ALIENRPG.Name"}}

+

+ +

{{localize "ALIENRPG.MODEL"}}

+ + +

{{localize "ALIENRPG.Manufacturer"}}

+ + +

{{localize "ALIENRPG.MODULES"}}

+ + +

{{localize "ALIENRPG.ARMAMENTS"}}

+ + +

{{localize "ALIENRPG.AI"}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{#times system.DAMcurrent}} + + {{/times}} {{#times system.DAMlost}} + + {{/times}} +
+
+
{{> "systems/alienrpg/templates/actor/crt/tabs/sCraft-minor-crit.html" }}
+
{{> "systems/alienrpg/templates/actor/crt/tabs/sCraft-major-crit.html" }}
+
+
+

{{localize "ALIENRPG.CREW"}}

+
{{> "systems/alienrpg/templates/actor/tabs/spacecraft-crew.html" sections=inventory}}
+
+

{{localize "ALIENRPG.ARMAMENTS"}}

+
{{> "systems/alienrpg/templates/actor/tabs/spacecraft-armaments.html" sections=inventory}}
+
+
+
+
+ + {{!-- Biography Tab --}} +
+ {{editor system.notes target="system.notes" button=true owner=owner editable=true}} +
+ + {{!-- Owned Items Tab --}} + +
+ {{> "systems/alienrpg/templates/actor/tabs/spacecraft-inventory.html" sections=inventory}} +
+ + +
+ {{> "systems/alienrpg/templates/actor/tabs/spacecraft-combat-phases.html" sections=combatphases}} +
+ + {{!-- Image Tab --}} +
+ +
+
+