Skip to content

Commit

Permalink
Merge pull request #89 from napolitanod/1.7.5
Browse files Browse the repository at this point in the history
1.7.5
  • Loading branch information
napolitanod committed Jun 20, 2023
2 parents 6a98e4b + 556f0ce commit ae04ee7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
4 changes: 3 additions & 1 deletion languages/en.json
Expand Up @@ -387,7 +387,9 @@
"display-danger-boundary.description": "Temporarily highlights the area targeted by a danger when the zone is triggered (GM's session only).",
"saving-throw-delay.label": "Player Saving Throw Wait Time",
"saving-throw-delay.description": "Requires socketLib module. The amount of time, in seconds, to wait for a player to fulfill a saving throw request before sending the prompt to the GM.",
"scene-control-button-display.label": "Display Clear Lasting Effects Button",
"saving-throw-fast-forward.label": "Fast Forward Saving Throws",
"saving-throw-fast-forward.description": "Bypasses prompt and auto-rolls saving throws generated by Danger Zone.",
"scene-control-button-display.label": "Display Clear Lasting Effects Button",
"scene-control-button-display.description": "Toggles the display of the Clear Danger Zone Lasting Effects button within the scene control buttons tiles grouping.",
"scene-control-clear-all-button-display.label": "Display Clear Button",
"scene-control-clear-all-button-display.description": "Toggles the display of the Clear button within the Danger Zone list of scene buttons.",
Expand Down
4 changes: 2 additions & 2 deletions module.json
Expand Up @@ -34,8 +34,8 @@
"styles/danger-zone.css"
],
"title": "Danger Zone",
"version": "1.7.4",
"version": "1.7.5",
"url": "https://github.com/napolitanod/Danger-Zone",
"manifest": "https://raw.githubusercontent.com/napolitanod/Danger-Zone/master/module.json",
"download": "https://github.com/napolitanod/Danger-Zone/releases/download/1.7.4/module.zip"
"download": "https://github.com/napolitanod/Danger-Zone/releases/download/1.7.5/module.zip"
}
12 changes: 6 additions & 6 deletions scripts/apps/workflow.js
Expand Up @@ -1739,7 +1739,7 @@ class Canvas extends executable{
}

get has(){
return (super.has && this.type) ? true : false
return (super.has && (this.type || this.pan.active)) ? true : false
}

get intensity(){
Expand Down Expand Up @@ -2327,8 +2327,8 @@ class save extends executable{

async _rollAbilitySave(token){
let result;
const owner = getActorOwner(token)
if (socketLibOn && owner) {
const owner = getActorOwner(token), fastforward = game.settings.get(dangerZone.ID, 'saving-throw-fast-forward');
if (!fastforward && socketLibOn && owner) {
const time = this.timeAlloted
if(time){
this._playerPrompted.push(`${token.name} (${owner.name})`)
Expand All @@ -2337,7 +2337,7 @@ class save extends executable{
await Promise.race([query, race]).then((value) => {result = value})
}
}
if(!result) result = await token.actor.rollAbilitySave(this.type, {chatMessage: false})
if(!result) result = await token.actor.rollAbilitySave(this.type, {chatMessage: false, fastForward: fastforward})

const saved = (!result || result.total < this.diff) ? false : true
!saved ? this.data.save.failed.push(token) : this.data.save.succeeded.push(token)
Expand Down Expand Up @@ -3270,11 +3270,11 @@ class weather extends executable{
});
}
}
await this._for();
await this.off();
this._for();
}

async _for(){
if(this.duration) await delay(this.duration);
await this.off();
}
}
9 changes: 9 additions & 0 deletions scripts/index.js
Expand Up @@ -187,6 +187,15 @@ Hooks.once('init', async function() {
});

if(game.world.system === 'dnd5e'){
game.settings.register('danger-zone', 'saving-throw-fast-forward', {
name: game.i18n.localize('DANGERZONE.setting.saving-throw-fast-forward.label'),
hint: game.i18n.localize('DANGERZONE.setting.saving-throw-fast-forward.description'),
scope: 'world',
config: true,
default: false,
type: Boolean
});

game.settings.register('danger-zone', 'saving-throw-delay', {
name: game.i18n.localize('DANGERZONE.setting.saving-throw-delay.label'),
hint: game.i18n.localize('DANGERZONE.setting.saving-throw-delay.description'),
Expand Down

0 comments on commit ae04ee7

Please sign in to comment.