mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 20:12:19 +00:00
Merge pull request #1 from lefnire/pets
add "hatching powder" (as temporary pet food), clean up some dialogs, fix eggs using their actual animal sprites
This commit is contained in:
commit
8c3577f3bf
7 changed files with 37 additions and 16 deletions
BIN
public/img/hatching_powder.png
Normal file
BIN
public/img/hatching_powder.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
|
|
@ -1,10 +1,13 @@
|
|||
Pet_Egg_Wolf, Pet_Egg_Tiger, Pet_Egg_PolarBear, Pet_Egg_Panda, Pet_Egg_Lion, Pet_Egg_FlyingPig, Pet_Egg_Drake, Pet_Egg_Cactus, Pet_Egg_Bear {background: url(Egg_Sprite_Sheet.png) no-repeat}
|
||||
Pet_Egg_Wolf {background-position: 0 0; width: 48px; height: 51px}
|
||||
Pet_Egg_Tiger {background-position: 0 -51; width: 48px; height: 51px}
|
||||
Pet_Egg_PolarBear{background-position: 0 -102; width: 48px; height: 51px}
|
||||
Pet_Egg_Panda {background-position: 0 -153; width: 48px; height: 51px}
|
||||
Pet_Egg_Lion {background-position: 0 -204; width: 48px; height: 51px}
|
||||
Pet_Egg_FlyingPig {background-position: 0 -255; width: 48px; height: 51px}
|
||||
Pet_Egg_Drake {background-position: 0 -306; width: 48px; height: 51px}
|
||||
Pet_Egg_Cactus {background-position: 0 -357; width: 48px; height: 51px}
|
||||
Pet_Egg_Bear {background-position: 0 -408; width: 48px; height: 51px}
|
||||
.Pet_Egg_Wolf, .Pet_Egg_TigerCub, .Pet_Egg_PolarBear, .Pet_Egg_PandaCub, .Pet_Egg_LionCub, .Pet_Egg_FlyingPig, .Pet_Egg_Dragon, .Pet_Egg_Cactus, .Pet_Egg_BearCub, .Pet_Egg_Fox {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}
|
||||
.Pet_Egg_PandaCub {background-position: 0px -153px; width: 48px; height: 51px}
|
||||
.Pet_Egg_LionCub {background-position: 0px -204px; width: 48px; height: 51px}
|
||||
.Pet_Egg_FlyingPig {background-position: 0px -255px; width: 48px; height: 51px}
|
||||
.Pet_Egg_Dragon {background-position: 0px -306px; width: 48px; height: 51px}
|
||||
.Pet_Egg_Cactus {background-position: 0px -357px; width: 48px; height: 51px}
|
||||
.Pet_Egg_BearCub {background-position: 0px -408px; width: 48px; height: 51px}
|
||||
|
||||
/* these not designed yet? */
|
||||
.Pet_Egg_Fox {background-position: 0px -408px; width: 48px; height: 51px}
|
||||
|
|
@ -66,6 +66,9 @@ 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.food, (food) -> food.notes = "Sprinkle this on an egg, and it will hatch as a #{food.text} pet."
|
||||
|
||||
###
|
||||
view exports
|
||||
###
|
||||
|
|
|
|||
|
|
@ -121,10 +121,12 @@ score = (model, taskId, direction, times, batch, cron) ->
|
|||
drop = randomVal(food)
|
||||
user.push 'items.food', drop.text
|
||||
drop.type = 'Food'
|
||||
drop.dialog = "You've found #{drop.text} Hatching Powder! #{drop.notes}"
|
||||
else
|
||||
drop = randomVal(pets)
|
||||
user.push 'items.eggs', drop
|
||||
drop.type = 'Egg'
|
||||
drop.dialog = "You've found a #{drop.text} Egg! #{drop.notes}"
|
||||
|
||||
model.set '_drop', drop
|
||||
$('#item-dropped-modal').modal 'show'
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
@import "./items.styl";
|
||||
@import "./alerts.styl";
|
||||
@import "../../public/img/sprites/pet_sprites.css";
|
||||
@import "../../public/img/sprites/PetEggs.css";
|
||||
@import "./helpers.styl";
|
||||
@import "./responsive.styl";
|
||||
@import "./header.styl";
|
||||
|
|
|
|||
|
|
@ -81,4 +81,15 @@
|
|||
outline: 1px solid rgba(0,0,0,0.1)
|
||||
outline-offset: -1px
|
||||
&:hover, &:focus
|
||||
background-color: darken($better, 10%)
|
||||
background-color: darken($better, 10%)
|
||||
|
||||
|
||||
.item-drop-icon
|
||||
float:left
|
||||
padding-right:20px
|
||||
padding-bottom:20px
|
||||
|
||||
.Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Veteran, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base, .Pet_Food_SugarCube, .Pet_Food_Strawberry, .Pet_Food_Rotten, .Pet_Food_Licorice, .Pet_Food_Golden, .Pet_Food_Cream, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Chocolate, .Pet_Food_Base, .Pet_Food_Zombie, .Pet_Food_White, .Pet_Food_Skeleton, .Pet_Food_Shade, .Pet_Food_Red, .Pet_Food_Golden, .Pet_Food_Desert, .Pet_Food_CottonCandyPink, .Pet_Food_CottonCandyBlue, .Pet_Food_Base
|
||||
background: url("/img/hatching_powder.png") no-repeat
|
||||
width:34px
|
||||
height:34px
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<modals:>
|
||||
|
||||
<app:modals:modal modalId='drops-enabled-modal' header="Drops Enabled!">
|
||||
<p>You've unlocked the drop system.</p>
|
||||
<p>Here's your first egg! {_user.items.eggs.0.text}</p>
|
||||
|
|
@ -7,11 +8,11 @@
|
|||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
<app:modals:modal modalId='item-dropped-modal' header="Item Dropped!">
|
||||
<p>An item has dropped!</p>
|
||||
<p>Here's your {_drop.type} – {_drop.text}!</p>
|
||||
<div class="Pet-{_drop.type}"></div>
|
||||
<p>{_drop.notes}</p>
|
||||
|
||||
<app:modals:modal modalId='item-dropped-modal' header="An item has dropped!">
|
||||
<p><span class="Pet_{_drop.type}_{_drop.name} item-drop-icon"></span>{_drop.dialog}</p>
|
||||
|
||||
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
||||
</@footer>
|
||||
|
|
|
|||
Loading…
Reference in a new issue