diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js
index 4bd10235..ec911f02 100755
--- a/app/js/controllers/controller-outfit.js
+++ b/app/js/controllers/controller-outfit.js
@@ -371,6 +371,10 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
$scope.costTab = tab;
};
+ $scope.pdWarning = function(pd) {
+ return pd.enginecapacity < ship.boostEnergy;
+ }
+
// Hide any open menu/slot/etc if the background is clicked
$scope.$on('close', function() {
$scope.selectedSlot = null;
diff --git a/app/js/directives/directive-component-select.js b/app/js/directives/directive-component-select.js
index a70d1917..a40d6629 100755
--- a/app/js/directives/directive-component-select.js
+++ b/app/js/directives/directive-component-select.js
@@ -2,7 +2,7 @@ angular.module('app').directive('componentSelect', function() {
// Generting the HTML in this manner is MUCH faster than using an angular template.
- function appendGroup(list, opts, cid, mass) {
+ function appendGroup(list, opts, cid, mass, checkWarning) {
var prevClass = null, prevRating = null;
for (var i = 0; i < opts.length; i++) {
var o = opts[i];
@@ -18,6 +18,10 @@ angular.module('app').directive('componentSelect', function() {
list.push(' active');
}
+ if (checkWarning && checkWarning(opts[i])) {
+ list.push(' warning');
+ }
+
list.push((o.maxmass && mass > o.maxmass) ? ' disabled"' : '" cpid="', id, '">');
if (o.mode) {
@@ -47,7 +51,8 @@ angular.module('app').directive('componentSelect', function() {
opts: '=', // Component Options object
groups: '=', // Groups of Component Options
mass: '=', // Current ship unladen mass
- s: '=' // Current Slot
+ s: '=', // Current Slot
+ warning: '=', // Check warning function
},
link: function(scope, element) {
var list = [];
@@ -64,12 +69,12 @@ angular.module('app').directive('componentSelect', function() {
var grp = groups[g];
var grpCode = grp[Object.keys(grp)[0]].grp; // Nasty operation to get the grp property of the first/any single component
list.push('
', g, '
');
- appendGroup(list, grp, cid, mass);
+ appendGroup(list, grp, cid, mass, scope.warning);
list.push('
');
}
} else {
list.push('');
- appendGroup(list, opts, cid, mass);
+ appendGroup(list, opts, cid, mass, scope.warning);
list.push('
');
}
diff --git a/app/less/colors.less b/app/less/colors.less
index 1a238c3e..029b52e0 100755
--- a/app/less/colors.less
+++ b/app/less/colors.less
@@ -66,3 +66,7 @@
color: @warning-disabled;
fill: @warning-disabled;
}
+
+.bg-warning-disabled {
+ background-color: @warning-disabled;
+}
diff --git a/app/less/select.less b/app/less/select.less
index f484759a..2c81cc94 100755
--- a/app/less/select.less
+++ b/app/less/select.less
@@ -77,18 +77,10 @@ select {
stroke: @primary-disabled;
&:hover {
+ border-color: @primary;
color: @primary;
stroke: @primary;
}
- &.disabled {
- cursor: not-allowed;
- color: @disabled;
- stroke: @disabled;
- }
- &.active {
- color: @secondary;
- stroke: @secondary;
- }
}
.lc, .c {
@@ -96,15 +88,27 @@ select {
padding: 0.1em 0.2em;
margin: 0.3em;
- &:hover {
- border:1px solid @primary;
+ &.warning {
+ border-color: @warning-disabled;
+ color: @warning-disabled;
+ stroke: @warning-disabled;
+
+ &:hover {
+ border-color: @warning;
+ color: @warning;
+ stroke: @warning;
+ }
}
&.disabled {
- border:1px solid @disabled;
+ border-color: @disabled;
+ color: @disabled;
+ stroke: @disabled;
}
&.active {
- border:1px solid @secondary;
+ border-color: @secondary;
+ color: @secondary;
+ stroke: @secondary;
}
}
diff --git a/app/views/page-outfit.html b/app/views/page-outfit.html
index 9b58eb5d..a4379dd8 100644
--- a/app/views/page-outfit.html
+++ b/app/views/page-outfit.html
@@ -32,7 +32,7 @@
Size |
Agility |
Speed |
- Boost |
+ Boost |
DPS |
Armour |
Shields |
@@ -60,7 +60,10 @@
|
{{ship.agility}}/10 |
{{fRound(ship.speed)}} m/s |
- {{fRound(ship.boost)}} m/s |
+
+ {{fRound(ship.boost)}} m/s
+ 0
+ |
{{fRound(ship.totalDps)}} |
{{ship.armour}}
@@ -148,7 +151,7 @@
-
+
{{::pd.maxClass}}
{{pd.id}} Power Distributor
{{pd.c.mass}} T
@@ -157,7 +160,7 @@
SYS: {{pd.c.systemcapacity}} MJ / {{pd.c.systemrecharge}} MW
ENG: {{pd.c.enginecapacity}} MJ / {{pd.c.enginerecharge}} MW
-
+
diff --git a/data/ships/adder.json b/data/ships/adder.json
index b5644323..446b68fc 100755
--- a/data/ships/adder.json
+++ b/data/ships/adder.json
@@ -7,6 +7,7 @@
"hullCost": 39993,
"speed": 220,
"boost": 320,
+ "boostEnergy": 9,
"agility": 8,
"baseShieldStrength": 60,
"baseArmour": 162,
diff --git a/data/ships/anaconda.json b/data/ships/anaconda.json
index ab165938..091a87bb 100755
--- a/data/ships/anaconda.json
+++ b/data/ships/anaconda.json
@@ -7,6 +7,7 @@
"hullCost": 141889932,
"speed": 180,
"boost": 240,
+ "boostEnergy": 29,
"agility": 2,
"baseShieldStrength": 350,
"baseArmour": 945,
diff --git a/data/ships/asp.json b/data/ships/asp.json
index 7d0dca34..b1806f56 100755
--- a/data/ships/asp.json
+++ b/data/ships/asp.json
@@ -7,6 +7,7 @@
"hullCost": 6135658,
"speed": 250,
"boost": 340,
+ "boostEnergy": 14,
"agility": 6,
"baseShieldStrength": 140,
"baseArmour": 378,
diff --git a/data/ships/cobra_mk_iii.json b/data/ships/cobra_mk_iii.json
index aef584be..3fffe999 100755
--- a/data/ships/cobra_mk_iii.json
+++ b/data/ships/cobra_mk_iii.json
@@ -7,6 +7,7 @@
"hullCost": 235787,
"speed": 280,
"boost": 400,
+ "boostEnergy": 11,
"agility": 6,
"baseShieldStrength": 80,
"baseArmour": 216,
diff --git a/data/ships/diamondback.json b/data/ships/diamondback.json
index d012d9b9..08735dc4 100644
--- a/data/ships/diamondback.json
+++ b/data/ships/diamondback.json
@@ -7,6 +7,7 @@
"hullCost": 461341,
"speed": 283,
"boost": 384,
+ "boostEnergy": 11,
"agility": 8,
"baseShieldStrength": 118,
"baseArmour": 216,
diff --git a/data/ships/diamondback_explorer.json b/data/ships/diamondback_explorer.json
index 84f3254b..a2a74459 100644
--- a/data/ships/diamondback_explorer.json
+++ b/data/ships/diamondback_explorer.json
@@ -7,6 +7,7 @@
"hullCost": 1635691,
"speed": 242,
"boost": 316,
+ "boostEnergy": 14,
"agility": 5,
"baseShieldStrength": 146,
"baseArmour": 270,
diff --git a/data/ships/eagle.json b/data/ships/eagle.json
index 89074741..8ebdd602 100755
--- a/data/ships/eagle.json
+++ b/data/ships/eagle.json
@@ -7,6 +7,7 @@
"hullCost": 10446,
"speed": 240,
"boost": 350,
+ "boostEnergy": 9,
"agility": 10,
"baseShieldStrength": 60,
"baseArmour": 72,
diff --git a/data/ships/federal_dropship.json b/data/ships/federal_dropship.json
index 85e4b239..4a5dcae5 100755
--- a/data/ships/federal_dropship.json
+++ b/data/ships/federal_dropship.json
@@ -7,6 +7,7 @@
"hullCost": 18969990,
"speed": 180,
"boost": 300,
+ "boostEnergy": 21,
"agility": 2,
"baseShieldStrength": 200,
"baseArmour": 540,
diff --git a/data/ships/fer_de_lance.json b/data/ships/fer_de_lance.json
index 3b49683b..3ff50370 100755
--- a/data/ships/fer_de_lance.json
+++ b/data/ships/fer_de_lance.json
@@ -7,6 +7,7 @@
"hullCost": 51232230,
"speed": 260,
"boost": 350,
+ "boostEnergy": 21,
"agility": 6,
"baseShieldStrength": 300,
"baseArmour": 405,
diff --git a/data/ships/hauler.json b/data/ships/hauler.json
index 1b506f41..f169a5f6 100755
--- a/data/ships/hauler.json
+++ b/data/ships/hauler.json
@@ -8,6 +8,7 @@
"speed": 200,
"boost": 300,
"agility": 6,
+ "boostEnergy": 7,
"baseShieldStrength": 50,
"baseArmour": 90,
"hullMass": 14,
diff --git a/data/ships/imperial_clipper.json b/data/ships/imperial_clipper.json
index 7a8a6f70..86021c25 100755
--- a/data/ships/imperial_clipper.json
+++ b/data/ships/imperial_clipper.json
@@ -7,6 +7,7 @@
"hullCost": 21077784,
"speed": 300,
"boost": 380,
+ "boostEnergy": 21,
"agility": 2,
"baseShieldStrength": 180,
"baseArmour": 486,
diff --git a/data/ships/imperial_courier.json b/data/ships/imperial_courier.json
index 0c77ed38..051552b5 100644
--- a/data/ships/imperial_courier.json
+++ b/data/ships/imperial_courier.json
@@ -7,6 +7,7 @@
"hullCost": 2481552,
"speed": 277,
"boost": 380,
+ "boostEnergy": 11,
"agility": 6,
"baseShieldStrength": 197,
"baseArmour": 144,
diff --git a/data/ships/orca.json b/data/ships/orca.json
index 8297e868..ff3a11ba 100755
--- a/data/ships/orca.json
+++ b/data/ships/orca.json
@@ -7,6 +7,7 @@
"hullCost": 47798079,
"speed": 300,
"boost": 380,
+ "boostEnergy": 17,
"agility": 2,
"baseShieldStrength": 220,
"baseArmour": 396,
diff --git a/data/ships/python.json b/data/ships/python.json
index 0deae2f0..029975e6 100755
--- a/data/ships/python.json
+++ b/data/ships/python.json
@@ -7,6 +7,7 @@
"hullCost": 55171395,
"speed": 230,
"boost": 280,
+ "boostEnergy": 24,
"agility": 6,
"baseShieldStrength": 260,
"baseArmour": 468,
diff --git a/data/ships/sidewinder.json b/data/ships/sidewinder.json
index 3dd2edf9..d07244d1 100755
--- a/data/ships/sidewinder.json
+++ b/data/ships/sidewinder.json
@@ -7,6 +7,7 @@
"hullCost": 12887,
"speed": 220,
"boost": 320,
+ "boostEnergy": 7,
"agility": 8,
"baseShieldStrength": 40,
"baseArmour": 108,
diff --git a/data/ships/type_6_transporter.json b/data/ships/type_6_transporter.json
index 3e14b986..1a75592c 100755
--- a/data/ships/type_6_transporter.json
+++ b/data/ships/type_6_transporter.json
@@ -7,6 +7,7 @@
"hullCost": 865782,
"speed": 220,
"boost": 350,
+ "boostEnergy": 11,
"agility": 3,
"baseShieldStrength": 90,
"baseArmour": 162,
diff --git a/data/ships/type_7_transport.json b/data/ships/type_7_transport.json
index c1592522..b5df1205 100755
--- a/data/ships/type_7_transport.json
+++ b/data/ships/type_7_transport.json
@@ -7,6 +7,7 @@
"hullCost": 16881511,
"speed": 180,
"boost": 300,
+ "boostEnergy": 11,
"agility": 2,
"baseShieldStrength": 120,
"baseArmour": 216,
diff --git a/data/ships/type_9_heavy.json b/data/ships/type_9_heavy.json
index 818b2310..49a2619c 100755
--- a/data/ships/type_9_heavy.json
+++ b/data/ships/type_9_heavy.json
@@ -7,6 +7,7 @@
"hullCost": 73255168,
"speed": 130,
"boost": 200,
+ "boostEnergy": 21,
"agility": 0,
"baseShieldStrength": 240,
"baseArmour": 432,
diff --git a/data/ships/viper.json b/data/ships/viper.json
index f5689f22..9760a12e 100755
--- a/data/ships/viper.json
+++ b/data/ships/viper.json
@@ -7,6 +7,7 @@
"hullCost": 95893,
"speed": 320,
"boost": 400,
+ "boostEnergy": 11,
"agility": 6,
"baseShieldStrength": 105,
"baseArmour": 126,
diff --git a/data/ships/vulture.json b/data/ships/vulture.json
index 57f05e3b..f136c614 100755
--- a/data/ships/vulture.json
+++ b/data/ships/vulture.json
@@ -7,6 +7,7 @@
"hullCost": 4689629,
"speed": 210,
"boost": 340,
+ "boostEnergy": 17,
"agility": 9,
"baseShieldStrength": 240,
"baseArmour": 288,
|