diff --git a/app/assets/images/pages/game-menu/slot-icons.png b/app/assets/images/pages/game-menu/slot-icons.png index efffc74f9..590e8d09c 100644 Binary files a/app/assets/images/pages/game-menu/slot-icons.png and b/app/assets/images/pages/game-menu/slot-icons.png differ diff --git a/app/lib/world/GoalManager.coffee b/app/lib/world/GoalManager.coffee index 05278be22..d037811bd 100644 --- a/app/lib/world/GoalManager.coffee +++ b/app/lib/world/GoalManager.coffee @@ -63,7 +63,9 @@ module.exports = class GoalManager extends CocoClass # gets these goals and code, and is told to be all ears during world gen setGoals: (@goals) -> setCode: (@userCodeMap) -> @updateCodeGoalStates() - worldGenerationWillBegin: -> @initGoalStates() + worldGenerationWillBegin: -> + @initGoalStates() + @checkForInitialUserCodeProblems() # World generator feeds world events to the goal manager to keep track submitWorldGenerationEvent: (channel, event, frameNumber) -> @@ -148,6 +150,12 @@ module.exports = class GoalManager extends CocoClass @initGoalState(state, [_.keys(goal.linesOfCode ? {})], 'lines') @goalStates[goal.id] = state + checkForInitialUserCodeProblems: -> + # There might have been some user code problems reported before the goal manager started listening. + for thang in @world.thangs when thang.isProgrammable + for message, problem of thang.publishedUserCodeProblems + @onUserCodeProblem {thang: thang, problem: problem}, 0 + onThangDied: (e, frameNumber) -> for goal in @goals ? [] @checkKillThangs(goal.id, goal.killThangs, e.thang, frameNumber) if goal.killThangs?