mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b44f5fe27 | ||
|
|
7332dc69ed | ||
|
|
381387c04f | ||
|
|
e0db9fdfb0 |
@@ -39,7 +39,7 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
|
|||||||
$scope.retroPredicate = 'netCost';
|
$scope.retroPredicate = 'netCost';
|
||||||
$scope.costDesc = true;
|
$scope.costDesc = true;
|
||||||
$scope.costPredicate = 'c.cost';
|
$scope.costPredicate = 'c.cost';
|
||||||
$scope.costTab = 'retrofit';
|
$scope.costTab = Persist.getCostTab() || 'costs';
|
||||||
|
|
||||||
if ($scope.savedCode) {
|
if ($scope.savedCode) {
|
||||||
Serializer.toShip(retrofitShip, $scope.savedCode); // Populate components from last save
|
Serializer.toShip(retrofitShip, $scope.savedCode); // Populate components from last save
|
||||||
@@ -351,6 +351,11 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
|
|||||||
$scope.retrofitTotal = total;
|
$scope.retrofitTotal = total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.updateCostTab = function(tab) {
|
||||||
|
Persist.setCostTab(tab);
|
||||||
|
$scope.costTab = tab;
|
||||||
|
};
|
||||||
|
|
||||||
// Hide any open menu/slot/etc if the background is clicked
|
// Hide any open menu/slot/etc if the background is clicked
|
||||||
$scope.$on('close', function() {
|
$scope.$on('close', function() {
|
||||||
$scope.selectedSlot = null;
|
$scope.selectedSlot = null;
|
||||||
|
|||||||
@@ -204,6 +204,27 @@ angular.module('app').service('Persist', ['$window', 'lodash', function($window,
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Persist selected cost tab
|
||||||
|
* @param {number} val Discount value/amount
|
||||||
|
*/
|
||||||
|
this.setCostTab = function(tabName) {
|
||||||
|
if (this.lsEnabled) {
|
||||||
|
return localStorage.setItem('costTab', tabName);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the saved discount
|
||||||
|
* @return {number} val Discount value/amount
|
||||||
|
*/
|
||||||
|
this.getCostTab = function() {
|
||||||
|
if (this.lsEnabled) {
|
||||||
|
return localStorage.getItem('costTab');
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the last router state from local storage
|
* Retrieve the last router state from local storage
|
||||||
* @param {object} state State object containing state name and params
|
* @param {object} state State object containing state name and params
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ html, body {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -76,26 +76,6 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="hardpoints" class="group">
|
|
||||||
<h1>HardPoints</h1>
|
|
||||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '!0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
|
||||||
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
|
||||||
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
|
||||||
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="utility" class="group">
|
|
||||||
<h1>Utility Mounts</h1>
|
|
||||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
|
||||||
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
|
||||||
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
|
||||||
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="standard" class="group">
|
<div id="standard" class="group">
|
||||||
<h1>Standard</h1>
|
<h1>Standard</h1>
|
||||||
<div class="slot" ng-click="selectSlot($event, ship.bulkheads)" ng-class="{selected: selectedSlot==ship.bulkheads}">
|
<div class="slot" ng-click="selectSlot($event, ship.bulkheads)" ng-class="{selected: selectedSlot==ship.bulkheads}">
|
||||||
@@ -200,6 +180,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="hardpoints" class="group">
|
||||||
|
<h1>HardPoints</h1>
|
||||||
|
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '!0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||||
|
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
||||||
|
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
||||||
|
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="utility" class="group">
|
||||||
|
<h1>Utility Mounts</h1>
|
||||||
|
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||||
|
<div slot-hardpoint class="details" hp="h" size="HPC[h.maxClass]" lbl="GMAP[h.c.grp]"></div>
|
||||||
|
<div class="select" ng-class="{hardpoint: h.maxClass > 0}" ng-if="selectedSlot==h" ng-click="select('h',h,$event)">
|
||||||
|
<div component-select s="h" groups="availCS.getHps(h.maxClass)"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="group half" id="componentPriority">
|
<div class="group half" id="componentPriority">
|
||||||
<table style="width:100%">
|
<table style="width:100%">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -244,8 +244,8 @@
|
|||||||
<table class="tabs">
|
<table class="tabs">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:50%" ng-class="{active: costTab == 'retrofit'}" ng-click="costTab = 'retrofit'">Retrofit Costs</th>
|
<th style="width:50%" ng-class="{active: costTab == 'retrofit'}" ng-click="updateCostTab('retrofit')">Retrofit Costs</th>
|
||||||
<th style="width:50%" ng-class="{active: costTab == 'costs'}" ng-click="costTab = 'costs'">Costs</th>
|
<th style="width:50%" ng-class="{active: costTab == 'costs'}" ng-click="updateCostTab('costs')">Costs</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
@@ -296,7 +296,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-if="!retrofitList || retrofitList.length == 0">
|
<tr ng-if="!retrofitList || retrofitList.length == 0">
|
||||||
<td colspan="5">No Retrofitting changes</td>
|
<td colspan="5" style="padding: 3em 0;">No Retrofitting changes</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="highlight" ng-repeat="item in retrofitList | orderBy:retroPredicate:retroDesc">
|
<tr class="highlight" ng-repeat="item in retrofitList | orderBy:retroPredicate:retroDesc">
|
||||||
<td style="width:1em;">{{item.sellClassRating}}</td>
|
<td style="width:1em;">{{item.sellClassRating}}</td>
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
<td colspan="2" ng-class="retrofitTotal > 0 ? 'warning' : 'secondary-disabled'">{{fCrd(retrofitTotal)}} <u>CR</u></td>
|
<td colspan="2" ng-class="retrofitTotal > 0 ? 'warning' : 'secondary-disabled'">{{fCrd(retrofitTotal)}} <u>CR</u></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="ri">
|
<tr class="ri">
|
||||||
<td class="lbl">Retrofitting from</td>
|
<td class="lbl">Retrofit from</td>
|
||||||
<td class="cen" style="border-right:none;width: 1em;"><u class="primary-disabled">▾</u></td>
|
<td class="cen" style="border-right:none;width: 1em;"><u class="primary-disabled">▾</u></td>
|
||||||
<td style="border-left:none;padding:0;">
|
<td style="border-left:none;padding:0;">
|
||||||
<select style="width: 100%;padding: 0" ng-model="$parent.retrofitBuild" ng-change="setRetrofitBase()" ng-options="name as name for (name, build) in allBuilds[ship.id]">
|
<select style="width: 100%;padding: 0" ng-model="$parent.retrofitBuild" ng-change="setRetrofitBase()" ng-options="name as name for (name, build) in allBuilds[ship.id]">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "coriolis_shipyard",
|
"name": "coriolis_shipyard",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/cmmcleod/coriolis"
|
"url": "https://github.com/cmmcleod/coriolis"
|
||||||
|
|||||||
Reference in New Issue
Block a user