Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
y-lohse committed Mar 8, 2017
2 parents e6d91c3 + d35f38c commit f2b4c77
Show file tree
Hide file tree
Showing 8 changed files with 755 additions and 529 deletions.
2 changes: 1 addition & 1 deletion engine/Story.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export class Story extends InkObject{
return;

// First, find the previously open set of containers
if (this._prevContainerSet == null) this._prevContainerSet = [];
this._prevContainerSet = [];
if (previousContentObject) {
// Container prevAncestor = previousContentObject as Container ?? previousContentObject.parent as Container;
var prevAncestor = (previousContentObject instanceof Container) ? previousContentObject : previousContentObject.parent;
Expand Down
4 changes: 4 additions & 0 deletions engine/StoryState.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ export class StoryState{
// Create a new base call stack element.
this.callStack = new CallStack(funcContainer);
this.callStack.currentElement.type = PushPopType.Function;

this._variablesState.callStack = this.callStack;

// By setting ourselves in external function evaluation mode,
// we're saying it's okay to end the flow without a Done or End,
Expand Down Expand Up @@ -673,6 +675,8 @@ export class StoryState{
this.callStack = this._originalCallstack;
this._originalCallstack = null;
this._originalEvaluationStackHeight = 0;

this._variablesState.callStack = this.callStack;

if (returnedObj) {
if (returnedObj instanceof Void)
Expand Down
6 changes: 6 additions & 0 deletions engine/VariablesState.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export class VariablesState{
// console.log("ES6 Proxy not available - direct manipulation of global variables can't work, use $() instead.");
}
}
get callStack(){
return this._callStack;
}
set callStack(callStack){
this._callStack = callStack;
}
get batchObservingVariableChanges(){
return this._batchObservingVariableChanges;
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "inkjs",
"version": "1.5.0",
"version": "1.5.1",
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
"main": "dist/ink-es2015.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "grunt rollup",
"build": "grunt rollup:release && grunt rollup:release_min && grunt rollup:legacy && grunt rollup:legacy_min",
"watch": "grunt watch",
"prepublish": "grunt rollup:release && grunt rollup:release_min && grunt rollup:legacy && grunt rollup:legacy_min"
},
Expand Down
Loading

0 comments on commit f2b4c77

Please sign in to comment.