mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Updates
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
* Add tooltip for blueprints providing details of the features they alter
|
* Add tooltip for blueprints providing details of the features they alter
|
||||||
* Use opponent's saved pips if available
|
* Use opponent's saved pips if available
|
||||||
* Ignore rounds per shot for EPS and HPS calculations; it's already factored in to the numbers
|
* Ignore rounds per shot for EPS and HPS calculations; it's already factored in to the numbers
|
||||||
|
* Ensure that clip size modification imports result in whole numbers
|
||||||
|
* Rework of separate offence/defence/movement sections to a unified interface
|
||||||
|
|
||||||
#2.2.19
|
#2.2.19
|
||||||
* Power management panel now displays modules in descending order of power usage by default
|
* Power management panel now displays modules in descending order of power usage by default
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ export default class CostSection extends TranslatedComponent {
|
|||||||
scoop = true;
|
scoop = true;
|
||||||
break;
|
break;
|
||||||
case 'scb':
|
case 'scb':
|
||||||
q = slotGroup[i].m.getCells();
|
q = slotGroup[i].m.getAmmo() + 1;
|
||||||
break;
|
break;
|
||||||
case 'am':
|
case 'am':
|
||||||
q = slotGroup[i].m.getAmmo();
|
q = slotGroup[i].m.getAmmo();
|
||||||
|
|||||||
@@ -52,14 +52,16 @@ export default class InternalSlot extends Slot {
|
|||||||
{ m.bays ? <div className={'l'}>{translate('bays')}: {m.bays}</div> : null }
|
{ m.bays ? <div className={'l'}>{translate('bays')}: {m.bays}</div> : null }
|
||||||
{ m.rebuildsperbay ? <div className={'l'}>{translate('rebuildsperbay')}: {m.rebuildsperbay}</div> : null }
|
{ m.rebuildsperbay ? <div className={'l'}>{translate('rebuildsperbay')}: {m.rebuildsperbay}</div> : null }
|
||||||
{ m.rate ? <div className={'l'}>{translate('rate')}: {m.rate}{u.kgs} {translate('refuel time')}: {formats.time(this.props.fuel * 1000 / m.rate)}</div> : null }
|
{ m.rate ? <div className={'l'}>{translate('rate')}: {m.rate}{u.kgs} {translate('refuel time')}: {formats.time(this.props.fuel * 1000 / m.rate)}</div> : null }
|
||||||
{ m.getAmmo() ? <div className={'l'}>{translate('ammunition')}: {formats.gen(m.getAmmo())}</div> : null }
|
{ m.getAmmo() && m.grp !== 'scb' ? <div className={'l'}>{translate('ammunition')}: {formats.gen(m.getAmmo())}</div> : null }
|
||||||
{ m.cells ? <div className={'l'}>{translate('cells')}: {m.cells}</div> : null }
|
{ m.getSpinup() ? <div className={'l'}>{translate('spinup')}: {formats.f1(m.getSpinup())}{u.s}</div> : null }
|
||||||
{ m.getShieldReinforcement() ? <div className={'l'}>{translate('shieldreinforcement')}: {formats.int(m.getShieldReinforcement())} <u>MJ</u> {translate('total')}: {formats.int(m.cells * m.getShieldReinforcement())}{u.MJ}</div> : null }
|
{ m.getDuration() ? <div className={'l'}>{translate('duration')}: {formats.f1(m.getDuration())}{u.s}</div> : null }
|
||||||
|
{ m.grp === 'scb' ? <div className={'l'}>{translate('cells')}: {formats.int(m.getAmmo() + 1)}</div> : null }
|
||||||
|
{ m.getShieldReinforcement() ? <div className={'l'}>{translate('shieldreinforcement')}: {formats.f1(m.getDuration() * m.getShieldReinforcement())}{u.MJ}</div> : null }
|
||||||
|
{ m.getShieldReinforcement() ? <div className={'l'}>{translate('total')}: {formats.int((m.getAmmo() + 1) * (m.getDuration() * m.getShieldReinforcement()))}{u.MJ}</div> : null }
|
||||||
{ m.repair ? <div className={'l'}>{translate('repair')}: {m.repair}</div> : null }
|
{ m.repair ? <div className={'l'}>{translate('repair')}: {m.repair}</div> : null }
|
||||||
{ m.getFacingLimit() ? <div className={'l'}>{translate('facinglimit')} {formats.f1(m.getFacingLimit())}°</div> : null }
|
{ m.getFacingLimit() ? <div className={'l'}>{translate('facinglimit')} {formats.f1(m.getFacingLimit())}°</div> : null }
|
||||||
{ m.getRange() ? <div className={'l'}>{translate('range')} {formats.f2(m.getRange())}{u.km}</div> : null }
|
{ m.getRange() ? <div className={'l'}>{translate('range')} {formats.f2(m.getRange())}{u.km}</div> : null }
|
||||||
{ m.getRangeT() ? <div className={'l'}>{translate('ranget')} {formats.f1(m.getRangeT())}{u.s}</div> : null }
|
{ m.getRangeT() ? <div className={'l'}>{translate('ranget')} {formats.f1(m.getRangeT())}{u.s}</div> : null }
|
||||||
{ m.getSpinup() ? <div className={'l'}>{translate('spinup')}: {formats.f1(m.getSpinup())}{u.s}</div> : null }
|
|
||||||
{ m.getTime() ? <div className={'l'}>{translate('time')}: {formats.time(m.getTime())}</div> : null }
|
{ m.getTime() ? <div className={'l'}>{translate('time')}: {formats.time(m.getTime())}</div> : null }
|
||||||
{ m.maximum ? <div className={'l'}>{translate('max')}: {(m.maximum)}</div> : null }
|
{ m.maximum ? <div className={'l'}>{translate('max')}: {(m.maximum)}</div> : null }
|
||||||
{ m.rangeLS ? <div className={'l'}>{translate('range')}: {m.rangeLS}{u.Ls}</div> : null }
|
{ m.rangeLS ? <div className={'l'}>{translate('range')}: {m.rangeLS}{u.Ls}</div> : null }
|
||||||
|
|||||||
@@ -680,14 +680,6 @@ export default class Module {
|
|||||||
return this._getModifiedValue('rebuildsperbay');
|
return this._getModifiedValue('rebuildsperbay');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the cells for this module, taking in to account modifications
|
|
||||||
* @return {Number} the cells for this module
|
|
||||||
*/
|
|
||||||
getCells() {
|
|
||||||
return this._getModifiedValue('cells');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the jitter for this module, taking in to account modifications
|
* Get the jitter for this module, taking in to account modifications
|
||||||
* @return {Number} the jitter for this module
|
* @return {Number} the jitter for this module
|
||||||
|
|||||||
@@ -1296,7 +1296,9 @@ export default class Ship {
|
|||||||
|
|
||||||
for (let slot of this.internal) {
|
for (let slot of this.internal) {
|
||||||
if (slot.m && slot.m.grp == 'scb') {
|
if (slot.m && slot.m.grp == 'scb') {
|
||||||
shieldCells += slot.m.getShieldReinforcement() * slot.m.getCells();
|
// There is currently a bug with Elite where you can have a clip > 1 thanks to engineering but it doesn't do anything,
|
||||||
|
// so we need to hard-code clip to 1
|
||||||
|
shieldCells += slot.m.getShieldReinforcement() * slot.m.getDuration() * (slot.m.getAmmo() + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -427,4 +427,10 @@ function _addModifications(module, modifiers, blueprint, grade) {
|
|||||||
if (module.getModValue('rof')) {
|
if (module.getModValue('rof')) {
|
||||||
module.setModValue('rof', ((1 / (1 + module.getModValue('rof') / 10000)) - 1) * 10000);
|
module.setModValue('rof', ((1 / (1 + module.getModValue('rof') / 10000)) - 1) * 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clip size is rounded up so that the result is a whole number
|
||||||
|
if (module.getModValue('clip')) {
|
||||||
|
const individual = 1 / (module.clip || 1);
|
||||||
|
module.setModValue('clip', Math.ceil((module.getModValue('clip') / 10000) / individual) * individual * 10000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user