mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Exposing Vector z property. Getting ready to use new builtin property documentation.
This commit is contained in:
parent
28bb28cf85
commit
802d43651e
4 changed files with 19 additions and 10 deletions
|
@ -8,7 +8,7 @@ class Vector
|
||||||
a.copy()[name](b, useZ)
|
a.copy()[name](b, useZ)
|
||||||
|
|
||||||
isVector: true
|
isVector: true
|
||||||
apiProperties: ['x', 'y', 'magnitude', 'heading', 'distance', 'dot', 'equals', 'copy', 'distanceSquared']
|
apiProperties: ['x', 'y', 'z', 'magnitude', 'heading', 'distance', 'dot', 'equals', 'copy', 'distanceSquared']
|
||||||
|
|
||||||
constructor: (@x=0, @y=0, @z=0) ->
|
constructor: (@x=0, @y=0, @z=0) ->
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,13 @@ module.exports = class SpellPaletteView extends View
|
||||||
Array: 'programmableArrayProperties'
|
Array: 'programmableArrayProperties'
|
||||||
Object: 'programmableObjectProperties'
|
Object: 'programmableObjectProperties'
|
||||||
String: 'programmableStringProperties'
|
String: 'programmableStringProperties'
|
||||||
|
Global: 'programmableGlobalProperties'
|
||||||
|
Function: 'programmableFunctionProperties'
|
||||||
|
RegExp: 'programmableRegExpProperties'
|
||||||
|
Date: 'programmableDateProperties'
|
||||||
|
Number: 'programmableNumberProperties'
|
||||||
|
JSON: 'programmableJSONProperties'
|
||||||
|
LoDash: 'programmableLoDashProperties'
|
||||||
Vector: 'programmableVectorProperties'
|
Vector: 'programmableVectorProperties'
|
||||||
snippets: 'programmableSnippets'
|
snippets: 'programmableSnippets'
|
||||||
else
|
else
|
||||||
|
|
|
@ -18,12 +18,14 @@ DEBUGGING = true
|
||||||
|
|
||||||
sendInitialRecruitingEmail = ->
|
sendInitialRecruitingEmail = ->
|
||||||
leaderboards = [
|
leaderboards = [
|
||||||
#{slug: 'brawlwood', team: 'humans', limit: 55, name: "Brawlwood", original: "52d97ecd32362bc86e004e87", majorVersion: 0}
|
{slug: 'brawlwood', team: 'humans', limit: 55, name: "Brawlwood", original: "52d97ecd32362bc86e004e87", majorVersion: 0}
|
||||||
#{slug: 'brawlwood', team: 'ogres', limit: 40, name: "Brawlwood", original: "52d97ecd32362bc86e004e87", majorVersion: 0}
|
{slug: 'brawlwood', team: 'ogres', limit: 40, name: "Brawlwood", original: "52d97ecd32362bc86e004e87", majorVersion: 0}
|
||||||
#{slug: 'dungeon-arena', team: 'humans', limit: 200, name: "Dungeon Arena", original: "53173f76c269d400000543c2", majorVersion: 0}
|
{slug: 'dungeon-arena', team: 'humans', limit: 300, name: "Dungeon Arena", original: "53173f76c269d400000543c2", majorVersion: 0}
|
||||||
#{slug: 'dungeon-arena', team: 'ogres', limit: 150, name: "Dungeon Arena", original: "53173f76c269d400000543c2", majorVersion: 0}
|
{slug: 'dungeon-arena', team: 'ogres', limit: 250, name: "Dungeon Arena", original: "53173f76c269d400000543c2", majorVersion: 0}
|
||||||
{slug: 'greed', team: 'humans', limit: 320, name: "Greed", original: "53558b5a9914f5a90d7ccddb", majorVersion: 0}
|
{slug: 'greed', team: 'humans', limit: 465, name: "Greed", original: "53558b5a9914f5a90d7ccddb", majorVersion: 0}
|
||||||
{slug: 'greed', team: 'ogres', limit: 300, name: "Greed", original: "53558b5a9914f5a90d7ccddb", majorVersion: 0}
|
{slug: 'greed', team: 'ogres', limit: 371, name: "Greed", original: "53558b5a9914f5a90d7ccddb", majorVersion: 0}
|
||||||
|
{slug: 'gold-rush', team: 'humans', limit: 253, name: "Gold Rush", original: "533353722a61b7ca6832840c", majorVersion: 0}
|
||||||
|
{slug: 'gold-rush', team: 'ogres', limit: 203, name: "Gold Rush", original: "533353722a61b7ca6832840c", majorVersion: 0}
|
||||||
]
|
]
|
||||||
async.waterfall [
|
async.waterfall [
|
||||||
(callback) -> async.map leaderboards, grabSessions, callback
|
(callback) -> async.map leaderboards, grabSessions, callback
|
||||||
|
@ -89,7 +91,7 @@ emailUserInitialRecruiting = (user, callback) ->
|
||||||
team = user.session.levelInfo.team
|
team = user.session.levelInfo.team
|
||||||
team = team.substr(0, team.length - 1)
|
team = team.substr(0, team.length - 1)
|
||||||
context =
|
context =
|
||||||
email_id: sendwithus.templates.one_time_recruiting_email
|
email_id: sendwithus.templates.recruiting_email
|
||||||
recipient:
|
recipient:
|
||||||
address: if DEBUGGING then 'nick@codecombat.com' else user.email
|
address: if DEBUGGING then 'nick@codecombat.com' else user.email
|
||||||
name: name
|
name: name
|
||||||
|
@ -98,7 +100,7 @@ emailUserInitialRecruiting = (user, callback) ->
|
||||||
level_name: user.session.levelInfo.name
|
level_name: user.session.levelInfo.name
|
||||||
place: "##{user.session.rank}" # like "#31"
|
place: "##{user.session.rank}" # like "#31"
|
||||||
level_race: team
|
level_race: team
|
||||||
ladder_link: "http://codecombat.com/play/ladder/#{user.session.levelInfo.name.toLowerCase()}"
|
ladder_link: "http://codecombat.com/play/ladder/#{user.session.levelInfo.slug}"
|
||||||
sendwithus.api.send context, (err, result) ->
|
sendwithus.api.send context, (err, result) ->
|
||||||
return callback err if err
|
return callback err if err
|
||||||
callback null, user
|
callback null, user
|
||||||
|
|
|
@ -14,5 +14,5 @@ module.exports.templates =
|
||||||
ladder_update_email: 'JzaZxf39A4cKMxpPZUfWy4'
|
ladder_update_email: 'JzaZxf39A4cKMxpPZUfWy4'
|
||||||
patch_created: 'tem_xhxuNosLALsizTNojBjNcL'
|
patch_created: 'tem_xhxuNosLALsizTNojBjNcL'
|
||||||
change_made_notify_watcher: 'tem_7KVkfmv9SZETb25dtHbUtG'
|
change_made_notify_watcher: 'tem_7KVkfmv9SZETb25dtHbUtG'
|
||||||
one_time_recruiting_email: 'tem_mdFMgtcczHKYu94Jmq68j8'
|
recruiting_email: 'tem_mdFMgtcczHKYu94Jmq68j8'
|
||||||
greed_tournament_rank: 'tem_c4KYnk2TriEkkZx5NqqGLG'
|
greed_tournament_rank: 'tem_c4KYnk2TriEkkZx5NqqGLG'
|
||||||
|
|
Loading…
Reference in a new issue