This commit is contained in:
Scott Erickson 2014-04-03 18:43:36 -07:00
commit 978c84bc89
11 changed files with 170 additions and 54 deletions

View file

@ -38,7 +38,7 @@ module.exports = class Thang
publishNote: (channel, event) -> publishNote: (channel, event) ->
event.thang = @ event.thang = @
@world.publishNote channel, event @world.publishNote channel, event
setGoalState: (goalID, status) -> setGoalState: (goalID, status) ->
@world.setGoalState goalID, status @world.setGoalState goalID, status

View file

@ -98,10 +98,14 @@ module.exports = class ThangState
storage = @trackedPropertyValues[propIndex] storage = @trackedPropertyValues[propIndex]
value = @getStoredProp propIndex, type, storage value = @getStoredProp propIndex, type, storage
if prop is "pos" if prop is "pos"
@thang.pos = @thang.pos.copy() if @thang.pos.distanceSquared(value) > 900
@thang.pos.x = inverse * @thang.pos.x + ratio * value.x # Don't interpolate; it was probably a teleport. https://github.com/codecombat/codecombat/issues/738
@thang.pos.y = inverse * @thang.pos.y + ratio * value.y @thang.pos = value
@thang.pos.z = inverse * @thang.pos.z + ratio * value.z else
@thang.pos = @thang.pos.copy()
@thang.pos.x = inverse * @thang.pos.x + ratio * value.x
@thang.pos.y = inverse * @thang.pos.y + ratio * value.y
@thang.pos.z = inverse * @thang.pos.z + ratio * value.z
else if prop is "rotation" else if prop is "rotation"
@thang.rotation = inverse * @thang.rotation + ratio * value @thang.rotation = inverse * @thang.rotation + ratio * value
@thang.partialState = true @thang.partialState = true

View file

@ -5,7 +5,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
sending: "Enviando..." sending: "Enviando..."
cancel: "Cancelar" cancel: "Cancelar"
save: "Guardar" save: "Guardar"
# create: "Create" create: "Crear"
delay_1_sec: "1 segundo" delay_1_sec: "1 segundo"
delay_3_sec: "3 segundos" delay_3_sec: "3 segundos"
delay_5_sec: "5 segundos" delay_5_sec: "5 segundos"
@ -13,13 +13,13 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
fork: "Bifurcar" fork: "Bifurcar"
play: "Jugar" play: "Jugar"
# units: units:
# second: "second" second: "segundo"
# seconds: "seconds" seconds: "segundos"
# minute: "minute" minute: "minuto"
# minutes: "minutes" minutes: "minutos"
# hour: "hour" hour: "hora"
# hours: "hours" hours: "horas"
modal: modal:
close: "Cerrar" close: "Cerrar"
@ -53,7 +53,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
login: login:
sign_up: "Crear una cuenta" sign_up: "Crear una cuenta"
log_in: "Entrar" log_in: "Entrar"
# logging_in: "Logging In" logging_in: "Entrando..."
log_out: "Salir" log_out: "Salir"
recover: "recuperar cuenta" recover: "recuperar cuenta"
@ -76,12 +76,12 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
no_ie: "CodeCombat no funciona en Internet Explorer 9 o anteriores. ¡Lo sentimos!" no_ie: "CodeCombat no funciona en Internet Explorer 9 o anteriores. ¡Lo sentimos!"
no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y puede que no funcione!" no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y puede que no funcione!"
play: "Jugar" play: "Jugar"
# old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!" old_browser: "Ay, su navegador es demasiado viejo para ejecutar CodeCombat. ¡Lo sentimos!"
# old_browser_suffix: "You can try anyway, but it probably won't work." old_browser_suffix: "Puede tentar de todos modos, pero probablemente no va a funcionar."
# campaign: "Campaign" campaign: "Campaña"
# for_beginners: "For Beginners" for_beginners: "Para principiantes"
# multiplayer: "Multiplayer" multiplayer: "Multijugador"
# for_developers: "For Developers" for_developers: "Para programadores"
play: play:
choose_your_level: "Elige tu nivel" choose_your_level: "Elige tu nivel"

View file

@ -5,7 +5,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
sending: "Se trimite..." sending: "Se trimite..."
cancel: "Anulează" cancel: "Anulează"
save: "Salvează" save: "Salvează"
# create: "Create" create: "Crează"
delay_1_sec: "1 secundă" delay_1_sec: "1 secundă"
delay_3_sec: "3 secunde" delay_3_sec: "3 secunde"
delay_5_sec: "5 secunde" delay_5_sec: "5 secunde"
@ -13,13 +13,13 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
fork: "Fork" fork: "Fork"
play: "Joacă" play: "Joacă"
# units: units:
# second: "second" second: "secundă"
# seconds: "seconds" seconds: "secunde"
# minute: "minute" minute: "minut"
# minutes: "minutes" minutes: "minute"
# hour: "hour" hour: "oră"
# hours: "hours" hours: "ore"
modal: modal:
close: "Inchide" close: "Inchide"
@ -53,7 +53,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
login: login:
sign_up: "Crează cont" sign_up: "Crează cont"
log_in: "Log In" log_in: "Log In"
# logging_in: "Logging In" logging_in: "Se conectează"
log_out: "Log Out" log_out: "Log Out"
recover: "recuperează cont" recover: "recuperează cont"
@ -226,8 +226,8 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
skip_tutorial: "Sari peste (esc)" skip_tutorial: "Sari peste (esc)"
editor_config: "Editor Config" editor_config: "Editor Config"
editor_config_title: "Configurare Editor" editor_config_title: "Configurare Editor"
# editor_config_language_label: "Programming Language" editor_config_language_label: "Limbaj de Programare"
# editor_config_language_description: "Define the programming language you want to code in." editor_config_language_description: "Definește limbajul de programare în care vrei să codezi."
editor_config_keybindings_label: "Mapare taste" editor_config_keybindings_label: "Mapare taste"
editor_config_keybindings_default: "Default (Ace)" editor_config_keybindings_default: "Default (Ace)"
editor_config_keybindings_description: "Adaugă comenzi rapide suplimentare cunoscute din editoarele obisnuite." editor_config_keybindings_description: "Adaugă comenzi rapide suplimentare cunoscute din editoarele obisnuite."
@ -246,17 +246,17 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
tip_beta_launch: "CodeCombat a fost lansat beta in Octombrie 2013." tip_beta_launch: "CodeCombat a fost lansat beta in Octombrie 2013."
tip_js_beginning: "JavaScript este doar începutul." tip_js_beginning: "JavaScript este doar începutul."
tip_autocast_setting: "Ajutează setările de autocast apăsând pe rotița de pe buton." tip_autocast_setting: "Ajutează setările de autocast apăsând pe rotița de pe buton."
# think_solution: "Think of the solution, not the problem." think_solution: "Gândește-te la soluție, nu la problemă."
# tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra" tip_theory_practice: "Teoretic nu este nici o diferență înte teorie și practică. Dar practic este. - Yogi Berra"
# tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis" tip_error_free: "Există doar două metode de a scrie un program fără erori; numai a treia funcționează. - Alan Perlis"
# tip_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra" tip_debugging_program: "Dacă a face debuggin este procesul de a scoate bug-uri, atunci a programa este procesul de a introduce bug-uri. - Edsger W. Dijkstra"
# tip_forums: "Head over to the forums and tell us what you think!" tip_forums: "Intră pe forum și spune-ți părerea!"
tip_baby_coders: "În vitor până și bebelușii vor fi Archmage." tip_baby_coders: "În vitor până și bebelușii vor fi Archmage."
tip_morale_improves: "Se va încărca până până când va crește moralul." tip_morale_improves: "Se va încărca până până când va crește moralul."
tip_all_species: "Noi credem în șanse egale de a învăța programare pentru toate speciile." tip_all_species: "Noi credem în șanse egale de a învăța programare pentru toate speciile."
# tip_reticulating: "Reticulating spines." tip_reticulating: "Reticulating spines."
tip_harry: "Ha un Wizard, " tip_harry: "Ha un Wizard, "
# tip_great_responsibility: "With great coding skill comes great debug responsibility." tip_great_responsibility: "With great coding skill comes great debug responsibility."
# tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep." # tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep."
# tip_binary: "There are only 10 types of people in the world: those who understand binary, and those who don't." # tip_binary: "There are only 10 types of people in the world: those who understand binary, and those who don't."
# tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda" # tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda"
@ -587,16 +587,16 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
warmup: "Încălzire" warmup: "Încălzire"
vs: "VS" vs: "VS"
# multiplayer_launch: multiplayer_launch:
# introducing_dungeon_arena: "Introducing Dungeon Arena" introducing_dungeon_arena: "Prezentăm Dungeon Arena"
# new_way: "The new way to compete with code." new_way: "Noul mod de a concura prin linii de cod."
# to_battle: "To Battle, Developers!" to_battle: "La luptă, Developers!"
# modern_day_sorcerer: "You know how to code? That's badass. You're a modern-day sorcerer! Isn't about time that you used your magic coding powers to command your minions in epic combat? And we're not talking robots here." modern_day_sorcerer: "Știi să programezie? Tare. Ești un vrăjitor al noii ere! Nu crezi ca este timpul să îți folosești puterile de programare pentru a conduce în lupte epice minionii tăi? Și nu vorbim despre roboți aici."
# arenas_are_here: "CodeCombat head-to-head multiplayer arenas are here." arenas_are_here: "Arenele CodeCombat multiplayer 1v1 sunt aici."
# ladder_explanation: "Choose your heroes, enchant your human or ogre armies, and climb your way over defeated fellow Wizards to reach the top of the laddersthen challenge your friends in our glorious, asynchronous multiplayer coding arenas. If you're feeling creative, you can even" ladder_explanation: "Alegeți eroii,vrăjește armatele de orci sau oameni, și croiește-ți drumul luptând și învingând alți Vrăjitori pentru a ajunge în topul clasamentului. Dacă te simți creativ poți chiar să"
# fork_our_arenas: "fork our arenas" fork_our_arenas: "să dai fork la arenele noastre"
# create_worlds: "and create your own worlds." create_worlds: "și să îți creezi propriile lumi."
# javascript_rusty: "JavaScript a bit rusty? Don't worry; there's a" javascript_rusty: "N-ai mai pus mâna pe JavaScript? Nicio problemă; există un"
# tutorial: "tutorial" tutorial: "tutorial"
# new_to_programming: ". New to programming? Hit our beginner campaign to skill up." new_to_programming: ". Nou in tainele programării? Încearcă campania de începători pentru ați dezolvata abilitățile."
# so_ready: "I Am So Ready for This" so_ready: "Sunt atât de pregătit pentru asta!"

View file

@ -218,3 +218,18 @@ body[lang='ru'], body[lang|='zh'], body[lang='ja'], body[lang='pl'], body[lang='
text-transform: uppercase text-transform: uppercase
letter-spacing: -1px !important letter-spacing: -1px !important
@media only screen and (max-width: 800px)
.main-content-area
width: 100%
.content
width: 100%
.footer-link-text a
font-size: 17px
margin-left: 3px
margin-right: 3px
.share-buttons
margin-bottom: 20px
.partner-badges
display: none

View file

@ -95,3 +95,33 @@
li li
color: #ebebeb color: #ebebeb
padding: 8px 20px padding: 8px 20px
#mobile-nav
display: none
@media only screen and (max-width: 800px)
#top-nav
display: none
#mobile-nav
display: inline
a.navbar-brand
padding: 4px 20px 0px 20px
button.navbar-toggle
background: #483a2d
border: 2px solid #2f261d
span.icon-bar
background: #F9E612
ul li
font-family: 'Bangers', cursive
font-weight: normal
color: #fff
font-size: 25px
margin-top: 5px
margin-bottom: 5px
.header-font
color: #fff
.footer-link-text
width: 100%
display: ineline

View file

@ -92,3 +92,38 @@
width: 660px width: 660px
height: 382px height: 382px
pointer-events: none pointer-events: none
#mobile-trailer-wrapper
display: none
@media only screen and (max-width: 800px)
#home-view
#site-slogan
font-size: 30px
#trailer-wrapper
display: none
#mobile-trailer-wrapper
display: inline-block
width: 100%
iframe
display: block
margin: 0 auto
.game-mode-wrapper
width: 100%
img
width: 100%
.play-text
position: absolute
right: 45px
bottom: 0px
color: $yellow
font-size: 50px
font-family: Bangers
@include transition(color .10s linear)
h1
text-align: center
margin-top: 0

View file

@ -70,3 +70,8 @@
#must-log-in button #must-log-in button
margin-right: 10px margin-right: 10px
@media only screen and (max-width: 800px)
#ladder-view
#level-column img
width: 100%

View file

@ -1,6 +1,28 @@
body body
#fb-root #fb-root
block header block header
.nav.navbar.navbar-fixed-top#mobile-nav
.content.clearfix
.navbar-header
button.navbar-toggle(type="button" data-toggle="collapse" data-target="#collapsible-navbar")
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand(href='/')
img(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat")
.collapse.navbar-collapse#collapsible-navbar
ul.nav.navbar-nav
li.play
a.header-font(href='/play', data-i18n="nav.play") Levels
li.editor
a.header-font(href='/editor', data-i18n="nav.editor") Editor
li.blog
a.header-font(href='http://blog.codecombat.com/', data-i18n="nav.blog") Blog
li.forum
a.header-font(href='http://discourse.codecombat.com/', data-i18n="nav.forum") Forum
.nav.navbar.navbar-fixed-top#top-nav .nav.navbar.navbar-fixed-top#top-nav
.content.clearfix .content.clearfix
.navbar-header .navbar-header
@ -32,6 +54,10 @@ body
if me.isAdmin() if me.isAdmin()
li.admin li.admin
a.header-font(href='/admin', data-i18n="nav.admin") Admin a.header-font(href='/admin', data-i18n="nav.admin") Admin
block outer_content block outer_content
#outer-content-wrapper #outer-content-wrapper

View file

@ -7,7 +7,8 @@ block content
#trailer-wrapper #trailer-wrapper
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720&wmode=transparent" frameborder="0" wmode="opaque" allowfullscreen></iframe> <iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720&wmode=transparent" frameborder="0" wmode="opaque" allowfullscreen></iframe>
img(src="/images/pages/home/video_border.png") img(src="/images/pages/home/video_border.png")
#mobile-trailer-wrapper
<iframe src="//www.youtube.com/embed/1zjaA13k-dA" frameborder="0" width="280" height="158"></iframe>
hr hr
.alert.alert-danger.lt-ie10 .alert.alert-danger.lt-ie10
@ -21,7 +22,7 @@ block content
strong(data-i18n="home.old_browser") Uh oh, your browser is too old to run CodeCombat. Sorry! strong(data-i18n="home.old_browser") Uh oh, your browser is too old to run CodeCombat. Sorry!
br br
span(data-i18n="home.old_browser_suffix") You can try anyway, but it probably won't work. span(data-i18n="home.old_browser_suffix") You can try anyway, but it probably won't work.
a#beginner-campaign(href="/play/level/rescue-mission") a#beginner-campaign(href="/play/level/rescue-mission")
div.game-mode-wrapper div.game-mode-wrapper
if isEnglish if isEnglish

View file

@ -78,7 +78,7 @@ module.exports = class VictoryModal extends View
c = super() c = super()
c.body = @body c.body = @body
c.me = me c.me = me
c.hasNextLevel = _.isObject(@level.get('nextLevel')) and (@level.get('name') isnt "Mobile Artillery") c.hasNextLevel = _.isObject(@level.get('nextLevel'))
c.levelName = utils.i18n @level.attributes, 'name' c.levelName = utils.i18n @level.attributes, 'name'
c.level = @level c.level = @level
if c.level.get('type') is 'ladder' if c.level.get('type') is 'ladder'