Merge pull request #925 from SlappyBag/develop

Tokens = Gems for front-end display.
This commit is contained in:
Tyler Renelle 2013-05-11 10:43:45 -07:00
commit 35342e8b71
8 changed files with 21 additions and 20 deletions

View file

@ -282,10 +282,10 @@
"_commentmisc": "MISC & GLOBAL",
"Tokens" : "Tokens",
"Gems" : "Gems",
"RemoveAds": "Remove 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 ",
"WhyAdsContent3": "these instructions.",
"_commentbuttons": "BUTTONS",
@ -302,4 +302,4 @@
"Yesterday":"Yesterday",
"DaysAgo":"days ago"
}
}

View file

@ -93,3 +93,4 @@
.Pet-BearCub-Base {background-position: -7290px 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;}
.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}

View file

@ -56,7 +56,7 @@ module.exports.app = (appExports, model) ->
newHatchingPotion = _.findWhere hatchingPotions, name: name
tokens = user.get('balance') * 4
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.set 'balance', (tokens - newHatchingPotion.value) / 4
else
@ -67,7 +67,7 @@ module.exports.app = (appExports, model) ->
newEgg = _.findWhere pets, name: name
tokens = user.get('balance') * 4
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.set 'balance', (tokens - newEgg.value) / 4
else

View file

@ -41,7 +41,7 @@ module.exports.app = (appExports, model) ->
return if alreadyShown(before,after)
html = """
<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'

View file

@ -26,7 +26,7 @@ module.exports.app = (appExports, model) ->
address: false
amount: 500
name: "Checkout"
description: "Buy 20 Tokens, #{disableAds}Support the Developers"
description: "Buy 20 Gems, #{disableAds}Support the Developers"
panelLabel: "Checkout"
token: token

View file

@ -36,27 +36,27 @@
<app:modals:modal modalId='reroll-modal' header="Reset Your Tasks">
<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>
<@footer>
<@footer>
{#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}
<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>
</app:modals:modal>
<!-- Buy more tokens modal -->
<app:modals:modal modalId='more-tokens-modal' header="Out Of Tokens">
<!-- Buy more Gems modal -->
<app:modals:modal modalId='more-tokens-modal' header="Out Of Gems">
<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>
<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>
</app:modals:modal>
<app:modals:modal modalId="why-ads-modal" header="Why Ads?">
<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>
"Hey, I backed the Kickstarter!" - follow <a target="_blank" href="http://community.habitrpg.com/node/22">these instructions</a>.

View file

@ -33,13 +33,13 @@
<hatchingPotion:>
<td class="active-hatchingPotion" x-bind="click:buyHatchingPotion" data-hatchingPotion='{.name}'>
<div class="Pet_HatchingPotion_{.name}"></div>
{.text}<br/><small>{.value} tokens<small>
{.text}<br/><small>{.value} Gems<small>
</td>
<egg:>
<td class="active-egg" x-bind="click:buyEgg" data-egg='{.name}'>
<div rel=tooltip class="Pet_Egg_{.name}"></div>
{.text}<br/><small>{.value} tokens<small>
{.text}<br/><small>{.value} Gems<small>
</td>
<inventory:>

View file

@ -12,7 +12,7 @@
<rewardsColumn:>
<div class="module rewards-module">
<div class="task-column rewards">
<!-- cash or tokens -->
<!-- cash or gems -->
<span class='option-box pull-right wallet'>
<div class="money">
{gold(floor(_user.stats.gp))}
@ -53,9 +53,9 @@
<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 neutral">{tokens(_user.balance)} Tokens</span>
<span class="task-action-btn tile flush neutral"><div class="Gems"></div> {tokens(_user.balance)} Gems
</a>