mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 20:12:19 +00:00
Merge pull request #925 from SlappyBag/develop
Tokens = Gems for front-end display.
This commit is contained in:
commit
35342e8b71
8 changed files with 21 additions and 20 deletions
|
|
@ -282,10 +282,10 @@
|
||||||
|
|
||||||
|
|
||||||
"_commentmisc": "MISC & GLOBAL",
|
"_commentmisc": "MISC & GLOBAL",
|
||||||
"Tokens" : "Tokens",
|
"Gems" : "Gems",
|
||||||
"RemoveAds": "Remove Ads",
|
"RemoveAds": "Remove Ads",
|
||||||
"WhyAds": "Why Ads?",
|
"WhyAds": "Why Ads?",
|
||||||
"WhyAdsContent1": "Habit an open source project, and can use all the help it can get - consider this a donation to the contributors. You also get 20 tokens from the purchase, which you can use to buy special items.",
|
"WhyAdsContent1": "Habit an open source project, and can use all the help it can get - consider this a donation to the contributors. You also get 20 Gems from the purchase, which you can use to buy special items.",
|
||||||
"WhyAdsContent2": "'Hey, I backed the Kickstarter!' - follow ",
|
"WhyAdsContent2": "'Hey, I backed the Kickstarter!' - follow ",
|
||||||
"WhyAdsContent3": "these instructions.",
|
"WhyAdsContent3": "these instructions.",
|
||||||
"_commentbuttons": "BUTTONS",
|
"_commentbuttons": "BUTTONS",
|
||||||
|
|
@ -302,4 +302,4 @@
|
||||||
"Yesterday":"Yesterday",
|
"Yesterday":"Yesterday",
|
||||||
"DaysAgo":"days ago"
|
"DaysAgo":"days ago"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,3 +93,4 @@
|
||||||
.Pet-BearCub-Base {background-position: -7290px 0; width: 81px; height: 99px}
|
.Pet-BearCub-Base {background-position: -7290px 0; width: 81px; height: 99px}
|
||||||
.Pet-Wolf-Base {background-position: -7371px 0; width: 81px; height: 99px}
|
.Pet-Wolf-Base {background-position: -7371px 0; width: 81px; height: 99px}
|
||||||
.Pet-Egg {background: url("/img/sprites/egg.png") no-repeat; width: 39px; height: 42px;}
|
.Pet-Egg {background: url("/img/sprites/egg.png") no-repeat; width: 39px; height: 42px;}
|
||||||
|
.Gems{background: url("/img/sprites/Egg_Sprite_Sheet.png"); background-position: -57px 50px; display:inline-block; margin-right:5px;border-style:none; width: 30px; height: 30px}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ module.exports.app = (appExports, model) ->
|
||||||
newHatchingPotion = _.findWhere hatchingPotions, name: name
|
newHatchingPotion = _.findWhere hatchingPotions, name: name
|
||||||
tokens = user.get('balance') * 4
|
tokens = user.get('balance') * 4
|
||||||
if tokens >= newHatchingPotion.value
|
if tokens >= newHatchingPotion.value
|
||||||
if confirm "Buy this hatching potion with #{newHatchingPotion.value} of your #{tokens} tokens?"
|
if confirm "Buy this hatching potion with #{newHatchingPotion.value} of your #{tokens} Gems?"
|
||||||
user.push 'items.hatchingPotions', newHatchingPotion.name
|
user.push 'items.hatchingPotions', newHatchingPotion.name
|
||||||
user.set 'balance', (tokens - newHatchingPotion.value) / 4
|
user.set 'balance', (tokens - newHatchingPotion.value) / 4
|
||||||
else
|
else
|
||||||
|
|
@ -67,7 +67,7 @@ module.exports.app = (appExports, model) ->
|
||||||
newEgg = _.findWhere pets, name: name
|
newEgg = _.findWhere pets, name: name
|
||||||
tokens = user.get('balance') * 4
|
tokens = user.get('balance') * 4
|
||||||
if tokens >= newEgg.value
|
if tokens >= newEgg.value
|
||||||
if confirm "Buy this egg with #{newEgg.value} of your #{tokens} tokens?"
|
if confirm "Buy this egg with #{newEgg.value} of your #{tokens} Gems?"
|
||||||
user.push 'items.eggs', newEgg
|
user.push 'items.eggs', newEgg
|
||||||
user.set 'balance', (tokens - newEgg.value) / 4
|
user.set 'balance', (tokens - newEgg.value) / 4
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ module.exports.app = (appExports, model) ->
|
||||||
return if alreadyShown(before,after)
|
return if alreadyShown(before,after)
|
||||||
html = """
|
html = """
|
||||||
<img src='/img/sprites/wolf_border.png' style='width:30px;height:30px;float:left;padding-right:5px' />
|
<img src='/img/sprites/wolf_border.png' style='width:30px;height:30px;float:left;padding-right:5px' />
|
||||||
You have unlocked Pets! You can now buy pets with tokens (note, you replenish tokens with real-life money - so chose your pets wisely!)
|
You have unlocked Pets! You can now buy pets with Gems (note, you replenish Gems with real-life money - so chose your pets wisely!)
|
||||||
"""
|
"""
|
||||||
showPopover '#rewardsTabs', 'Pets Unlocked', html, 'left'
|
showPopover '#rewardsTabs', 'Pets Unlocked', html, 'left'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ module.exports.app = (appExports, model) ->
|
||||||
address: false
|
address: false
|
||||||
amount: 500
|
amount: 500
|
||||||
name: "Checkout"
|
name: "Checkout"
|
||||||
description: "Buy 20 Tokens, #{disableAds}Support the Developers"
|
description: "Buy 20 Gems, #{disableAds}Support the Developers"
|
||||||
panelLabel: "Checkout"
|
panelLabel: "Checkout"
|
||||||
token: token
|
token: token
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,27 +36,27 @@
|
||||||
<app:modals:modal modalId='reroll-modal' header="Reset Your Tasks">
|
<app:modals:modal modalId='reroll-modal' header="Reset Your Tasks">
|
||||||
<app:rewards:userTokens/>
|
<app:rewards: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>
|
<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>
|
||||||
<@footer>
|
<@footer>
|
||||||
{#if lt(_user.balance,1)}
|
{#if lt(_user.balance,1)}
|
||||||
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">Buy More Tokens</a><span class='token-cost'>Not enough tokens</span>
|
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">Buy More Gems</a><span class='token-cost'>Not enough Gems</span>
|
||||||
{else}
|
{else}
|
||||||
<a data-dismiss="modal" x-bind=click:buyReroll class="btn btn-danger btn-large">Re-Roll</a><span class='token-cost'>4 Tokens</span>
|
<a data-dismiss="modal" x-bind=click:buyReroll class="btn btn-danger btn-large">Re-Roll</a><span class='token-cost'>4 Gems</span>
|
||||||
{/}
|
{/}
|
||||||
</@footer>
|
</@footer>
|
||||||
</app:modals:modal>
|
</app:modals:modal>
|
||||||
|
|
||||||
<!-- Buy more tokens modal -->
|
<!-- Buy more Gems modal -->
|
||||||
<app:modals:modal modalId='more-tokens-modal' header="Out Of Tokens">
|
<app:modals:modal modalId='more-tokens-modal' header="Out Of Gems">
|
||||||
<app:rewards:userTokens/>
|
<app:rewards:userTokens/>
|
||||||
<p>Oops, out of tokens, which are used to buy special items! Habit is an open source project, and can use all the help it can get - buy more tokens to receive this pet, and consider it a donation to the contributors</p>
|
<p>Oops, out of Gems, which are used to buy special items! Habit is an open source project, and can use all the help it can get - buy more Gems to receive this pet, and consider it a donation to the contributors</p>
|
||||||
<@footer>
|
<@footer>
|
||||||
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">Buy More Tokens</a><span class='token-cost'>Not enough tokens</span>
|
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">Buy More Gems</a><span class='token-cost'>Not enough Gems</span>
|
||||||
</@footer>
|
</@footer>
|
||||||
</app:modals:modal>
|
</app:modals:modal>
|
||||||
|
|
||||||
<app:modals:modal modalId="why-ads-modal" header="Why Ads?">
|
<app:modals:modal modalId="why-ads-modal" header="Why Ads?">
|
||||||
<p>
|
<p>
|
||||||
Habit an open source project, and can use all the help it can get - consider this a donation to the contributors. You also get 20 tokens from the purchase, which you can use to buy special items.
|
Habit an open source project, and can use all the help it can get - consider this a donation to the contributors. You also get 20 Gems from the purchase, which you can use to buy special items.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
"Hey, I backed the Kickstarter!" - follow <a target="_blank" href="http://community.habitrpg.com/node/22">these instructions</a>.
|
"Hey, I backed the Kickstarter!" - follow <a target="_blank" href="http://community.habitrpg.com/node/22">these instructions</a>.
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,13 @@
|
||||||
<hatchingPotion:>
|
<hatchingPotion:>
|
||||||
<td class="active-hatchingPotion" x-bind="click:buyHatchingPotion" data-hatchingPotion='{.name}'>
|
<td class="active-hatchingPotion" x-bind="click:buyHatchingPotion" data-hatchingPotion='{.name}'>
|
||||||
<div class="Pet_HatchingPotion_{.name}"></div>
|
<div class="Pet_HatchingPotion_{.name}"></div>
|
||||||
{.text}<br/><small>{.value} tokens<small>
|
{.text}<br/><small>{.value} Gems<small>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<egg:>
|
<egg:>
|
||||||
<td class="active-egg" x-bind="click:buyEgg" data-egg='{.name}'>
|
<td class="active-egg" x-bind="click:buyEgg" data-egg='{.name}'>
|
||||||
<div rel=tooltip class="Pet_Egg_{.name}"></div>
|
<div rel=tooltip class="Pet_Egg_{.name}"></div>
|
||||||
{.text}<br/><small>{.value} tokens<small>
|
{.text}<br/><small>{.value} Gems<small>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<inventory:>
|
<inventory:>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<rewardsColumn:>
|
<rewardsColumn:>
|
||||||
<div class="module rewards-module">
|
<div class="module rewards-module">
|
||||||
<div class="task-column rewards">
|
<div class="task-column rewards">
|
||||||
<!-- cash or tokens -->
|
<!-- cash or gems -->
|
||||||
<span class='option-box pull-right wallet'>
|
<span class='option-box pull-right wallet'>
|
||||||
<div class="money">
|
<div class="money">
|
||||||
{gold(floor(_user.stats.gp))}
|
{gold(floor(_user.stats.gp))}
|
||||||
|
|
@ -53,9 +53,9 @@
|
||||||
|
|
||||||
|
|
||||||
<userTokens:>
|
<userTokens:>
|
||||||
<a class="pull-right token-wallet" rel='popover' data-trigger='hover' data-title='Tokens' data-content="Used for buying special items (reroll, eggs, hatching potions, etc). You'll need to unlock those features before being able to use tokens." data-placement='bottom'>
|
<a class="pull-right token-wallet" rel='popover' data-trigger='hover' data-title='Gems' data-content="Used for buying special items (reroll, eggs, hatching potions, etc). You'll need to unlock those features before being able to use Gems." data-placement='bottom'>
|
||||||
<span class="task-action-btn tile flush bright add-token-btn" x-bind="click:showStripe">+</span>
|
<span class="task-action-btn tile flush bright add-token-btn" x-bind="click:showStripe">+</span>
|
||||||
<span class="task-action-btn tile flush neutral">{tokens(_user.balance)} Tokens</span>
|
<span class="task-action-btn tile flush neutral"><div class="Gems"></div> {tokens(_user.balance)} Gems
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue