From 7c93d80ae53ca73999d4da99a5c3535d3f34c9fb Mon Sep 17 00:00:00 2001
From: Tyler Renelle
Date: Fri, 3 May 2013 16:06:25 +0100
Subject: [PATCH] add beast-master achievement
---
src/app/unlock.coffee | 10 ++++++++
styles/app/achievements.styl | 6 +++++
views/app/avatar.html | 50 ++++++++++++++++++++----------------
views/app/pets.html | 9 +++++++
4 files changed, 53 insertions(+), 22 deletions(-)
diff --git a/src/app/unlock.coffee b/src/app/unlock.coffee
index 6d3f77aa0b..41f6dc044f 100644
--- a/src/app/unlock.coffee
+++ b/src/app/unlock.coffee
@@ -64,3 +64,13 @@ module.exports.app = (appExports, model) ->
model._dontPersist = dontPersist
$('#drops-enabled-modal').modal 'show'
+
+ user.on 'push', 'items.pets', (after, before) ->
+ return if user.get('achievements.beastMaster')
+ if before >= 90 # evidently before is the count?
+ dontPersist = model._dontPersist
+ model._dontPersist = false
+ user.set 'achievements.beastMaster', true, ->
+ model._dontPersist = dontPersist
+ $('#beastmaster-achievement-modal').modal('show')
+
diff --git a/styles/app/achievements.styl b/styles/app/achievements.styl
index 31c9d40b2a..82046a22d6 100644
--- a/styles/app/achievements.styl
+++ b/styles/app/achievements.styl
@@ -1,7 +1,13 @@
+.achievements-container
+ margin: 20px
+
.achievement
background: url('/img/sprites/achievements.png') no-repeat
width: 24px
height: 26px
+ float:left
+ clear:right
+ margin-right: 10px
.achievement-sword {background-position:0px 0px}
.achievement-tree {background-position:-24px 0px}
diff --git a/views/app/avatar.html b/views/app/avatar.html
index 06967dfc04..bc81fb7411 100644
--- a/views/app/avatar.html
+++ b/views/app/avatar.html
@@ -164,28 +164,34 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {#if @profile.achievements.originalUser}
- Original User!
- {/}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#if @profile.achievements.originalUser}
+
Original User
+
+ {/}
+ {#if @profile.achievements.beastMaster}
+
Beast Master
+ {/}
+
+
diff --git a/views/app/pets.html b/views/app/pets.html
index db64b7236b..9f73962b55 100644
--- a/views/app/pets.html
+++ b/views/app/pets.html
@@ -16,6 +16,15 @@
@footer>
+
+
+
You have earned the "Beast Master" Achievement for collecting all the pets!
+
+ <@footer>
+
+ @footer>
+
+
|