diff --git a/test/api/v3/integration/user/POST-user_feed_pet_food.test.js b/test/api/v3/integration/user/POST-user_feed_pet_food.test.js index 253bfb1ca0..e3a6574157 100644 --- a/test/api/v3/integration/user/POST-user_feed_pet_food.test.js +++ b/test/api/v3/integration/user/POST-user_feed_pet_food.test.js @@ -30,7 +30,7 @@ describe('POST /user/feed/:pet/:food', () => { data: user.items.pets['Wolf-Base'], message: t('messageDontEnjoyFood', { egg: pet.text(), - foodText: food.text(), + foodText: food.textThe(), }), }); diff --git a/test/common/ops/feed.js b/test/common/ops/feed.js index fb9dcb4af9..91c6a9cee9 100644 --- a/test/common/ops/feed.js +++ b/test/common/ops/feed.js @@ -125,7 +125,7 @@ describe('shared.ops.feed', () => { expect(data).to.eql(user.items.pets['Wolf-Base']); expect(message).to.eql(i18n.t('messageLikesFood', { egg: pet.text(), - foodText: food.text(), + foodText: food.textThe(), })); expect(user.items.food.Meat).to.equal(1); @@ -143,7 +143,7 @@ describe('shared.ops.feed', () => { expect(data).to.eql(user.items.pets['Wolf-Spooky']); expect(message).to.eql(i18n.t('messageLikesFood', { egg: pet.text(), - foodText: food.text(), + foodText: food.textThe(), })); expect(user.items.food.Milk).to.equal(1); @@ -161,7 +161,7 @@ describe('shared.ops.feed', () => { expect(data).to.eql(user.items.pets['Wolf-Base']); expect(message).to.eql(i18n.t('messageDontEnjoyFood', { egg: pet.text(), - foodText: food.text(), + foodText: food.textThe(), })); expect(user.items.food.Milk).to.equal(1); diff --git a/website/client/components/tasks/task.vue b/website/client/components/tasks/task.vue index 0629844a15..a49a47896a 100644 --- a/website/client/components/tasks/task.vue +++ b/website/client/components/tasks/task.vue @@ -758,9 +758,9 @@ export default { dropNotes = Content.eggs[drop.key].notes(); this.drop(this.$t('messageDropEgg', {dropText, dropNotes}), drop); } else if (drop.type === 'Food') { - dropText = Content.food[drop.key].text(); + dropText = Content.food[drop.key].textA(); dropNotes = Content.food[drop.key].notes(); - this.drop(this.$t('messageDropFood', {dropArticle: drop.article, dropText, dropNotes}), drop); + this.drop(this.$t('messageDropFood', {dropText, dropNotes}), drop); } else if (drop.type === 'Quest') { // TODO $rootScope.selectedQuest = Content.quests[drop.key]; // $rootScope.openModal('questDrop', {controller:'PartyCtrl', size:'sm'}); diff --git a/website/common/locales/en/content.json b/website/common/locales/en/content.json index 5634b01842..8fc0deea84 100644 --- a/website/common/locales/en/content.json +++ b/website/common/locales/en/content.json @@ -257,37 +257,97 @@ "premiumPotionAddlNotes": "Not usable on quest pet eggs.", "foodMeat": "Meat", + "foodMeatThe": "the Meat", + "foodMeatA": "Meat", "foodMilk": "Milk", + "foodMilkThe": "the Milk", + "foodMilkA": "Milk", "foodPotatoe": "Potato", + "foodPotatoeThe": "the Potato", + "foodPotatoeA": "a Potato", "foodStrawberry": "Strawberry", + "foodStrawberryThe": "the Strawberry", + "foodStrawberryA": "a Strawberry", "foodChocolate": "Chocolate", + "foodChocolateThe": "the Chocolate", + "foodChocolateA": "Chocolate", "foodFish": "Fish", + "foodFishThe": "the Fish", + "foodFishA": "a Fish", "foodRottenMeat": "Rotten Meat", + "foodRottenMeatThe": "the Rotten Meat", + "foodRottenMeatA": "Rotten Meat", "foodCottonCandyPink": "Pink Cotton Candy", + "foodCottonCandyPinkThe": "the Pink Cotton Candy", + "foodCottonCandyPinkA": "Pink Cotton Candy", "foodCottonCandyBlue": "Blue Cotton Candy", + "foodCottonCandyBlueThe": "the Blue Cotton Candy", + "foodCottonCandyBlueA": "Blue Cotton Candy", "foodHoney": "Honey", + "foodHoneyThe": "the Honey", + "foodHoneyA": "Honey", "foodCakeSkeleton": "Bare Bones Cake", + "foodCakeSkeletonThe": "the Bare Bones Cake", + "foodCakeSkeletonA": "a Bare Bones Cake", "foodCakeBase": "Basic Cake", + "foodCakeBaseThe": "the Basic Cake", + "foodCakeBaseA": "a Basic Cake", "foodCakeCottonCandyBlue": "Candy Blue Cake", + "foodCakeCottonCandyBlueThe": "the Candy Blue Cake", + "foodCakeCottonCandyBlueA": "a Candy Blue Cake", "foodCakeCottonCandyPink": "Candy Pink Cake", + "foodCakeCottonCandyPinkThe": "the Candy Pink Cake", + "foodCakeCottonCandyPinkA": "a Candy Pink Cake", "foodCakeShade": "Chocolate Cake", + "foodCakeShadeThe": "the Chocolate Cake", + "foodCakeShadeA": "a Chocolate Cake", "foodCakeWhite": "Cream Cake", + "foodCakeWhiteThe": "the Cream Cake", + "foodCakeWhiteA": "a Cream Cake", "foodCakeGolden": "Honey Cake", + "foodCakeGoldenThe": "the Honey Cake", + "foodCakeGoldenA": "a Honey Cake", "foodCakeZombie": "Rotten Cake", + "foodCakeZombieThe": "the Rotten Cake", + "foodCakeZombieA": "a Rotten Cake", "foodCakeDesert": "Sand Cake", + "foodCakeDesertThe": "the Sand Cake", + "foodCakeDesertA": "a Sand Cake", "foodCakeRed": "Strawberry Cake", + "foodCakeRedThe": "the Strawberry Cake", + "foodCakeRedA": "a Strawberry Cake", "foodCandySkeleton": "Bare Bones Candy", + "foodCandySkeletonThe": "the Bare Bones Candy", + "foodCandySkeletonA": "Bare Bones Candy", "foodCandyBase": "Basic Candy", + "foodCandyBaseThe": "the Basic Candy", + "foodCandyBaseA": "Basic Candy", "foodCandyCottonCandyBlue": "Sour Blue Candy", + "foodCandyCottonCandyBlueThe": "the Sour Blue Candy", + "foodCandyCottonCandyBlueA": "Sour Blue Candy", "foodCandyCottonCandyPink": "Sour Pink Candy", + "foodCandyCottonCandyPinkThe": "the Sour Pink Candy", + "foodCandyCottonCandyPinkA": "Sour Pink Candy", "foodCandyShade": "Chocolate Candy", + "foodCandyShadeThe": "the Chocolate Candy", + "foodCandyShadeA": "Chocolate Candy", "foodCandyWhite": "Vanilla Candy", + "foodCandyWhiteThe": "the Vanilla Candy", + "foodCandyWhiteA": "Vanilla Candy", "foodCandyGolden": "Honey Candy ", + "foodCandyGoldenThe": "the Honey Candy", + "foodCandyGoldenA": "Honey Candy", "foodCandyZombie": "Rotten Candy", + "foodCandyZombieThe": "the Rotten Candy", + "foodCandyZombieA": "Rotten Candy", "foodCandyDesert": "Sand Candy", + "foodCandyDesertThe": "the Sand Candy", + "foodCandyDesertA": "Sand Candy", "foodCandyRed": "Cinnamon Candy", + "foodCandyRedThe": "the Cinnamon Candy", + "foodCandyRedA": "Cinnamon Candy", "foodSaddleText": "Saddle", "foodSaddleNotes": "Instantly raises one of your pets into a mount.", diff --git a/website/common/locales/en/messages.json b/website/common/locales/en/messages.json index e5020db5cb..11e26c7a70 100644 --- a/website/common/locales/en/messages.json +++ b/website/common/locales/en/messages.json @@ -9,8 +9,8 @@ "messageCannotFeedPet": "Can't feed this pet.", "messageAlreadyMount": "You already have that mount. Try feeding another pet.", "messageEvolve": "You have tamed <%= egg %>, let's go for a ride!", - "messageLikesFood": "<%= egg %> really likes the <%= foodText %>!", - "messageDontEnjoyFood": "<%= egg %> eats the <%= foodText %> but doesn't seem to enjoy it.", + "messageLikesFood": "<%= egg %> really likes <%= foodText %>!", + "messageDontEnjoyFood": "<%= egg %> eats <%= foodText %> but doesn't seem to enjoy it.", "messageBought": "Bought <%= itemText %>", "messageEquipped": " <%= itemText %> equipped.", "messageUnEquipped": "<%= itemText %> unequipped.", @@ -21,7 +21,7 @@ "messageNotEnoughGold": "Not Enough Gold", "messageTwoHandedEquip": "Wielding <%= twoHandedText %> takes two hands, so <%= offHandedText %> has been unequipped.", "messageTwoHandedUnequip": "Wielding <%= twoHandedText %> takes two hands, so it was unequipped when you armed yourself with <%= offHandedText %>.", - "messageDropFood": "You've found <%= dropArticle %><%= dropText %>!", + "messageDropFood": "You've found <%= dropText %>!", "messageDropEgg": "You've found a <%= dropText %> Egg!", "messageDropPotion": "You've found a <%= dropText %> Hatching Potion!", "messageDropQuest": "You've found a quest!", @@ -35,7 +35,7 @@ "messageHealthAlreadyMin": "Oh no! You have already run out of health so it's too late to buy a health potion, but don't worry - you can revive!", "armoireEquipment": "<%= image %> You found a piece of rare Equipment in the Armoire: <%= dropText %>! Awesome!", - "armoireFood": "<%= image %> You rummage in the Armoire and find <%= dropArticle %><%= dropText %>. What's that doing in here?", + "armoireFood": "<%= image %> You rummage in the Armoire and find <%= dropText %>. What's that doing in here?", "armoireExp": "You wrestle with the Armoire and gain Experience. Take that!", "messageInsufficientGems": "Not enough gems!", diff --git a/website/common/locales/en/pets.json b/website/common/locales/en/pets.json index c6a5cb863f..e85feb199f 100644 --- a/website/common/locales/en/pets.json +++ b/website/common/locales/en/pets.json @@ -81,7 +81,7 @@ "petNotOwned": "You do not own this pet.", "mountNotOwned": "You do not own this mount.", "earnedCompanion": "With all your productivity, you've earned a new companion. Feed it to make it grow!", - "feedPet": "Feed <%= article %><%= text %> to your <%= name %>?", + "feedPet": "Feed <%= text %> to your <%= name %>?", "useSaddle": "Saddle <%= pet %>?", "raisedPet": "You grew your <%= pet %>!", "earnedSteed": "By completing your tasks, you've earned a faithful steed!", diff --git a/website/common/script/content/constants.js b/website/common/script/content/constants.js index 84ae40e641..6f6632466e 100644 --- a/website/common/script/content/constants.js +++ b/website/common/script/content/constants.js @@ -91,7 +91,7 @@ export const ITEM_LIST = { premiumHatchingPotions: { localeKey: 'hatchingPotion', isEquipment: false }, eggs: { localeKey: 'eggSingular', isEquipment: false }, quests: { localeKey: 'quest', isEquipment: false }, - food: { localeKey: 'foodText', isEquipment: false }, + food: { localeKey: 'foodTextThe', isEquipment: false }, Saddle: { localeKey: 'foodSaddleText', isEquipment: false }, bundles: { localeKey: 'discountBundle', isEquipment: false }, }; diff --git a/website/common/script/content/index.js b/website/common/script/content/index.js index c5b33f81f3..aa2eb057ba 100644 --- a/website/common/script/content/index.js +++ b/website/common/script/content/index.js @@ -276,8 +276,9 @@ let canDropCakeFood = false; api.food = { Meat: { text: t('foodMeat'), + textA: t('foodMeatA'), + textThe: t('foodMeatThe'), target: 'Base', - article: '', canBuy () { return canBuyNormalFood; }, @@ -285,8 +286,9 @@ api.food = { }, Milk: { text: t('foodMilk'), + textA: t('foodMilkA'), + textThe: t('foodMilkThe'), target: 'White', - article: '', canBuy () { return canBuyNormalFood; }, @@ -294,8 +296,9 @@ api.food = { }, Potatoe: { text: t('foodPotatoe'), + textA: t('foodPotatoeA'), + textThe: t('foodPotatoeThe'), target: 'Desert', - article: 'a ', canBuy () { return canBuyNormalFood; }, @@ -303,8 +306,9 @@ api.food = { }, Strawberry: { text: t('foodStrawberry'), + textA: t('foodStrawberryA'), + textThe: t('foodStrawberryThe'), target: 'Red', - article: 'a ', canBuy () { return canBuyNormalFood; }, @@ -312,8 +316,9 @@ api.food = { }, Chocolate: { text: t('foodChocolate'), + textA: t('foodChocolateA'), + textThe: t('foodChocolateThe'), target: 'Shade', - article: '', canBuy () { return canBuyNormalFood; }, @@ -321,8 +326,9 @@ api.food = { }, Fish: { text: t('foodFish'), + textA: t('foodFishA'), + textThe: t('foodFishThe'), target: 'Skeleton', - article: 'a ', canBuy () { return canBuyNormalFood; }, @@ -330,8 +336,9 @@ api.food = { }, RottenMeat: { text: t('foodRottenMeat'), + textA: t('foodRottenMeatA'), + textThe: t('foodRottenMeatThe'), target: 'Zombie', - article: '', canBuy () { return canBuyNormalFood; }, @@ -339,8 +346,9 @@ api.food = { }, CottonCandyPink: { text: t('foodCottonCandyPink'), + textA: t('foodCottonCandyPinkA'), + textThe: t('foodCottonCandyPinkThe'), target: 'CottonCandyPink', - article: '', canBuy () { return canBuyNormalFood; }, @@ -348,8 +356,9 @@ api.food = { }, CottonCandyBlue: { text: t('foodCottonCandyBlue'), + textA: t('foodCottonCandyBlueA'), + textThe: t('foodCottonCandyBlueThe'), target: 'CottonCandyBlue', - article: '', canBuy () { return canBuyNormalFood; }, @@ -357,8 +366,9 @@ api.food = { }, Honey: { text: t('foodHoney'), + textA: t('foodHoneyA'), + textThe: t('foodHoneyThe'), target: 'Golden', - article: '', canBuy () { return canBuyNormalFood; }, @@ -377,7 +387,6 @@ api.food = { Cake_Skeleton: { text: t('foodCakeSkeleton'), target: 'Skeleton', - article: '', canBuy () { return canBuyCakeFood; }, @@ -385,8 +394,9 @@ api.food = { }, Cake_Base: { text: t('foodCakeBase'), + textA: t('foodCakeBaseA'), + textThe: t('foodCakeBaseThe'), target: 'Base', - article: '', canBuy () { return canBuyCakeFood; }, @@ -394,8 +404,9 @@ api.food = { }, Cake_CottonCandyBlue: { text: t('foodCakeCottonCandyBlue'), + textA: t('foodCakeCottonCandyBlueA'), + textThe: t('foodCakeCottonCandyBlueThe'), target: 'CottonCandyBlue', - article: '', canBuy () { return canBuyCakeFood; }, @@ -403,8 +414,9 @@ api.food = { }, Cake_CottonCandyPink: { text: t('foodCakeCottonCandyPink'), + textA: t('foodCakeCottonCandyPinkA'), + textThe: t('foodCakeCottonCandyPinkThe'), target: 'CottonCandyPink', - article: '', canBuy () { return canBuyCakeFood; }, @@ -412,8 +424,9 @@ api.food = { }, Cake_Shade: { text: t('foodCakeShade'), + textA: t('foodCakeShadeA'), + textThe: t('foodCakeShadeThe'), target: 'Shade', - article: '', canBuy () { return canBuyCakeFood; }, @@ -421,8 +434,9 @@ api.food = { }, Cake_White: { text: t('foodCakeWhite'), + textA: t('foodCakeWhiteA'), + textThe: t('foodCakeWhiteThe'), target: 'White', - article: '', canBuy () { return canBuyCakeFood; }, @@ -430,8 +444,9 @@ api.food = { }, Cake_Golden: { text: t('foodCakeGolden'), + textA: t('foodCakeGoldenA'), + textThe: t('foodCakeGoldenThe'), target: 'Golden', - article: '', canBuy () { return canBuyCakeFood; }, @@ -439,8 +454,9 @@ api.food = { }, Cake_Zombie: { text: t('foodCakeZombie'), + textA: t('foodCakeZombieA'), + textThe: t('foodCakeZombieThe'), target: 'Zombie', - article: '', canBuy () { return canBuyCakeFood; }, @@ -448,8 +464,9 @@ api.food = { }, Cake_Desert: { text: t('foodCakeDesert'), + textA: t('foodCakeDesertA'), + textThe: t('foodCakeDesertThe'), target: 'Desert', - article: '', canBuy () { return canBuyCakeFood; }, @@ -457,8 +474,9 @@ api.food = { }, Cake_Red: { text: t('foodCakeRed'), + textA: t('foodCakeRedA'), + textThe: t('foodCakeRedThe'), target: 'Red', - article: '', canBuy () { return canBuyCakeFood; }, @@ -466,8 +484,9 @@ api.food = { }, Candy_Skeleton: { text: t('foodCandySkeleton'), + textA: t('foodCandySkeletonA'), + textThe: t('foodCandySkeletonThe'), target: 'Skeleton', - article: '', canBuy () { return canBuyCandyFood; }, @@ -475,8 +494,9 @@ api.food = { }, Candy_Base: { text: t('foodCandyBase'), + textA: t('foodCandyBaseA'), + textThe: t('foodCandyBaseThe'), target: 'Base', - article: '', canBuy () { return canBuyCandyFood; }, @@ -484,8 +504,9 @@ api.food = { }, Candy_CottonCandyBlue: { text: t('foodCandyCottonCandyBlue'), + textA: t('foodCandyCottonCandyBlueA'), + textThe: t('foodCandyCottonCandyBlueThe'), target: 'CottonCandyBlue', - article: '', canBuy () { return canBuyCandyFood; }, @@ -493,8 +514,9 @@ api.food = { }, Candy_CottonCandyPink: { text: t('foodCandyCottonCandyPink'), + textA: t('foodCandyCottonCandyPinkA'), + textThe: t('foodCandyCottonCandyPinkThe'), target: 'CottonCandyPink', - article: '', canBuy () { return canBuyCandyFood; }, @@ -502,8 +524,9 @@ api.food = { }, Candy_Shade: { text: t('foodCandyShade'), + textA: t('foodCandyShadeA'), + textThe: t('foodCandyShadeThe'), target: 'Shade', - article: '', canBuy () { return canBuyCandyFood; }, @@ -511,8 +534,9 @@ api.food = { }, Candy_White: { text: t('foodCandyWhite'), + textA: t('foodCandyWhiteA'), + textThe: t('foodCandyWhiteThe'), target: 'White', - article: '', canBuy () { return canBuyCandyFood; }, @@ -520,8 +544,9 @@ api.food = { }, Candy_Golden: { text: t('foodCandyGolden'), + textA: t('foodCandyGoldenA'), + textThe: t('foodCandyGoldenThe'), target: 'Golden', - article: '', canBuy () { return canBuyCandyFood; }, @@ -529,8 +554,9 @@ api.food = { }, Candy_Zombie: { text: t('foodCandyZombie'), + textA: t('foodCandyZombieA'), + textThe: t('foodCandyZombieThe'), target: 'Zombie', - article: '', canBuy () { return canBuyCandyFood; }, @@ -538,8 +564,9 @@ api.food = { }, Candy_Desert: { text: t('foodCandyDesert'), + textA: t('foodCandyDesertA'), + textThe: t('foodCandyDesertThe'), target: 'Desert', - article: '', canBuy () { return canBuyCandyFood; }, @@ -547,8 +574,9 @@ api.food = { }, Candy_Red: { text: t('foodCandyRed'), + textA: t('foodCandyRedA'), + textThe: t('foodCandyRedThe'), target: 'Red', - article: '', canBuy () { return canBuyCandyFood; }, diff --git a/website/common/script/fns/randomDrop.js b/website/common/script/fns/randomDrop.js index 7db8c72892..3156c82590 100644 --- a/website/common/script/fns/randomDrop.js +++ b/website/common/script/fns/randomDrop.js @@ -77,8 +77,7 @@ module.exports = function randomDrop (user, options, req = {}, analytics) { user.items.food[drop.key] += 1; drop.type = 'Food'; drop.dialog = i18n.t('messageDropFood', { - dropArticle: drop.article, - dropText: drop.text(req.language), + dropText: drop.textA(req.language), dropNotes: drop.notes(req.language), }, req.language); } else if (rarity > 0.3) { // eggs 30% chance diff --git a/website/common/script/ops/buyArmoire.js b/website/common/script/ops/buyArmoire.js index 59236e91c9..be8dd3cec6 100644 --- a/website/common/script/ops/buyArmoire.js +++ b/website/common/script/ops/buyArmoire.js @@ -74,14 +74,12 @@ module.exports = function buyArmoire (user, req = {}, analytics) { message = i18n.t('armoireFood', { image: ``, - dropArticle: drop.article, dropText: drop.text(req.language), }, req.language); armoireResp = { type: 'food', dropKey: drop.key, - dropArticle: drop.article, - dropText: drop.text(req.language), + dropText: drop.textA(req.language), }; } else { let armoireExp = Math.floor(randomVal.trueRandom() * 40 + 10); diff --git a/website/common/script/ops/feed.js b/website/common/script/ops/feed.js index 5d34d26ac6..cbe0e347f9 100644 --- a/website/common/script/ops/feed.js +++ b/website/common/script/ops/feed.js @@ -62,7 +62,7 @@ module.exports = function feed (user, req = {}) { } else { let messageParams = { egg: pet.text(req.language), - foodText: food.text(req.language), + foodText: food.textThe(req.language), }; if (food.target === pet.potion || pet.type === 'premium') { diff --git a/website/server/controllers/api-v3/tasks.js b/website/server/controllers/api-v3/tasks.js index 905a392dbf..237d2a7c61 100644 --- a/website/server/controllers/api-v3/tasks.js +++ b/website/server/controllers/api-v3/tasks.js @@ -531,7 +531,7 @@ api.updateTask = { * {"success":true,"data":{"delta":0.9746999906450404,"_tmp":{},"hp":49.06645205596985,"mp":37.2008917491047,"exp":101.93810026267543,"gp":77.09694176716997,"lvl":19,"class":"rogue","points":0,"str":5,"con":3,"int":3,"per":8,"buffs":{"str":9,"int":9,"per":9,"con":9,"stealth":0,"streaks":false,"snowball":false,"spookySparkles":false,"shinySeed":false,"seafoam":false},"training":{"int":0,"per":0,"str":0,"con":0}},"notifications":[]} * * @apiSuccessExample {json} Example result with item drop: - * {"success":true,"data":{"delta":1.0259567046270648,"_tmp":{"quest":{"progressDelta":1.2362778290756147,"collection":1},"drop":{"target":"Zombie","article":"","canDrop":true,"value":1,"key":"RottenMeat","type":"Food","dialog":"You've found Rotten Meat! Feed this to a pet and it may grow into a sturdy steed."}},"hp":50,"mp":66.2390716654227,"exp":143.93810026267545,"gp":135.12889840462591,"lvl":20,"class":"rogue","points":0,"str":6,"con":3,"int":3,"per":8,"buffs":{"str":10,"int":10,"per":10,"con":10,"stealth":0,"streaks":false,"snowball":false,"spookySparkles":false,"shinySeed":false,"seafoam":false},"training":{"int":0,"per":0,"str":0,"con":0}},"notifications":[]} + * {"success":true,"data":{"delta":1.0259567046270648,"_tmp":{"quest":{"progressDelta":1.2362778290756147,"collection":1},"drop":{"target":"Zombie","canDrop":true,"value":1,"key":"RottenMeat","type":"Food","dialog":"You've found Rotten Meat! Feed this to a pet and it may grow into a sturdy steed."}},"hp":50,"mp":66.2390716654227,"exp":143.93810026267545,"gp":135.12889840462591,"lvl":20,"class":"rogue","points":0,"str":6,"con":3,"int":3,"per":8,"buffs":{"str":10,"int":10,"per":10,"con":10,"stealth":0,"streaks":false,"snowball":false,"spookySparkles":false,"shinySeed":false,"seafoam":false},"training":{"int":0,"per":0,"str":0,"con":0}},"notifications":[]} * * @apiUse TaskNotFound */