Skip to content

Commit

Permalink
v0.3.51 Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rinnocenti committed Apr 27, 2021
1 parent b661c5c commit bf3d34b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "innocenti-openlock",
"title": "Innocenti Open Lock",
"description": "Modules for opening locks using keys, force or picklock",
"version": "0.3.5",
"version": "0.3.51",
"minimumCoreVersion": "0.7.0",
"compatibleCoreVersion": "0.7.9",
"author": "Renato innocenti",
Expand Down
5 changes: 4 additions & 1 deletion scripts/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ export class ActionLock {
let gmaction = new GMActions(action.options);
await gmaction.Init();
}
await action.OpenLock();
if (typeof action?.OpenLock === "function") {
// safe to use the function
await action?.OpenLock();
//console.log("Depois do GM", action);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/behaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class Behaviors {
export class LootLock {
constructor(lootToken, charToken) {
this.tools = this.GetTools(charToken);
let hasFlag = lootToken.actor.items.getFlag(SETTINGS.MODULE_NAME, 'enable');
let hasFlag = lootToken.actor.items.find(a => a.data.flags[SETTINGS.MODULE_NAME]);
if (hasFlag) {
this.lock = lootToken.actor.items.find(a => a.data.flags[SETTINGS.MODULE_NAME]);
if (this.lock) {
Expand Down

0 comments on commit bf3d34b

Please sign in to comment.