Fixed bug with primary spell being unreadable and thus no spells showing up in old, multi-spell levels.

This commit is contained in:
Nick Winter 2014-11-18 07:42:49 -08:00
parent 9afc98f447
commit d0233fc999

View file

@ -222,7 +222,8 @@ module.exports = class TomeView extends CocoView
if spellName
spell = _.find selectedThangSpells, {name: spellName}
else
spell = _.find selectedThangSpells, (spell) -> true # Just grab one
spell = _.find selectedThangSpells, (spell) -> spell.canWrite()
spell ?= _.find selectedThangSpells, (spell) -> spell.canRead()
spell
reloadAllCode: ->