mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Got repeatables working flawlessly and improved the achievement popup by a great deal
This commit is contained in:
parent
2c04025a5a
commit
5aa211cabd
6 changed files with 18 additions and 5 deletions
app
schemas/models
styles
views
|
@ -57,12 +57,17 @@ _.extend(AchievementSchema.properties,
|
|||
type: 'object'
|
||||
properties:
|
||||
a: {type: 'number', default: 1},
|
||||
required: ['a']
|
||||
description: 'f(x) = a * x'
|
||||
logarithmic:
|
||||
type:'object'
|
||||
properties:
|
||||
a: {type: 'number', default: 1}
|
||||
b: {type: 'number', default: 1}
|
||||
required: ['a', 'b']
|
||||
description: 'f(x) = a * ln(1/b * (x + b))'
|
||||
]
|
||||
default: linear: a: 1
|
||||
)
|
||||
|
||||
AchievementSchema.definitions = {}
|
||||
|
|
|
@ -127,6 +127,4 @@ c.definitions =
|
|||
lastSent: c.date()
|
||||
count: {type: 'integer'}
|
||||
|
||||
UserSchema.additionalProperties = true # TODO Ruben seriously remove this
|
||||
|
||||
module.exports = UserSchema
|
||||
|
|
|
@ -45,3 +45,6 @@
|
|||
font-family: Bangers
|
||||
font-size: 16px
|
||||
float: right
|
||||
|
||||
.progress-bar-white
|
||||
background-color: white
|
||||
|
|
|
@ -46,6 +46,7 @@ module.exports = class AchievementEditView extends View
|
|||
@treema = @$el.find('#achievement-treema').treema(options)
|
||||
|
||||
@treema.build()
|
||||
console.log @treema
|
||||
|
||||
pushChangesToPreview: =>
|
||||
'TODO' # TODO might want some intrinsic preview thing
|
||||
|
|
|
@ -8,6 +8,13 @@ module.exports = class AchievementSearchView extends SearchView
|
|||
tableTemplate: require 'templates/editor/achievement/table'
|
||||
projection: ['name', 'description', 'collection', 'slug']
|
||||
|
||||
initialize: ->
|
||||
console.log me.isAdmin()
|
||||
unless me.isAdmin()
|
||||
NotFoundView = require '../../not_found'
|
||||
return new NotFoundView
|
||||
else super()
|
||||
|
||||
getRenderData: ->
|
||||
context = super()
|
||||
context.currentEditor = 'editor.achievement_title'
|
||||
|
|
|
@ -38,9 +38,8 @@ module.exports = class RootView extends CocoView
|
|||
me.set(val, me.get(val) + 1)
|
||||
console.debug me.get(val)
|
||||
me.save()
|
||||
|
||||
#test = new Achievement(_id:'537ce4855c91b8d1dda7fda8')
|
||||
#test.fetch(success:@showNewAchievement)
|
||||
test = new Achievement(_id:'537ce4855c91b8d1dda7fda8')
|
||||
test.fetch(success:@showNewAchievement)
|
||||
|
||||
showNewAchievement: (achievement) ->
|
||||
currentLevel = me.level()
|
||||
|
|
Loading…
Add table
Reference in a new issue