narrat 0.8.0 → 0.8.1
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/CHANGELOG.md +6 -2
- package/lib/index.esm.js +7 -6
- package/lib/index.js +7 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
# Narrat changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
- Fixed a bug in accessing values inside conditions caused by changed in 0.7.2
|
|
6
|
+
|
|
7
|
+
## 0.8.0
|
|
4
8
|
|
|
5
9
|
- Changed the `set` method to access things without caps (`data`, `skills`, `buttons` instead of `DATA`, `SKILLS`, `BUTTONS`) for consistency.
|
|
6
|
-
- Changed string interpolation to have more accessible objects, now values in `data` need to be
|
|
10
|
+
- Changed string interpolation to have more accessible objects, now values in `data` need to be accessed with `%{data.something}` instead of just `%{something}`
|
|
7
11
|
- Now possible to access skill levels in string interpolation with `%{skills.someSkill.level}`
|
|
8
12
|
- Improvements to how skill checks are printed to be less awkward
|
|
9
13
|
|
package/lib/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version: 0.8.
|
|
1
|
+
// Version: 0.8.1 - April 26, 2022 13:28:12
|
|
2
2
|
import 'es6-promise/auto';
|
|
3
3
|
import { ref, reactive, readonly, defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, Fragment, renderList, createBlock, Transition, withCtx, renderSlot, createTextVNode, resolveComponent, toDisplayString, createVNode, TransitionGroup, createApp } from 'vue';
|
|
4
4
|
import { createLogger, createStore } from 'vuex';
|
|
@@ -4775,10 +4775,10 @@ function runCondition(ctx, condition) {
|
|
|
4775
4775
|
function conditionFunction(ctx, condition) {
|
|
4776
4776
|
const { state } = ctx;
|
|
4777
4777
|
const context = {
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4778
|
+
data: state.machine.data,
|
|
4779
|
+
skills: state.skills,
|
|
4780
|
+
skillChecks: state.skillChecks,
|
|
4781
|
+
stats: state.hudStats,
|
|
4782
4782
|
roll: (checkId, skill, value) => {
|
|
4783
4783
|
const skillCheckState = getSkillCheckState(ctx, checkId);
|
|
4784
4784
|
if (skillCheckState) {
|
|
@@ -4959,6 +4959,7 @@ async function runCommand(context, cmd, choices) {
|
|
|
4959
4959
|
}
|
|
4960
4960
|
catch (err) {
|
|
4961
4961
|
console.log(state.machine.stack[state.machine.stack.length - 1].label);
|
|
4962
|
+
console.error(err);
|
|
4962
4963
|
error(commit, `Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
|
|
4963
4964
|
<b>${err}</b>
|
|
4964
4965
|
Script: ${cmd.code}
|
|
@@ -5811,7 +5812,7 @@ async function startApp(config, options) {
|
|
|
5811
5812
|
mousePos.x = e.clientX;
|
|
5812
5813
|
mousePos.y = e.clientY;
|
|
5813
5814
|
});
|
|
5814
|
-
console.log('%c Narrat game engine – 0.8.
|
|
5815
|
+
console.log('%c Narrat game engine – 0.8.1 - April 26, 2022 13:28:12', 'background: #222; color: #bada55');
|
|
5815
5816
|
const storeSetup = setupStore(options);
|
|
5816
5817
|
store$1 = storeSetup.store;
|
|
5817
5818
|
app = createApp(script$8, {
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version: 0.8.
|
|
1
|
+
// Version: 0.8.1 - April 26, 2022 13:28:12
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -4779,10 +4779,10 @@ function runCondition(ctx, condition) {
|
|
|
4779
4779
|
function conditionFunction(ctx, condition) {
|
|
4780
4780
|
const { state } = ctx;
|
|
4781
4781
|
const context = {
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4782
|
+
data: state.machine.data,
|
|
4783
|
+
skills: state.skills,
|
|
4784
|
+
skillChecks: state.skillChecks,
|
|
4785
|
+
stats: state.hudStats,
|
|
4786
4786
|
roll: (checkId, skill, value) => {
|
|
4787
4787
|
const skillCheckState = getSkillCheckState(ctx, checkId);
|
|
4788
4788
|
if (skillCheckState) {
|
|
@@ -4963,6 +4963,7 @@ async function runCommand(context, cmd, choices) {
|
|
|
4963
4963
|
}
|
|
4964
4964
|
catch (err) {
|
|
4965
4965
|
console.log(state.machine.stack[state.machine.stack.length - 1].label);
|
|
4966
|
+
console.error(err);
|
|
4966
4967
|
error(commit, `Narrat script runtime error at <span class="error-filename">${cmd.fileName}:${cmd.line + 1}</span>
|
|
4967
4968
|
<b>${err}</b>
|
|
4968
4969
|
Script: ${cmd.code}
|
|
@@ -5815,7 +5816,7 @@ async function startApp(config, options) {
|
|
|
5815
5816
|
mousePos.x = e.clientX;
|
|
5816
5817
|
mousePos.y = e.clientY;
|
|
5817
5818
|
});
|
|
5818
|
-
console.log('%c Narrat game engine – 0.8.
|
|
5819
|
+
console.log('%c Narrat game engine – 0.8.1 - April 26, 2022 13:28:12', 'background: #222; color: #bada55');
|
|
5819
5820
|
const storeSetup = setupStore(options);
|
|
5820
5821
|
store$1 = storeSetup.store;
|
|
5821
5822
|
app = vue.createApp(script$8, {
|