mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
classes: reposition inventory, fix saddle confirm dialog, gems & food tweaks
This commit is contained in:
@@ -52,15 +52,9 @@ menu.pets div
|
||||
padding-right:20px
|
||||
padding-bottom:20px
|
||||
|
||||
// we'll remove this and place it into habitrpg-shared when we have art to work with
|
||||
menu button[class*="Pet_Food_"]
|
||||
width:48px
|
||||
height:53px
|
||||
margin-left: 1.25em
|
||||
|
||||
.Pet_Currency_Gem, .Pet_Currency_Gem2x, .Pet_Currency_Gem1x
|
||||
background: url("/bower_components/habitrpg-shared/img/sprites/Egg_Sprite_Sheet.png") no-repeat
|
||||
display:block
|
||||
//.Pet_Currency_Gem, .Pet_Currency_Gem2x, .Pet_Currency_Gem1x
|
||||
// background: url("/bower_components/habitrpg-shared/img/sprites/Egg_Sprite_Sheet.png") no-repeat
|
||||
// display:block
|
||||
|
||||
.food-tray
|
||||
position:fixed
|
||||
@@ -70,10 +64,6 @@ menu button[class*="Pet_Food_"]
|
||||
height: 50%
|
||||
overflow-y: scroll
|
||||
|
||||
.Pet_Currency_Gem {background-position: 0px -510px; width: 51px; height: 45px} /* Not an egg or potion so has a different size */
|
||||
.Pet_Currency_Gem2x {background-position: -55px -513px; width: 34px; height: 30px}
|
||||
.Pet_Currency_Gem1x {background-position: -63px -542px; width: 19px; height: 17px}
|
||||
|
||||
.inventory-list
|
||||
p
|
||||
//display: none
|
||||
|
||||
@@ -76,6 +76,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', 'User', 'API_URL',
|
||||
}
|
||||
|
||||
$scope.hatch = function(egg, potion){
|
||||
if (!confirm('Hatch a ' + potion.name + ' ' + egg.name + '?')) return;
|
||||
user.ops.hatch({query:{egg:egg.name, hatchingPotion:potion.name}});
|
||||
$scope.selectedEgg = null;
|
||||
$scope.selectedPotion = null;
|
||||
@@ -100,8 +101,11 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', 'User', 'API_URL',
|
||||
// Feeding Pet
|
||||
if ($scope.selectedFood) {
|
||||
var food = $scope.selectedFood
|
||||
if (food.name == 'Saddle' && !confirm('Saddle ' + pet + '?')) return;
|
||||
if (!confirm('Feed ' + pet + ' a ' + food.name + '?')) return;
|
||||
if (food.name == 'Saddle') {
|
||||
if (!confirm('Saddle ' + pet + '?')) return;
|
||||
} else if (!confirm('Feed ' + pet + ' a ' + food.name + '?')) {
|
||||
return;
|
||||
}
|
||||
User.user.ops.feed({query:{pet: pet, food: food.name}});
|
||||
$scope.selectedFood = null;
|
||||
|
||||
|
||||
@@ -5,20 +5,6 @@ script(type='text/ng-template', id='partials/options.inventory.inventory.html')
|
||||
p.well Click an egg to see usable potions highlighted in green and then click one of the highlighted potions to hatch your pet. If no potions are highlighted, click that egg again to deselect it, and instead click a potion first to have the usable eggs highlighted. You can also sell unwanted drops to Alexander the Merchant.
|
||||
menu.inventory-list(type='list')
|
||||
|
||||
h4 Gear
|
||||
li.customize-menu
|
||||
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Wizard", rogue:"Rogue", special:"Special"}', ng-show='gear[klass]')
|
||||
div(ng-repeat='item in gear[klass]')
|
||||
button.customize-option(popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({query:{key:item.key}})', class='shop_{{item.key}}', ng-class='{selectableInventory: user.items.gear.equipped[item.type] == item.key}')
|
||||
label.checkbox.inline
|
||||
input(type="checkbox", ng-model="user.preferences.costume", ng-click='set({"preferences.costume":!user.preferences.costume})')
|
||||
| Use Costume
|
||||
i.icon-question-sign(popover="Show something different on your avatar than the gear you have equipped for battle", popover-trigger='mouseenter', popover-placement='right')
|
||||
li.customize-menu(ng-if='user.preferences.costume')
|
||||
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Wizard", rogue:"Rogue", special:"Special"}', ng-show='gear[klass]')
|
||||
div(ng-repeat='item in gear[klass]')
|
||||
button.customize-option(popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({query:{type:"costume", key:item.key}})', class='shop_{{item.key}}', ng-class='{selectableInventory: user.items.gear.costume[item.type] == item.key}')
|
||||
|
||||
li.customize-menu
|
||||
menu.pets-menu(label='Eggs ({{eggCount}})')
|
||||
p(ng-show='eggCount < 1') You don't have any eggs.
|
||||
@@ -44,6 +30,22 @@ script(type='text/ng-template', id='partials/options.inventory.inventory.html')
|
||||
.badge.badge-info.stack-count {{points}}
|
||||
//-p {{food}}
|
||||
|
||||
hr
|
||||
|
||||
h4 Gear
|
||||
li.customize-menu
|
||||
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Wizard", rogue:"Rogue", special:"Special"}', ng-show='gear[klass]')
|
||||
div(ng-repeat='item in gear[klass]')
|
||||
button.customize-option(popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({query:{key:item.key}})', class='shop_{{item.key}}', ng-class='{selectableInventory: user.items.gear.equipped[item.type] == item.key}')
|
||||
label.checkbox.inline
|
||||
input(type="checkbox", ng-model="user.preferences.costume", ng-click='set({"preferences.costume":!user.preferences.costume})')
|
||||
| Use Costume
|
||||
i.icon-question-sign(popover="Show something different on your avatar than the gear you have equipped for battle", popover-trigger='mouseenter', popover-placement='right')
|
||||
li.customize-menu(ng-if='user.preferences.costume')
|
||||
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Wizard", rogue:"Rogue", special:"Special"}', ng-show='gear[klass]')
|
||||
div(ng-repeat='item in gear[klass]')
|
||||
button.customize-option(popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({query:{type:"costume", key:item.key}})', class='shop_{{item.key}}', ng-class='{selectableInventory: user.items.gear.costume[item.type] == item.key}')
|
||||
|
||||
.span6
|
||||
h2 Market
|
||||
.row-fluid
|
||||
|
||||
Reference in New Issue
Block a user