mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 00:33:03 +00:00
Updates
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
* Ensure that boost value is set correctly when modifications to power distributor enable/disable boost
|
* Ensure that boost value is set correctly when modifications to power distributor enable/disable boost
|
||||||
* Ensure that hull reinforcement modifications take the inherent resistance in to account when calculating modification percentages
|
* Ensure that hull reinforcement modifications take the inherent resistance in to account when calculating modification percentages
|
||||||
* 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
|
||||||
|
|
||||||
#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
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export default class HardpointSlot extends Slot {
|
|||||||
{ m.getHps() ? <div className={'l'} onMouseOver={termtip.bind(null, m.getClip() ? 'hpsshps' : 'hps')} onMouseOut={tooltip.bind(null, null)}>{translate('HPS')}: {formats.round1(m.getHps())} { m.getClip() ? <span>({formats.round1((m.getClip() * m.getHps() / m.getRoF()) / ((m.getClip() / m.getRoF()) + m.getReload())) })</span> : null }</div> : null }
|
{ m.getHps() ? <div className={'l'} onMouseOver={termtip.bind(null, m.getClip() ? 'hpsshps' : 'hps')} onMouseOut={tooltip.bind(null, null)}>{translate('HPS')}: {formats.round1(m.getHps())} { m.getClip() ? <span>({formats.round1((m.getClip() * m.getHps() / m.getRoF()) / ((m.getClip() / m.getRoF()) + m.getReload())) })</span> : null }</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.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() ? <div className={'l'}>{translate('range')} {formats.f1(m.getRange() / 1000)}{u.km}</div> : null }
|
{ m.getRange() ? <div className={'l'}>{translate('range', m.grp)} {formats.f1(m.getRange() / 1000)}{u.km}</div> : null }
|
||||||
{ m.getScanTime() ? <div className={'l'}>{translate('scantime')} {formats.f1(m.getScanTime())}{u.s}</div> : null }
|
{ m.getScanTime() ? <div className={'l'}>{translate('scantime')} {formats.f1(m.getScanTime())}{u.s}</div> : null }
|
||||||
{ m.getFalloff() ? <div className={'l'}>{translate('falloff')} {formats.round(m.getFalloff() / 1000)}{u.km}</div> : null }
|
{ m.getFalloff() ? <div className={'l'}>{translate('falloff')} {formats.round(m.getFalloff() / 1000)}{u.km}</div> : null }
|
||||||
{ m.getShieldBoost() ? <div className={'l'}>+{formats.pct1(m.getShieldBoost())}</div> : null }
|
{ m.getShieldBoost() ? <div className={'l'}>+{formats.pct1(m.getShieldBoost())}</div> : null }
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export default class StandardSlot extends TranslatedComponent {
|
|||||||
{ m.getMinMass() ? <div className='l'>{translate('minimum mass')}: {formats.int(m.getMinMass())}{units.T}</div> : null }
|
{ m.getMinMass() ? <div className='l'>{translate('minimum mass')}: {formats.int(m.getMinMass())}{units.T}</div> : null }
|
||||||
{ m.getOptMass() ? <div className='l'>{translate('optimal mass')}: {formats.int(m.getOptMass())}{units.T}</div> : null }
|
{ m.getOptMass() ? <div className='l'>{translate('optimal mass')}: {formats.int(m.getOptMass())}{units.T}</div> : null }
|
||||||
{ m.getMaxMass() ? <div className='l'>{translate('max mass')}: {formats.int(m.getMaxMass())}{units.T}</div> : null }
|
{ m.getMaxMass() ? <div className='l'>{translate('max mass')}: {formats.int(m.getMaxMass())}{units.T}</div> : null }
|
||||||
{ m.getRange() ? <div className='l'>{translate('range')}: {formats.f2(m.getRange())}{units.km}</div> : null }
|
{ m.getRange() ? <div className='l'>{translate('range', m.grp)}: {formats.f2(m.getRange())}{units.km}</div> : null }
|
||||||
{ m.time ? <div className='l'>{translate('time')}: {formats.time(m.time)}</div> : null }
|
{ m.time ? <div className='l'>{translate('time')}: {formats.time(m.time)}</div> : null }
|
||||||
{ m.getThermalEfficiency() ? <div className='l'>{translate('efficiency')}: {formats.f2(m.getThermalEfficiency())}</div> : null }
|
{ m.getThermalEfficiency() ? <div className='l'>{translate('efficiency')}: {formats.f2(m.getThermalEfficiency())}</div> : null }
|
||||||
{ m.getPowerGeneration() > 0 ? <div className='l'>{translate('pgen')}: {formats.f1(m.getPowerGeneration())}{units.MW}</div> : null }
|
{ m.getPowerGeneration() > 0 ? <div className='l'>{translate('pgen')}: {formats.f1(m.getPowerGeneration())}{units.MW}</div> : null }
|
||||||
|
|||||||
@@ -230,8 +230,7 @@ export const terms = {
|
|||||||
regen: 'Regeneration rate',
|
regen: 'Regeneration rate',
|
||||||
reload: 'Reload',
|
reload: 'Reload',
|
||||||
rof: 'Rate of fire',
|
rof: 'Rate of fire',
|
||||||
scanangle: 'Scan angle',
|
angle: 'Scan angle',
|
||||||
scanrange: 'Scan range',
|
|
||||||
scantime: 'Scan time',
|
scantime: 'Scan time',
|
||||||
shield: 'Shield',
|
shield: 'Shield',
|
||||||
shieldboost: 'Shield boost',
|
shieldboost: 'Shield boost',
|
||||||
@@ -253,6 +252,8 @@ export const terms = {
|
|||||||
optmul_sg: 'Optimal strength',
|
optmul_sg: 'Optimal strength',
|
||||||
maxmul_sg: 'Minimum strength',
|
maxmul_sg: 'Minimum strength',
|
||||||
|
|
||||||
|
range_s: 'Typical emission range',
|
||||||
|
|
||||||
// Damage types
|
// Damage types
|
||||||
absolute: 'Absolute',
|
absolute: 'Absolute',
|
||||||
explosive: 'Explosive',
|
explosive: 'Explosive',
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default class OutfittingPage extends Page {
|
|||||||
this._getTitle = getTitle.bind(this, data.properties.name);
|
this._getTitle = getTitle.bind(this, data.properties.name);
|
||||||
|
|
||||||
// Obtain ship control from code
|
// Obtain ship control from code
|
||||||
const { sys, eng, wep, boost, fuel, cargo, opponent, opponentBuild, engagementRange } = this._obtainControlFromCode(ship, code);
|
const { sys, eng, wep, boost, fuel, cargo, opponent, opponentBuild, opponentSys, opponentEng, opponentWep, engagementRange } = this._obtainControlFromCode(ship, code);
|
||||||
return {
|
return {
|
||||||
error: null,
|
error: null,
|
||||||
title: this._getTitle(buildName),
|
title: this._getTitle(buildName),
|
||||||
@@ -109,6 +109,9 @@ export default class OutfittingPage extends Page {
|
|||||||
cargo,
|
cargo,
|
||||||
opponent,
|
opponent,
|
||||||
opponentBuild,
|
opponentBuild,
|
||||||
|
opponentSys,
|
||||||
|
opponentEng,
|
||||||
|
opponentWep,
|
||||||
engagementRange
|
engagementRange
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -167,7 +170,10 @@ export default class OutfittingPage extends Page {
|
|||||||
let fuel = ship.fuelCapacity;
|
let fuel = ship.fuelCapacity;
|
||||||
let cargo = ship.cargoCapacity;
|
let cargo = ship.cargoCapacity;
|
||||||
let opponent = new Ship('eagle', Ships['eagle'].properties, Ships['eagle'].slots).buildWith(Ships['eagle'].defaults);
|
let opponent = new Ship('eagle', Ships['eagle'].properties, Ships['eagle'].slots).buildWith(Ships['eagle'].defaults);
|
||||||
let opponentBuild = undefined;
|
let opponentSys = 2;
|
||||||
|
let opponentEng = 2;
|
||||||
|
let opponentWep = 2;
|
||||||
|
let opponentBuild;
|
||||||
let engagementRange = 1000;
|
let engagementRange = 1000;
|
||||||
|
|
||||||
// Obtain updates from code, if available
|
// Obtain updates from code, if available
|
||||||
@@ -187,8 +193,19 @@ export default class OutfittingPage extends Page {
|
|||||||
opponent = new Ship(shipId, Ships[shipId].properties, Ships[shipId].slots);
|
opponent = new Ship(shipId, Ships[shipId].properties, Ships[shipId].slots);
|
||||||
if (control[7] && Persist.getBuild(shipId, control[7])) {
|
if (control[7] && Persist.getBuild(shipId, control[7])) {
|
||||||
// Ship is a particular build
|
// Ship is a particular build
|
||||||
opponent.buildFrom(Persist.getBuild(shipId, control[7]));
|
const opponentCode = Persist.getBuild(shipId, control[7]);
|
||||||
|
opponent.buildFrom(opponentCode);
|
||||||
opponentBuild = control[7];
|
opponentBuild = control[7];
|
||||||
|
if (opponentBuild) {
|
||||||
|
// Obtain opponent's sys/eng/wep pips from their code
|
||||||
|
const opponentParts = opponentCode.split('.');
|
||||||
|
if (opponentParts.length >= 5) {
|
||||||
|
const opponentControl = LZString.decompressFromBase64(Utils.fromUrlSafe(opponentParts[4])).split('/');
|
||||||
|
opponentSys = parseFloat(opponentControl[0]);
|
||||||
|
opponentEng = parseFloat(opponentControl[1]);
|
||||||
|
opponentWep = parseFloat(opponentControl[2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Ship is a stock build
|
// Ship is a stock build
|
||||||
opponent.buildWith(Ships[shipId].defaults);
|
opponent.buildWith(Ships[shipId].defaults);
|
||||||
@@ -198,7 +215,7 @@ export default class OutfittingPage extends Page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { sys, eng, wep, boost, fuel, cargo, opponent, opponentBuild, engagementRange };
|
return { sys, eng, wep, boost, fuel, cargo, opponent, opponentBuild, opponentSys, opponentEng, opponentWep, engagementRange };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user