@vnejs/plugins.views.achievement 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/exec.js +2 -2
- package/modules/logs.js +1 -3
- package/package.json +1 -1
package/modules/exec.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Module } from "@vnejs/module";
|
|
2
2
|
|
|
3
|
-
import { tokenizeExecLine } from "@vnejs/helpers
|
|
3
|
+
import { tokenizeExecLine } from "@vnejs/helpers";
|
|
4
4
|
|
|
5
5
|
export class AchievementExec extends Module {
|
|
6
6
|
name = "achievement.exec";
|
|
@@ -25,7 +25,7 @@ export class AchievementExec extends Module {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
emitActionExec = (action = "", tokens = [], keywords = []) => {
|
|
28
|
-
const isSkipIfPossible = keywords.includes(
|
|
28
|
+
const isSkipIfPossible = keywords.includes(this.CONST.SCENARIO.LINE_KEYWORDS.SKIP_IF_POSSIBLE);
|
|
29
29
|
|
|
30
30
|
if (action === this.CONST.ACHIEVEMENT.EXEC_ACTIONS.UNLOCK) return this.emitUnlockExec(tokens, isSkipIfPossible);
|
|
31
31
|
};
|
package/modules/logs.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Module } from "@vnejs/module";
|
|
2
2
|
|
|
3
|
-
const FILTER_FROM_RESULT_OPTIONS = { filterFromResult: true };
|
|
4
|
-
|
|
5
3
|
export class AchievementLogs extends Module {
|
|
6
4
|
name = "achievement.logs";
|
|
7
5
|
|
|
8
6
|
subscribe = () => {
|
|
9
|
-
this.on(this.EVENTS.ACHIEVEMENT.UNLOCKED, this.onAchievementUnlocked, FILTER_FROM_RESULT_OPTIONS);
|
|
7
|
+
this.on(this.EVENTS.ACHIEVEMENT.UNLOCKED, this.onAchievementUnlocked, this.CONST.LOGS.FILTER_FROM_RESULT_OPTIONS);
|
|
10
8
|
};
|
|
11
9
|
|
|
12
10
|
onAchievementUnlocked = ({ id = "" } = {}) =>
|