mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05: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.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.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.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.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 }
|
{ 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>
|
</div>
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ export const terms = {
|
|||||||
reload: 'Reload time',
|
reload: 'Reload time',
|
||||||
rof: 'Rate of fire',
|
rof: 'Rate of fire',
|
||||||
shield: 'Shield',
|
shield: 'Shield',
|
||||||
shieldmul: 'Shield boost',
|
shieldboost: 'Shield boost',
|
||||||
spinup: 'Spin up time',
|
spinup: 'Spin up time',
|
||||||
syscap: 'Systems capacity',
|
syscap: 'Systems capacity',
|
||||||
sysrate: 'Systems recharge rate',
|
sysrate: 'Systems recharge rate',
|
||||||
|
|||||||
@@ -274,11 +274,11 @@ export default class Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the shield multiplier for this module, taking in to account modifications
|
* Get the shield boost for this module, taking in to account modifications
|
||||||
* @return {Number} the shield multiplier of this module
|
* @return {Number} the shield boost of this module
|
||||||
*/
|
*/
|
||||||
getShieldMultiplier() {
|
getShieldBoost() {
|
||||||
return this._getModifiedValue('shieldmul');
|
return this._getModifiedValue('shieldboost');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -365,14 +365,6 @@ export default class Module {
|
|||||||
return result;
|
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
|
* Get the damage for this module, taking in to account modifications
|
||||||
* @return {Number} the damage of this module
|
* @return {Number} the damage of this module
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ export default class Ship {
|
|||||||
sg = sgSlot.m;
|
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, this.shieldMultiplier + (multiplierDelta || 0));
|
||||||
return Calc.shieldStrength(this.hullMass, this.baseShieldStrength, sg, 0 + (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
|
// Could be for either thrusters or FSD
|
||||||
this.updateTopSpeed();
|
this.updateTopSpeed();
|
||||||
this.updateJumpStats();
|
this.updateJumpStats();
|
||||||
} else if (name == 'shieldmul') {
|
} else if (name == 'shieldboost') {
|
||||||
m.setModValue(name, value);
|
m.setModValue(name, value);
|
||||||
this.updateShield();
|
this.updateShield();
|
||||||
} else if (name == 'hullboost') {
|
} else if (name == 'hullboost') {
|
||||||
@@ -906,7 +906,7 @@ export default class Ship {
|
|||||||
// Shield from boosters
|
// Shield from boosters
|
||||||
for (let slot of this.hardpoints) {
|
for (let slot of this.hardpoints) {
|
||||||
if (slot.m && slot.m.grp == 'sb') {
|
if (slot.m && slot.m.grp == 'sb') {
|
||||||
shield += baseShield * slot.m.getShieldMultiplier();
|
shield += baseShield * slot.m.getShieldBoost();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.shield = shield;
|
this.shield = shield;
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ const PROP_BLACKLIST = {
|
|||||||
ssdam: 1,
|
ssdam: 1,
|
||||||
mjdps: 1,
|
mjdps: 1,
|
||||||
mjeps: 1,
|
mjeps: 1,
|
||||||
M: 1,
|
|
||||||
P: 1,
|
|
||||||
mass: 1,
|
mass: 1,
|
||||||
cost: 1,
|
cost: 1,
|
||||||
recover: 1,
|
recover: 1,
|
||||||
@@ -138,14 +136,12 @@ const PROP_BLACKLIST = {
|
|||||||
const TERM_LOOKUP = {
|
const TERM_LOOKUP = {
|
||||||
pgen: 'power',
|
pgen: 'power',
|
||||||
armouradd: 'armour',
|
armouradd: 'armour',
|
||||||
shieldmul: 'multiplier',
|
|
||||||
rof: 'ROF',
|
rof: 'ROF',
|
||||||
dps: 'DPS'
|
dps: 'DPS'
|
||||||
};
|
};
|
||||||
|
|
||||||
const FORMAT_LOOKUP = {
|
const FORMAT_LOOKUP = {
|
||||||
time: 'time',
|
time: 'time'
|
||||||
shieldmul: 'rPct'
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const UNIT_LOOKUP = {
|
const UNIT_LOOKUP = {
|
||||||
@@ -246,13 +242,13 @@ export function diffDetails(language, m, mm) {
|
|||||||
|
|
||||||
if (mAffectsShield) {
|
if (mAffectsShield) {
|
||||||
if (m.grp == 'sb') { // Both m and mm must be utility modules if this is true
|
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 {
|
} else {
|
||||||
newShield = this.calcShieldStrengthWith(m);
|
newShield = this.calcShieldStrengthWith(m);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Old module must be a shield booster
|
// 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');
|
let sgDiffClass = Math.round((newShield - shield) * 100) / 100 == 0 ? 'muted' : (newShield > shield ? 'secondary' : 'warning');
|
||||||
|
|||||||
Reference in New Issue
Block a user