From d124968273c5a95868c219e5070950d8cc410f0a Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Wed, 13 Nov 2013 16:45:08 -0800 Subject: [PATCH] mounts: add egg.mountText so "cub" text doesn't show up for mounts --- dist/habitrpg-shared.js | 15 ++++++++++----- script/items.coffee | 17 +++++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 4de1b1f99e..3e19a64bf6 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -9711,13 +9711,16 @@ try { text: 'Wolf' }, TigerCub: { - text: 'Tiger Cub' + text: 'Tiger Cub', + mountText: 'Tiger' }, PandaCub: { - text: 'Panda Cub' + text: 'Panda Cub', + mountText: 'Panda' }, LionCub: { - text: 'Lion Cub' + text: 'Lion Cub', + mountText: 'Lion' }, Fox: { text: 'Fox' @@ -9732,7 +9735,8 @@ try { text: 'Cactus' }, BearCub: { - text: 'Bear Cub' + text: 'Bear Cub', + mountText: 'Bear' } }, hatchingPotions: { @@ -9854,7 +9858,8 @@ try { return _.defaults(egg, { value: 3, name: k, - notes: 'Find a hatching potion to pour on this egg, and it will hatch into a loyal pet.' + notes: 'Find a hatching potion to pour on this egg, and it will hatch into a loyal pet.', + mountText: egg.text }); }); diff --git a/script/items.coffee b/script/items.coffee index fc089ad673..9df5681256 100644 --- a/script/items.coffee +++ b/script/items.coffee @@ -46,15 +46,16 @@ items = module.exports.items = reroll: {type: 'reroll', text: "Re-Roll", classes: 'reroll', notes: "Resets your task values back to 0 (yellow). Useful when everything's red and it's hard to stay alive.", value:0 } eggs: - Wolf: text: 'Wolf' # values set below - TigerCub: text: 'Tiger Cub' - PandaCub: text: 'Panda Cub' - LionCub: text: 'Lion Cub' + # value & other defaults set below + Wolf: text: 'Wolf' + TigerCub: text: 'Tiger Cub', mountText: 'Tiger' + PandaCub: text: 'Panda Cub', mountText: 'Panda' + LionCub: text: 'Lion Cub', mountText: 'Lion' Fox: text: 'Fox' FlyingPig: text: 'Flying Pig' Dragon: text: 'Dragon' Cactus: text: 'Cactus' - BearCub: text: 'Bear Cub' + BearCub: text: 'Bear Cub', mountText: 'Bear' #{text: 'Polar Bear Cub', name: 'PolarBearCub', value: 3} hatchingPotions: @@ -97,7 +98,11 @@ _.each ['weapon', 'armor', 'head', 'shield'], (type) -> _.each items[type], (item) -> _.defaults(item, {type, canOwn: ->true}) _.each items.eggs, (egg,k) -> - _.defaults egg, {value: 3, name: k, notes: 'Find a hatching potion to pour on this egg, and it will hatch into a loyal pet.'} + _.defaults egg, + value: 3 + name: k + notes: 'Find a hatching potion to pour on this egg, and it will hatch into a loyal pet.' + mountText: egg.text _.each items.hatchingPotions, (pot,k) -> _.defaults pot, {name: k, notes: "Pour this on an egg, and it will hatch as a #{pot.text} pet."}