From a1a85241d5606096db225e017e9cbefb5d541602 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 21 Mar 2013 14:56:25 -0600 Subject: [PATCH] add "hatching powder" (as temporary pet food), clean up some dialogs, fix eggs using their actual animal sprites --- public/img/hatching_powder.png | Bin 0 -> 3413 bytes public/img/sprites/PetEggs.css | 23 +++++++++++++---------- src/app/items.coffee | 3 +++ src/app/scoring.coffee | 2 ++ styles/app/index.styl | 1 + styles/app/items.styl | 13 ++++++++++++- views/app/pets.html | 11 ++++++----- 7 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 public/img/hatching_powder.png diff --git a/public/img/hatching_powder.png b/public/img/hatching_powder.png new file mode 100644 index 0000000000000000000000000000000000000000..34db3dc93351ef139b58462888bdda2f8884413c GIT binary patch literal 3413 zcmV-b4XW~qP)4Tx07wm;mUmPX*B8g%%xo{TU6vwc>AklFq%OTkl_mFQv@x1^BM1TV}0C2duqR=S6Xn?LjUp6xrb&~O43j*Nv zEr418u3H3zGns$s|L;SQD-ufpfWpxLJ03rmi*g~#S@{x?OrJ!Vo{}kJ7$ajbnjp%m zGEV!%=70KpVow?KvV}a4moSaFCQKV= zXBIPnpP$8-NG!rR+)R#`$7JVZi#Wn10DSspSrkx`)s~4C+0n+?(b2-z5-tDd^^cpM zz5W?wz5V3zGUCskL5!X++LzcbT23thtSPiMTfS&1I{|204}j|3FPi>70OSh+Xzlyz zdl<5LNtZ}OE>>3g`T3RtKG#xK(9i3CI(+v0d-&=+OWAp!Ysd8Ar*foO5~i%E+?=c& zshF87;&Ay)i~kOm zCIB-Z!^JGdti+UJsxgN!t(Y#%b<8kk67vyD#cE*9urAm@Y#cTXn~yERR$}Y1E!Yd# zo7hq8Ya9;8z!~A3Z~?e@Tn26#t`xT$*Ni)h>&K1Yrto;Y8r}@=h7ZGY@Dh9xekcA2 z{tSKqKZ<`tAQQ9+wgf*y0zpVvOQ<9qCY&Y=5XJ~ILHOG0j2XwBQ%7jM`P2tv~{#P+6C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W zEx0YhEw{FMY&}%2SiZD;WLxOA)(U1tamB0cN!u@1+E?z~LE0hRF;o>&)xJ}I=a!xC ztJAA*)_B)6@6y<{Y1i~_-tK`to_m`1YVIxB`);3L-|hYW`&(-bYby`n4&)tpTo+T< z{VnU;hI;k-lKKw^g$IWYMIP#EaB65ctZ}%k5pI+=jvq-pa_u{x@7kLzn)Wv{noEv? zqtc^Kzfb=D*0JDYoyS?nn|?6(VOI;SrMMMpUD7()mfkkh9^c-7BIrbChiga6kCs0k zJgIZC=9KcOveTr~g{NoFEIl)IR&;jaT-v#j&ZN$J=i|=b=!)p-y%2oi(nY_E=exbS z&s=i5bn>#xz3Ke>~2=f&N;yEFGz-^boBexUH6@}b7V+Mi8+ZXR+R zIyLMw-18{v(Y+Dw$g^K^e|bMz_?Y^*a!h-y;fd{&ljDBl*PbqTI{HlXY-Xb9SH)j< zJvV;-!*8Cy^-RW1j=m7TnEk!)LOwxh@D^|_!k6h6!I5%Cn+Pd6Uk>{dwwBiUa!|n3u`zW)?#95PbDH8{&4%EVwioM)8=vao|~WRK68Go zlSCv&2?1+wtTIVN0QtH4&0>u{%?s0x?IY7}u01<;?sjWsPNlB-G6?fucvlAd_xoDv zg@)vOF<|XhMre8E*F@w~hm1ju*tBpsSrLLu^6taW1`9P z?KgWGsL`@S*vfhpOD3Y!0G5$Zidqhz)UofMrpBR-9Tlyg9{+ucU%5soR%(Qi8j&%t zQX|P-1EA7_BAd}M#7tJiCqV#Oc=2n~wK9sRMtC1<$wcyjDcDO#f7s>O=gs`<=y_6V z@@lAS{Gt_d>ZKN~NS?&qH&YgK?!}}EqzOw+QIsNi5>mnsXr8prQ6&HRO|So5t65r{2b?w8&z(L^4-T_vt*GQo5dG=csQq;!z`%@MO z5=DRzrPD&)6I8_i0#uPAtdk~4U?L#}^5dCn@9n _.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 ### diff --git a/src/app/scoring.coffee b/src/app/scoring.coffee index f264b75253..af09fb6459 100644 --- a/src/app/scoring.coffee +++ b/src/app/scoring.coffee @@ -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' diff --git a/styles/app/index.styl b/styles/app/index.styl index 20031b95a0..396a5b7593 100644 --- a/styles/app/index.styl +++ b/styles/app/index.styl @@ -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"; diff --git a/styles/app/items.styl b/styles/app/items.styl index dc8700d359..c6bddc2eff 100644 --- a/styles/app/items.styl +++ b/styles/app/items.styl @@ -81,4 +81,15 @@ outline: 1px solid rgba(0,0,0,0.1) outline-offset: -1px &:hover, &:focus - background-color: darken($better, 10%) \ No newline at end of file + 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 \ No newline at end of file diff --git a/views/app/pets.html b/views/app/pets.html index 9644c86c93..6d4bf7b49e 100644 --- a/views/app/pets.html +++ b/views/app/pets.html @@ -1,4 +1,5 @@ +

You've unlocked the drop system.

Here's your first egg! {_user.items.eggs.0.text}

@@ -7,11 +8,11 @@
- -

An item has dropped!

-

Here's your {_drop.type} – {_drop.text}!

-
-

{_drop.notes}

+ + +

{_drop.dialog}

+ + <@footer>