mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Added default goals. Don't show System versions in the Systems list if they're 0.
This commit is contained in:
parent
e615dde6e2
commit
af42bafb15
2 changed files with 8 additions and 3 deletions
|
@ -213,6 +213,10 @@ LevelSchema = c.object {
|
|||
systems: []
|
||||
victory: {}
|
||||
type: 'hero'
|
||||
goals: [
|
||||
{id: 'ogres-die', name: 'Ogres must die.', killThangs: ['ogres'], worldEndsAfter: 3}
|
||||
{id: 'humans-survive', name: 'Humans must survive.', saveThangs: ['humans'], howMany: 1, worldEndsAfter: 3, hiddenGoal: true}
|
||||
]
|
||||
}
|
||||
c.extendNamedProperties LevelSchema # let's have the name be the first property
|
||||
_.extend LevelSchema.properties,
|
||||
|
|
|
@ -121,7 +121,7 @@ module.exports = class SystemsTabView extends CocoView
|
|||
{original: '528114e60268d018e300001a', majorVersion: 0} # UI
|
||||
{original: '528114040268d018e3000011', majorVersion: 0} # Physics
|
||||
]
|
||||
|
||||
|
||||
destroy: ->
|
||||
@systemsTreema?.destroy()
|
||||
super()
|
||||
|
@ -146,8 +146,9 @@ class LevelSystemNode extends TreemaObjectNode
|
|||
|
||||
buildValueForDisplay: (valEl, data) ->
|
||||
return super valEl unless data.original and @system
|
||||
name = "#{@system.get('name')} v#{@system.get('version').major}"
|
||||
@buildValueForDisplaySimply valEl, "#{name}"
|
||||
name = @system.get 'name'
|
||||
name += " v#{@system.get('version').major}" if @system.get('version').major
|
||||
@buildValueForDisplaySimply valEl, name
|
||||
|
||||
onEnterPressed: (e) ->
|
||||
super e
|
||||
|
|
Loading…
Reference in a new issue