mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Added a handler for when components or systems go rogue, so they don't take down the level editor quite so hard.
This commit is contained in:
parent
912b6140ac
commit
81912d25d1
1 changed files with 4 additions and 1 deletions
|
@ -333,7 +333,10 @@ module.exports = class ThangsTabView extends View
|
|||
onThangsChanged: (e) =>
|
||||
@level.set 'thangs', @thangsTreema.data
|
||||
serializedLevel = @level.serialize @supermodel
|
||||
@world.loadFromLevel serializedLevel, false
|
||||
try
|
||||
@world.loadFromLevel serializedLevel, false
|
||||
catch error
|
||||
console.error 'Catastrophic error loading the level:', error
|
||||
thang.isSelectable = not thang.isLand for thang in @world.thangs # let us select walls and such
|
||||
@surface?.setWorld @world
|
||||
@selectAddThangType @addThangType, @cloneSourceThang if @addThangType # make another addThang sprite, since the World just refreshed
|
||||
|
|
Loading…
Reference in a new issue