mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 23:40:25 +00:00
wip
This commit is contained in:
parent
b3247e32d0
commit
510bcda47c
6 changed files with 20 additions and 6 deletions
|
|
@ -14,6 +14,7 @@ browser = require './browser'
|
|||
party = require './party'
|
||||
items = require './items'
|
||||
profile = require './profile'
|
||||
pets = require './pets'
|
||||
|
||||
helpers.viewHelpers view
|
||||
character.view view
|
||||
|
|
@ -58,6 +59,7 @@ ready (model) ->
|
|||
items.app(exports, model)
|
||||
party.app(exports, model)
|
||||
profile.app(exports, model)
|
||||
pets.app(exports, model)
|
||||
require('../server/private').app(exports, model)
|
||||
require('./debug').app(exports, model) if model.get('_view.nodeEnv') != 'production'
|
||||
browser.app(exports, model, app)
|
||||
|
|
|
|||
|
|
@ -197,10 +197,6 @@ module.exports.app = (appExports, model) ->
|
|||
content: html
|
||||
$('#rewardsTabs').popover 'show'
|
||||
|
||||
user.on 'set', 'flags.dropsEnabled', (captures, args) ->
|
||||
return unless captures == true
|
||||
# do drops enabled stuff
|
||||
|
||||
###
|
||||
update store
|
||||
###
|
||||
|
|
|
|||
11
src/app/pets.coffee
Normal file
11
src/app/pets.coffee
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
###
|
||||
app exports
|
||||
###
|
||||
module.exports.app = (appExports, model) ->
|
||||
user = model.at '_user'
|
||||
|
||||
user.on 'set', 'flags.dropsEnabled', (captures, args) ->
|
||||
console.log 'hi!'
|
||||
return unless captures == true
|
||||
# do drops enabled stuff
|
||||
$('#dropsEnabled-modal').show()
|
||||
|
|
@ -170,8 +170,7 @@ updateStats = (model, newStats, batch) ->
|
|||
batch.set 'flags.itemsEnabled', obj.flags.itemsEnabled = true
|
||||
if !obj.flags.partyEnabled and obj.stats.lvl >= 3
|
||||
batch.set 'flags.partyEnabled', obj.flags.partyEnabled = true
|
||||
if !obj.flags.petsEnabled and obj.stats.lvl >= 4
|
||||
batch.set 'flags.petsEnabled', obj.flags.petsEnabled = true
|
||||
if !obj.flags.dropsEnabled and obj.stats.lvl >= 4
|
||||
batch.set 'flags.dropsEnabled', obj.flags.dropsEnabled = true
|
||||
|
||||
if newStats.gp?
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<import: src="footer">
|
||||
<import: src="settings">
|
||||
<import: src="party">
|
||||
<import: src="pets">
|
||||
|
||||
<Title:>
|
||||
HabitRPG | Gamify Your Life
|
||||
|
|
|
|||
5
views/app/pets.html
Normal file
5
views/app/pets.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<modal:>
|
||||
<app:modals:modal modalId='dropsEnabled-modal' header="Drops Enabled!">
|
||||
<app:userTokens/>
|
||||
<p>Highly discouraged because red tasks provide good incentive to improve (<a target="_blank" href="https://github.com/lefnire/habitrpg#all-my-tasks-are-red-im-dying-too-fast">read more</a>). However, this becomes necessary after long bouts of bad habits.</p>
|
||||
</app:modals:modal>
|
||||
Loading…
Reference in a new issue