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