From 77d92b84dcf07702536572e833c286723c39b078 Mon Sep 17 00:00:00 2001 From: Taldin Date: Thu, 30 Oct 2014 12:35:14 -0700 Subject: [PATCH 1/2] added mountmaster support pets: added language support - needs to be commuted to other languages' content.coffee - added api.mounts and api.questmounts index.coffee - revised api.countMounts to remove quest mounts from the list --- locales/en/pets.json | 4 ++++ script/content.coffee | 9 +++++++++ script/index.coffee | 10 ++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/locales/en/pets.json b/locales/en/pets.json index 8a47beacb6..f82f17b569 100644 --- a/locales/en/pets.json +++ b/locales/en/pets.json @@ -30,6 +30,10 @@ "beastMastName": "Beast Master", "beastMastText": "Has found all 90 pets (insanely difficult, congratulate this user!)", "beastMastText2": " and has released their pets a total of <%= count %> times", + "mountAchievement": "You have earned the \"Mount Master\" achievement for taming all the mounts!", + "mountMastName": "Mount Master", + "mountMastText": "Has tamed all 90 mounts (even more difficult, congratulate this user!)", + "mountMastText2": " and has released their mounts a total of <%= count %> times", "dropsEnabled": "Drops Enabled!", "itemDrop": "An item has dropped!", "firstDrop": "You've unlocked the Drop System! Now when you complete tasks, you have a small chance of finding an item. You just found a <%= eggText %> Egg! <%= eggNotes %>", diff --git a/script/content.coffee b/script/content.coffee index 7db4eec2ef..8d49e50ab3 100644 --- a/script/content.coffee +++ b/script/content.coffee @@ -730,6 +730,15 @@ api.questPets = _.transform api.questEggs, (m, egg) -> _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> m2[egg.key + "-" + pot.key] = true +## added for mountmaster -- yes, the transforms are correct, since the same strings are used for both pets and mounts +api.mounts = _.transform api.dropEggs, (m, egg) -> + _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> + m2[egg.key + "-" + pot.key] = true + +api.questMounts = _.transform api.questEggs, (m, egg) -> + _.defaults m, _.transform api.hatchingPotions, (m2, pot) -> + m2[egg.key + "-" + pot.key] = true + #TODO after the fall event, set Base set to canBuy:true (or remove, since it's default) and set Fall set to canBuy:false api.food = # Base diff --git a/script/index.coffee b/script/index.coffee index bc2899916a..9ae6052ef4 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -318,11 +318,13 @@ api.countPets = (originalCount, pets) -> count-- if pets[pet] count -api.countMounts= (originalCount, mounts) -> - count = if originalCount? then originalCount else _.size(mounts) +api.countMounts = (originalCount, mounts) -> + count2 = if originalCount? then originalCount else _.size(mounts) + for mount of content.questPets + count2-- if mounts[mount] for mount of content.specialMounts - count-- if mounts[mount] - count + count2-- if mounts[mount] + count2 ### ------------------------------------------------------ From 3c3d73e15ad63a0d983b939d83cc6f840c6bf242 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Thu, 11 Dec 2014 10:09:44 -0600 Subject: [PATCH 2/2] Added strings for beast/mount master progress --- locales/en/pets.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/locales/en/pets.json b/locales/en/pets.json index f82f17b569..58c1deff99 100644 --- a/locales/en/pets.json +++ b/locales/en/pets.json @@ -26,10 +26,12 @@ "inventoryText": "Click an egg to see usable potions highlighted in green and then click one of the highlighted potions to hatch your pet. If no potions are highlighted, click that egg again to deselect it, and instead click a potion first to have the usable eggs highlighted. You can also sell unwanted drops to Alexander the Merchant.", "food": "Food and Saddles", "noFood": "You don't have any food or saddles.", + "beastProgress": "Beast Master Progress", "beastAchievement": "You have earned the \"Beast Master\" Achievement for collecting all the pets!", "beastMastName": "Beast Master", "beastMastText": "Has found all 90 pets (insanely difficult, congratulate this user!)", "beastMastText2": " and has released their pets a total of <%= count %> times", + "mountProgress": "Mount Master Progress", "mountAchievement": "You have earned the \"Mount Master\" achievement for taming all the mounts!", "mountMastName": "Mount Master", "mountMastText": "Has tamed all 90 mounts (even more difficult, congratulate this user!)",