unlock pets feature
This commit is contained in:
@@ -182,6 +182,21 @@ module.exports.app = (appExports, model) ->
|
||||
content: html
|
||||
$('ul.items').popover 'show'
|
||||
|
||||
user.on 'set', 'flags.petsEnabled', (captures, args) ->
|
||||
return unless captures == true
|
||||
html = """
|
||||
<img src='/img/BrowserQuest/habitrpg_mods/wolf_border.png' style='width:30px;height:30px;float:left;padding-right:5px' />
|
||||
You have unlocked Pets! You can now buy buy pets with tokens (note, you replenish tokens with real-life money - so chose your pets wisely!)
|
||||
<a href='#' onClick="$('#rewardsTabs').popover('hide');return false;">[Close]</a>
|
||||
"""
|
||||
$('#rewardsTabs').popover
|
||||
title: "Pets Unlocked"
|
||||
placement: 'left'
|
||||
trigger: 'manual'
|
||||
html: true
|
||||
content: html
|
||||
$('#rewardsTabs').popover 'show'
|
||||
|
||||
###
|
||||
update store
|
||||
###
|
||||
|
||||
@@ -96,6 +96,9 @@ updateStats = (newStats, batch) ->
|
||||
if !obj.flags.partyEnabled and obj.stats.lvl >= 3
|
||||
batch.set 'flags.partyEnabled', true
|
||||
obj.flags.partyEnabled = true
|
||||
if !obj.flags.petsEnabled and obj.stats.lvl >= 4
|
||||
batch.set 'flags.petsEnabled', true
|
||||
obj.flags.petsEnabled = true
|
||||
|
||||
if newStats.gp?
|
||||
#FIXME what was I doing here? I can't remember, gp isn't defined
|
||||
|
||||
Reference in New Issue
Block a user