mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 15:31:16 +00:00
pets: rename shaners Item_HatchingPotion to Pet_HatchingPotion to fit
previous architecture, add some placeholders for the un-finished potions. got them working
This commit is contained in:
parent
db2a210007
commit
6520bfb789
5 changed files with 32 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
.Pet_Egg_Wolf, .Pet_Egg_TigerCub, .Pet_Egg_PolarBear, .Pet_Egg_PandaCub, .Pet_Egg_LionCub, .Pet_Egg_Fox, .Pet_Egg_FlyingPig, .Pet_Egg_Dragon, .Pet_Egg_Cactus, .Pet_Egg_BearCub, .Item_HatchingPotion_Basic, .Item_HatchingPotion_White, .Item_HatchingPotion_Desert, .Item_HatchingPotion_Red, .Item_HatchingPotion_Shade, .Item_HatchingPotion_Skeleton {background: url("/img/sprites/Egg_Sprite_Sheet.png") no-repeat}
|
||||
.Pet_Egg_Wolf, .Pet_Egg_TigerCub, .Pet_Egg_PolarBear, .Pet_Egg_PandaCub, .Pet_Egg_LionCub, .Pet_Egg_Fox, .Pet_Egg_FlyingPig, .Pet_Egg_Dragon, .Pet_Egg_Cactus, .Pet_Egg_BearCub, .Pet_HatchingPotion_Base, .Pet_HatchingPotion_White, .Pet_HatchingPotion_Desert, .Pet_HatchingPotion_Red, .Pet_HatchingPotion_Shade, .Pet_HatchingPotion_Skeleton, .Pet_HatchingPotion_Zombie, .Pet_HatchingPotion_CottonCandyPink, .Pet_HatchingPotion_CottonCandyBlue, .Pet_HatchingPotion_Golden {background: url("/img/sprites/Egg_Sprite_Sheet.png") no-repeat}
|
||||
.Pet_Egg_Wolf {background-position: 0px 0px; width: 48px; height: 51px}
|
||||
.Pet_Egg_TigerCub {background-position: 0px -51px; width: 48px; height: 51px}
|
||||
.Pet_Egg_PolarBear {background-position: 0px -102px; width: 48px; height: 51px}
|
||||
|
|
@ -9,9 +9,25 @@
|
|||
.Pet_Egg_Dragon {background-position: 0px -357px; width: 48px; height: 51px}
|
||||
.Pet_Egg_Cactus {background-position: 0px -408px; width: 48px; height: 51px}
|
||||
.Pet_Egg_BearCub {background-position: 0px -459px; width: 48px; height: 51px}
|
||||
.Item_HatchingPotion_Basic {background-position: -48px -0px; width: 48px; height: 51px}
|
||||
.Item_HatchingPotion_White {background-position: -48px -51px; width: 48px; height: 51px}
|
||||
.Item_HatchingPotion_Desert {background-position: -48px -102px; width: 48px; height: 51px}
|
||||
.Item_HatchingPotion_Red {background-position: -48px -153px; width: 48px; height: 51px}
|
||||
.Item_HatchingPotion_Shade {background-position: -48px -204px; width: 48px; height: 51px}
|
||||
.Item_HatchingPotion_Skeleton {background-position: -48px -255px; width: 48px; height: 51px}
|
||||
|
||||
.Pet_HatchingPotion_Base {background-position: -48px -0px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_White {background-position: -48px -51px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_Desert {background-position: -48px -102px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_Red {background-position: -48px -153px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_Shade {background-position: -48px -204px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_Skeleton {background-position: -48px -255px; width: 48px; height: 51px}
|
||||
|
||||
/* Temporary until we get the other hatching potions */
|
||||
.Pet_HatchingPotion_Zombie, .Pet_HatchingPotion_CottonCandyPink, .Pet_HatchingPotion_CottonCandyBlue, .Pet_HatchingPotion_Golden {background-position: -48px -0px; width: 48px; height: 51px}
|
||||
.Pet_HatchingPotion_Zombie {
|
||||
-webkit-filter: invert(1);
|
||||
}
|
||||
.Pet_HatchingPotion_CottonCandyPink {
|
||||
-webkit-filter: hue-rotate(120deg);
|
||||
}
|
||||
.Pet_HatchingPotion_CottonCandyBlue {
|
||||
-webkit-filter: saturate(3);
|
||||
}
|
||||
.Pet_HatchingPotion_Golden {
|
||||
-webkit-filter: hue-rotate(220deg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ 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 Powder to sprinkle on this egg, and one day it will hatch into a loyal pet.'
|
||||
_.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.food, (food) -> food.notes = "Sprinkle this on an egg, and it will hatch as a #{food.text} pet."
|
||||
|
||||
###
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ randomDrop = (model, delta) ->
|
|||
acceptableDrops = _.filter(food, (foodItem) -> foodItem.name in acceptableDrops)
|
||||
drop = randomVal acceptableDrops
|
||||
user.push 'items.food', drop.name
|
||||
drop.type = 'Food'
|
||||
drop.dialog = "You've found #{drop.text} Hatching Powder! #{drop.notes}"
|
||||
drop.type = 'HatchingPotion'
|
||||
drop.dialog = "You've found a #{drop.text} Hatching Potion! #{drop.notes}"
|
||||
|
||||
model.set '_drop', drop
|
||||
$('#item-dropped-modal').modal 'show'
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@
|
|||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
<h4>Hatching Powder</h4>
|
||||
<h4>Hatching Potions</h4>
|
||||
{#with _view.items.food as :food}
|
||||
<table>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<food:>
|
||||
<td class="active-food">
|
||||
<div rel=tooltip class="Pet_Food_{.name}" title="{.text} - {.value} Tokens" x-bind="click:buyFood" data-food='{.name}'></div>
|
||||
<div rel=tooltip class="Pet_HatchingPotion_{.name}" title="{.text} - {.value} Tokens" x-bind="click:buyFood" data-food='{.name}'></div>
|
||||
{.text}
|
||||
</td>
|
||||
|
||||
|
|
@ -52,12 +52,12 @@
|
|||
</li>
|
||||
<li class="customize-menu">
|
||||
{#if not(_user.items.food)}
|
||||
<p>You don't have any hatching powder yet.</p>
|
||||
<p>You don't have any hatching potions yet.</p>
|
||||
{/if}
|
||||
<menu label="Hatching Powder" class='food-menu'>
|
||||
<menu label="Hatching Potion" class='food-menu'>
|
||||
{#each _user.items.food as :food}
|
||||
<div>
|
||||
<button rel=tooltip title="{:food}" class="customize-option Pet_Food_{{:food}}" x-bind="click: chooseFood"></button>
|
||||
<button rel=tooltip title="{:food}" class="customize-option Pet_HatchingPotion_{{:food}}" x-bind="click: chooseFood"></button>
|
||||
<p>{:food}</p>
|
||||
</div>
|
||||
{/each}
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<div class='span6 well'>
|
||||
<h3>Hatch Your Egg</h3>
|
||||
{#if not(_user.items.food)}
|
||||
<p>You don't have any hatching powder yet.</p>
|
||||
<p>You don't have any hatching potions yet.</p>
|
||||
{else}
|
||||
<p>What would you like to sprinkle on your {_feedEgg.text} egg?</p>
|
||||
<form x-bind="submit:feedEgg">
|
||||
|
|
|
|||
Loading…
Reference in a new issue