Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-10-18 14:56:27 -07:00
commit 4278863c34
25 changed files with 337 additions and 315 deletions

View file

@ -91,9 +91,9 @@ module.exports = class LevelLoader extends CocoClass
loadDependenciesForSession: (session) -> loadDependenciesForSession: (session) ->
if session is @session if session is @session
Backbone.Mediator.publish 'level:session-loaded', level: @level, session: @session Backbone.Mediator.publish 'level:session-loaded', level: @level, session: @session
return unless @level.get('type', true) is 'hero' return unless @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
heroConfig = session.get('heroConfig') heroConfig = session.get('heroConfig')
heroConfig ?= me.get('heroConfig') heroConfig ?= me.get('heroConfig') if session is @session
heroConfig ?= {inventory: {}, thangType: '529ffbf1cf1818f2be000001'} # If all else fails, assign Tharin as the hero. heroConfig ?= {inventory: {}, thangType: '529ffbf1cf1818f2be000001'} # If all else fails, assign Tharin as the hero.
session.set 'heroConfig', heroConfig unless _.isEqual heroConfig, session.get('heroConfig') session.set 'heroConfig', heroConfig unless _.isEqual heroConfig, session.get('heroConfig')
url = "/db/thang.type/#{heroConfig.thangType}/version" url = "/db/thang.type/#{heroConfig.thangType}/version"
@ -334,7 +334,7 @@ module.exports = class LevelLoader extends CocoClass
@initialized = true @initialized = true
@world = new World() @world = new World()
@world.levelSessionIDs = if @opponentSessionID then [@sessionID, @opponentSessionID] else [@sessionID] @world.levelSessionIDs = if @opponentSessionID then [@sessionID, @opponentSessionID] else [@sessionID]
serializedLevel = @level.serialize(@supermodel, @session) serializedLevel = @level.serialize(@supermodel, @session, @opponentSession)
@world.loadFromLevel serializedLevel, false @world.loadFromLevel serializedLevel, false
console.log 'World has been initialized from level loader.' console.log 'World has been initialized from level loader.'

View file

@ -193,7 +193,7 @@ module.exports = class Simulator extends CocoClass
@levelLoader = null @levelLoader = null
setupGod: -> setupGod: ->
@god.setLevel @level.serialize @supermodel @god.setLevel @level.serialize @supermodel, @task.getSessions()[0], @task.getSessions()[1]
@god.setLevelSessionIDs (session.sessionID for session in @task.getSessions()) @god.setLevelSessionIDs (session.sessionID for session in @task.getSessions())
@god.setWorldClassMap @world.classMap @god.setWorldClassMap @world.classMap
@god.setGoalManager new GoalManager(@world, @level.get 'goals') @god.setGoalManager new GoalManager(@world, @level.get 'goals')

View file

@ -540,7 +540,9 @@ module.exports = Surface = class Surface extends CocoClass
#- Camera focus on hero #- Camera focus on hero
focusOnHero: -> focusOnHero: ->
@heroLank = @lankBoss.lankFor 'Hero Placeholder' @heroLank = @lankBoss.lankFor 'Hero Placeholder'
if me.team is 'ogres'
# TODO: do this for real
@heroLank = @lankBoss.lankFor 'Hero Placeholder 1'
#- Real-time playback #- Real-time playback

View file

@ -237,35 +237,35 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
time_goto: "Ir para:" time_goto: "Ir para:"
infinite_loop_try_again: "Tentar novamente" infinite_loop_try_again: "Tentar novamente"
infinite_loop_reset_level: "Resetar nível" infinite_loop_reset_level: "Resetar nível"
# infinite_loop_comment_out: "Comment Out My Code" infinite_loop_comment_out: "Comentar Meu Código"
tip_toggle_play: "Alterne entre rodando/pausado com Ctrl+P." tip_toggle_play: "Alterne entre rodando/pausado com Ctrl+P."
tip_scrub_shortcut: "Ctrl+[ e Ctrl+] rebobina e avança." tip_scrub_shortcut: "Ctrl+[ e Ctrl+] rebobina e avança."
# tip_guide_exists: "Click the guide at the top of the page for useful info." tip_guide_exists: "Clique no guia no topo da página para informações úteis."
tip_open_source: "CodeCombat é 100% código aberto!" tip_open_source: "CodeCombat é 100% código aberto!"
tip_beta_launch: "CodeCombat lançou sua versão beta em outubro de 2013." tip_beta_launch: "CodeCombat lançou sua versão beta em outubro de 2013."
tip_think_solution: "Pense na solução, não no problema." tip_think_solution: "Pense na solução, não no problema."
# tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra" tip_theory_practice: "Na teoria, não existe diferença entre teoria e prática. Mas, na prática, há. - Yogi Berra"
# tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis" tip_error_free: "Existem duas formas de escrever programas sem erros; apenas a terceira funciona. - 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: "Se depurar é o processo de remover erros, então programar deve ser o processo de adicioná-los. - Edsger W. Dijkstra"
# tip_forums: "Head over to the forums and tell us what you think!" tip_forums: "Vá aos fóruns e diga-nos o que você pensa!"
# tip_baby_coders: "In the future, even babies will be Archmages." tip_baby_coders: "No futuro, até bebês serão Arquimagos."
# tip_morale_improves: "Loading will continue until morale improves." tip_morale_improves: "O carregamento continuará até que a ânimo melhore."
# tip_all_species: "We believe in equal opportunities to learn programming for all species." tip_all_species: "Nós acreditamos em oportunidades iguais para todas as espécies aprenderem a programar."
# tip_reticulating: "Reticulating spines." tip_reticulating: "Reticulando espinhas."
# tip_harry: "Yer a Wizard, " tip_harry: "Você é um Feiticeiro, "
# tip_great_responsibility: "With great coding skill comes great debug responsibility." tip_great_responsibility: "Com grandes poderes de programacão vêm grandes responsabilidades de debug."
# tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep." tip_munchkin: "Se você não comer legumes e verduras, um ogro virá te buscar equanto você estiver dormindo."
# tip_binary: "There are only 10 types of people in the world: those who understand binary, and those who don't." tip_binary: "Existem apenas 10 tipos de pessoas no mundo: as que entendem binário e as que não entendem."
# tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda" tip_commitment_yoda: "Um programador deve possuir um compromisso profundo, uma mente séria. ~ Yoda"
tip_no_try: "Faça. Ou não faça. Não existe tentar. - Yoda" tip_no_try: "Faça. Ou não faça. Não existe tentar. - Yoda"
tip_patience: "Paciência você deve ter, jovem Padawan. - Yoda" tip_patience: "Paciência você deve ter, jovem Padawan. - Yoda"
tip_documented_bug: "Um bug documentado não é um bug; é uma funcionalidade." tip_documented_bug: "Um bug documentado não é um bug; é uma funcionalidade."
# tip_impossible: "It always seems impossible until it's done. - Nelson Mandela" tip_impossible: "Sempre parece impossível, até ser feito. - Nelson Mandela"
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" tip_talk_is_cheap: "Falar é fácil. Mostre-me o código. - Linus Torvalds"
# tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" tip_first_language: "A coisa mais desastrosa que você pode aprender é a sua primeira linguagem de programação. - Alan Kay"
# tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." tip_hardware_problem: "P: Quantos programadores são necessários para se trocar uma lâmpada? R: Nenhum, é um problema de hardware."
# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." tip_hofstadters_law: "Lei de Hofstadter: Sempre demora mais do que você espera, mesmo quando você leva em consideração a Lei de Hofstadter."
# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" tip_premature_optimization: "Uma otimização permatura é a raíz de todos os males. - Donald Knuth"
tip_brute_force: "Na dúvida, utilize força bruta. - Ken Thompson" tip_brute_force: "Na dúvida, utilize força bruta. - Ken Thompson"
customize_wizard: "Personalize o feiticeiro" customize_wizard: "Personalize o feiticeiro"
@ -278,12 +278,12 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
multiplayer_tab: "Multijogador" multiplayer_tab: "Multijogador"
inventory_caption: "Equipar seu herói" inventory_caption: "Equipar seu herói"
choose_hero_caption: "Escolha seu herói, linguagem" choose_hero_caption: "Escolha seu herói, linguagem"
# save_load_caption: "... and view history" save_load_caption: "... e visualizar o histórico"
options_caption: "Configurar preferências" options_caption: "Configurar preferências"
guide_caption: "Documentos e dicas" guide_caption: "Documentos e dicas"
multiplayer_caption: "Jogue com seus amigos!" multiplayer_caption: "Jogue com seus amigos!"
# inventory: inventory:
choose_inventory: "Equipar itens" choose_inventory: "Equipar itens"
choose_hero: choose_hero:
@ -387,8 +387,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
email_announcements: "Notícias" email_announcements: "Notícias"
email_announcements_description: "Receba emails com as últimas notícias e desenvolvimentos do CodeCombat." email_announcements_description: "Receba emails com as últimas notícias e desenvolvimentos do CodeCombat."
email_notifications: "Notificações" email_notifications: "Notificações"
# email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." email_notifications_summary: "Controles para notificações por email, automáticas e personalizadas, relacionadas a sua atividade no CodeCombat."
# email_any_notes: "Any Notifications" email_any_notes: "Quaisquer Notificações"
email_any_notes_description: "Desabilitar todas as atividades de notificação por email." email_any_notes_description: "Desabilitar todas as atividades de notificação por email."
email_news: "Notícias" email_news: "Notícias"
email_recruit_notes: "Oportunidades de emprego" email_recruit_notes: "Oportunidades de emprego"
@ -403,8 +403,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
password_mismatch: "As senhas não estão iguais" password_mismatch: "As senhas não estão iguais"
password_repeat: "Por favor repita sua senha." password_repeat: "Por favor repita sua senha."
job_profile: "Perfil de trabalho" # Rest of this section (the job profile stuff and wizard stuff) is deprecated job_profile: "Perfil de trabalho" # Rest of this section (the job profile stuff and wizard stuff) is deprecated
# job_profile_approved: "Your job profile has been approved by CodeCombat. Employers will be able to see it until you either mark it inactive or it has not been changed for four weeks." job_profile_approved: "Seu perfil de trabalho foi aprovado pelo CodeCombat. Empregadores poderão vê-lo até que você o marque como inativo ou caso não seja alterado por quatro semanas."
# job_profile_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job." job_profile_explanation: "Olá! Preencha tudo e iremos entrar em contato sobre encontrar um trabalho como desenvolvedor de software."
sample_profile: "Veja um perfil de exemplo" sample_profile: "Veja um perfil de exemplo"
view_profile: "Visualizar seu perfil" view_profile: "Visualizar seu perfil"
wizard_tab: "Feiticeiro" wizard_tab: "Feiticeiro"
@ -418,8 +418,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
shift: "Shift" shift: "Shift"
cast_spell: "Lançar feitiço atual." cast_spell: "Lançar feitiço atual."
run_real_time: "Rodar em tempo real." run_real_time: "Rodar em tempo real."
# continue_script: "Continue past current script." continue_script: "Pular script atual."
# skip_scripts: "Skip past all skippable scripts." skip_scripts: "Pular todos os scripts puláveis."
toggle_playback: "Alternar play/pause." toggle_playback: "Alternar play/pause."
scrub_playback: "Rolar para frente e para trás no tempo." scrub_playback: "Rolar para frente e para trás no tempo."
single_scrub_playback: "Rolar para frente e para trás no tempo, quadro a quadro." single_scrub_playback: "Rolar para frente e para trás no tempo, quadro a quadro."
@ -433,20 +433,20 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
community: community:
main_title: "Comunidade CodeCombat" main_title: "Comunidade CodeCombat"
# introduction: "Check out the ways you can get involved below and decide what sounds the most fun. We look forward to working with you!" introduction: "Verifique abaixo de que maneires você pode se envolver e decida qual lhe parece mais divertida. Esperamos trabalhar com você em breve!"
level_editor_prefix: "Use o CodeCombat" level_editor_prefix: "Use o CodeCombat"
# level_editor_suffix: "to create and edit levels. Users have created levels for their classes, friends, hackathons, students, and siblings. If create a new level sounds intimidating you can start by forking one of ours!" level_editor_suffix: "para criar e editar níveis. Usuários criaram níveis para suas classes, amigos, hackathons, estudantes e parentes. Se criar um novo nível soa intimidador, você pode iniciar fazendo um fork de um dos nossos."
# thang_editor_prefix: "We call units within the game 'thangs'. Use the" # thang_editor_prefix: "We call units within the game 'thangs'. Use the"
# thang_editor_suffix: "to modify the CodeCombat source artwork. Allow units to throw projectiles, alter the direction of an animation, change a unit's hit points, or upload your own vector sprites." # thang_editor_suffix: "to modify the CodeCombat source artwork. Allow units to throw projectiles, alter the direction of an animation, change a unit's hit points, or upload your own vector sprites."
# article_editor_prefix: "See a mistake in some of our docs? Want to make some instructions for your own creations? Check out the" article_editor_prefix: "Encontrou algo errado na nossa documentação? Gostaria de criar algumas instruções para suas próprias criações? Dê uma olhada em"
# article_editor_suffix: "and help CodeCombat players get the most out of their playtime." article_editor_suffix: "e ajude os jogadores do CodeCombat a aproveitar o máximo de seu jogo."
# find_us: "Find us on these sites" find_us: "Encontre-nos nestes sites"
# social_blog: "Read the CodeCombat blog on Sett" social_blog: "Leia o blog do CodeCombat no Sett"
# social_discource: "Join the discussion on our Discourse forum" social_discource: "Entre na discussão no nosso Fórum"
social_facebook: "Curta o CodeCombat no Facebook" social_facebook: "Curta o CodeCombat no Facebook"
social_twitter: "Siga o CodeCombat no Twitter" social_twitter: "Siga o CodeCombat no Twitter"
# social_gplus: "Join CodeCombat on Google+" social_gplus: "Ingresse no CodeCombat no Google+"
# social_hipchat: "Chat with us in the public CodeCombat HipChat room" social_hipchat: "Converse conosco na sala pública do CodeCombat no HipChat"
contribute_to_the_project: "Contribuir para o projeto" contribute_to_the_project: "Contribuir para o projeto"
classes: classes:
@ -474,13 +474,13 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
revert_models: "Reverter Modelos" revert_models: "Reverter Modelos"
pick_a_terrain: "Escolha um Terreno" pick_a_terrain: "Escolha um Terreno"
small: "Pequeno" small: "Pequeno"
# grassy: "Grassy" grassy: "Gramado"
# fork_title: "Fork New Version" fork_title: "Realizar um Novo Fork"
# fork_creating: "Creating Fork..." fork_creating: "Criando Fork..."
# generate_terrain: "Generate Terrain" generate_terrain: "Gerando Terreno"
more: "Mais" more: "Mais"
wiki: "Wiki" wiki: "Wiki"
# live_chat: "Live Chat" live_chat: "Chat Ao Vivo"
level_some_options: "Algumas Opções?" level_some_options: "Algumas Opções?"
level_tab_thangs: "Thangs" level_tab_thangs: "Thangs"
level_tab_scripts: "Scripts" level_tab_scripts: "Scripts"
@ -489,7 +489,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
level_tab_systems: "Sistemas" level_tab_systems: "Sistemas"
level_tab_docs: "Documentação" level_tab_docs: "Documentação"
level_tab_thangs_title: "Thangs Atuais" level_tab_thangs_title: "Thangs Atuais"
# level_tab_thangs_all: "All" level_tab_thangs_all: "Tudo"
level_tab_thangs_conditions: "Condições de Início" level_tab_thangs_conditions: "Condições de Início"
level_tab_thangs_add: "Adicionar Thangs" level_tab_thangs_add: "Adicionar Thangs"
delete: "Excluir" delete: "Excluir"
@ -512,20 +512,20 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
new_article_title: "Criar um Novo Artigo" new_article_title: "Criar um Novo Artigo"
new_thang_title: "Criar um Novo Tipo de Thang" new_thang_title: "Criar um Novo Tipo de Thang"
new_level_title: "Criar um Novo Nível" new_level_title: "Criar um Novo Nível"
# new_article_title_login: "Log In to Create a New Article" new_article_title_login: "Faça login para Criar um Novo Artigo"
# new_thang_title_login: "Log In to Create a New Thang Type" # new_thang_title_login: "Log In to Create a New Thang Type"
# new_level_title_login: "Log In to Create a New Level" new_level_title_login: "Faça login para Criar um Novo Nível"
# new_achievement_title: "Create a New Achievement" new_achievement_title: "Criar Nova Conquista"
# new_achievement_title_login: "Log In to Create a New Achievement" new_achievement_title_login: "Faça login para Criar uma Nova Conquista"
article_search_title: "Procurar Artigos Aqui" article_search_title: "Procurar Artigos Aqui"
thang_search_title: "Procurar Tipos de Thang Aqui" thang_search_title: "Procurar Tipos de Thang Aqui"
level_search_title: "Procurar Níveis Aqui" level_search_title: "Procurar Níveis Aqui"
# achievement_search_title: "Search Achievements" achievement_search_title: "Buscar Conquistas"
# read_only_warning2: "Note: you can't save any edits here, because you're not logged in." read_only_warning2: "Nota: você não pode salvar suas edições aqui pois não está logado."
# no_achievements: "No achievements have been added for this level yet." no_achievements: "Nenhuma conquista foi adicionada para esse nível ainda."
# achievement_query_misc: "Key achievement off of miscellanea" # achievement_query_misc: "Key achievement off of miscellanea"
# achievement_query_goals: "Key achievement off of level goals" # achievement_query_goals: "Key achievement off of level goals"
# level_completion: "Level Completion" level_completion: "Conclusão do Nível"
article: article:
edit_btn_preview: "Prever" edit_btn_preview: "Prever"
@ -541,7 +541,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
introduction_desc_ending: "Nós esperamos que você se junte a nossa festa!" introduction_desc_ending: "Nós esperamos que você se junte a nossa festa!"
introduction_desc_signature: "- Nick, George, Scott, Michael, Jeremy and Matt" introduction_desc_signature: "- Nick, George, Scott, Michael, Jeremy and Matt"
alert_account_message_intro: "Ei!" alert_account_message_intro: "Ei!"
# alert_account_message: "To subscribe for class emails, you'll need to be logged in first." alert_account_message: "Para assinar os emails de classe, você precisa estar logado."
archmage_summary: "Interessado em trabalhar em gráficos do jogo, design de interface de usuário, banco de dados e organização de servidores, networking multijogador, física, som ou desempenho do motor de jogo? Quer ajudar a construir um jogo para ajudar outras pessoas a aprender o que você é bom? Temos muito a fazer e se você é um programador experiente e quer desenvolver para o CodeCombat, esta classe é para você. Gostaríamos muito de sua ajuda a construir o melhor jogo de programação da história." archmage_summary: "Interessado em trabalhar em gráficos do jogo, design de interface de usuário, banco de dados e organização de servidores, networking multijogador, física, som ou desempenho do motor de jogo? Quer ajudar a construir um jogo para ajudar outras pessoas a aprender o que você é bom? Temos muito a fazer e se você é um programador experiente e quer desenvolver para o CodeCombat, esta classe é para você. Gostaríamos muito de sua ajuda a construir o melhor jogo de programação da história."
archmage_introduction: "Uma das melhores partes sobre a construção de jogos é que eles sintetizam diversas coisas diferentes. Gráficos, som, interação em tempo real, redes sociais, e, claro, muitos dos aspectos mais comuns da programação, desde a gestão em baixo nível de banco de dados, e administração do servidor até interação com o usuário e desenvolvimento da interface. Há muito a fazer, e se você é um programador experiente com um desejo ardente de realmente mergulhar no âmago da questão do CodeCombat, esta classe pode ser para você. Nós gostaríamos de ter sua ajuda para construir o melhor jogo de programação de todos os tempos." archmage_introduction: "Uma das melhores partes sobre a construção de jogos é que eles sintetizam diversas coisas diferentes. Gráficos, som, interação em tempo real, redes sociais, e, claro, muitos dos aspectos mais comuns da programação, desde a gestão em baixo nível de banco de dados, e administração do servidor até interação com o usuário e desenvolvimento da interface. Há muito a fazer, e se você é um programador experiente com um desejo ardente de realmente mergulhar no âmago da questão do CodeCombat, esta classe pode ser para você. Nós gostaríamos de ter sua ajuda para construir o melhor jogo de programação de todos os tempos."
class_attributes: "Atributos da Classe" class_attributes: "Atributos da Classe"
@ -623,11 +623,11 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
simulation_explanation: "Por simular partidas você pode classificar seu jogo mais rápido!" simulation_explanation: "Por simular partidas você pode classificar seu jogo mais rápido!"
simulate_games: "Simular Partidas!" simulate_games: "Simular Partidas!"
simulate_all: "RESETAR E SIMULAR PARTIDAS" simulate_all: "RESETAR E SIMULAR PARTIDAS"
# games_simulated_by: "Games simulated by you:" games_simulated_by: "Partidas simuladas por você:"
# games_simulated_for: "Games simulated for you:" games_simulated_for: "Partidas simuladas para você:"
# games_simulated: "Games simulated" games_simulated: "Partidas simuladas"
# games_played: "Games played" games_played: "Partidas jogadas"
# ratio: "Ratio" ratio: "Taxa"
leaderboard: "Tabela de Classificação" leaderboard: "Tabela de Classificação"
battle_as: "Lutar como " battle_as: "Lutar como "
summary_your: "Seus " summary_your: "Seus "
@ -640,13 +640,13 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
rank_submitted: "Submetendo para a Classificação" rank_submitted: "Submetendo para a Classificação"
rank_failed: "Falha ao Classificar" rank_failed: "Falha ao Classificar"
rank_being_ranked: "Jogo sendo Classificado" rank_being_ranked: "Jogo sendo Classificado"
# rank_last_submitted: "submitted " rank_last_submitted: "enviado "
# help_simulate: "Help simulate games?" help_simulate: "Ajuda simulando partidas?"
code_being_simulated: "Seu novo código está sendo simulado por outros jogadores para ser classificado. Isto atualizará automaticamente assim que novas partidas entrarem." code_being_simulated: "Seu novo código está sendo simulado por outros jogadores para ser classificado. Isto atualizará automaticamente assim que novas partidas entrarem."
no_ranked_matches_pre: "Sem partidas classificadas para o " no_ranked_matches_pre: "Sem partidas classificadas para o "
no_ranked_matches_post: " time! Jogue contra alguns competidores e então volte aqui para ter seu jogo classificado." no_ranked_matches_post: " time! Jogue contra alguns competidores e então volte aqui para ter seu jogo classificado."
choose_opponent: "Escolha um Oponente" choose_opponent: "Escolha um Oponente"
# select_your_language: "Select your language!" select_your_language: "Selecione sua linguagem!"
tutorial_play: "Jogue o Tutorial" tutorial_play: "Jogue o Tutorial"
tutorial_recommended: "Recomendado se você nunca jogou antes" tutorial_recommended: "Recomendado se você nunca jogou antes"
tutorial_skip: "Pular Tutorial" tutorial_skip: "Pular Tutorial"
@ -654,21 +654,21 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
tutorial_play_first: "Jogue o Tutorial primeiro." tutorial_play_first: "Jogue o Tutorial primeiro."
simple_ai: "IA Simples" simple_ai: "IA Simples"
warmup: "Aquecimento" warmup: "Aquecimento"
# friends_playing: "Friends Playing" friends_playing: "Amigos Jogando"
# log_in_for_friends: "Log in to play with your friends!" log_in_for_friends: "Faça loginp ara jogar com seus amigos!"
# social_connect_blurb: "Connect and play against your friends!" social_connect_blurb: "Conecte-se e jogue contra seus amigos!"
# invite_friends_to_battle: "Invite your friends to join you in battle!" invite_friends_to_battle: "Convide seus amigos para juntarem-se à sua batalha!"
# fight: "Fight!" fight: "Lutem!"
# watch_victory: "Watch your victory" watch_victory: "Assista sua vitória"
# defeat_the: "Defeat the" defeat_the: "Derrote"
# tournament_ends: "Tournament ends" tournament_ends: "Fim do torneio"
# tournament_ended: "Tournament ended" tournament_ended: "Torneio encerrado"
# tournament_rules: "Tournament Rules" tournament_rules: "Regras do Torneio"
# tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details" tournament_blurb: "Escreva códigos, colete ouro, construa exércitos, esmague inimigos, ganhe prêmios e aprimore sua carreira no nosso Torneio da Cobiça de $40,000! Veja os detalhes"
# tournament_blurb_criss_cross: "Win bids, construct paths, outwit opponents, grab gems, and upgrade your career in our Criss-Cross tournament! Check out the details" tournament_blurb_criss_cross: "Ganhe leilões, construa caminhos, despiste oponentes, agarre joias e aprimore sua carreira no nosso Torneio de Cruzadas! Veja os detalhes"
# tournament_blurb_blog: "on our blog" tournament_blurb_blog: "no nosso blog"
# rules: "Rules" rules: "Regras"
# winners: "Winners" winners: "Vencedores"
user: user:
stats: "Estatísticas" stats: "Estatísticas"
@ -687,8 +687,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
achievements: achievements:
last_earned: "Últimos Ganhos" last_earned: "Últimos Ganhos"
# amount_achieved: "Amount" amount_achieved: "Montante"
# achievement: "Achievement" achievement: "Conquista"
category_contributor: "Cotribuidor" category_contributor: "Cotribuidor"
category_miscellaneous: "Diversos" category_miscellaneous: "Diversos"
category_levels: "Níveis" category_levels: "Níveis"
@ -696,95 +696,95 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
current_xp_prefix: "" current_xp_prefix: ""
current_xp_postfix: " no total" current_xp_postfix: " no total"
new_xp_prefix: "" new_xp_prefix: ""
# new_xp_postfix: " earned" new_xp_postfix: " adquirido"
left_xp_prefix: "" left_xp_prefix: ""
# left_xp_infix: " until level " left_xp_infix: " até o nível "
left_xp_postfix: "" left_xp_postfix: ""
account: account:
recently_played: "Jogos Recentes" recently_played: "Jogos Recentes"
no_recent_games: "Não foram feitos jogos durante duas semanas." no_recent_games: "Não foram feitos jogos durante duas semanas."
# loading_error: loading_error:
# could_not_load: "Error loading from server" could_not_load: "Erro ao carregar do servidor"
# connection_failure: "Connection failed." connection_failure: "Conexão falhou."
# unauthorized: "You need to be signed in. Do you have cookies disabled?" unauthorized: "Você precisa estar autenticado. Você desativou os cookies?"
# forbidden: "You do not have the permissions." forbidden: "Você não possui permissão."
# not_found: "Not found." not_found: "Não encontrado."
# not_allowed: "Method not allowed." not_allowed: "Método não permitodo."
# timeout: "Server timeout." timeout: "Tempo de requisição esgotado."
# conflict: "Resource conflict." conflict: "Conflito de recurso."
# bad_input: "Bad input." bad_input: "Problema de entrada (bad input)."
# server_error: "Server error." server_error: "Erro do servidor."
# unknown: "Unknown error." unknown: "Erro desconhecido."
# resources: resources:
# sessions: "Sessions" sessions: "Sessão"
# your_sessions: "Your Sessions" your_sessions: "Sua sessão"
# level: "Level" level: "vel"
# social_network_apis: "Social Network APIs" social_network_apis: "APIs das Redes Sociais"
# facebook_status: "Facebook Status" facebook_status: "Status do Facebook"
# facebook_friends: "Facebook Friends" facebook_friends: "Amigos do Facebook"
# facebook_friend_sessions: "Facebook Friend Sessions" facebook_friend_sessions: "Sessões de Amigos do Facebook"
# gplus_friends: "G+ Friends" gplus_friends: "Amigos do G+"
# gplus_friend_sessions: "G+ Friend Sessions" gplus_friend_sessions: "Sessões de Amigos do G+"
# leaderboard: "Leaderboard" leaderboard: "Tabela de Classificação"
# user_schema: "User Schema" user_schema: "Esquema do Usuário"
# user_profile: "User Profile" user_profile: "Perfil do Usuário"
# patches: "Patches" patches: "Patches"
# patched_model: "Source Document" patched_model: "Documento da Fonte"
# model: "Model" model: "Modelo"
# system: "System" system: "Sistema"
# systems: "Systems" systems: "Sistemas"
# component: "Component" component: "Componente"
# components: "Components" components: "Componentes"
# thang: "Thang" # thang: "Thang"
# thangs: "Thangs" # thangs: "Thangs"
# level_session: "Your Session" level_session: "Sua Sessão"
# opponent_session: "Opponent Session" opponent_session: "Sessão do Oponente"
# article: "Article" article: "Artigo"
# user_names: "User Names" user_names: "Nomes de Usuários"
# thang_names: "Thang Names" # thang_names: "Thang Names"
# files: "Files" files: "Arquivos"
# top_simulators: "Top Simulators" top_simulators: "Top Simuladores"
# source_document: "Source Document" source_document: "Documento da Fonte"
# document: "Document" document: "Documento"
# sprite_sheet: "Sprite Sheet" # sprite_sheet: "Sprite Sheet"
# employers: "Employers" employers: "Empregadores"
# candidates: "Candidates" candidates: "Candidatos"
# candidate_sessions: "Candidate Sessions" # candidate_sessions: "Candidate Sessions"
# user_remark: "User Remark" user_remark: "Observação do Usuário"
# user_remarks: "User Remarks" user_remarks: "Observações do Usuário"
# versions: "Versions" versions: "Versões"
# items: "Items" items: "Itens"
# heroes: "Heroes" heroes: "Heróis"
# wizard: "Wizard" wizard: "Assistente"
# achievement: "Achievement" achievement: "Conquista"
# clas: "CLAs" clas: "CLAs"
# play_counts: "Play Counts" play_counts: "Contagem de Jogos"
# feedback: "Feedback" feedback: "Comentários"
delta: delta:
# added: "Added" added: "Adicionado"
# modified: "Modified" modified: "Modificado"
# deleted: "Deleted" deleted: "Removido"
# moved_index: "Moved Index" moved_index: "Índice Movido"
# text_diff: "Text Diff" text_diff: "Diff do Texto"
# merge_conflict_with: "MERGE CONFLICT WITH" merge_conflict_with: "MERGE DO CONFLITO COM"
no_changes: "Sem Alterações" no_changes: "Sem Alterações"
# guide: # guide:
# temp: "Temp" # temp: "Temp"
multiplayer: multiplayer:
multiplayer_title: "Configurações do Multijogador" # We'll be changing this around significantly soon. Until then, it's not important to translate. multiplayer_title: "Configurações de Multijogador" # We'll be changing this around significantly soon. Until then, it's not important to translate.
# multiplayer_toggle: "Enable multiplayer" multiplayer_toggle: "Habilitar multijogador"
# multiplayer_toggle_description: "Allow others to join your game." multiplayer_toggle_description: "Permitir que outros entrem no seu jogo."
multiplayer_link_description: "Passe este link para quem você quiser que se una à partida." multiplayer_link_description: "Passe este link para quem você quiser que se una à partida."
multiplayer_hint_label: "Dica:" multiplayer_hint_label: "Dica:"
multiplayer_hint: " Clique no link para selecionar tudo, então dê Ctrl+C ou ⌘+C para copiar o link. " multiplayer_hint: " Clique no link para selecionar tudo, então dê Ctrl+C ou ⌘+C para copiar o link. "
multiplayer_coming_soon: "Mais novidades no multijogador estão chegando!" multiplayer_coming_soon: "Mais novidades no multijogador estão chegando!"
# multiplayer_sign_in_leaderboard: "Sign in or create an account and get your solution on the leaderboard." multiplayer_sign_in_leaderboard: "Autentique-se ou crie uma conta para enviar sua solução para a tabela de classificação."
legal: legal:
page_title: "Jurídico" page_title: "Jurídico"
@ -847,25 +847,25 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
nutshell_description: "Todos os recursos que oferecemos no Editor de Níveis é livre para usar como quiser para a criação de níveis. Mas nós nos reservamos o direito de restringir a distribuição dos próprios níveis (que são criados em codecombat.com) para que possam ser cobrados no futuro, se é que isso precise acontecer." nutshell_description: "Todos os recursos que oferecemos no Editor de Níveis é livre para usar como quiser para a criação de níveis. Mas nós nos reservamos o direito de restringir a distribuição dos próprios níveis (que são criados em codecombat.com) para que possam ser cobrados no futuro, se é que isso precise acontecer."
canonical: "A versão em inglês deste documento é a versão canônica definitiva. Se houver discrepâncias entre traduções, o documento em inglês tem precedência." canonical: "A versão em inglês deste documento é a versão canônica definitiva. Se houver discrepâncias entre traduções, o documento em inglês tem precedência."
# ladder_prizes: ladder_prizes:
# title: "Tournament Prizes" # This section was for an old tournament and doesn't need new translations now. title: "Prêmios do Torneio" # This section was for an old tournament and doesn't need new translations now.
# blurb_1: "These prizes will be awarded according to" blurb_1: "Esses prêmios serão entregues de acordo com"
# blurb_2: "the tournament rules" blurb_2: "as regras do torneio"
# blurb_3: "to the top human and ogre players." blurb_3: "para os melhores jogadores humano e ogro."
# blurb_4: "Two teams means double the prizes!" blurb_4: "Dois times significa o dobro de prêmios!"
# blurb_5: "(There will be two first place winners, two second-place winners, etc.)" blurb_5: "(Haverá dois vencedores em primeiro lugar, dois vencedores em segundo lugar etc.)"
# rank: "Rank" rank: "Classificação"
# prizes: "Prizes" prizes: "Prêmios"
# total_value: "Total Value" total_value: "Valor Total"
# in_cash: "in cash" # in_cash: "in cash"
# custom_wizard: "Custom CodeCombat Wizard" custom_wizard: "Assistente Personalizado do CodeCombat"
# custom_avatar: "Custom CodeCombat avatar" custom_avatar: "Avatar Personalizado do CodeCombat"
# heap: "for six months of \"Startup\" access" heap: "para seis meses de acesso \"Startup\""
# credits: "credits" credits: "créditos"
# one_month_coupon: "coupon: choose either Rails or HTML" one_month_coupon: "cupom: escolha Rails ou HTML"
# one_month_discount: "discount, 30% off: choose either Rails or HTML" one_month_discount: "desconto de 30%: escolha Rails ou HTML"
# license: "license" license: "licença"
# oreilly: "ebook of your choice" oreilly: "ebook de sua escolha"
wizard_settings: wizard_settings:
title: "Configurações do Feiticeiro" title: "Configurações do Feiticeiro"
@ -889,91 +889,91 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
done_editing: "Edição Feita" done_editing: "Edição Feita"
profile_for_prefix: "Perfil de " profile_for_prefix: "Perfil de "
profile_for_suffix: "" profile_for_suffix: ""
# featured: "Featured" featured: "Disponível"
# not_featured: "Not Featured" not_featured: "Não disponível"
# looking_for: "Looking for:" looking_for: "Procurando por:"
last_updated: "Última atualização:" last_updated: "Última atualização:"
contact: "Contato" contact: "Contato"
# active: "Looking for interview offers now" active: "Procurando por entrevistas de emprego no momento"
# inactive: "Not looking for offers right now" inactive: "Não está procurando por oportunidades no momento"
complete: "Completo" complete: "Completo"
next: "Próximo" next: "Próximo"
next_city: "Cidade?" next_city: "Cidade?"
# next_country: "pick your country." next_country: "escolha seu país."
next_name: "Nome?" next_name: "Nome?"
# next_short_description: "write a short description." next_short_description: "escreva uma breve descrição."
# next_long_description: "describe your desired position." next_long_description: "descreva o tipo de vaga ou cargo desejados."
# next_skills: "list at least five skills." next_skills: "relacione pelo menos cinco habilidades."
# next_work: "chronicle your work history." next_work: "descreva seu histórico de trabalho."
# next_education: "recount your educational ordeals." next_education: "descreva seu percurso acadêmico."
# next_projects: "show off up to three projects you've worked on." next_projects: "mostre até três projetos nos quais você trabalhou."
# next_links: "add any personal or social links." next_links: "adicione links pessoais ou sociais."
# next_photo: "add an optional professional photo." next_photo: "adicione uma foto profissional (opcional)."
# next_active: "mark yourself open to offers to show up in searches." next_active: "marque-se como \"aberto a oportunidades\"."
example_blog: "Blog" example_blog: "Blog"
example_personal_site: "Site Pessoal" example_personal_site: "Site Pessoal"
# links_header: "Personal Links" links_header: "Links Pessoais"
# links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog." links_blurb: "Adicione links para sites ou perfis que você gostaria de destacar, como seu GitHub, LinkedIn ou seu blog."
# links_name: "Link Name" links_name: "Nome do Link"
# links_name_help: "What are you linking to?" links_name_help: "Para onde você está linkando?"
# links_link_blurb: "Link URL" links_link_blurb: "URL do Link"
# basics_header: "Update basic info" basics_header: "Atualizar informações básicas"
basics_active: "Aberto para Ofertas" basics_active: "Aberto para Oportunidades"
# basics_active_help: "Want interview offers right now?" basics_active_help: "Está procurando oportunidades de entrevista agora?"
# basics_job_title: "Desired Job Title" basics_job_title: "Título do Trabalho Desejado"
# basics_job_title_help: "What role are you looking for?" basics_job_title_help: "Qual cargo você está procurando?"
basics_city: "Cidade" basics_city: "Cidade"
# basics_city_help: "City you want to work in (or live in now)." basics_city_help: "Cidade que você quer trabalhar (ou morar)."
basics_country: "País" basics_country: "País"
# basics_country_help: "Country you want to work in (or live in now)." basics_country_help: "País que você quer trabalhar (ou morar)."
# basics_visa: "US Work Status" basics_visa: "Status de Trabalho nos EUA"
# basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship? (If you live in Canada or Australia, mark authorized.)" basics_visa_help: "Você está autorizado a trabalhar nos EUA ou você precisa de patrocínio para o VISA? (Se você mora no Canadá ou na Austrália, marque como autorizado.)"
# basics_looking_for: "Looking For" basics_looking_for: "Procurando por"
# basics_looking_for_full_time: "Full-time" basics_looking_for_full_time: "Tempo integral"
# basics_looking_for_part_time: "Part-time" basics_looking_for_part_time: "Meio-turno"
# basics_looking_for_remote: "Remote" basics_looking_for_remote: "Remoto"
# basics_looking_for_contracting: "Contracting" basics_looking_for_contracting: "Contratando"
# basics_looking_for_internship: "Internship" basics_looking_for_internship: "Estágio"
# basics_looking_for_help: "What kind of developer position do you want?" basics_looking_for_help: "Que tipo de cargo de desenvolvendor você procura?"
# name_header: "Fill in your name" name_header: "Preencha seu nome"
# name_anonymous: "Anonymous Developer" name_anonymous: "Desenvolvedor Anônimo"
# name_help: "Name you want employers to see, like 'Nick Winter'." name_help: "Nome que você quer que os empregadores vejam, por exemplo 'Nick Winter'."
# short_description_header: "Write a short description of yourself" short_description_header: "Escreva uma breve descrição de si mesmo"
# short_description_blurb: "Add a tagline to help an employer quickly learn more about you." short_description_blurb: "Adicione um slogan (frase) que ajudará o empregador a lhe conhecer rapidamente."
# short_description: "Tagline" short_description: "Slogan"
# short_description_help: "Who are you, and what are you looking for? 140 characters max." short_description_help: "Quem é você e o que você está procurando? Máximo de 140 caracteres."
# skills_header: "Skills" skills_header: "Habilidades"
# skills_help: "Tag relevant developer skills in order of proficiency." skills_help: "Marque habilidades de desenvolvimento relevantes em ordem de proficiência."
# long_description_header: "Describe your desired position" long_description_header: "Descreva o cargo desejado"
# long_description_blurb: "Tell employers how awesome you are and what role you want." long_description_blurb: "Diga aos empregadores o quão incrível você é e qual cargo você deseja."
# long_description: "Self Description" long_description: "Autodescrição"
# long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max." long_description_help: "Descreva a si mesmo para seu potencial empregador. Mantenha curto e direto. Recomendamos esboçar o cargo que mais lhe interessa. Máximo de 600 caracteres."
# work_experience: "Work Experience" work_experience: "Experiência de Trabalho"
# work_header: "Chronicle your work history" work_header: "Descreva seu histórico de trabalho"
# work_years: "Years of Experience" work_years: "Anos de Experiência"
# work_years_help: "How many years of professional experience (getting paid) developing software do you have?" work_years_help: "Quantos anos de experiência profissional (sendo pago) de desenvolvimento de software você tem?"
# work_blurb: "List your relevant work experience, most recent first." work_blurb: "Liste experiências relevantes de trabalho. As mais recentes primeiro."
# work_employer: "Employer" work_employer: "Empregador"
# work_employer_help: "Name of your employer." work_employer_help: "Nome do empregador."
# work_role: "Job Title" work_role: "Título do Emprego"
# work_role_help: "What was your job title or role?" work_role_help: "Qual era a sua função ou cargo no emprego?"
work_duration: "Duração" work_duration: "Duração"
# work_duration_help: "When did you hold this gig?" work_duration_help: "Por quanto tempo?"
work_description: "Descrição" work_description: "Descrição"
# work_description_help: "What did you do there? (140 chars; optional)" work_description_help: "O que você fez lá? (140 carac.; opcional)"
education: "Educação" education: "Educação"
# education_header: "Recount your academic ordeals" education_header: "Descreva seu percurso acadêmico"
# education_blurb: "List your academic ordeals." education_blurb: "Liste seu percurso acadêmico."
education_school: "Escola" education_school: "Escola"
education_school_help: "Nome da sua escola." education_school_help: "Nome da sua escola."
education_degree: "Grau" education_degree: "Grau"
# education_degree_help: "What was your degree and field of study?" education_degree_help: "Qual é o seu grau e área de estudo?"
education_duration: "Datas" education_duration: "Datas"
education_duration_help: "Quando?" education_duration_help: "Quando?"
education_description: "Descrição" education_description: "Descrição"
# education_description_help: "Highlight anything about this educational experience. (140 chars; optional)" education_description_help: "Destaque qualquer coisa sobre essa experiência acadêmica. (140 carac.; opcional)"
our_notes: "Nossas notas" our_notes: "Nossas notas"
# remarks: "Remarks" remarks: "Observações"
projects: "Projetos" projects: "Projetos"
projects_header: "Adicione 3 projetos" projects_header: "Adicione 3 projetos"
projects_header_2: "Projetos (Top 3)" projects_header_2: "Projetos (Top 3)"
@ -986,13 +986,13 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
project_picture_help: "Envie uma imagem com 230x115px ou maior mostrando o projeto." project_picture_help: "Envie uma imagem com 230x115px ou maior mostrando o projeto."
project_link: "Link" project_link: "Link"
project_link_help: "Link para o projeto." project_link_help: "Link para o projeto."
# player_code: "Player Code" player_code: "Código do Jogador"
# employers: employers:
# deprecation_warning_title: "Sorry, CodeCombat is not recruiting right now." deprecation_warning_title: "Desculpe, o CodeCombat não está recrutando no momento."
# deprecation_warning: "We are focusing on beginner levels instead of finding expert developers for the time being." deprecation_warning: "Estamos nos concentrando em níveis iniciante, em vez de encontrar desenvolvedores especializados no momento."
# hire_developers_not_credentials: "Hire developers, not credentials." # We are not actively recruiting right now, so there's no need to add new translations for the rest of this section. hire_developers_not_credentials: "Contrate desenvolvedores, não referências." # We are not actively recruiting right now, so there's no need to add new translations for the rest of this section.
# get_started: "Get Started" get_started: "Comece"
# already_screened: "We've already technically screened all our candidates" # already_screened: "We've already technically screened all our candidates"
# filter_further: ", but you can also filter further:" # filter_further: ", but you can also filter further:"
# filter_visa: "Visa" # filter_visa: "Visa"
@ -1044,8 +1044,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
av_entities_sub_title: "Entidades" av_entities_sub_title: "Entidades"
av_entities_users_url: "Usuários" av_entities_users_url: "Usuários"
av_entities_active_instances_url: "Instâncias Ativas" av_entities_active_instances_url: "Instâncias Ativas"
# av_entities_employer_list_url: "Employer List" av_entities_employer_list_url: "Lista de Empregadores"
# av_entities_candidates_list_url: "Candidate List" av_entities_candidates_list_url: "Lista de Candidatos"
av_other_sub_title: "Outro" av_other_sub_title: "Outro"
av_other_debug_base_url: "Base (para debugar base.jade)" av_other_debug_base_url: "Base (para debugar base.jade)"
u_title: "Lista de Usuários" u_title: "Lista de Usuários"

View file

@ -56,14 +56,14 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
spectate: "Наблюдать" # Ladder page spectate: "Наблюдать" # Ladder page
players: "игроки" # Hover over a level on /play players: "игроки" # Hover over a level on /play
hours_played: "часов сыграно" # Hover over a level on /play hours_played: "часов сыграно" # Hover over a level on /play
# items: "Items" # Tooltip on item shop button from /play items: "Предметы" # Tooltip on item shop button from /play
heroes: "Герои" # Tooltip on hero shop button from /play heroes: "Герои" # Tooltip on hero shop button from /play
achievements: "Достижения" # Tooltip on achievement list button from /play achievements: "Достижения" # Tooltip on achievement list button from /play
account: "Аккаунт" # Tooltip on account button from /play account: "Аккаунт" # Tooltip on account button from /play
settings: "Настройки" # Tooltip on settings button from /play settings: "Настройки" # Tooltip on settings button from /play
next: "Следующий" # Go from choose hero to choose inventory before playing a level next: "Следующий" # Go from choose hero to choose inventory before playing a level
change_hero: "Выбрать героя" # Go back from choose inventory to choose hero change_hero: "Выбрать героя" # Go back from choose inventory to choose hero
# choose_inventory: "Equip Items" choose_inventory: "Выбрать предметы"
older_campaigns: "Старые компании" older_campaigns: "Старые компании"
anonymous: "Неизвестный игрок" anonymous: "Неизвестный игрок"
level_difficulty: "Сложность: " level_difficulty: "Сложность: "
@ -135,7 +135,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
general: general:
and: "и" and: "и"
name: "Имя" name: "Имя"
# date: "Date" date: "Дата"
body: "Содержание" body: "Содержание"
version: "Версия" version: "Версия"
commit_msg: "Сопроводительное сообщение" commit_msg: "Сопроводительное сообщение"
@ -204,7 +204,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
victory_rate_the_level: "Оцените уровень:" # Only in old-style levels. victory_rate_the_level: "Оцените уровень:" # Only in old-style levels.
victory_return_to_ladder: "Вернуться к ладдеру" victory_return_to_ladder: "Вернуться к ладдеру"
victory_play_next_level: "Следующий уровень" # Only in old-style levels. victory_play_next_level: "Следующий уровень" # Only in old-style levels.
# victory_play_continue: "Continue" victory_play_continue: "Продолжить"
victory_go_home: "На главную" # Only in old-style levels. victory_go_home: "На главную" # Only in old-style levels.
victory_review: "Расскажите нам больше!" # Only in old-style levels. victory_review: "Расскажите нам больше!" # Only in old-style levels.
victory_hour_of_code_done: "Вы закончили?" victory_hour_of_code_done: "Вы закончили?"
@ -225,13 +225,13 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
# tome_see_all_methods: "See all methods you can edit" # Title text for method list selector (shown when there are multiple programmable methdos). # tome_see_all_methods: "See all methods you can edit" # Title text for method list selector (shown when there are multiple programmable methdos).
tome_select_a_thang: "Выбрать кого-нибудь для " tome_select_a_thang: "Выбрать кого-нибудь для "
tome_available_spells: "Доступные заклинания" tome_available_spells: "Доступные заклинания"
# tome_your_skills: "Your Skills" tome_your_skills: "Ваши навыки"
hud_continue: "Продолжить (Shift+Пробел)" hud_continue: "Продолжить (Shift+Пробел)"
spell_saved: "Заклинание сохранено" spell_saved: "Заклинание сохранено"
skip_tutorial: "Пропуск (Esc)" skip_tutorial: "Пропуск (Esc)"
keyboard_shortcuts: "Горячие клавиши" keyboard_shortcuts: "Горячие клавиши"
loading_ready: "Готово!" loading_ready: "Готово!"
# loading_start: "Start Level" loading_start: "Начать уровень"
time_current: "Текущее:" time_current: "Текущее:"
time_total: "Максимальное:" time_total: "Максимальное:"
time_goto: "Перейти на:" time_goto: "Перейти на:"
@ -265,7 +265,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
tip_first_language: "Наиболее катастрофическая вещь, которую вы можете выучить - ваш первый язык программирования. - Alan Kay" tip_first_language: "Наиболее катастрофическая вещь, которую вы можете выучить - ваш первый язык программирования. - Alan Kay"
tip_hardware_problem: "В: Сколько программистов нужно, чтобы вкрутить лампочку? О: Нисколько, это проблемы с железом." tip_hardware_problem: "В: Сколько программистов нужно, чтобы вкрутить лампочку? О: Нисколько, это проблемы с железом."
# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." # tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law."
# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" tip_premature_optimization: "Поспешная оптимизация - корень всех зол. - Donald Knuth"
# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # tip_brute_force: "When in doubt, use brute force. - Ken Thompson"
customize_wizard: "Настройки волшебника" customize_wizard: "Настройки волшебника"
@ -274,9 +274,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
choose_hero_tab: "Перезапустить уровень" choose_hero_tab: "Перезапустить уровень"
save_load_tab: "Сохранить/Загрузить" save_load_tab: "Сохранить/Загрузить"
options_tab: "Настройки" options_tab: "Настройки"
# guide_tab: "Guide" guide_tab: "Руководство"
multiplayer_tab: "Мультиплеер" multiplayer_tab: "Мультиплеер"
# inventory_caption: "Equip your hero" inventory_caption: "Оденьте своего героя"
choose_hero_caption: "Выбор героя, языка" choose_hero_caption: "Выбор героя, языка"
# save_load_caption: "... and view history" # save_load_caption: "... and view history"
# options_caption: "Configure settings" # options_caption: "Configure settings"
@ -305,7 +305,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
music_label: "Музыка" music_label: "Музыка"
music_description: "Фоновая музыка вкл/выкл" music_description: "Фоновая музыка вкл/выкл"
autorun_label: "Автозапуск" autorun_label: "Автозапуск"
# autorun_description: "Control automatic code execution." autorun_description: "Настройка автоматического выполнения кода."
editor_config: "Настройки редактора" editor_config: "Настройки редактора"
editor_config_title: "Настройки редактора" editor_config_title: "Настройки редактора"
editor_config_level_language_label: "Язык для этого уровня" editor_config_level_language_label: "Язык для этого уровня"
@ -417,7 +417,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
escape: "Escape" escape: "Escape"
# shift: "Shift" # shift: "Shift"
cast_spell: "Произнести текущее заклинание." cast_spell: "Произнести текущее заклинание."
# run_real_time: "Run in real time." run_real_time: "Запустить в реальном времени."
continue_script: "Продолжить текущий скрипт." continue_script: "Продолжить текущий скрипт."
skip_scripts: "Пропустить все возможные скрипты." skip_scripts: "Пропустить все возможные скрипты."
toggle_playback: "Переключить проигрывание/паузу." toggle_playback: "Переключить проигрывание/паузу."
@ -428,7 +428,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
toggle_grid: "Включить наложение сетки." toggle_grid: "Включить наложение сетки."
toggle_pathfinding: "Включить путевой оверлей.." toggle_pathfinding: "Включить путевой оверлей.."
beautify: "Приукрасьте свой код стандартизацией его форматирования." beautify: "Приукрасьте свой код стандартизацией его форматирования."
# maximize_editor: "Maximize/minimize code editor." maximize_editor: "Развернуть/свернуть редактор кода."
move_wizard: "Перемещайте своего Волшебника по уровню." move_wizard: "Перемещайте своего Волшебника по уровню."
community: community:
@ -477,7 +477,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
grassy: "Травянистый" grassy: "Травянистый"
fork_title: "Форк новой версии" fork_title: "Форк новой версии"
fork_creating: "Создание форка..." fork_creating: "Создание форка..."
# generate_terrain: "Generate Terrain" generate_terrain: "Создать ландшафт"
more: "Ещё" more: "Ещё"
wiki: "Вики" wiki: "Вики"
live_chat: "Онлайн-чат" live_chat: "Онлайн-чат"
@ -487,7 +487,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
level_tab_settings: "Настройки" level_tab_settings: "Настройки"
level_tab_components: "Компоненты" level_tab_components: "Компоненты"
level_tab_systems: "Системы" level_tab_systems: "Системы"
# level_tab_docs: "Documentation" level_tab_docs: "Документация"
level_tab_thangs_title: "Текущие объекты" level_tab_thangs_title: "Текущие объекты"
level_tab_thangs_all: "Все" level_tab_thangs_all: "Все"
level_tab_thangs_conditions: "Начальные условия" level_tab_thangs_conditions: "Начальные условия"
@ -522,7 +522,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
level_search_title: "Искать уровни" level_search_title: "Искать уровни"
achievement_search_title: "Искать достижения" achievement_search_title: "Искать достижения"
read_only_warning2: "Примечание: вы не можете сохранять любые правки здесь, потому что вы не авторизованы." read_only_warning2: "Примечание: вы не можете сохранять любые правки здесь, потому что вы не авторизованы."
# no_achievements: "No achievements have been added for this level yet." no_achievements: "Для этого уровня еще не были добавлены достижения."
# achievement_query_misc: "Key achievement off of miscellanea" # achievement_query_misc: "Key achievement off of miscellanea"
# achievement_query_goals: "Key achievement off of level goals" # achievement_query_goals: "Key achievement off of level goals"
# level_completion: "Level Completion" # level_completion: "Level Completion"
@ -719,7 +719,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
unknown: "Неизвестная ошибка." unknown: "Неизвестная ошибка."
resources: resources:
# sessions: "Sessions" sessions: "Сессии"
your_sessions: "Ваши сессии" your_sessions: "Ваши сессии"
level: "Уровень" level: "Уровень"
social_network_apis: "API социальных сетей" social_network_apis: "API социальных сетей"
@ -735,7 +735,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
patched_model: "Исходный документ" patched_model: "Исходный документ"
model: "Модель" model: "Модель"
system: "Система" system: "Система"
# systems: "Systems" systems: "Системы"
component: "Компонент" component: "Компонент"
components: "Компоненты" components: "Компоненты"
# thang: "Thang" # thang: "Thang"
@ -756,13 +756,13 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
user_remark: "Пользовательские поправки" user_remark: "Пользовательские поправки"
# user_remarks: "User Remarks" # user_remarks: "User Remarks"
versions: "Версии" versions: "Версии"
# items: "Items" items: "Предметы"
# heroes: "Heroes" heroes: "Герои"
# wizard: "Wizard" wizard: "Волшебник"
# achievement: "Achievement" achievement: "Достижение"
# clas: "CLAs" # clas: "CLAs"
# play_counts: "Play Counts" # play_counts: "Play Counts"
# feedback: "Feedback" feedback: "Отзыв"
delta: delta:
added: "Добавлено" added: "Добавлено"

View file

@ -8,8 +8,8 @@ module.exports = class Level extends CocoModel
@schema: require 'schemas/models/level' @schema: require 'schemas/models/level'
urlRoot: '/db/level' urlRoot: '/db/level'
serialize: (supermodel, session, cached=false) -> serialize: (supermodel, session, otherSession, cached=false) ->
o = @denormalize supermodel, session # hot spot to optimize o = @denormalize supermodel, session, otherSession # hot spot to optimize
# Figure out Components # Figure out Components
o.levelComponents = if cached then @getCachedLevelComponents(supermodel) else $.extend true, [], (lc.attributes for lc in supermodel.getModels LevelComponent) o.levelComponents = if cached then @getCachedLevelComponents(supermodel) else $.extend true, [], (lc.attributes for lc in supermodel.getModels LevelComponent)
@ -44,17 +44,24 @@ module.exports = class Level extends CocoModel
newLevelComponents.push(@cachedLevelComponents[levelComponent.id]) newLevelComponents.push(@cachedLevelComponents[levelComponent.id])
newLevelComponents newLevelComponents
denormalize: (supermodel, session) -> denormalize: (supermodel, session, otherSession) ->
o = $.extend true, {}, @attributes o = $.extend true, {}, @attributes
if o.thangs and @get('type', true) is 'hero' if o.thangs and @get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
# TOOD: figure out if/when/how we are doing this for non-Hero levels that aren't expecting denormalization.
for levelThang in o.thangs for levelThang in o.thangs
@denormalizeThang(levelThang, supermodel, session) @denormalizeThang(levelThang, supermodel, session, otherSession)
o o
denormalizeThang: (levelThang, supermodel, session) -> denormalizeThang: (levelThang, supermodel, session, otherSession) ->
levelThang.components ?= [] levelThang.components ?= []
isHero = levelThang.id is 'Hero Placeholder' isHero = /Hero Placeholder/.test levelThang.id
if isHero and otherSession
# If it's a hero and there's another session, find the right session for it.
# If there is no other session (playing against default code, or on single player), clone all placeholders.
# TODO: actually look at the teams on these things to determine which session should go with which placeholder.
if levelThang.id is 'Hero Placeholder 1' and session.get('team') is 'humans'
session = otherSession
else if levelThang.id is 'Hero Placeholder' and session.get('team') is 'ogres'
session = otherSession
# Empty out placeholder Components and store their values if we're the hero placeholder. # Empty out placeholder Components and store their values if we're the hero placeholder.
if isHero if isHero
@ -129,6 +136,7 @@ module.exports = class Level extends CocoModel
# Example: Programmable must come last, since it has to override any Component-provided methods that any other Component might have created. Can't enumerate all soft dependencies. # Example: Programmable must come last, since it has to override any Component-provided methods that any other Component might have created. Can't enumerate all soft dependencies.
# Example: Plans needs to come after everything except Programmable, since other Components that add plannable methods need to have done so by the time Plans is attached. # Example: Plans needs to come after everything except Programmable, since other Components that add plannable methods need to have done so by the time Plans is attached.
# Example: Collides doesn't depend on Allied, but if both exist, Collides must come after Allied. Soft dependency example. Can't just figure out a proper priority to take care of it. # Example: Collides doesn't depend on Allied, but if both exist, Collides must come after Allied. Soft dependency example. Can't just figure out a proper priority to take care of it.
# Example: Moves doesn't depend on Acts, but if both exist, Moves must come after Acts. Another soft dependency example.
# Decision? Just special case the sort logic in here until we have more examples than these two and decide how best to handle most of the cases then, since we don't really know the whole of the problem yet. # Decision? Just special case the sort logic in here until we have more examples than these two and decide how best to handle most of the cases then, since we don't really know the whole of the problem yet.
# TODO: anything that depends on Programmable will break right now. # TODO: anything that depends on Programmable will break right now.
@ -158,10 +166,13 @@ module.exports = class Level extends CocoModel
console.error parentType, thang.id or thang.name, 'does not have dependent Component', dependent, 'from', lc.name console.error parentType, thang.id or thang.name, 'does not have dependent Component', dependent, 'from', lc.name
visit c2 if c2 visit c2 if c2
if lc.name is 'Collides' if lc.name is 'Collides'
allied = _.find levelComponents, {name: 'Allied'} if allied = _.find levelComponents, {name: 'Allied'}
if allied allied = _.find(thang.components, {original: allied.original})
collides = _.find(thang.components, {original: allied.original}) visit allied if allied
visit collides if collides if lc.name is 'Moves'
if acts = _.find levelComponents, {name: 'Acts'}
acts = _.find(thang.components, {original: acts.original})
visit acts if acts
#console.log thang.id, 'sorted comps adding', lc.name #console.log thang.id, 'sorted comps adding', lc.name
sorted.push c sorted.push c
for comp in thang.components for comp in thang.components

View file

@ -244,7 +244,7 @@ _.extend LevelSchema.properties,
icon: {type: 'string', format: 'image-file', title: 'Icon'} icon: {type: 'string', format: 'image-file', title: 'Icon'}
banner: {type: 'string', format: 'image-file', title: 'Banner'} banner: {type: 'string', format: 'image-file', title: 'Banner'}
goals: c.array {title: 'Goals', description: 'An array of goals which are visible to the player and can trigger scripts.'}, GoalSchema goals: c.array {title: 'Goals', description: 'An array of goals which are visible to the player and can trigger scripts.'}, GoalSchema
type: c.shortString(title: 'Type', description: 'What kind of level this is.', 'enum': ['campaign', 'ladder', 'ladder-tutorial', 'hero']) type: c.shortString(title: 'Type', description: 'What kind of level this is.', 'enum': ['campaign', 'ladder', 'ladder-tutorial', 'hero', 'hero-ladder', 'hero-coop'])
terrain: c.terrainString terrain: c.terrainString
showsGuide: c.shortString(title: 'Shows Guide', description: 'If the guide is shown at the beginning of the level.', 'enum': ['first-time', 'always']) showsGuide: c.shortString(title: 'Shows Guide', description: 'If the guide is shown at the beginning of the level.', 'enum': ['first-time', 'always'])

View file

@ -52,7 +52,7 @@ module.exports = class ThangComponentConfigView extends CocoView
schema.default ?= {} schema.default ?= {}
_.merge schema.default, @additionalDefaults if @additionalDefaults _.merge schema.default, @additionalDefaults if @additionalDefaults
if @level?.get('type', true) is 'hero' if @level?.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
schema.required = [] schema.required = []
treemaOptions = treemaOptions =
supermodel: @supermodel supermodel: @supermodel

View file

@ -46,7 +46,7 @@ module.exports = class LevelThangEditView extends CocoView
level: @level level: @level
world: @world world: @world
if @level.get('type', true) is 'hero' then options.thangType = thangType if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'] then options.thangType = thangType
@thangComponentEditView = new ThangComponentsEditView options @thangComponentEditView = new ThangComponentsEditView options
@listenTo @thangComponentEditView, 'components-changed', @onComponentsChanged @listenTo @thangComponentEditView, 'components-changed', @onComponentsChanged

View file

@ -520,7 +520,7 @@ module.exports = class ThangsTabView extends CocoView
@level.set 'thangs', thangs @level.set 'thangs', thangs
return if @editThangView return if @editThangView
serializedLevel = @level.serialize @supermodel, null, true serializedLevel = @level.serialize @supermodel, null, null, true
try try
@world.loadFromLevel serializedLevel, false @world.loadFromLevel serializedLevel, false
catch error catch error
@ -552,14 +552,14 @@ module.exports = class ThangsTabView extends CocoView
if batchInsert if batchInsert
if thangType.get('name') is 'Hero Placeholder' if thangType.get('name') is 'Hero Placeholder'
thangID = 'Hero Placeholder' thangID = 'Hero Placeholder'
return if @level.get('type', true) isnt 'hero' or @getThangByID(thangID) return if not (@level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']) or @getThangByID(thangID)
else else
thangID = "Random #{thangType.get('name')} #{@thangsBatch.length}" thangID = "Random #{thangType.get('name')} #{@thangsBatch.length}"
else else
thangID = Thang.nextID(thangType.get('name'), @world) until thangID and not @getThangByID(thangID) thangID = Thang.nextID(thangType.get('name'), @world) until thangID and not @getThangByID(thangID)
if @cloneSourceThang if @cloneSourceThang
components = _.cloneDeep @getThangByID(@cloneSourceThang.id).components components = _.cloneDeep @getThangByID(@cloneSourceThang.id).components
else if @level.get('type', true) is 'hero' else if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
components = [] # Load them all from default ThangType Components components = [] # Load them all from default ThangType Components
else else
components = _.cloneDeep thangType.get('components') ? [] components = _.cloneDeep thangType.get('components') ? []

View file

@ -21,7 +21,7 @@ module.exports = class GameMenuModal extends ModalView
constructor: (options) -> constructor: (options) ->
super options super options
@options.showDevBits = me.isAdmin() or /https?:\/\/localhost/.test(window.location.href) @options.showDevBits = me.isAdmin() or /https?:\/\/localhost/.test(window.location.href)
@options.showInventory = @options.level.get('type', true) is 'hero' @options.showInventory = @options.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
@options.levelID = @options.level.get('slug') @options.levelID = @options.level.get('slug')
@options.startingSessionHeroConfig = $.extend {}, true, (@options.session.get('heroConfig') ? {}) @options.startingSessionHeroConfig = $.extend {}, true, (@options.session.get('heroConfig') ? {})

View file

@ -40,7 +40,7 @@ module.exports = class MultiplayerView extends CocoView
c.team = @session.get 'team' c.team = @session.get 'team'
c.levelSlug = @level?.get 'slug' c.levelSlug = @level?.get 'slug'
# For now, ladderGame will disallow multiplayer, because session code combining doesn't play nice yet. # For now, ladderGame will disallow multiplayer, because session code combining doesn't play nice yet.
if @level?.get('type') is 'ladder' if @level?.get('type') in ['ladder', 'hero-ladder']
c.ladderGame = true c.ladderGame = true
c.readyToRank = @session?.readyToRank() c.readyToRank = @session?.readyToRank()
@ -68,7 +68,7 @@ module.exports = class MultiplayerView extends CocoView
updateLinkSection: -> updateLinkSection: ->
multiplayer = @$el.find('#multiplayer').prop('checked') multiplayer = @$el.find('#multiplayer').prop('checked')
la = @$el.find('#link-area') la = @$el.find('#link-area')
la.toggle if @level?.get('type') is 'ladder' then false else Boolean(multiplayer) la.toggle if @level?.get('type') in ['ladder', 'hero-ladder'] then false else Boolean(multiplayer)
true true
onHidden: -> onHidden: ->

View file

@ -68,7 +68,7 @@ module.exports = class SpectateLevelView extends RootView
@load() @load()
setLevel: (@level, @supermodel) -> setLevel: (@level, @supermodel) ->
serializedLevel = @level.serialize @supermodel, @session serializedLevel = @level.serialize @supermodel, @session, @otherSession
@god?.setLevel serializedLevel @god?.setLevel serializedLevel
if @world if @world
@world.loadFromLevel serializedLevel, false @world.loadFromLevel serializedLevel, false
@ -105,7 +105,7 @@ module.exports = class SpectateLevelView extends RootView
#at this point, all requisite data is loaded, and sessions are not denormalized #at this point, all requisite data is loaded, and sessions are not denormalized
team = @world.teamForPlayer(0) team = @world.teamForPlayer(0)
@loadOpponentTeam(team) @loadOpponentTeam(team)
@god.setLevel @level.serialize @supermodel, @session @god.setLevel @level.serialize @supermodel, @session, @otherSession
@god.setLevelSessionIDs if @otherSession then [@session.id, @otherSession.id] else [@session.id] @god.setLevelSessionIDs if @otherSession then [@session.id, @otherSession.id] else [@session.id]
@god.setWorldClassMap @world.classMap @god.setWorldClassMap @world.classMap
@setTeam team @setTeam team
@ -119,7 +119,7 @@ module.exports = class SpectateLevelView extends RootView
@register() @register()
@controlBar.setBus(@bus) @controlBar.setBus(@bus)
@surface.showLevel() @surface.showLevel()
if @level.get('type', true) isnt 'hero' if not (@level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'])
if me.id isnt @session.get 'creator' if me.id isnt @session.get 'creator'
@surface.createOpponentWizard @surface.createOpponentWizard
id: @session.get('creator') id: @session.get('creator')

View file

@ -718,6 +718,17 @@ hero = [
x: 95.31 x: 95.31
y: 88.26 y: 88.26
} }
{
name: 'Dueling Grounds'
type: 'hero-ladder'
difficulty: 1
id: 'dueling-grounds'
original: '5442ba0e1e835500007eb1c7'
description: 'Battle head-to-head against another hero in this basic beginner combat arena.'
disabled: not me.isAdmin()
x: 17.54
y: 78.39
}
#{ #{
# name: '' # name: ''
# type: 'hero' # type: 'hero'

View file

@ -1,7 +1,7 @@
{hslToHex} = require 'lib/utils' {hslToHex} = require 'lib/utils'
module.exports.teamDataFromLevel = (level) -> module.exports.teamDataFromLevel = (level) ->
alliedSystem = _.find level.get('systems'), (value) -> value.config?.teams? alliedSystem = _.find level.get('systems', true), (value) -> value.config?.teams?
teamNames = (teamName for teamName, teamConfig of alliedSystem.config.teams when teamConfig.playable) teamNames = (teamName for teamName, teamConfig of alliedSystem.config.teams when teamConfig.playable)
teamConfigs = alliedSystem.config.teams teamConfigs = alliedSystem.config.teams

View file

@ -51,15 +51,15 @@ module.exports = class ControlBarView extends CocoView
super c super c
c.worldName = @worldName c.worldName = @worldName
c.multiplayerEnabled = @session.get('multiplayer') c.multiplayerEnabled = @session.get('multiplayer')
c.ladderGame = @level.get('type') is 'ladder' c.ladderGame = @level.get('type') in ['ladder', 'hero-ladder']
c.spectateGame = @spectateGame c.spectateGame = @spectateGame
@homeViewArgs = [{supermodel: @supermodel}] @homeViewArgs = [{supermodel: @supermodel}]
if @level.get('type', true) in ['ladder', 'ladder-tutorial'] if @level.get('type', true) in ['ladder', 'ladder-tutorial', 'hero-ladder']
levelID = @level.get('slug').replace /\-tutorial$/, '' levelID = @level.get('slug').replace /\-tutorial$/, ''
@homeLink = c.homeLink = '/play/ladder/' + levelID @homeLink = c.homeLink = '/play/ladder/' + levelID
@homeViewClass = require 'views/play/ladder/LadderView' @homeViewClass = require 'views/play/ladder/LadderView'
@homeViewArgs.push levelID @homeViewArgs.push levelID
else if @level.get('type', true) is 'hero' else if @level.get('type', true) in ['hero', 'hero-coop']
@homeLink = c.homeLink = '/play' @homeLink = c.homeLink = '/play'
@homeViewClass = require 'views/play/WorldMapView' @homeViewClass = require 'views/play/WorldMapView'
else else

View file

@ -85,7 +85,7 @@ module.exports = class LevelHUDView extends CocoView
clearTimeout @hintNextSelectionTimeout clearTimeout @hintNextSelectionTimeout
@$el.find('.no-selection-message').hide() @$el.find('.no-selection-message').hide()
if not @thang if not @thang
unless @options.level.get('type', true) is 'hero' unless @options.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
@hintNextSelectionTimeout = _.delay((=> @$el.find('.no-selection-message').slideDown('slow')), 10000) @hintNextSelectionTimeout = _.delay((=> @$el.find('.no-selection-message').slideDown('slow')), 10000)
return return
@createAvatar thangType, @thang @createAvatar thangType, @thang

View file

@ -167,7 +167,7 @@ module.exports = class LevelPlaybackView extends CocoView
@togglePlaybackControls false @togglePlaybackControls false
Backbone.Mediator.publish 'playback:real-time-playback-started', {} Backbone.Mediator.publish 'playback:real-time-playback-started', {}
Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'real-time-playback-start', volume: 1 Backbone.Mediator.publish 'audio-player:play-sound', trigger: 'real-time-playback-start', volume: 1
Backbone.Mediator.publish 'level:set-letterbox', on: true Backbone.Mediator.publish 'level:set-letterbox', on: true if @options.level.get('type', true) is ['hero'] # not with flags...?
onRealTimeMultiplayerCast: (e) -> onRealTimeMultiplayerCast: (e) ->
@realTime = true @realTime = true

View file

@ -118,7 +118,7 @@ module.exports = class PlayLevelView extends RootView
@supermodel.collections = givenSupermodel.collections @supermodel.collections = givenSupermodel.collections
@supermodel.shouldSaveBackups = givenSupermodel.shouldSaveBackups @supermodel.shouldSaveBackups = givenSupermodel.shouldSaveBackups
serializedLevel = @level.serialize @supermodel, @session serializedLevel = @level.serialize @supermodel, @session, @otherSession
@god?.setLevel serializedLevel @god?.setLevel serializedLevel
if @world if @world
@world.loadFromLevel serializedLevel, false @world.loadFromLevel serializedLevel, false
@ -215,8 +215,8 @@ module.exports = class PlayLevelView extends RootView
@session = @levelLoader.session @session = @levelLoader.session
@world = @levelLoader.world @world = @levelLoader.world
@level = @levelLoader.level @level = @levelLoader.level
@$el.addClass 'hero' if @level.get('type', true) is 'hero' @$el.addClass 'hero' if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
@$el.addClass 'flags' if @level.get('slug') is 'sky-span' # TODO: figure out when the player has flags. @$el.addClass 'flags' if @level.get('slug') is 'sky-span' or (@level.get('type', true) in ['hero-ladder', 'hero-coop']) # TODO: figure out when the player has flags.
@otherSession = @levelLoader.opponentSession @otherSession = @levelLoader.opponentSession
@worldLoadFakeResources = [] # first element (0) is 1%, last (100) is 100% @worldLoadFakeResources = [] # first element (0) is 1%, last (100) is 100%
for percent in [1 .. 100] for percent in [1 .. 100]
@ -251,7 +251,7 @@ module.exports = class PlayLevelView extends RootView
@session.set 'multiplayer', false @session.set 'multiplayer', false
setupGod: -> setupGod: ->
@god.setLevel @level.serialize @supermodel, @session @god.setLevel @level.serialize @supermodel, @session, @otherSession
@god.setLevelSessionIDs if @otherSession then [@session.id, @otherSession.id] else [@session.id] @god.setLevelSessionIDs if @otherSession then [@session.id, @otherSession.id] else [@session.id]
@god.setWorldClassMap @world.classMap @god.setWorldClassMap @world.classMap
@ -268,9 +268,9 @@ module.exports = class PlayLevelView extends RootView
insertSubviews: -> insertSubviews: ->
@insertSubView @tome = new TomeView levelID: @levelID, session: @session, otherSession: @otherSession, thangs: @world.thangs, supermodel: @supermodel, level: @level @insertSubView @tome = new TomeView levelID: @levelID, session: @session, otherSession: @otherSession, thangs: @world.thangs, supermodel: @supermodel, level: @level
@insertSubView new LevelPlaybackView session: @session, levelID: @levelID @insertSubView new LevelPlaybackView session: @session, levelID: @levelID, level: @level
@insertSubView new GoalsView {} @insertSubView new GoalsView {}
@insertSubView new LevelFlagsView world: @world if @levelID is 'sky-span' # TODO: figure out when flags are available @insertSubView new LevelFlagsView world: @world if @levelID is 'sky-span' or @level.get('type', true) in ['hero-ladder', 'hero-coop'] # TODO: figure out when flags are available
@insertSubView new GoldView {} @insertSubView new GoldView {}
@insertSubView new HUDView {level: @level} @insertSubView new HUDView {level: @level}
@insertSubView new ChatView levelID: @levelID, sessionID: @session.id, session: @session @insertSubView new ChatView levelID: @levelID, sessionID: @session.id, session: @session
@ -297,11 +297,11 @@ module.exports = class PlayLevelView extends RootView
onLevelLoaded: (e) -> onLevelLoaded: (e) ->
# Just the level has been loaded by the level loader # Just the level has been loaded by the level loader
@showWizardSettingsModal() if not me.get('name') and not @isIPadApp() and e.level.get('type', true) isnt 'hero' @showWizardSettingsModal() if not me.get('name') and not @isIPadApp() and not (e.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'])
onSessionLoaded: (e) -> onSessionLoaded: (e) ->
# Just the level and session have been loaded by the level loader # Just the level and session have been loaded by the level loader
if e.level.get('type', true) is 'hero' and not _.size e.session.get('heroConfig')?.inventory ? {} if e.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'] and not _.size e.session.get('heroConfig')?.inventory ? {}
@openModalView new GameMenuModal level: e.level, session: e.session @openModalView new GameMenuModal level: e.level, session: e.session
onLoaded: -> onLoaded: ->
@ -331,7 +331,7 @@ module.exports = class PlayLevelView extends RootView
initSurface: -> initSurface: ->
webGLSurface = $('canvas#webgl-surface', @$el) webGLSurface = $('canvas#webgl-surface', @$el)
normalSurface = $('canvas#normal-surface', @$el) normalSurface = $('canvas#normal-surface', @$el)
@surface = new Surface(@world, normalSurface, webGLSurface, thangTypes: @supermodel.getModels(ThangType), playJingle: not @isEditorPreview, wizards: @level.get('type', true) isnt 'hero') @surface = new Surface(@world, normalSurface, webGLSurface, thangTypes: @supermodel.getModels(ThangType), playJingle: not @isEditorPreview, wizards: not (@level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']))
worldBounds = @world.getBounds() worldBounds = @world.getBounds()
bounds = [{x: worldBounds.left, y: worldBounds.top}, {x: worldBounds.right, y: worldBounds.bottom}] bounds = [{x: worldBounds.left, y: worldBounds.top}, {x: worldBounds.right, y: worldBounds.bottom}]
@surface.camera.setBounds(bounds) @surface.camera.setBounds(bounds)
@ -346,7 +346,7 @@ module.exports = class PlayLevelView extends RootView
if window.currentModal and not window.currentModal.destroyed and window.currentModal.constructor isnt VictoryModal if window.currentModal and not window.currentModal.destroyed and window.currentModal.constructor isnt VictoryModal
return Backbone.Mediator.subscribeOnce 'modal:closed', @onLevelStarted, @ return Backbone.Mediator.subscribeOnce 'modal:closed', @onLevelStarted, @
@surface.showLevel() @surface.showLevel()
if @otherSession and @level.get('type', true) isnt 'hero' if @otherSession and not (@level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'])
# TODO: colorize name and cloud by team, colorize wizard by user's color config # TODO: colorize name and cloud by team, colorize wizard by user's color config
@surface.createOpponentWizard id: @otherSession.get('creator'), name: @otherSession.get('creatorName'), team: @otherSession.get('team'), levelSlug: @level.get('slug'), codeLanguage: @otherSession.get('submittedCodeLanguage') @surface.createOpponentWizard id: @otherSession.get('creator'), name: @otherSession.get('creatorName'), team: @otherSession.get('team'), levelSlug: @level.get('slug'), codeLanguage: @otherSession.get('submittedCodeLanguage')
if @isEditorPreview if @isEditorPreview
@ -377,7 +377,7 @@ module.exports = class PlayLevelView extends RootView
return if @alreadyLoadedState return if @alreadyLoadedState
@alreadyLoadedState = true @alreadyLoadedState = true
state = @originalSessionState state = @originalSessionState
if @level.get('type', true) is 'hero' if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
Backbone.Mediator.publish 'level:suppress-selection-sounds', suppress: true Backbone.Mediator.publish 'level:suppress-selection-sounds', suppress: true
Backbone.Mediator.publish 'tome:select-primary-sprite', {} Backbone.Mediator.publish 'tome:select-primary-sprite', {}
Backbone.Mediator.publish 'level:suppress-selection-sounds', suppress: false Backbone.Mediator.publish 'level:suppress-selection-sounds', suppress: false
@ -443,7 +443,7 @@ module.exports = class PlayLevelView extends RootView
onDonePressed: -> @showVictory() onDonePressed: -> @showVictory()
onShowVictory: (e) -> onShowVictory: (e) ->
$('#level-done-button').show() unless @level.get('type', true) is 'hero' $('#level-done-button').show() unless @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
@showVictory() if e.showModal @showVictory() if e.showModal
setTimeout(@preloadNextLevel, 3000) setTimeout(@preloadNextLevel, 3000)
return if @victorySeen return if @victorySeen
@ -455,7 +455,8 @@ module.exports = class PlayLevelView extends RootView
showVictory: -> showVictory: ->
options = {level: @level, supermodel: @supermodel, session: @session} options = {level: @level, supermodel: @supermodel, session: @session}
ModalClass = if @level.get('type', true) is 'hero' then HeroVictoryModal else VictoryModal ModalClass = if @level.get('type', true) in ['hero', 'hero-coop'] then HeroVictoryModal else VictoryModal
# TODO: made HeroVictoryModal able to support hero-ladder and then switch over for that level type, too
victoryModal = new ModalClass(options) victoryModal = new ModalClass(options)
@openModalView(victoryModal) @openModalView(victoryModal)
if me.get('anonymous') if me.get('anonymous')

View file

@ -36,9 +36,6 @@ module.exports = class VictoryModal extends ModalView
@session = options.session @session = options.session
@saveReviewEventually = _.debounce(@saveReviewEventually, 2000) @saveReviewEventually = _.debounce(@saveReviewEventually, 2000)
@loadExistingFeedback() @loadExistingFeedback()
if @level.get('type', true) is 'hero'
@closeButton = false
@closesOnClickOutside = false
super options super options
loadExistingFeedback: -> loadExistingFeedback: ->
@ -82,7 +79,7 @@ module.exports = class VictoryModal extends ModalView
c.hasNextLevel = _.isObject(@level.get('nextLevel')) 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') in ['ladder', 'hero-ladder']
c.readyToRank = @session.readyToRank() c.readyToRank = @session.readyToRank()
if me.get 'hourOfCode' if me.get 'hourOfCode'
# Show the Hour of Code "I'm Done" tracking pixel after they played for 30 minutes # Show the Hour of Code "I'm Done" tracking pixel after they played for 30 minutes

View file

@ -133,7 +133,7 @@ module.exports = class Spell
writable = @permissions.readwrite.length > 0 writable = @permissions.readwrite.length > 0
skipProtectAPI = @skipProtectAPI or not writable skipProtectAPI = @skipProtectAPI or not writable
problemContext = @createProblemContext thang problemContext = @createProblemContext thang
aetherOptions = createAetherOptions functionName: @name, codeLanguage: @language, functionParameters: @parameters, skipProtectAPI: skipProtectAPI, includeFlow: @levelType is 'hero', problemContext: problemContext aetherOptions = createAetherOptions functionName: @name, codeLanguage: @language, functionParameters: @parameters, skipProtectAPI: skipProtectAPI, includeFlow: @levelType in ['hero', 'hero-ladder', 'hero-coop'], problemContext: problemContext
aether = new Aether aetherOptions aether = new Aether aetherOptions
if @worker if @worker
workerMessage = workerMessage =

View file

@ -59,7 +59,7 @@ module.exports = class SpellPaletteView extends CocoView
itemGroup.append entry.el itemGroup.append entry.el
entry.render() # Render after appending so that we can access parent container for popover entry.render() # Render after appending so that we can access parent container for popover
@$el.addClass 'hero' @$el.addClass 'hero'
@updateMaxHeight() @updateMaxHeight() unless application.isIPadApp
afterInsert: -> afterInsert: ->
super() super()
@ -121,7 +121,7 @@ module.exports = class SpellPaletteView extends CocoView
else else
propStorage = propStorage =
'this': ['apiProperties', 'apiMethods'] 'this': ['apiProperties', 'apiMethods']
if @options.level.get('type', true) isnt 'hero' or not @options.programmable if not (@options.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']) or not @options.programmable
@organizePalette propStorage, allDocs, excludedDocs @organizePalette propStorage, allDocs, excludedDocs
else else
@organizePaletteHero propStorage, allDocs, excludedDocs @organizePaletteHero propStorage, allDocs, excludedDocs
@ -162,7 +162,7 @@ module.exports = class SpellPaletteView extends CocoView
if tabbify and _.find @entries, ((entry) -> entry.doc.owner isnt 'this') if tabbify and _.find @entries, ((entry) -> entry.doc.owner isnt 'this')
@entryGroups = _.groupBy @entries, groupForEntry @entryGroups = _.groupBy @entries, groupForEntry
else else
i18nKey = if @options.level.get('type', true) is 'hero' then 'play_level.tome_your_skills' else 'play_level.tome_available_spells' i18nKey = if @options.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'] then 'play_level.tome_your_skills' else 'play_level.tome_available_spells'
defaultGroup = $.i18n.t i18nKey defaultGroup = $.i18n.t i18nKey
@entryGroups = {} @entryGroups = {}
@entryGroups[defaultGroup] = @entries @entryGroups[defaultGroup] = @entries
@ -218,7 +218,7 @@ module.exports = class SpellPaletteView extends CocoView
return true if doc.owner is owner return true if doc.owner is owner
return (owner is 'this' or owner is 'more') and (not doc.owner? or doc.owner is 'this') return (owner is 'this' or owner is 'more') and (not doc.owner? or doc.owner is 'this')
if not doc and not excludedDocs['__' + prop] if not doc and not excludedDocs['__' + prop]
console.log 'could not find doc for', prop, 'from', allDocs['__' + prop], 'for', owner, 'of', propGroups, 'with item', item console.log 'could not find doc for', prop, 'from', allDocs['__' + prop], 'for', owner, 'of', propsByItem, 'with item', item
doc ?= prop doc ?= prop
if doc if doc
@entries.push @addEntry(doc, shortenize, false, owner is 'snippets', item, propIndex > 0) @entries.push @addEntry(doc, shortenize, false, owner is 'snippets', item, propIndex > 0)

View file

@ -186,7 +186,7 @@ module.exports = class TomeView extends CocoView
@thangList?.$el.show() @thangList?.$el.show()
onSpriteSelected: (e) -> onSpriteSelected: (e) ->
return if @spellView and @options.level.get('type', true) is 'hero' # Never deselect the hero in the Tome. return if @spellView and @options.level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'] # Never deselect the hero in the Tome.
thang = e.thang thang = e.thang
spellName = e.spellName spellName = e.spellName
@spellList?.$el.hide() @spellList?.$el.hide()

View file

@ -67,7 +67,7 @@ LevelHandler = class LevelHandler extends Handler
sessionQuery.team = req.query.team sessionQuery.team = req.query.team
# TODO: generalize this for levels based on their teams # TODO: generalize this for levels based on their teams
else if level.get('type') is 'ladder' else if level.get('type') in ['ladder', 'hero-ladder']
sessionQuery.team = 'humans' sessionQuery.team = 'humans'
Session.findOne(sessionQuery).exec (err, doc) => Session.findOne(sessionQuery).exec (err, doc) =>

View file

@ -279,7 +279,7 @@ fetchAndVerifyLevelType = (levelID, cb) ->
.lean() .lean()
query.exec (err, levelWithType) -> query.exec (err, levelWithType) ->
if err? then return cb err if err? then return cb err
if not levelWithType.type or levelWithType.type isnt 'ladder' then return cb 'Level isn\'t of type "ladder"' if not levelWithType.type or not (levelWithType.type in ['ladder', 'hero-ladder']) then return cb 'Level isn\'t of type "ladder"'
cb null cb null
fetchSessionObjectToSubmit = (sessionID, callback) -> fetchSessionObjectToSubmit = (sessionID, callback) ->