From b0ae4f1ddba7030861d1f03c99e7258ccba91d7f Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 26 Sep 2014 20:11:14 +0100 Subject: [PATCH 01/10] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 8b6597753..2d16b872d 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -117,7 +117,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: adventurer_forum: "fórum do Aventureiro" adventurer_suffix: "." campaign_beginner: "Campanha para Iniciantes" -# campaign_old_beginner: "Old Beginner Campaign" + campaign_old_beginner: "Campanha para Iniciantes Antiga" campaign_beginner_description: "... onde aprendes a magia da programação." campaign_dev: "Níveis mais Difíceis Aleatórios" campaign_dev_description: "... onde aprendes a interface enquanto fazes coisas um bocadinho mais difíceis." @@ -140,8 +140,8 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: next: "Seguinte" previous: "Anterior" choose_inventory: "Equipar Itens" -# older_campaigns: "Older Campaigns" -# anonymous: "Anonymous Player" + older_campaigns: "Campanhas Mais Antigas" + anonymous: "Jogador Anónimo" items: armor: "Armadura" @@ -419,9 +419,9 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: tome_cast_button_running: "A Correr" tome_cast_button_ran: "Corrido" tome_submit_button: "Submeter" -# tome_reload_method: "Reload original code for this method" # Title text for individual method reload button. -# tome_select_method: "Select a Method" -# tome_see_all_methods: "See all methods you can edit" # Title text for method list selector (shown when there are multiple programmable methdos). + tome_reload_method: "Recarregar o código original para este método" # Title text for individual method reload button. + tome_select_method: "Selecionar um método" + tome_see_all_methods: "Ver todos os métodos editáveis" # Title text for method list selector (shown when there are multiple programmable methdos). tome_select_a_thang: "Seleciona Alguém para " tome_available_spells: "Feitiços Disponíveis" tome_your_skills: "As Tuas Habilidades" From 26c4271736a3b37b4ddd07f777de708732cb7325 Mon Sep 17 00:00:00 2001 From: enricpc Date: Mon, 29 Sep 2014 12:34:47 +0200 Subject: [PATCH 02/10] Update ca.coffee --- app/locale/ca.coffee | 106 +++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/app/locale/ca.coffee b/app/locale/ca.coffee index 31a266908..6a1bbf053 100644 --- a/app/locale/ca.coffee +++ b/app/locale/ca.coffee @@ -15,7 +15,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr fork: "Fork" play: "Jugar" # When used as an action verb, like "Play next level" retry: "Tornar a intentar" -# watch: "Watch" + watch: "Veure" # unwatch: "Unwatch" # submit_patch: "Submit Patch" @@ -63,7 +63,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr versions: save_version_title: "Guarda una nova versió" -# new_major_version: "New Major Version" + new_major_version: "Nova versió principal" cla_prefix: "Per guardar els canvis primer has d'acceptar" cla_url: "CLA" cla_suffix: "." @@ -105,10 +105,10 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr multiplayer: "Multijugador" for_developers: "Per a Desenvolupadors" javascript_blurb: "El llenguatge de les webs. Útil per escriure pagines web, aplicacions web, jocs en HTML5 i servidors." -# python_blurb: "Simple yet powerful, Python is a great general purpose programming language." + python_blurb: "Simple però poderós, Python és un bon llenguatge d'us general." # coffeescript_blurb: "Nicer JavaScript syntax." -# clojure_blurb: "A modern Lisp." -# lua_blurb: "Game scripting language." + clojure_blurb: "Un Lisp modern." + lua_blurb: "Llenguatge script per a jocs." io_blurb: "Senzill però obscur." play: @@ -179,12 +179,12 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr color: "Color" group: "Grup" clothes: "Roba" -# trim: "Trim" + trim: "Decoració" cloud: "Nuvol" team: "Equip" -# spell: "Spell" + spell: "Encanteri" boots: "Botes" -# hue: "Hue" + hue: "Matriu" saturation: "Saturació" lightness: "Brillantor" @@ -202,9 +202,9 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr wizard_color: "Color de la roba" new_password: "Contrasenya nova" new_password_verify: "Verifica" -# email_subscriptions: "Email Subscriptions" -# email_subscriptions_none: "No Email Subscriptions." -# email_announcements: "Announcements" + email_subscriptions: "Subscripcions via correu electrònic" + email_subscriptions_none: "Sense subsrcipcions de correu electrònic." + email_announcements: "Notícies" # email_announcements_description: "Get emails on the latest news and developments at CodeCombat." email_notifications: "Notificacions" # email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." @@ -216,7 +216,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # contributor_emails: "Contributor Class Emails" # contribute_prefix: "We're looking for people to join our party! Check out the " # contribute_page: "contribute page" -# contribute_suffix: " to find out more." + contribute_suffix: " per a trobar més." email_toggle: "Activa-ho tot" error_saving: "Error en desar" saved: "Canvis desats" @@ -887,13 +887,13 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # simulate_all: "RESET AND SIMULATE GAMES" # games_simulated_by: "Games simulated by you:" # games_simulated_for: "Games simulated for you:" -# games_simulated: "Games simulated" + games_simulated: "Partides simulades" games_played: "Partides guanyades" # ratio: "Ratio" # leaderboard: "Leaderboard" # battle_as: "Battle as " -# summary_your: "Your " -# summary_matches: "Matches - " + summary_your: "Les teves " + summary_matches: "Partides - " summary_wins: " Victories, " summary_losses: " Derrotes" # rank_no_code: "No New Code to Rank" @@ -911,41 +911,41 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr select_your_language: "Escull el teu idioma!" tutorial_play: "Juga el tutorial" # tutorial_recommended: "Recommended if you've never played before" -# tutorial_skip: "Skip Tutorial" + tutorial_skip: "Salta el tutorial" # tutorial_not_sure: "Not sure what's going on?" -# tutorial_play_first: "Play the Tutorial first." -# simple_ai: "Simple AI" + tutorial_play_first: "Juga el tutorial primer." + simple_ai: "IA simple" # warmup: "Warmup" -# friends_playing: "Friends Playing" + friends_playing: "Amics jugant" # log_in_for_friends: "Log in to play with your friends!" # social_connect_blurb: "Connect and play against your friends!" # invite_friends_to_battle: "Invite your friends to join you in battle!" -# fight: "Fight!" -# watch_victory: "Watch your victory" -# defeat_the: "Defeat the" -# tournament_ends: "Tournament ends" -# tournament_ended: "Tournament ended" -# tournament_rules: "Tournament Rules" + fight: "Lluita!" + watch_victory: "Mira la teva victòria" + defeat_the: "Derrota a" + tournament_ends: "El torneig acaba" + tournament_ended: "El torneig ha acabat" + tournament_rules: "Normes del torneig" # 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_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_blog: "on our blog" + tournament_blurb_blog: "en el nostre blog" rules: "Normes" winners: "Guanyadors" ladder_prizes: title: "Premis del torneig" -# blurb_1: "These prizes will be awarded according to" + blurb_1: "Aquests premis seran guanyats d'acord amb" blurb_2: "Les normes del torneig" -# blurb_3: "to the top human and ogre players." -# blurb_4: "Two teams means double the prizes!" -# blurb_5: "(There will be two first place winners, two second-place winners, etc.)" + blurb_3: "els millors jugadors humans i ogres." + blurb_4: "Dos equips signifiquen el doble de premis!" + blurb_5: "(Hi haura dos guanyadors pel primer lloc, dos pels del segon lloc, etc.)" rank: "Rang" prizes: "Premis" total_value: "Valor total" -# in_cash: "in cash" -# custom_wizard: "Custom CodeCombat Wizard" -# custom_avatar: "Custom CodeCombat avatar" -# heap: "for six months of \"Startup\" access" + in_cash: "en diners" + custom_wizard: "Personalitza el teu bruixot de CodeCombat" + custom_avatar: "Personalitza el teu avatar de CodeCombat" + heap: "per sis mesosd'acces \"Startup\" " credits: "credits" # one_month_coupon: "coupon: choose either Rails or HTML" # one_month_discount: "discount, 30% off: choose either Rails or HTML" @@ -953,21 +953,21 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # oreilly: "ebook of your choice" loading_error: -# could_not_load: "Error loading from server" + could_not_load: "Error de carrega del servidor" connection_failure: "Connexió fallida." # unauthorized: "You need to be signed in. Do you have cookies disabled?" -# forbidden: "You do not have the permissions." + forbidden: "No disposes dels permisos." not_found: "No trobat." -# not_allowed: "Method not allowed." + not_allowed: "Metode no permès." # timeout: "Server timeout." # conflict: "Resource conflict." -# bad_input: "Bad input." + bad_input: "Entrada incorrecta." server_error: "Error del servidor." unknown: "Error desconegut." resources: sessions: "Sessions" -# your_sessions: "Your Sessions" + your_sessions: "Les teves sessions" level: "Nivell" # social_network_apis: "Social Network APIs" # facebook_status: "Facebook Status" @@ -975,24 +975,24 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # facebook_friend_sessions: "Facebook Friend Sessions" # gplus_friends: "G+ Friends" # gplus_friend_sessions: "G+ Friend Sessions" -# leaderboard: "Leaderboard" -# user_schema: "User Schema" -# user_profile: "User Profile" -# patches: "Patches" -# patched_model: "Source Document" -# model: "Model" + leaderboard: "Classificació" + user_schema: "Esquema d'usuari" + user_profile: "Perfil d'usuari" + patches: "Pegats" + patched_model: "Document font" + model: "Model" system: "Sistema" systems: "Sistemes" -# component: "Component" -# components: "Components" + component: "Component" + components: "Components" # thang: "Thang" # thangs: "Thangs" level_session: "La teva sessió" -# opponent_session: "Opponent Session" -# article: "Article" + opponent_session: "Sessió de l'adversari" + article: "Article" user_names: "Noms d'usuaris" # thang_names: "Thang Names" - files: "Archius" + files: "Arxius" # top_simulators: "Top Simulators" # source_document: "Source Document" document: "Documents" @@ -1007,15 +1007,15 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr heroes: "Herois" wizard: "Bruixot" achievement: "Triomf" -# clas: "CLAs" + clas: "CLAs" # play_counts: "Play Counts" -# feedback: "Feedback" + feedback: "Feedback" delta: added: "Afegit" modified: "Modificat" deleted: "Eliminat" -# moved_index: "Moved Index" + moved_index: "Índex desplaçat" # text_diff: "Text Diff" # merge_conflict_with: "MERGE CONFLICT WITH" no_changes: "Sense canvis" From 45daffc2f383e097eb23e1095d92ff94e6d76927 Mon Sep 17 00:00:00 2001 From: Randall Mason Date: Mon, 29 Sep 2014 16:52:45 +0300 Subject: [PATCH 03/10] Rough translations of more phrases to Bulgarian They should be looked over for grammar and spelling mistakes. --- app/locale/bg.coffee | 64 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/app/locale/bg.coffee b/app/locale/bg.coffee index 5c23f9dea..0e4c091fb 100644 --- a/app/locale/bg.coffee +++ b/app/locale/bg.coffee @@ -3,11 +3,11 @@ module.exports = nativeDescription: "български език", englishDescri loading: "Зареждане..." saving: "Записване..." sending: "Изпращане..." -# send: "Send" + send: "Изпрати" cancel: "Отказ" save: "Запис" -# publish: "Publish" -# create: "Create" + publish: "Публикирай" + create: "Создавай" delay_1_sec: "1 секунда" delay_3_sec: "3 секунди" delay_5_sec: "5 секунди" @@ -19,21 +19,21 @@ module.exports = nativeDescription: "български език", englishDescri # unwatch: "Unwatch" # submit_patch: "Submit Patch" -# units: -# second: "second" -# seconds: "seconds" -# minute: "minute" -# minutes: "minutes" -# hour: "hour" -# hours: "hours" -# day: "day" -# days: "days" -# week: "week" -# weeks: "weeks" -# month: "month" -# months: "months" -# year: "year" -# years: "years" + units: + second: "секунда" + seconds: "секунди" + minute: "минута" + minutes: "минути" + hour: "час" + hours: "часове" + day: "ден" + days: "дни" + week: "седмица" + weeks: "седмици" + month: "месец" + months: "месеци" + year: "година" + years: "години" modal: close: "Затвори" @@ -44,20 +44,20 @@ module.exports = nativeDescription: "български език", englishDescri nav: play: "Нива" # The top nav bar entry where players choose which levels to play -# community: "Community" + community: "Обшност" editor: "Редактор" blog: "Блог" forum: "Форум" -# account: "Account" -# profile: "Profile" + account: "Сметката" + profile: "Профил" # stats: "Stats" # code: "Code" # admin: "Admin" -# home: "Home" + home: "Начало" # contribute: "Contribute" # legal: "Legal" -# about: "About" -# contact: "Contact" + about: "За нас" + contact: "Контакти" # twitter_follow: "Follow" # employers: "Employers" @@ -72,7 +72,7 @@ module.exports = nativeDescription: "български език", englishDescri login: sign_up: "Създай Профил" log_in: "Вход" -# logging_in: "Logging In" + logging_in: "Влизане..." log_out: "Изход" recover: "Възстанови акаунт" @@ -82,16 +82,16 @@ module.exports = nativeDescription: "български език", englishDescri # recovery_sent: "Recovery email sent." signup: -# create_account_title: "Create Account to Save Progress" -# description: "It's free. Just need a couple things and you'll be good to go:" -# email_announcements: "Receive announcements by email" + create_account_title: "Создавай нов сметката за да записва прогрес" + description: "Е безплатен. Само ще трабва неколко неща и ти ще си готов:" + email_announcements: "Получава анонци през имейл" # coppa: "13+ or non-USA " coppa_why: "(Защо?)" creating: "Създаване на профил..." sign_up: "Регистриране" log_in: "Вход с парола" -# social_signup: "Or, you can sign up through Facebook or G+:" -# required: "You need to log in before you can go that way." + social_signup: "Или, можеш да зарегистрираваш през Facebook или G+:" + required: "Трабва да влезиш преди можеш да ходиш на там." home: slogan: "Научи се да програмираш, докато играеш игра " @@ -165,11 +165,11 @@ module.exports = nativeDescription: "български език", englishDescri # recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns." diplomat_suggestion: -# title: "Help translate CodeCombat!" + title: "Дай да помогни да преводи CodeCombat!" # sub_heading: "We need your language skills." pitch_body: "We develop CodeCombat in English, but we already have players all over the world. Many of them want to play in Bulgarian but don't speak English, so if you can speak both, please consider signing up to be a Diplomat and help translate both the CodeCombat website and all the levels into Bulgarian." missing_translations: "Until we can translate everything into Bulgarian, you'll see English when Bulgarian isn't available." -# learn_more: "Learn more about being a Diplomat" + learn_more: "Научи повече за ставане Дипломат" # subscribe_as_diplomat: "Subscribe as a Diplomat" # wizard_settings: From eebbe8a1302266e0578de6ab52797d1878428946 Mon Sep 17 00:00:00 2001 From: enricpc Date: Tue, 30 Sep 2014 15:41:44 +0200 Subject: [PATCH 04/10] Update ca.coffee --- app/locale/ca.coffee | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/app/locale/ca.coffee b/app/locale/ca.coffee index 6a1bbf053..8a572c97a 100644 --- a/app/locale/ca.coffee +++ b/app/locale/ca.coffee @@ -16,8 +16,8 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr play: "Jugar" # When used as an action verb, like "Play next level" retry: "Tornar a intentar" watch: "Veure" -# unwatch: "Unwatch" -# submit_patch: "Submit Patch" + unwatch: "Amaga" + submit_patch: "Enviar pegat" units: second: "segon" @@ -51,7 +51,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr account: "Compte" profile: "Perfil" stats: "Estats" -# code: "Code" + code: "Codi" admin: "Admin" home: "Inici" contribute: "Col·laborar" @@ -106,7 +106,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr for_developers: "Per a Desenvolupadors" javascript_blurb: "El llenguatge de les webs. Útil per escriure pagines web, aplicacions web, jocs en HTML5 i servidors." python_blurb: "Simple però poderós, Python és un bon llenguatge d'us general." -# coffeescript_blurb: "Nicer JavaScript syntax." + coffeescript_blurb: "Sintaxi JavaScript millorat." clojure_blurb: "Un Lisp modern." lua_blurb: "Llenguatge script per a jocs." io_blurb: "Senzill però obscur." @@ -126,7 +126,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr campaign_player_created: "Creats pel Jugador" campaign_player_created_description: "... on lluites contra la creativitat dels teus companys Artisan Wizards." campaign_classic_algorithms: "Algoritmes classics" -# campaign_classic_algorithms_description: "... in which you learn the most popular algorithms in Computer Science." + campaign_classic_algorithms_description: "... on pots aprendre els algoritmes més populars de l'informàtica." level_difficulty: "Dificultat: " play_as: "Jugar com" spectate: "Spectate" @@ -162,7 +162,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr forum_suffix: " sinó" send: "Enviar comentari" contact_candidate: "Contactar amb el candidat" -# recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns." + recruitment_reminder: "Utilitza aquest formulari per a contactar amb els candidats que vols entrevistar. Recorda que CodeCombat cobrará el 15% del sou del primer any. El cost es per la contactacio del treballador i es reemborsable durant 90 dies si el treballdor no roman contractat . Temporals, a distancia i treballadors de contracte són gratuits, com els becaris." diplomat_suggestion: title: "Ajuda a traduir CodeCombat!" @@ -205,11 +205,11 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr email_subscriptions: "Subscripcions via correu electrònic" email_subscriptions_none: "Sense subsrcipcions de correu electrònic." email_announcements: "Notícies" -# email_announcements_description: "Get emails on the latest news and developments at CodeCombat." + email_announcements_description: "Rebre les últimes notícies i desenvolupaments de CodeCombat." email_notifications: "Notificacions" -# email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity." + email_notifications_summary: "Controls per personalitzar les teves notificacions d'email automàtiques relacionades amb la teva activitat a CodeCombat." email_any_notes: "Cap notificació" -# email_any_notes_description: "Disable to stop all activity notification emails." + email_any_notes_description: "Desactiva totes les notificacions via correu electrònic." email_news: "Noticies" email_recruit_notes: "Oportunitats de feina" # email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job." @@ -232,14 +232,14 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr settings: "Configuració" edit_profile: "Modifica el perfil" done_editing: "Acaba l'edició" -# profile_for_prefix: "Profile for " + profile_for_prefix: "Perfil de " profile_for_suffix: "" -# featured: "Featured" + featured: "Destacat" # not_featured: "Not Featured" looking_for: "Buscant:" -# last_updated: "Last updated:" + last_updated: "Ultima actualització:" contact: "Contacta" -# active: "Looking for interview offers now" + active: "Buscant entrevistes de feina" # inactive: "Not looking for offers right now" complete: "complet" next: "Seguent" @@ -247,7 +247,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr next_country: "escull el teu país." next_name: "nom?" next_short_description: "escriu una breu descripció." -# next_long_description: "describe your desired position." + next_long_description: "descriu el lloc de feina que desitges." # next_skills: "list at least five skills." # next_work: "chronicle your work history." # next_education: "recount your educational ordeals." @@ -596,11 +596,11 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr editor: # main_title: "CodeCombat Editors" -# article_title: "Article Editor" + article_title: "Editor d'articles " # thang_title: "Thang Editor" level_title: "Editor de nivells" achievement_title: "Editor de triomfs" -# back: "Back" + back: "Enrere" # revert: "Revert" # revert_models: "Revert Models" # pick_a_terrain: "Pick A Terrain" @@ -616,21 +616,21 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # level_tab_thangs: "Thangs" # level_tab_scripts: "Scripts" level_tab_settings: "Configuració" -# level_tab_components: "Components" -# level_tab_systems: "Systems" + level_tab_components: "Components" + level_tab_systems: "Sistemes" # level_tab_docs: "Documentation" # level_tab_thangs_title: "Current Thangs" -# level_tab_thangs_all: "All" + level_tab_thangs_all: "Tot" # level_tab_thangs_conditions: "Starting Conditions" # level_tab_thangs_add: "Add Thangs" delete: "Esborrar" duplicate: "Duplicar" level_settings_title: "Configuració" -# level_component_tab_title: "Current Components" + level_component_tab_title: "Components actuals" # level_component_btn_new: "Create New Component" -# level_systems_tab_title: "Current Systems" + level_systems_tab_title: "Sistemes actuals" # level_systems_btn_new: "Create New System" -# level_systems_btn_add: "Add System" + level_systems_btn_add: "Afegir sistema" # level_components_title: "Back to All Thangs" # level_components_type: "Type" # level_component_edit_title: "Edit Component" @@ -678,7 +678,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # subject: "Subject" # email: "Email" password: "Contrasenya" -# message: "Message" + message: "Missatge" # code: "Code" # ladder: "Ladder" # when: "When" @@ -718,8 +718,8 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr matt_title: "Programador" # matt_blurb: "Bicyclist" -# legal: -# page_title: "Legal" + legal: + page_title: "Legalitat" # opensource_intro: "CodeCombat is free to play and completely open source." # opensource_description_prefix: "Check out " # github_url: "our GitHub" @@ -728,7 +728,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # opensource_description_suffix: "for a list of the software that makes this game possible." # practices_title: "Respectful Best Practices" # practices_description: "These are our promises to you, the player, in slightly less legalese." -# privacy_title: "Privacy" + privacy_title: "Privacitat" # privacy_description: "We will not sell any of your personal information. We intend to make money through recruitment eventually, but rest assured we will not distribute your personal information to interested companies without your explicit consent." # security_title: "Security" # security_description: "We strive to keep your personal information safe. As an open source project, our site is freely open to anyone to review and improve our security systems." @@ -910,7 +910,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr choose_opponent: "Escull adversari" select_your_language: "Escull el teu idioma!" tutorial_play: "Juga el tutorial" -# tutorial_recommended: "Recommended if you've never played before" + tutorial_recommended: "Recomenat si no has jugat abans" tutorial_skip: "Salta el tutorial" # tutorial_not_sure: "Not sure what's going on?" tutorial_play_first: "Juga el tutorial primer." From 3871b60ea74bb34f59c2399629e11d0549532303 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 30 Sep 2014 22:38:18 -0700 Subject: [PATCH 05/10] Actually committing last of earned_achievement_handler fixes. --- server/achievements/earned_achievement_handler.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/achievements/earned_achievement_handler.coffee b/server/achievements/earned_achievement_handler.coffee index 144d01266..936a273a1 100644 --- a/server/achievements/earned_achievement_handler.coffee +++ b/server/achievements/earned_achievement_handler.coffee @@ -16,7 +16,6 @@ class EarnedAchievementHandler extends Handler recalculate: (req, res) -> onSuccess = (data) => log.debug 'Finished recalculating achievements' - console.log 'req.body.achievements is', req.body.achievements if 'achievements' of req.body # Support both slugs and IDs separated by commas achievementSlugsOrIDs = req.body.achievements EarnedAchievementHandler.recalculate achievementSlugsOrIDs, onSuccess @@ -55,7 +54,7 @@ class EarnedAchievementHandler extends Handler log.info "Recalculating a total of #{achievements.length} achievements..." # Fetch every single user. This tends to get big so do it in a streaming fashion. - userStream = User.find(slug: 'nick').sort('_id').stream() + userStream = User.find().sort('_id').stream() streamFinished = false usersTotal = 0 usersFinished = 0 From 5dd7c3ffa16b9bcf1dfa713dc62dc28d78c89f81 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 1 Oct 2014 10:58:19 -0700 Subject: [PATCH 06/10] Adding some iPad event publishing optimizations. Fixed #1623. --- app/Router.coffee | 4 ++++ app/initialize.coffee | 10 +++++++++- app/locale/en.coffee | 1 + app/schemas/subscriptions/misc.coffee | 3 +++ app/templates/base.jade | 2 +- config.coffee | 1 + 6 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/Router.coffee b/app/Router.coffee index aa273795f..d3f84daac 100644 --- a/app/Router.coffee +++ b/app/Router.coffee @@ -177,3 +177,7 @@ module.exports = class CocoRouter extends Backbone.Router @openView view else @openView e.view + + navigate: (fragment, options) -> + super fragment, options + Backbone.Mediator.publish 'router:navigated', route: fragment diff --git a/app/initialize.coffee b/app/initialize.coffee index 0f102fe22..b0e14f48e 100644 --- a/app/initialize.coffee +++ b/app/initialize.coffee @@ -61,10 +61,12 @@ setUpBackboneMediator = -> Backbone.Mediator.addChannelSchemas schemas for channel, schemas of channelSchemas Backbone.Mediator.setValidationEnabled document.location.href.search(/codecombat.com/) is -1 if webkit?.messageHandlers + window.iPadSubscriptions = 'application:error': true # We try to subscribe to this one before it's all set up, so just do it. originalPublish = Backbone.Mediator.publish Backbone.Mediator.publish = -> originalPublish.apply Backbone.Mediator, arguments - webkit.messageHandlers.backboneEventHandler?.postMessage channel: arguments[0], event: serializeForIOS(arguments[1] ? {}) + if window.iPadSubscriptions[arguments[0]] + webkit.messageHandlers.backboneEventHandler?.postMessage channel: arguments[0], event: serializeForIOS(arguments[1] ? {}) setUpMoment = -> {me} = require 'lib/auth' @@ -106,6 +108,12 @@ watchForErrors = -> noty text: message, layout: 'topCenter', type: 'error', killer: false, timeout: 5000, dismissQueue: true, maxVisible: 3, callback: {onClose: -> --currentErrors} Backbone.Mediator.publish 'application:error', message: msg # For iOS app +window.addIPadSubscription = (channel) -> + window.iPadSubscriptions[channel] = true + +window.removeIPadSubscription = (channel) -> + window.iPadSubscriptions[channel] = false + setUpIOSLogging = -> return unless webkit?.messageHandlers for level in ['debug', 'log', 'info', 'warn', 'error'] diff --git a/app/locale/en.coffee b/app/locale/en.coffee index a053a90d0..d549353e9 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -59,6 +59,7 @@ about: "About" contact: "Contact" twitter_follow: "Follow" + teachers: "Teachers" employers: "Employers" versions: diff --git a/app/schemas/subscriptions/misc.coffee b/app/schemas/subscriptions/misc.coffee index 209564359..d83c6dcaa 100644 --- a/app/schemas/subscriptions/misc.coffee +++ b/app/schemas/subscriptions/misc.coffee @@ -29,6 +29,9 @@ module.exports = viewClass: {type: 'function'} viewArgs: {type: 'array'} + 'router:navigated': c.object {required: ['route']}, + route: {type: 'string'} + 'achievements:new': c.object {required: ['earnedAchievements']}, earnedAchievements: {type: 'object'} diff --git a/app/templates/base.jade b/app/templates/base.jade index 27071cb6d..b29b2bdee 100644 --- a/app/templates/base.jade +++ b/app/templates/base.jade @@ -75,7 +75,7 @@ body a(title='Contact', tabindex=-1, data-toggle="coco-modal", data-target="modal/ContactModal", data-i18n="nav.contact") Contact a(href='http://blog.codecombat.com/', data-i18n="nav.blog") Blog a(href='http://discourse.codecombat.com/', data-i18n="nav.forum") Forum - a(href='/teachers', data-i18n="nav.forum") Teachers + a(href='/teachers', data-i18n="nav.teachers") Teachers if me.isAdmin() a(href='/admin', data-i18n="nav.admin") Admin diff --git a/config.coffee b/config.coffee index d27435f9b..f6ebd484e 100644 --- a/config.coffee +++ b/config.coffee @@ -94,6 +94,7 @@ exports.config = semicolons: false sass: mode: 'ruby' + allowCache: true onCompile: (files) -> exec = require('child_process').exec From 511378465fb0b9dbea2c14ac8be8c7ebc4381f46 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Wed, 1 Oct 2014 11:58:25 -0700 Subject: [PATCH 07/10] Fix WebGL check in SpriteStage.js This was breaking us on IE10. Fixes #1620 --- vendor/scripts/SpriteStage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/scripts/SpriteStage.js b/vendor/scripts/SpriteStage.js index ce01ac996..fe616c4c4 100644 --- a/vendor/scripts/SpriteStage.js +++ b/vendor/scripts/SpriteStage.js @@ -528,7 +528,7 @@ var p = SpriteStage.prototype = new createjs.Stage(); * into itself). **/ p.draw = function(ctx, ignoreCache) { - if (ctx === this._webGLContext || ctx instanceof WebGLRenderingContext) { + if (typeof WebGLRenderingContext !== 'undefined' && (ctx === this._webGLContext || ctx instanceof WebGLRenderingContext)) { this._drawWebGLKids(this.children, ctx); // If there is a remaining texture, draw it: From 0290db9cd4026ac3deeb158b9c3a2c4ca57fbf4b Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 1 Oct 2014 12:08:14 -0700 Subject: [PATCH 08/10] Starting to try to get iPad to work during real-time playback. --- app/lib/surface/Surface.coffee | 12 ++++++++---- app/styles/play/level.sass | 3 +++ app/templates/teachers.jade | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index 228d6aa17..c002a4563 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -506,7 +506,10 @@ module.exports = Surface = class Surface extends CocoClass oldHeight = parseInt @normalCanvas.attr('height'), 10 aspectRatio = oldWidth / oldHeight pageWidth = $('#page-container').width() - 17 # 17px nano scroll bar - if @realTime or @options.spectateGame + if application.isIPadApp + newWidth = 1024 + newHeight = newWidth / aspectRatio + else if @realTime or @options.spectateGame pageHeight = $('#page-container').height() - $('#control-bar-view').outerHeight() - $('#playback-view').outerHeight() newWidth = Math.min pageWidth, pageHeight * aspectRatio newHeight = newWidth / aspectRatio @@ -517,6 +520,7 @@ module.exports = Surface = class Surface extends CocoClass newWidth = 0.55 * pageWidth newHeight = newWidth / aspectRatio return unless newWidth > 0 and newHeight > 0 + return if newWidth is oldWidth and newHeight is oldHeight ##if InstallTrigger? # Firefox rendering performance goes down as canvas size goes up ## newWidth = Math.min 924, newWidth ## newHeight = Math.min 589, newHeight @@ -524,14 +528,14 @@ module.exports = Surface = class Surface extends CocoClass #@normalCanvas.height newHeight scaleFactor = if application.isIPadApp then 2 else 1 # Retina @normalCanvas.add(@webGLCanvas).attr width: newWidth * scaleFactor, height: newHeight * scaleFactor - + # Cannot do this to the webGLStage because it does not use scaleX/Y. - # Instead the LayerAdapter scales webGL-enabled layers. + # Instead the LayerAdapter scales webGL-enabled layers. @webGLStage.updateViewport(@webGLCanvas[0].width, @webGLCanvas[0].height) @normalStage.scaleX *= newWidth / oldWidth @normalStage.scaleY *= newHeight / oldHeight @camera.onResize newWidth, newHeight - + #- Camera focus on hero focusOnHero: -> diff --git a/app/styles/play/level.sass b/app/styles/play/level.sass index bddc0fd21..389453cbf 100644 --- a/app/styles/play/level.sass +++ b/app/styles/play/level.sass @@ -267,6 +267,9 @@ body.ipad #level-view a, .editor-dash display: none + #goals-view + left: 40px + #level-chat-view bottom: 40px diff --git a/app/templates/teachers.jade b/app/templates/teachers.jade index 110ef8420..b2de5a0a0 100644 --- a/app/templates/teachers.jade +++ b/app/templates/teachers.jade @@ -12,7 +12,7 @@ block content p CodeCombat is free to play and does not require students to sign up. We encourage teachers to a(href="http://codecombat.com/play") play through the campaign - | to try it out, but the only thing you absolutely need to do to be ready is ensure students have access to a computer or iPad. + | to try it out, but the only thing you absolutely need to do to be ready is ensure students have access to a computer or iPad. p It is not necessary for teachers to be comfortable with computer science concepts for students to have fun learning with CodeCombat. From 3205821ee9a403be23bad306d052d646274277f3 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Wed, 1 Oct 2014 13:26:38 -0700 Subject: [PATCH 09/10] Got the level editor mostly working again. --- app/lib/surface/RegionChooser.coffee | 4 +- app/lib/surface/Surface.coffee | 2 +- ...ld_select.sass => world-select-modal.sass} | 16 +++- app/styles/editor/level/thangs-tab-view.sass | 9 ++- ...ld_select.jade => world-select-modal.jade} | 4 +- .../editor/level/thangs-tab-view.jade | 3 +- .../level/modals/WorldSelectModal.coffee | 14 ++-- .../editor/level/thangs/ThangsTabView.coffee | 76 ++++++++++--------- 8 files changed, 75 insertions(+), 53 deletions(-) rename app/styles/editor/level/modal/{world_select.sass => world-select-modal.sass} (60%) rename app/templates/editor/level/modal/{world_select.jade => world-select-modal.jade} (86%) diff --git a/app/lib/surface/RegionChooser.coffee b/app/lib/surface/RegionChooser.coffee index 939782e0c..e7750b9ff 100644 --- a/app/lib/surface/RegionChooser.coffee +++ b/app/lib/surface/RegionChooser.coffee @@ -59,10 +59,10 @@ module.exports = class RegionChooser extends CocoClass updateShape: -> rect = @options.camera.normalizeBounds([@firstPoint, @secondPoint]) - @options.surfaceLayer.removeChild @shape if @shape + @options.normalStage.removeChild @shape if @shape @shape = new createjs.Shape() @shape.alpha = 0.5 @shape.mouseEnabled = false @shape.graphics.beginFill('#fedcba').drawRect rect.x, rect.y, rect.width, rect.height @shape.graphics.endFill() - @options.surfaceLayer.addChild(@shape) + @options.normalStage.addChild(@shape) diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index 228d6aa17..b0e587c38 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -133,7 +133,7 @@ module.exports = Surface = class Surface extends CocoClass @coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if showCoordinates hookUpChooseControls: -> - chooserOptions = stage: @normalStage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region' + chooserOptions = stage: @normalStage, normalStage: @normalStage, camera: @camera, restrictRatio: @options.choosing is 'ratio-region' klass = if @options.choosing is 'point' then PointChooser else RegionChooser @chooser = new klass chooserOptions diff --git a/app/styles/editor/level/modal/world_select.sass b/app/styles/editor/level/modal/world-select-modal.sass similarity index 60% rename from app/styles/editor/level/modal/world_select.sass rename to app/styles/editor/level/modal/world-select-modal.sass index dc8637221..9afde19ff 100644 --- a/app/styles/editor/level/modal/world_select.sass +++ b/app/styles/editor/level/modal/world-select-modal.sass @@ -1,14 +1,24 @@ @import "../../../bootstrap/mixins" -#select-point-modal +#world-select-modal @include user-select(none) .modal-body max-height: inherit - canvas - background-color: #ddd + .canvas-wrapper + position: relative + + .normal-canvas + position: absolute + bottom: 0 + left: 0 + z-index: 1 + pointer-events: none + + .webgl-canvas border: 1px solid black + background-color: #ddd .instructions .alert float: left diff --git a/app/styles/editor/level/thangs-tab-view.sass b/app/styles/editor/level/thangs-tab-view.sass index f1e9bb42f..96cd51047 100644 --- a/app/styles/editor/level/thangs-tab-view.sass +++ b/app/styles/editor/level/thangs-tab-view.sass @@ -111,9 +111,14 @@ // Below snatched from play/level.sass; should refactor? - canvas#surface + canvas background-color: #ddd width: 100% display: block - z-index: 1 border: 1px solid black + + #webgl-surface + z-index: 1 + + #normal-surface + z-index: 2 \ No newline at end of file diff --git a/app/templates/editor/level/modal/world_select.jade b/app/templates/editor/level/modal/world-select-modal.jade similarity index 86% rename from app/templates/editor/level/modal/world_select.jade rename to app/templates/editor/level/modal/world-select-modal.jade index 3fe648e6a..0c48822c2 100644 --- a/app/templates/editor/level/modal/world_select.jade +++ b/app/templates/editor/level/modal/world-select-modal.jade @@ -32,7 +32,9 @@ block modal-body-content div.alert.alert-info strong Enter | to confirm - canvas(width=924, height=589) + .canvas-wrapper + canvas(width=924, height=589).webgl-canvas + canvas(width=924, height=589).normal-canvas block modal-footer-content a.btn.btn-primary#done-button Done diff --git a/app/templates/editor/level/thangs-tab-view.jade b/app/templates/editor/level/thangs-tab-view.jade index 34fcd3963..99a3ee070 100644 --- a/app/templates/editor/level/thangs-tab-view.jade +++ b/app/templates/editor/level/thangs-tab-view.jade @@ -14,7 +14,8 @@ button.btn#thangs-palette-toggle a(data-i18n="editor.delete") Delete li#duplicate a(data-i18n="editor.duplicate") Duplicate - canvas(width=924, height=589)#surface + canvas(width=924, height=589)#webgl-surface + canvas(width=924, height=589)#normal-surface #canvas-left-gradient.gradient #canvas-top-gradient.gradient diff --git a/app/views/editor/level/modals/WorldSelectModal.coffee b/app/views/editor/level/modals/WorldSelectModal.coffee index 3424ec576..58c3aeb73 100644 --- a/app/views/editor/level/modals/WorldSelectModal.coffee +++ b/app/views/editor/level/modals/WorldSelectModal.coffee @@ -1,10 +1,10 @@ ModalView = require 'views/kinds/ModalView' -template = require 'templates/editor/level/modal/world_select' +template = require 'templates/editor/level/modal/world-select-modal' Surface = require 'lib/surface/Surface' ThangType = require 'models/ThangType' module.exports = class WorldSelectModal extends ModalView - id: 'select-point-modal' + id: 'world-select-modal' template: template modalWidthPercent: 80 cache: false @@ -41,10 +41,12 @@ module.exports = class WorldSelectModal extends ModalView # surface setup initSurface: -> - canvas = @$el.find('canvas') - canvas.attr('width', currentView.$el.width()*.8-70) - canvas.attr('height', currentView.$el.height()*.6) - @surface = new Surface @world, canvas, { + webGLCanvas = @$el.find('.webgl-canvas') + normalCanvas = @$el.find('.normal-canvas') + canvases = webGLCanvas.add(normalCanvas) + canvases.attr('width', currentView.$el.width()*.8-70) + canvases.attr('height', currentView.$el.height()*.6) + @surface = new Surface @world, normalCanvas, webGLCanvas, { wizards: false paths: false grid: true diff --git a/app/views/editor/level/thangs/ThangsTabView.coffee b/app/views/editor/level/thangs/ThangsTabView.coffee index 7c23deff8..381eee2d2 100644 --- a/app/views/editor/level/thangs/ThangsTabView.coffee +++ b/app/views/editor/level/thangs/ThangsTabView.coffee @@ -184,8 +184,9 @@ module.exports = class ThangsTabView extends CocoView @openSmallerFolders(child) initSurface: -> - surfaceCanvas = $('canvas#surface', @$el) - @surface = new Surface @world, surfaceCanvas, { + webGLCanvas = $('canvas#webgl-surface', @$el) + normalCanvas = $('canvas#normal-surface', @$el) + @surface = new Surface @world, normalCanvas, webGLCanvas, { wizards: false paths: false coords: true @@ -219,7 +220,7 @@ module.exports = class ThangsTabView extends CocoView onViewSwitched: (e) -> @selectAddThang null, true - @surface?.spriteBoss?.selectSprite null, null + @surface?.lankBoss?.selectLank null, null onSpriteMouseDown: (e) -> @dragged = false @@ -229,7 +230,7 @@ module.exports = class ThangsTabView extends CocoView # @onSpriteContextMenu e onStageMouseDown: (e) -> - return unless @addThangSprite?.thangType.get('kind') is 'Wall' + return unless @addThangLank?.thangType.get('kind') is 'Wall' @surface.camera.dragDisabled = true @paintingWalls = true @@ -238,9 +239,9 @@ module.exports = class ThangsTabView extends CocoView # We need to stop painting walls, but we may also stop in onExtantThangSelected. _.defer => @paintingWalls = @paintedWalls = @surface.camera.dragDisabled = false - else if @addThangSprite + else if @addThangLank @surface.camera.lock() - # If we click on the background, we need to add @addThangSprite, but not if onSpriteMouseUp will fire. + # If we click on the background, we need to add @addThangLank, but not if onSpriteMouseUp will fire. @backgroundAddClickTimeout = _.defer => @onExtantThangSelected {} $('#contextmenu').hide() @@ -252,7 +253,7 @@ module.exports = class ThangsTabView extends CocoView cap = @surface.camera.screenToCanvas x: stageX, y: stageY wop = @surface.camera.canvasToWorld cap wop.z = @selectedExtantThang.depth / 2 - @adjustThangPos @selectedExtantSprite, @selectedExtantThang, wop + @adjustThangPos @selectedExtantLank, @selectedExtantThang, wop [w, h] = [@surface.camera.canvasWidth, @surface.camera.canvasHeight] sidebarWidths = ((if @$el.find(id).hasClass('hide') then 0 else (@$el.find(id).outerWidth() / @surface.camera.canvasScaleFactorX)) for id in ['#all-thangs', '#add-thangs-view']) w -= sidebarWidth for sidebarWidth in sidebarWidths @@ -304,9 +305,9 @@ module.exports = class ThangsTabView extends CocoView # TODO: figure out a good way to have all Surface clicks and Treema clicks just proxy in one direction, so we can maintain only one way of handling selection and deletion onExtantThangSelected: (e) -> - @selectedExtantSprite?.setNameLabel? null unless @selectedExtantSprite is e.sprite + @selectedExtantLank?.setNameLabel? null unless @selectedExtantLank is e.sprite @selectedExtantThang = e.thang - @selectedExtantSprite = e.sprite + @selectedExtantLank = e.sprite paintedAWall = @paintedWalls @paintingWalls = @paintedWalls = @surface.camera.dragDisabled = false if paintedAWall @@ -318,15 +319,15 @@ module.exports = class ThangsTabView extends CocoView else if @justAdded() # Skip double insert due to extra selection event null - else if e.thang and not (@addThangSprite and @addThangType.get('name') in overlappableThangTypeNames) + else if e.thang and not (@addThangLank and @addThangType.get('name') in overlappableThangTypeNames) # We clicked on a Thang (or its Treema), so select the Thang @selectAddThang null, true @selectedExtantThangClickTime = new Date() # Show the label above selected thang, notice that we may get here from thang-edit-view, so it will be selected but no label - @selectedExtantSprite.setNameLabel @selectedExtantSprite.thangType.get('name') + ': ' + @selectedExtantThang.id - else if @addThangSprite + @selectedExtantLank.setNameLabel @selectedExtantLank.thangType.get('name') + ': ' + @selectedExtantThang.id + else if @addThangLank # We clicked on the background when we had an add Thang selected, so add it - @addThang @addThangType, @addThangSprite.thang.pos + @addThang @addThangType, @addThangLank.thang.pos @lastAddTime = new Date() justAdded: -> @lastAddTime and (new Date() - @lastAddTime) < 150 @@ -354,19 +355,19 @@ module.exports = class ThangsTabView extends CocoView selectAddThangType: (type, @cloneSourceThang) -> if _.isString type type = _.find @supermodel.getModels(ThangType), (m) -> m.get('name') is type - pos = @addThangSprite?.thang.pos # Maintain old sprite's pos if we have it - @surface.spriteBoss.removeSprite @addThangSprite if @addThangSprite + pos = @addThangLank?.thang.pos # Maintain old sprite's pos if we have it + @surface.lankBoss.removeLank @addThangLank if @addThangLank @addThangType = type if @addThangType thang = @createAddThang() - @addThangSprite = @surface.spriteBoss.addThangToSprites thang, @surface.spriteBoss.layerAdapters['Floating'] - @addThangSprite.notOfThisWorld = true - @addThangSprite.sprite.alpha = 0.75 - @addThangSprite.playSound? 'selected' + @addThangLank = @surface.lankBoss.addThangToLanks thang, @surface.lankBoss.layerAdapters['Floating'] + @addThangLank.notOfThisWorld = true + @addThangLank.sprite.alpha = 0.75 + @addThangLank.playSound? 'selected' pos ?= x: Math.round(@world.width / 2), y: Math.round(@world.height / 2) - @adjustThangPos @addThangSprite, thang, pos + @adjustThangPos @addThangLank, thang, pos else - @addThangSprite = null + @addThangLank = null createEssentialComponents: (defaultComponents) -> physicalConfig = {pos: {x: 10, y: 10, z: 1}} @@ -399,32 +400,32 @@ module.exports = class ThangsTabView extends CocoView pos.y = Math.round((pos.y - (thang.height ? 1) / 2) / snap.y) * snap.y + (thang.height ? 1) / 2 pos.z = thang.depth / 2 thang.pos = pos - @surface.spriteBoss.update true # Make sure Obstacle layer resets cache + @surface.lankBoss.update true # Make sure Obstacle layer resets cache onSurfaceMouseMoved: (e) -> - return unless @addThangSprite + return unless @addThangLank wop = @surface.camera.screenToWorld x: e.x, y: e.y wop.z = 0.5 - @adjustThangPos @addThangSprite, @addThangSprite.thang, wop + @adjustThangPos @addThangLank, @addThangLank.thang, wop if @paintingWalls - unless _.find @surface.spriteBoss.spriteArray, ((sprite) => - sprite.thangType.get('kind') is 'Wall' and - Math.abs(sprite.thang.pos.x - @addThangSprite.thang.pos.x) < 2 and - Math.abs(sprite.thang.pos.y - @addThangSprite.thang.pos.y) < 2 and - sprite isnt @addThangSprite + unless _.find @surface.lankBoss.lankArray, ((lank) => + lank.thangType.get('kind') is 'Wall' and + Math.abs(lank.thang.pos.x - @addThangLank.thang.pos.x) < 2 and + Math.abs(lank.thang.pos.y - @addThangLank.thang.pos.y) < 2 and + lank isnt @addThangLank ) - @addThang @addThangType, @addThangSprite.thang.pos + @addThang @addThangType, @addThangLank.thang.pos @lastAddTime = new Date() @paintedWalls = true null onSurfaceMouseOver: (e) -> - return unless @addThangSprite - @addThangSprite.sprite.visible = true + return unless @addThangLank + @addThangLank.sprite.visible = true onSurfaceMouseOut: (e) -> - return unless @addThangSprite - @addThangSprite.sprite.visible = false + return unless @addThangLank + @addThangLank.sprite.visible = false calculateMovement: (pctX, pctY, widthHeightRatio) -> MOVE_TOP_MARGIN = 1.0 - MOVE_MARGIN @@ -521,14 +522,14 @@ module.exports = class ThangsTabView extends CocoView # update selection, since the thangs have been remade if @selectedExtantThang - @selectedExtantSprite = @surface.spriteBoss.sprites[@selectedExtantThang.id] - @selectedExtantThang = @selectedExtantSprite?.thang + @selectedExtantLank = @surface.lankBoss.lanks[@selectedExtantThang.id] + @selectedExtantThang = @selectedExtantLank?.thang Backbone.Mediator.publish 'editor:thangs-edited', thangs: @world.thangs onTreemaThangSelected: (e, selectedTreemas) => selectedThangID = _.last(selectedTreemas)?.data.id if selectedThangID isnt @selectedExtantThang?.id - @surface.spriteBoss.selectThang selectedThangID, null, true + @surface.lankBoss.selectThang selectedThangID, null, true onTreemaThangDoubleClicked: (e, treema) => id = treema?.data?.id @@ -566,6 +567,7 @@ module.exports = class ThangsTabView extends CocoView thangData = $(e.target).data 'thang-data' else # Mediator event thangData = @getThangByID(e.thangID) + return unless thangData @editThangView = new LevelThangEditView thangData: thangData, level: @level, world: @world, supermodel: @supermodel, oldPath: @pathForThang(thangData) # supermodel needed for checkForMissingSystems @insertSubView @editThangView @$el.find('>').hide() From 36615ae39f37350b420b48a6e9d8ecfed414acb1 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 1 Oct 2014 17:01:51 -0700 Subject: [PATCH 10/10] Unlocked all levels again until we can figure out the achievement timing problems. --- app/views/play/WorldMapView.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 99511e68c..57e8df5b7 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -68,7 +68,8 @@ module.exports = class WorldMapView extends RootView for level, index in campaign.levels level.x ?= 10 + 80 * Math.random() level.y ?= 10 + 80 * Math.random() - level.locked = index > 0 and not me.earnedLevel level.original + #level.locked = index > 0 and not me.earnedLevel level.original + level.locked = false # Until we can solve the bug. context.levelStatusMap = @levelStatusMap context.levelPlayCountMap = @levelPlayCountMap context.isIPadApp = application.isIPadApp