mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-26 00:58:00 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
08cef0e380
4 changed files with 93 additions and 77 deletions
|
@ -212,6 +212,16 @@ module.exports = class GoalManager extends CocoClass
|
|||
else
|
||||
state[progressObjectName][thang] = false
|
||||
|
||||
setGoalState: (goalID, status) ->
|
||||
state = @goalStates[goalID]
|
||||
state.status = status
|
||||
if overallStatus = @checkOverallStatus true
|
||||
matchedGoals = (_.find(@goals, {id: goalID}) for goalID, goalState of @goalStates when goalState.status is overallStatus)
|
||||
mostEagerGoal = _.min matchedGoals, 'worldEndsAfter'
|
||||
victory = overallStatus is "success"
|
||||
tentative = overallStatus is "success"
|
||||
@world.endWorld victory, mostEagerGoal.worldEndsAfter, tentative if mostEagerGoal isnt Infinity
|
||||
|
||||
updateGoalState: (goalID, thangID, progressObjectName, frameNumber) ->
|
||||
# A thang has done something related to the goal!
|
||||
# Mark it down and update the goal state.
|
||||
|
|
|
@ -38,6 +38,9 @@ module.exports = class Thang
|
|||
publishNote: (channel, event) ->
|
||||
event.thang = @
|
||||
@world.publishNote channel, event
|
||||
|
||||
setGoalState: (goalID, status) ->
|
||||
@world.setGoalState goalID, status
|
||||
|
||||
addComponents: (components...) ->
|
||||
# We don't need to keep the components around after attaching them, but we will keep their initial config for recreating Thangs
|
||||
|
|
|
@ -221,6 +221,9 @@ module.exports = class World
|
|||
@scriptNotes.push scriptNote
|
||||
return unless @goalManager
|
||||
@goalManager.submitWorldGenerationEvent(channel, event, @frames.length)
|
||||
|
||||
setGoalState: (goalID, status) ->
|
||||
@goalManager.setGoalState(goalID, status)
|
||||
|
||||
endWorld: (victory=false, delay=3, tentative=false) ->
|
||||
@totalFrames = Math.min(@totalFrames, @frames.length + Math.floor(delay / @dt)) - 1 # end a few seconds later
|
||||
|
|
|
@ -1,94 +1,94 @@
|
|||
module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak", translation:
|
||||
common:
|
||||
loading: "Načítava sa..."
|
||||
# saving: "Saving..."
|
||||
saving: "Ukladá sa..."
|
||||
sending: "Odosiela sa..."
|
||||
cancel: "Zrušiť"
|
||||
# save: "Save"
|
||||
# delay_1_sec: "1 second"
|
||||
# delay_3_sec: "3 seconds"
|
||||
# delay_5_sec: "5 seconds"
|
||||
# manual: "Manual"
|
||||
cancel: "Zruš"
|
||||
save: "Ulož"
|
||||
delay_1_sec: "1 sekunda"
|
||||
delay_3_sec: "3 sekundy"
|
||||
delay_5_sec: "5 sekúnd"
|
||||
manual: "Manuál"
|
||||
# fork: "Fork"
|
||||
play: "Hrať"
|
||||
play: "Hraj"
|
||||
|
||||
modal:
|
||||
close: "Zatvoriť"
|
||||
close: "Zatvor"
|
||||
okay: "Súhlasím"
|
||||
|
||||
not_found:
|
||||
page_not_found: "Stránka nenájdená"
|
||||
|
||||
nav:
|
||||
play: "Hrať"
|
||||
play: "Hraj"
|
||||
editor: "Editor"
|
||||
blog: "Blog"
|
||||
forum: "Fórum"
|
||||
admin: "Administrácia"
|
||||
admin: "Spravuj"
|
||||
home: "Domov"
|
||||
contribute: "Prispieť"
|
||||
# legal: "Legal"
|
||||
contribute: "Prispej"
|
||||
legal: "Pre právnikov"
|
||||
about: "O projekte"
|
||||
contact: "Kontakt"
|
||||
twitter_follow: "Sledovať"
|
||||
# employers: "Employers"
|
||||
twitter_follow: "Sleduj na twitteri"
|
||||
employers: "Zamestnávatelia"
|
||||
|
||||
# versions:
|
||||
# save_version_title: "Save New Version"
|
||||
# new_major_version: "New Major Version"
|
||||
# cla_prefix: "To save changes, first you must agree to our"
|
||||
versions:
|
||||
save_version_title: "Ulož novú verziu"
|
||||
new_major_version: "Nová primárna verzia"
|
||||
cla_prefix: "Ak chcete uložiť svoje zmeny, musíte najprv súhlasiť s našou"
|
||||
# cla_url: "CLA"
|
||||
# cla_suffix: "."
|
||||
# cla_agree: "I AGREE"
|
||||
cla_agree: "SÚHLASÍM"
|
||||
|
||||
login:
|
||||
sign_up: "Vytvoriť účet"
|
||||
log_in: "Prihlásiť sa"
|
||||
log_out: "Odhlásiť sa"
|
||||
recover: "obnoviť účet"
|
||||
sign_up: "Vytvor účet"
|
||||
log_in: "Prihlás sa"
|
||||
log_out: "Odhlás sa"
|
||||
recover: "obnov"
|
||||
|
||||
# recover:
|
||||
# recover_account_title: "Recover Account"
|
||||
# send_password: "Send Recovery Password"
|
||||
recover:
|
||||
recover_account_title: "Obnov účet"
|
||||
send_password: "Zašli záchranné heslo"
|
||||
|
||||
signup:
|
||||
# create_account_title: "Create Account to Save Progress"
|
||||
description: "Je to zdarma. Potrebuješ zadať len zopár detailov."
|
||||
email_announcements: "Dostávať správy na email."
|
||||
create_account_title: "Vytvor si účet, nech si uložíš progres"
|
||||
description: "Je to zdarma. Len treba zadať zopár detailov."
|
||||
email_announcements: "Chcem dostávať správy na email."
|
||||
coppa: "13+ alebo mimo USA"
|
||||
coppa_why: "(Prečo?)"
|
||||
creating: "Vytvára sa účet..."
|
||||
sign_up: "Registrovať sa"
|
||||
log_in: "prihlásiť sa pomocou hesla"
|
||||
sign_up: "Registruj sa"
|
||||
log_in: "prihlás sa pomocou hesla"
|
||||
|
||||
home:
|
||||
slogan: "Naučte sa programovať v Javascripte pomocou hry"
|
||||
slogan: "Nauč sa programovať v Javascripte pomocou hry"
|
||||
no_ie: "CodeCombat nefunguje v prehliadači Internet Explorer 9 a jeho starších verziách. Ospravedlňujeme sa."
|
||||
no_mobile: "CodeCombat nebol navrhnutý pre mobilné zariadenia a nemusí na nich fungovať správne!"
|
||||
play: "Hrať"
|
||||
# old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!"
|
||||
# old_browser_suffix: "You can try anyway, but it probably won't work."
|
||||
# campaign: "Campaign"
|
||||
# for_beginners: "For Beginners"
|
||||
play: "Hraj"
|
||||
old_browser: "Ajaj, prehliadač je príliš starý. CodeCombat na ňom nepôjde. Je nám to ľúto!"
|
||||
old_browser_suffix: "Skúsiť sa to dá, ale asi to nepôjde."
|
||||
campaign: "Ťaženie"
|
||||
for_beginners: "Pre začiatočníkov"
|
||||
# multiplayer: "Multiplayer"
|
||||
# for_developers: "For Developers"
|
||||
for_developers: "Pre vývojárov"
|
||||
|
||||
play:
|
||||
choose_your_level: "Vyber si level"
|
||||
adventurer_prefix: "Môže si vybrať ktorýkoľvek z levelov alebo ich prediskutovať na "
|
||||
choose_your_level: "Vyber si úroveň"
|
||||
adventurer_prefix: "Môže si vybrať ktorúkoľvek z úrovní alebo ich prediskutovať na "
|
||||
adventurer_forum: "fóre pre dobrodruhov"
|
||||
adventurer_suffix: "."
|
||||
campaign_beginner: "Ťaženie pre začiatočníkov"
|
||||
campaign_beginner_description: "... v kotorom sa naučíte mágiu programovania."
|
||||
campaign_dev: "Náhodné ťažšie levely"
|
||||
campaign_dev_description: "... v ktorom sa naučíte používať rozhranie zatiaľčo budete čeliť väčším výzvam."
|
||||
campaign_beginner_description: "... v ktorom sa naučíš mágiu programovania."
|
||||
campaign_dev: "Náhodné ťažšie úrovne"
|
||||
campaign_dev_description: "... v ktorych sa naučíš používať rozhranie a čeliť väčším výzvam."
|
||||
campaign_multiplayer: "Aréna pre viacerých hráčov"
|
||||
campaign_multiplayer_description: "... v ktorej si zmeriate svoje programátorské sily proti ostatným hráčom."
|
||||
campaign_player_created: "Hráčmi vytvorené levely"
|
||||
campaign_player_created_description: "... v ktorých sa popasujete s kreativitou svojich <a href=\"/contribute#artisan\">súdruhov kúzelníkov</a>."
|
||||
campaign_multiplayer_description: "... v ktorej si zmeriaš svoje programátorské sily proti ostatným hráčom."
|
||||
campaign_player_created: "Hráčmi vytvorené úrovne"
|
||||
campaign_player_created_description: "... v ktorých sa popasuješ s kreativitou svojich <a href=\"/contribute#artisan\">kúzelníckych súdruhov</a>."
|
||||
level_difficulty: "Obtiažnosť."
|
||||
# play_as: "Play As"
|
||||
# spectate: "Spectate"
|
||||
play_as: "Hraj ako"
|
||||
spectate: "Sleduj"
|
||||
|
||||
contact:
|
||||
contact_us: "Kontaktujte nás"
|
||||
|
@ -109,34 +109,34 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
|
|||
# learn_more: "Learn more about being a Diplomat"
|
||||
# subscribe_as_diplomat: "Subscribe as a Diplomat"
|
||||
|
||||
# wizard_settings:
|
||||
# title: "Wizard Settings"
|
||||
# customize_avatar: "Customize Your Avatar"
|
||||
# clothes: "Clothes"
|
||||
# trim: "Trim"
|
||||
# cloud: "Cloud"
|
||||
# spell: "Spell"
|
||||
# boots: "Boots"
|
||||
# hue: "Hue"
|
||||
# saturation: "Saturation"
|
||||
# lightness: "Lightness"
|
||||
wizard_settings:
|
||||
title: "Nastavenia kúzelníka"
|
||||
customize_avatar: "Uprav svojho avatara"
|
||||
clothes: "Róba"
|
||||
trim: "Lem"
|
||||
cloud: "Obláčik"
|
||||
spell: "Kúzlo"
|
||||
boots: "Čižmy"
|
||||
hue: "Odtieň"
|
||||
saturation: "Sýtosť"
|
||||
lightness: "Jas"
|
||||
|
||||
# account_settings:
|
||||
# title: "Account Settings"
|
||||
# not_logged_in: "Log in or create an account to change your settings."
|
||||
# autosave: "Changes Save Automatically"
|
||||
# me_tab: "Me"
|
||||
# picture_tab: "Picture"
|
||||
# wizard_tab: "Wizard"
|
||||
# password_tab: "Password"
|
||||
# emails_tab: "Emails"
|
||||
# admin: "Admin"
|
||||
# gravatar_select: "Select which Gravatar photo to use"
|
||||
account_settings:
|
||||
title: "Nastvenia účtu"
|
||||
not_logged_in: "Prihlás sa alebo si vytvor účet."
|
||||
autosave: "Zmeny sa uložia automaticky"
|
||||
me_tab: "Ja"
|
||||
picture_tab: "Obrázok"
|
||||
wizard_tab: "Kúzelník"
|
||||
password_tab: "Heslo"
|
||||
emails_tab: "E-maily"
|
||||
admin: "Spravovať"
|
||||
gravatar_select: " Vyber ktorú fotografiu z Gravataru použit"
|
||||
# gravatar_add_photos: "Add thumbnails and photos to a Gravatar account for your email to choose an image."
|
||||
# gravatar_add_more_photos: "Add more photos to your Gravatar account to access them here."
|
||||
# wizard_color: "Wizard Clothes Color"
|
||||
# new_password: "New Password"
|
||||
# new_password_verify: "Verify"
|
||||
wizard_color: "Farba kúzelníckej róby"
|
||||
new_password: "Nové heslo"
|
||||
new_password_verify: "Overenie"
|
||||
# email_subscriptions: "Email Subscriptions"
|
||||
# email_announcements: "Announcements"
|
||||
# email_notifications: "Notifications"
|
||||
|
@ -147,9 +147,9 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
|
|||
# contribute_page: "contribute page"
|
||||
# contribute_suffix: " to find out more."
|
||||
# email_toggle: "Toggle All"
|
||||
# error_saving: "Error Saving"
|
||||
# saved: "Changes Saved"
|
||||
# password_mismatch: "Password does not match."
|
||||
error_saving: "Chyba pri ukladaní"
|
||||
saved: "Zmeny uložené"
|
||||
password_mismatch: "Heslá nesedia."
|
||||
|
||||
# account_profile:
|
||||
# edit_settings: "Edit Settings"
|
||||
|
|
Loading…
Reference in a new issue