mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-11 16:21:08 -05:00
31 lines
649 B
CoffeeScript
31 lines
649 B
CoffeeScript
ScriptModule = require './ScriptModule'
|
|
|
|
module.exports = class GoalsScriptModule extends ScriptModule
|
|
@neededFor: (noteGroup) ->
|
|
return noteGroup.goals?
|
|
|
|
startNotes: ->
|
|
notes = []
|
|
notes.push(@addNote()) if @noteGroup.goals.add?
|
|
notes.push(@removeNote()) if @noteGroup.goals.remove?
|
|
return notes
|
|
|
|
endNotes: ->
|
|
return []
|
|
|
|
skipNotes: ->
|
|
return @startNotes()
|
|
|
|
addNote: ->
|
|
note =
|
|
channel: 'level-add-goals'
|
|
event:
|
|
goals: @noteGroup.goals.add
|
|
return note
|
|
|
|
removeNote: ->
|
|
note =
|
|
channel: 'level-remove-goals'
|
|
event:
|
|
goals: @noteGroup.goals.remove
|
|
return note
|