mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Tidy-ups
This commit is contained in:
@@ -216,6 +216,7 @@ export default class InternalSlotSection extends SlotSection {
|
|||||||
/**
|
/**
|
||||||
* Generate the section drop-down menu
|
* Generate the section drop-down menu
|
||||||
* @param {Function} translate Translate function
|
* @param {Function} translate Translate function
|
||||||
|
* @param {Function} ship The ship
|
||||||
* @return {React.Component} Section menu
|
* @return {React.Component} Section menu
|
||||||
*/
|
*/
|
||||||
_getSectionMenu(translate, ship) {
|
_getSectionMenu(translate, ship) {
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ export default class Ship {
|
|||||||
* Calculate the hypothetical shield strength for the ship using the specified parameters
|
* Calculate the hypothetical shield strength for the ship using the specified parameters
|
||||||
* @param {Object} sg [optional] Shield Generator to use
|
* @param {Object} sg [optional] Shield Generator to use
|
||||||
* @param {Number} multiplierDelta [optional] Change to shield multiplier (+0.2, - 0.12, etc)
|
* @param {Number} multiplierDelta [optional] Change to shield multiplier (+0.2, - 0.12, etc)
|
||||||
* @return {Number} Shield strength in MH
|
* @return {Number} Shield strength in MJ
|
||||||
*/
|
*/
|
||||||
calcShieldStrengthWith(sg, multiplierDelta) {
|
calcShieldStrengthWith(sg, multiplierDelta) {
|
||||||
if (!sg) {
|
if (!sg) {
|
||||||
@@ -845,7 +845,6 @@ export default class Ship {
|
|||||||
const slot = this.standard[slotNum];
|
const slot = this.standard[slotNum];
|
||||||
if (slot.m && slot.enabled) {
|
if (slot.m && slot.enabled) {
|
||||||
bands[slot.priority][powerUsageType(slot, slot.m)] += slot.m.getPowerUsage();
|
bands[slot.priority][powerUsageType(slot, slot.m)] += slot.m.getPowerUsage();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1164,9 +1163,9 @@ export default class Ship {
|
|||||||
let modificationId = buffer.readInt8(curpos++);
|
let modificationId = buffer.readInt8(curpos++);
|
||||||
while (modificationId != -1) {
|
while (modificationId != -1) {
|
||||||
let modificationValue = buffer.readInt16BE(curpos);
|
let modificationValue = buffer.readInt16BE(curpos);
|
||||||
curpos += 2;
|
curpos += 2;
|
||||||
modifications[Modifications.modifiers[modificationId]] = modificationValue;
|
modifications[Modifications.modifiers[modificationId]] = modificationValue;
|
||||||
modificationId = buffer.readInt8(curpos++);
|
modificationId = buffer.readInt8(curpos++);
|
||||||
}
|
}
|
||||||
arr[module] = modifications;
|
arr[module] = modifications;
|
||||||
module = buffer.readInt8(curpos++);
|
module = buffer.readInt8(curpos++);
|
||||||
|
|||||||
Reference in New Issue
Block a user