mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Fixed walls not updating when you edit them in the ThangsTabView.
This commit is contained in:
parent
3305a3d7db
commit
cc04626a5a
2 changed files with 6 additions and 3 deletions
app
|
@ -238,13 +238,15 @@ module.exports = class LankBoss extends CocoClass
|
|||
possiblyUpdatedWallLanks = (lank for lank in wallLanks when _.find updatedObstacles, (w2) -> lank is w2 or (Math.abs(lank.thang.pos.x - w2.thang.pos.x) + Math.abs(lank.thang.pos.y - w2.thang.pos.y)) <= 16)
|
||||
else
|
||||
possiblyUpdatedWallLanks = wallLanks
|
||||
#console.log 'updating up to', possiblyUpdatedWallLanks.length, 'of', wallLanks.length, 'wall lanks from updatedObstacles', updatedObstacles
|
||||
# console.log 'updating up to', possiblyUpdatedWallLanks.length, 'of', wallLanks.length, 'wall lanks from updatedObstacles', updatedObstacles
|
||||
for wallLank in possiblyUpdatedWallLanks
|
||||
wallLank.queueAction 'idle' if not wallLank.currentRootAction
|
||||
wallLank.lockAction(false)
|
||||
wallLank.updateActionDirection wallGrid
|
||||
wallLank.lockAction()
|
||||
wallLank.lockAction(true)
|
||||
wallLank.updateScale()
|
||||
wallLank.updatePosition()
|
||||
#console.log @wallGrid.toString()
|
||||
# console.log wallGrid.toString()
|
||||
@cachedObstacles = true
|
||||
|
||||
lankFor: (thangID) -> @lanks[thangID]
|
||||
|
|
|
@ -519,6 +519,7 @@ module.exports = class ThangsTabView extends CocoView
|
|||
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
|
||||
@surface?.lankBoss.cachedObstacles = false
|
||||
@selectAddThangType @addThangType, @cloneSourceThang if @addThangType # make another addThang sprite, since the World just refreshed
|
||||
|
||||
# update selection, since the thangs have been remade
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue