mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 08:43:02 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a71abd9fe3 | ||
|
|
f1d804e3a1 | ||
|
|
aa7479d111 |
@@ -88,6 +88,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
this.totalCost = this.c.incCost ? this.c.discountedCost : 0;
|
this.totalCost = this.c.incCost ? this.c.discountedCost : 0;
|
||||||
this.unladenMass = this.mass;
|
this.unladenMass = this.mass;
|
||||||
this.armourTotal = this.armour;
|
this.armourTotal = this.armour;
|
||||||
|
this.totalDps = 0;
|
||||||
|
|
||||||
this.bulkheads.c = null;
|
this.bulkheads.c = null;
|
||||||
this.useBulkhead(comps.bulkheads || 0, true);
|
this.useBulkhead(comps.bulkheads || 0, true);
|
||||||
@@ -258,6 +259,8 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
} else if (slot.c.grp == 'sb') {
|
} else if (slot.c.grp == 'sb') {
|
||||||
this.shieldMultiplier += slot.c.shieldmul * (enabled ? 1 : -1);
|
this.shieldMultiplier += slot.c.shieldmul * (enabled ? 1 : -1);
|
||||||
this.updateShieldStrength();
|
this.updateShieldStrength();
|
||||||
|
} else if (slot.c.dps) {
|
||||||
|
this.totalDps += slot.c.dps * (enabled ? 1 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updatePower();
|
this.updatePower();
|
||||||
@@ -308,6 +311,10 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
if (old.power && slot.enabled) {
|
if (old.power && slot.enabled) {
|
||||||
this.priorityBands[slot.priority][powerUsageType(slot, old)] -= old.power;
|
this.priorityBands[slot.priority][powerUsageType(slot, old)] -= old.power;
|
||||||
powerChange = true;
|
powerChange = true;
|
||||||
|
|
||||||
|
if (old.dps) {
|
||||||
|
this.totalDps -= old.dps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.unladenMass -= old.mass || 0;
|
this.unladenMass -= old.mass || 0;
|
||||||
}
|
}
|
||||||
@@ -338,6 +345,10 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
if (n.power && slot.enabled) {
|
if (n.power && slot.enabled) {
|
||||||
this.priorityBands[slot.priority][powerUsageType(slot, n)] += n.power;
|
this.priorityBands[slot.priority][powerUsageType(slot, n)] += n.power;
|
||||||
powerChange = true;
|
powerChange = true;
|
||||||
|
|
||||||
|
if (n.dps) {
|
||||||
|
this.totalDps += n.dps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.unladenMass += n.mass || 0;
|
this.unladenMass += n.mass || 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,6 +163,13 @@ angular.module('shipyard', ['ngLodash'])
|
|||||||
lbls: ['Unladen', 'Laden'],
|
lbls: ['Unladen', 'Laden'],
|
||||||
unit: 'LY',
|
unit: 'LY',
|
||||||
fmt: 'fRound'
|
fmt: 'fRound'
|
||||||
|
},
|
||||||
|
{ // 11
|
||||||
|
title: 'DPS',
|
||||||
|
props: ['totalDps'],
|
||||||
|
lbls: ['Dps'],
|
||||||
|
unit: '',
|
||||||
|
fmt: 'fRound'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="processed">
|
<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>
|
<thead><tr><th>Ship</th><th>Build Name</th><th>Action</th></tr></thead>
|
||||||
<tbody ng-repeat="(shipId,shipBuilds) in builds">
|
<tbody ng-repeat="(shipId,shipBuilds) in builds">
|
||||||
<tr class="cb" ng-repeat="(buildName, b) in shipBuilds">
|
<tr class="cb" ng-repeat="(buildName, b) in shipBuilds">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"cost": 18969990,
|
"cost": 18969990,
|
||||||
"speed": 180,
|
"speed": 180,
|
||||||
"boost": 300,
|
"boost": 300,
|
||||||
"agility": 0,
|
"agility": 2,
|
||||||
"shields": 200,
|
"shields": 200,
|
||||||
"armour": 540,
|
"armour": 540,
|
||||||
"fuelcost": 50,
|
"fuelcost": 50,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "coriolis_shipyard",
|
"name": "coriolis_shipyard",
|
||||||
"version": "0.14.0",
|
"version": "0.14.1",
|
||||||
"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