Compare commits

...

3 Commits

Author SHA1 Message Date
Colin McLeod
a71abd9fe3 Bumping version to 0.14.1 2015-06-29 14:59:30 -07:00
Colin McLeod
f1d804e3a1 Adding total DPS to outfit page and comparisons 2015-06-29 11:57:29 -07:00
Colin McLeod
aa7479d111 Updating Federal Dropship agility 2015-06-29 10:36:49 -07:00
5 changed files with 21 additions and 3 deletions

View File

@@ -88,6 +88,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
this.totalCost = this.c.incCost ? this.c.discountedCost : 0;
this.unladenMass = this.mass;
this.armourTotal = this.armour;
this.totalDps = 0;
this.bulkheads.c = null;
this.useBulkhead(comps.bulkheads || 0, true);
@@ -258,6 +259,8 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
} else if (slot.c.grp == 'sb') {
this.shieldMultiplier += slot.c.shieldmul * (enabled ? 1 : -1);
this.updateShieldStrength();
} else if (slot.c.dps) {
this.totalDps += slot.c.dps * (enabled ? 1 : -1);
}
this.updatePower();
@@ -308,6 +311,10 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
if (old.power && slot.enabled) {
this.priorityBands[slot.priority][powerUsageType(slot, old)] -= old.power;
powerChange = true;
if (old.dps) {
this.totalDps -= old.dps;
}
}
this.unladenMass -= old.mass || 0;
}
@@ -338,6 +345,10 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
if (n.power && slot.enabled) {
this.priorityBands[slot.priority][powerUsageType(slot, n)] += n.power;
powerChange = true;
if (n.dps) {
this.totalDps += n.dps;
}
}
this.unladenMass += n.mass || 0;
}

View File

@@ -163,6 +163,13 @@ angular.module('shipyard', ['ngLodash'])
lbls: ['Unladen', 'Laden'],
unit: 'LY',
fmt: 'fRound'
},
{ // 11
title: 'DPS',
props: ['totalDps'],
lbls: ['Dps'],
unit: '',
fmt: 'fRound'
}
])
/**

View File

@@ -6,7 +6,7 @@
</div>
<div ng-show="processed">
<table class="l" style="overflow:hidden;margin: 1em 0;">
<table class="l" style="overflow:hidden;margin: 1em 0; width: 100%;">
<thead><tr><th>Ship</th><th>Build Name</th><th>Action</th></tr></thead>
<tbody ng-repeat="(shipId,shipBuilds) in builds">
<tr class="cb" ng-repeat="(buildName, b) in shipBuilds">

View File

@@ -8,7 +8,7 @@
"cost": 18969990,
"speed": 180,
"boost": 300,
"agility": 0,
"agility": 2,
"shields": 200,
"armour": 540,
"fuelcost": 50,

View File

@@ -1,6 +1,6 @@
{
"name": "coriolis_shipyard",
"version": "0.14.0",
"version": "0.14.1",
"repository": {
"type": "git",
"url": "https://github.com/cmmcleod/coriolis"