mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Fix up name of shield boost
This commit is contained in:
@@ -61,7 +61,7 @@ export default class HardpointSlot extends Slot {
|
||||
{ m.getDps() && m.getEps() ? <div className={'l'} onMouseOver={termtip.bind(null, 'dpe')} onMouseOut={tooltip.bind(null, null)}>{translate('DPE')}: {formats.f1(m.getDps() / m.getEps())}</div> : null }
|
||||
{ m.getRoF() ? <div className={'l'} onMouseOver={termtip.bind(null, 'rof')} onMouseOut={tooltip.bind(null, null)}>{translate('ROF')}: {formats.f1(m.getRoF())}{u.ps}</div> : null }
|
||||
{ m.getRange() && !m.getDps() ? <div className={'l'}>{translate('Range')} : {formats.round(m.getRange() / 1000)}{u.km}</div> : null }
|
||||
{ m.getShieldMul() ? <div className={'l'}>+{formats.rPct(m.getShieldMul())}</div> : null }
|
||||
{ m.getShieldBoost() ? <div className={'l'}>+{formats.rPct(m.getShieldBoost())}</div> : null }
|
||||
{ m.getAmmo() ? <div className={'l'}>{translate('ammunition')}: {formats.int(m.getClip())}/{formats.int(m.getAmmo())}</div> : null }
|
||||
{ m && validMods.length > 0 ? <div className='r' ><button onClick={this._toggleModifications.bind(this)} onContextMenu={stopCtxPropagation} onMouseOver={termtip.bind(null, 'modifications')} onMouseOut={tooltip.bind(null, null)}><ListModifications /></button></div> : null }
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,7 @@ export const terms = {
|
||||
reload: 'Reload time',
|
||||
rof: 'Rate of fire',
|
||||
shield: 'Shield',
|
||||
shieldmul: 'Shield boost',
|
||||
shieldboost: 'Shield boost',
|
||||
spinup: 'Spin up time',
|
||||
syscap: 'Systems capacity',
|
||||
sysrate: 'Systems recharge rate',
|
||||
|
||||
@@ -274,11 +274,11 @@ export default class Module {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shield multiplier for this module, taking in to account modifications
|
||||
* @return {Number} the shield multiplier of this module
|
||||
* Get the shield boost for this module, taking in to account modifications
|
||||
* @return {Number} the shield boost of this module
|
||||
*/
|
||||
getShieldMultiplier() {
|
||||
return this._getModifiedValue('shieldmul');
|
||||
getShieldBoost() {
|
||||
return this._getModifiedValue('shieldboost');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -365,14 +365,6 @@ export default class Module {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shield multiplier for this module, taking in to account modifications
|
||||
* @return {Number} the shield multiplier of this module
|
||||
*/
|
||||
getShieldMul() {
|
||||
return this._getModifiedValue('shieldmul');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the damage for this module, taking in to account modifications
|
||||
* @return {Number} the damage of this module
|
||||
|
||||
@@ -232,7 +232,7 @@ export default class Ship {
|
||||
sg = sgSlot.m;
|
||||
}
|
||||
|
||||
// TODO obtain shieldMultiplier
|
||||
// TODO obtain shield boost
|
||||
//return Calc.shieldStrength(this.hullMass, this.baseShieldStrength, sg, this.shieldMultiplier + (multiplierDelta || 0));
|
||||
return Calc.shieldStrength(this.hullMass, this.baseShieldStrength, sg, 0 + (multiplierDelta || 0));
|
||||
}
|
||||
@@ -430,7 +430,7 @@ export default class Ship {
|
||||
// Could be for either thrusters or FSD
|
||||
this.updateTopSpeed();
|
||||
this.updateJumpStats();
|
||||
} else if (name == 'shieldmul') {
|
||||
} else if (name == 'shieldboost') {
|
||||
m.setModValue(name, value);
|
||||
this.updateShield();
|
||||
} else if (name == 'hullboost') {
|
||||
@@ -906,7 +906,7 @@ export default class Ship {
|
||||
// Shield from boosters
|
||||
for (let slot of this.hardpoints) {
|
||||
if (slot.m && slot.m.grp == 'sb') {
|
||||
shield += baseShield * slot.m.getShieldMultiplier();
|
||||
shield += baseShield * slot.m.getShieldBoost();
|
||||
}
|
||||
}
|
||||
this.shield = shield;
|
||||
|
||||
@@ -118,8 +118,6 @@ const PROP_BLACKLIST = {
|
||||
ssdam: 1,
|
||||
mjdps: 1,
|
||||
mjeps: 1,
|
||||
M: 1,
|
||||
P: 1,
|
||||
mass: 1,
|
||||
cost: 1,
|
||||
recover: 1,
|
||||
@@ -138,14 +136,12 @@ const PROP_BLACKLIST = {
|
||||
const TERM_LOOKUP = {
|
||||
pgen: 'power',
|
||||
armouradd: 'armour',
|
||||
shieldmul: 'multiplier',
|
||||
rof: 'ROF',
|
||||
dps: 'DPS'
|
||||
};
|
||||
|
||||
const FORMAT_LOOKUP = {
|
||||
time: 'time',
|
||||
shieldmul: 'rPct'
|
||||
time: 'time'
|
||||
};
|
||||
|
||||
const UNIT_LOOKUP = {
|
||||
@@ -246,13 +242,13 @@ export function diffDetails(language, m, mm) {
|
||||
|
||||
if (mAffectsShield) {
|
||||
if (m.grp == 'sb') { // Both m and mm must be utility modules if this is true
|
||||
newShield = this.calcShieldStrengthWith(null, m.shieldmul - (mm ? mm.getShieldMul() || 0 : 0));
|
||||
newShield = this.calcShieldStrengthWith(null, m.shieldboost - (mm ? mm.getShieldBoost() || 0 : 0));
|
||||
} else {
|
||||
newShield = this.calcShieldStrengthWith(m);
|
||||
}
|
||||
} else {
|
||||
// Old module must be a shield booster
|
||||
newShield = this.calcShieldStrengthWith(null, -mm.getShieldMul());
|
||||
newShield = this.calcShieldStrengthWith(null, -mm.getShieldBoost());
|
||||
}
|
||||
|
||||
let sgDiffClass = Math.round((newShield - shield) * 100) / 100 == 0 ? 'muted' : (newShield > shield ? 'secondary' : 'warning');
|
||||
|
||||
Reference in New Issue
Block a user