mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
pets: bug fixes & rewording
This commit is contained in:
parent
1ee008aea1
commit
3a62482a4d
3 changed files with 13 additions and 13 deletions
|
|
@ -67,8 +67,8 @@ items = module.exports.items =
|
|||
_.each ['weapon', 'armor', 'head', 'shield'], (key) ->
|
||||
_.each items[key], (item) -> item.type = key
|
||||
|
||||
_.each items.pets, (pet) -> pet.notes = 'Find some Hatching Potion to sprinkle on this egg, and one day it will hatch into a loyal pet.'
|
||||
_.each items.hatchingPotions, (hatchingPotion) -> hatchingPotion.notes = "Sprinkle this on an egg, and it will hatch as a #{hatchingPotion.text} pet."
|
||||
_.each items.pets, (pet) -> pet.notes = 'Find a <strong>hatching potion</strong> to pour on this egg, and one day it will hatch into a loyal pet.'
|
||||
_.each items.hatchingPotions, (hatchingPotion) -> hatchingPotion.notes = "Pour this on an egg, and it will hatch as a #{hatchingPotion.text} pet."
|
||||
|
||||
###
|
||||
view exports
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ module.exports.app = (appExports, model) ->
|
|||
eggs.splice eggIdx, 1
|
||||
myHatchingPotion.splice hatchingPotionIdx, 1
|
||||
user.set 'items.eggs', eggs
|
||||
user.set 'items.hatchingPotions', myHatching Potion
|
||||
user.set 'items.hatchingPotions', myHatchingPotion
|
||||
|
||||
alert 'Your egg hatched! Visit your stable to equip your pet.'
|
||||
|
||||
|
|
@ -65,9 +65,9 @@ module.exports.app = (appExports, model) ->
|
|||
|
||||
appExports.buyHatchingPotion = (e, el) ->
|
||||
name = $(el).attr 'data-hatchingPotion'
|
||||
newHatchingPotion = _.findWhere hatchingPotion, name: name
|
||||
newHatchingPotion = _.findWhere hatchingPotions, name: name
|
||||
tokens = user.get('balance') * 4
|
||||
if tokens > newHatching Potion.value
|
||||
if tokens > newHatchingPotion.value
|
||||
if confirm "Buy this hatching potion with #{newHatchingPotion.value} of your #{tokens} tokens?"
|
||||
user.push 'items.hatchingPotions', newHatchingPotion.name
|
||||
user.set 'balance', (tokens - newHatchingPotion.value) / 4
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@
|
|||
<div class='span6 well'>
|
||||
<menu type="list" class="inventory-list">
|
||||
<li class="customize-menu">
|
||||
{#if not(_user.items.eggs)}
|
||||
<p>You don't have any eggs yet.</p>
|
||||
{/if}
|
||||
<menu label="Eggs" class='pets-menu'>
|
||||
{#if not(_user.items.eggs)}
|
||||
<p>You don't have any eggs yet.</p>
|
||||
{/if}
|
||||
{#each _user.items.eggs as :egg}
|
||||
<div>
|
||||
<button rel=tooltip title="{:egg.text}" class="customize-option Pet_Egg_{{:egg.name}}" x-bind="click: chooseEgg"></button>
|
||||
|
|
@ -51,10 +51,10 @@
|
|||
</menu>
|
||||
</li>
|
||||
<li class="customize-menu">
|
||||
{#if not(_user.items.hatchingPotions)}
|
||||
<p>You don't have any hatching potions yet.</p>
|
||||
{/if}
|
||||
<menu label="Hatching Potion" class='hatchingPotion-menu'>
|
||||
<menu label="Hatching Potions" class='hatchingPotion-menu'>
|
||||
{#if not(_user.items.hatchingPotions)}
|
||||
<p>You don't have any hatching potions yet.</p>
|
||||
{/if}
|
||||
{#each _user.items.hatchingPotions as :hatchingPotion}
|
||||
<div>
|
||||
<button rel=tooltip title="{:hatchingPotion}" class="customize-option Pet_HatchingPotion_{{:hatchingPotion}}" x-bind="click: chooseHatching Potion"></button>
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
{#if not(_user.items.hatchingPotions)}
|
||||
<p>You don't have any hatching potions yet.</p>
|
||||
{else}
|
||||
<p>What would you like to sprinkle on your {_hatchEgg.text} egg?</p>
|
||||
<p>Which hatching potion will you pour on your {_hatchEgg.text} egg?</p>
|
||||
<form x-bind="submit:hatchEgg">
|
||||
<select>
|
||||
{#each _user.items.hatchingPotions as :hatchingPotion}
|
||||
|
|
|
|||
Loading…
Reference in a new issue