diff --git a/app/lib/Angel.coffee b/app/lib/Angel.coffee index 4beeffa97..3b5f59a75 100644 --- a/app/lib/Angel.coffee +++ b/app/lib/Angel.coffee @@ -213,6 +213,8 @@ module.exports = class Angel extends CocoClass work.t1 = now() Math.random = work.testWorld.rand.randf # so user code is predictable Aether.replaceBuiltin('Math', Math) + replacedLoDash = _.runInContext(window) + _[key] = replacedLoDash[key] for key, val of replacedLoDash i = 0 while i < work.testWorld.totalFrames frame = work.testWorld.getFrame i++ diff --git a/app/views/editor/level/edit.coffee b/app/views/editor/level/edit.coffee index 6683d6a54..62666f44a 100644 --- a/app/views/editor/level/edit.coffee +++ b/app/views/editor/level/edit.coffee @@ -94,7 +94,10 @@ module.exports = class EditorLevelView extends RootView # Create a new Window with a blank LevelView scratchLevelID = @level.get('slug') + '?dev=true' scratchLevelID += "&team=#{team}" if team - @childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true) + if me.get('name') is 'Nick!' + @childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=2560,height=1080,left=0,top=-1600,location=1,menubar=1,scrollbars=1,status=0,titlebar=1,toolbar=1', true) + else + @childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true) @childWindow.onPlayLevelViewLoaded = (e) => sendLevel() # still a hack @childWindow.focus() diff --git a/app/views/play/level/tome/spell.coffee b/app/views/play/level/tome/spell.coffee index 0572542b3..72a897ee2 100644 --- a/app/views/play/level/tome/spell.coffee +++ b/app/views/play/level/tome/spell.coffee @@ -90,6 +90,7 @@ module.exports = class Spell problems = spellThang.aether.problems #console.log 'aether transpiled', source.length, 'to', spellThang.aether.pure.length, 'for', thangID, @spellKey else + spellThang.aether.raw = source spellThang.aether.pure = pure spellThang.aether.problems = problems #console.log 'aether reused transpilation for', thangID, @spellKey diff --git a/app/views/play/level/tome/spell_view.coffee b/app/views/play/level/tome/spell_view.coffee index 3f6ec643d..46fb62e4e 100644 --- a/app/views/play/level/tome/spell_view.coffee +++ b/app/views/play/level/tome/spell_view.coffee @@ -396,7 +396,7 @@ module.exports = class SpellView extends CocoView displayAether: (aether, isCast=false) -> @displayedAether = aether - isCast = isCast or not _.isEmpty(aether.metrics) or _.some aether.problems.errors, {type: 'runtime'} + isCast = isCast or not _.isEmpty(aether.metrics) or _.some aether.getAllProblems(), {type: 'runtime'} problem.destroy() for problem in @problems # Just in case another problem was added since clearAetherDisplay() ran. @problems = [] annotations = []