Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-05-23 12:07:10 -07:00
commit c2a2826baf
5 changed files with 16 additions and 16 deletions

View file

@ -260,7 +260,8 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
@handledDisplayEvents[event] = true @handledDisplayEvents[event] = true
options = JSON.parse(event[5...]) options = JSON.parse(event[5...])
label = new createjs.Text options.text, "bold #{options.size or 16}px Arial", options.color or '#FFF' label = new createjs.Text options.text, "bold #{options.size or 16}px Arial", options.color or '#FFF'
label.shadow = new createjs.Shadow '#000', 0, 0, 2 shadowColor = {humans: '#F00', ogres: '#00F', neutral: '#0F0', common: '#0F0'}[@thang.team] ? '#000'
label.shadow = new createjs.Shadow shadowColor, 1, 1, 3
offset = @getOffset 'aboveHead' offset = @getOffset 'aboveHead'
[label.x, label.y] = [@imageObject.x + offset.x - label.getMeasuredWidth() / 2, @imageObject.y + offset.y] [label.x, label.y] = [@imageObject.x + offset.x - label.getMeasuredWidth() / 2, @imageObject.y + offset.y]
@options.floatingLayer.addChild label @options.floatingLayer.addChild label
@ -575,7 +576,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
@marks[range['name']].toggle false for range in @ranges @marks[range['name']].toggle false for range in @ranges
if @thangType.get('name') in ['Arrow', 'Spear'] and @thang.action is 'die' if @thangType.get('name') in ['Arrow', 'Spear'] and @thang.action is 'die'
@marks.shadow.hide() @marks.shadow?.hide()
mark.update() for name, mark of @marks mark.update() for name, mark of @marks
#@thang.effectNames = ['berserk', 'confuse', 'control', 'curse', 'fear', 'poison', 'paralyze', 'regen', 'sleep', 'slow', 'haste'] #@thang.effectNames = ['berserk', 'confuse', 'control', 'curse', 'fear', 'poison', 'paralyze', 'regen', 'sleep', 'slow', 'haste']
@updateEffectMarks() if @thang?.effectNames?.length or @previousEffectNames?.length @updateEffectMarks() if @thang?.effectNames?.length or @previousEffectNames?.length

View file

@ -14,7 +14,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
manual: "Kézi" manual: "Kézi"
# fork: "Fork" # fork: "Fork"
play: "Játék" play: "Játék"
# retry: "Retry" retry: "Próbáld újra!"
# watch: "Watch" # watch: "Watch"
# unwatch: "Unwatch" # unwatch: "Unwatch"
# submit_patch: "Submit Patch" # submit_patch: "Submit Patch"
@ -36,7 +36,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
nav: nav:
play: "Játék" play: "Játék"
# community: "Community" community: "Közösség"
editor: "Szerkesztő" editor: "Szerkesztő"
blog: "Blog" blog: "Blog"
forum: "Fórum" forum: "Fórum"
@ -48,7 +48,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
about: "Rólunk" about: "Rólunk"
contact: "Kapcsolat" contact: "Kapcsolat"
twitter_follow: "Követés" twitter_follow: "Követés"
# employers: "Employers" employers: "Munkaadók"
versions: versions:
save_version_title: "Új verzió mentése" save_version_title: "Új verzió mentése"
@ -119,8 +119,8 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
forum_page: "fórumban" forum_page: "fórumban"
forum_suffix: " is." forum_suffix: " is."
send: "Visszajelzés küldése" send: "Visszajelzés küldése"
# contact_candidate: "Contact Candidate" contact_candidate: "Vedd fel a kapcsolatot a jelölttel"
# recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns." recruitment_reminder: "Használd ezt az űrlapot, hogy tudasd a jelöltekkel, szívesen fogadnád őket egy interjúra. Ne feledd, CodeCombat felszámítja az első évi fizetés 15%-át. A díj a munkavállaló alkalmazásakor esedékes, és 90 napig visszafizetendő, ha a munkavállaó nem marad alkalmazásban. Részidőben, távmunkára és szerződéssel alkalmazottak után nem kell fizetni, valamint gyakornokok után sem."
diplomat_suggestion: diplomat_suggestion:
title: "Segítsd lefordítani a CodeCombat-ot!" title: "Segítsd lefordítani a CodeCombat-ot!"
@ -139,7 +139,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
clothes: "Öltözetek" clothes: "Öltözetek"
# trim: "Trim" # trim: "Trim"
cloud: "Felhő" cloud: "Felhő"
# team: "Team" team: "Csapat"
spell: "Varázslat" spell: "Varázslat"
boots: "Lábbelik" boots: "Lábbelik"
hue: "Árnyalat" hue: "Árnyalat"
@ -152,7 +152,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
autosave: "A változtatásokat automatikusan elmentjük." autosave: "A változtatásokat automatikusan elmentjük."
me_tab: "Rólad" me_tab: "Rólad"
picture_tab: "Kép" picture_tab: "Kép"
# upload_picture: "Upload a picture" upload_picture: "Tölts föl egy képet"
wizard_tab: "Varázsló" wizard_tab: "Varázsló"
password_tab: "Jelszó" password_tab: "Jelszó"
emails_tab: "Levelek" emails_tab: "Levelek"

View file

@ -52,6 +52,7 @@ module.exports = class LadderTabView extends CocoView
@fbStatusRes.load() @fbStatusRes.load()
FB.getLoginStatus (response) => FB.getLoginStatus (response) =>
return if @destroyed
@facebookStatus = response.status @facebookStatus = response.status
@loadFacebookFriends() if @facebookStatus is 'connected' @loadFacebookFriends() if @facebookStatus is 'connected'
@fbStatusRes.markLoaded() @fbStatusRes.markLoaded()

View file

@ -25,7 +25,7 @@ module.exports = class Spell
teamSpells = @session.get('teamSpells') teamSpells = @session.get('teamSpells')
team = @session.get('team') ? 'humans' team = @session.get('team') ? 'humans'
@useTranspiledCode = @permissions.readwrite.length and ((teamSpells and not _.contains(teamSpells[team], @spellKey)) or (@session.get('creator') isnt me.id) or @spectateView) @useTranspiledCode = @permissions.readwrite.length and ((teamSpells and not _.contains(teamSpells[team], @spellKey)) or (@session.get('creator') isnt me.id) or @spectateView)
console.log @spellKey, "using transpiled code?", @useTranspiledCode #console.log @spellKey, "using transpiled code?", @useTranspiledCode
@source = @originalSource = p.source @source = @originalSource = p.source
@parameters = p.parameters @parameters = p.parameters
if @permissions.readwrite.length and sessionSource = @session.getSourceFor(@spellKey) if @permissions.readwrite.length and sessionSource = @session.getSourceFor(@spellKey)
@ -73,12 +73,12 @@ module.exports = class Spell
transpiledCode = @session.get('code') transpiledCode = @session.get('code')
for thangID, spellThang of @thangs for thangID, spellThang of @thangs
unless pure unless pure
if @useTranspiledCode and transpiledSpell = transpiledCode[_.string.slugify thangID]?[@name] if @useTranspiledCode and transpiledSpell = transpiledCode[@spellKey.split('/')[0]]?[@name]
spellThang.aether.pure = transpiledSpell spellThang.aether.pure = transpiledSpell
else else
pure = spellThang.aether.transpile source pure = spellThang.aether.transpile source
problems = spellThang.aether.problems problems = spellThang.aether.problems
#console.log "aether transpiled", source.length, "to", pure.length, "for", thangID, @spellKey #console.log "aether transpiled", source.length, "to", spellThang.aether.pure.length, "for", thangID, @spellKey
else else
spellThang.aether.pure = pure spellThang.aether.pure = pure
spellThang.aether.problems = problems spellThang.aether.problems = problems

View file

@ -480,11 +480,9 @@ verifyClientResponse = (responseObject, callback) ->
callback null, responseObject callback null, responseObject
fetchTaskLog = (responseObject, callback) -> fetchTaskLog = (responseObject, callback) ->
findParameters = query = TaskLog.findOne _id: responseObject.taskID
_id: responseObject.taskID
query = TaskLog
.findOne(findParameters)
query.exec (err, taskLog) => query.exec (err, taskLog) =>
return callback new Error("Couldn't find TaskLog for _id #{responseObject.taskID}!") unless taskLog
@taskLog = taskLog @taskLog = taskLog
#log.info "Fetched task log!" #log.info "Fetched task log!"
callback err, taskLog.toObject() callback err, taskLog.toObject()