mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 06:43:24 +00:00
Added translation
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
* Ensure that hidden blueprint effects are applied when a blueprint is selected
|
* Ensure that hidden blueprint effects are applied when a blueprint is selected
|
||||||
* Handle display when summary values show thrusters disabled but current mass keeps them enabled
|
* Handle display when summary values show thrusters disabled but current mass keeps them enabled
|
||||||
* Added updated German translations (thanks to @sweisgerber-dev)
|
* Added updated German translations (thanks to @sweisgerber-dev)
|
||||||
|
* Power state (enabled and priority) now follows modules when they are swapped or copied
|
||||||
|
|
||||||
#2.3.4
|
#2.3.4
|
||||||
* Fix crash when removing the special effect from a module
|
* Fix crash when removing the special effect from a module
|
||||||
|
|||||||
@@ -134,18 +134,38 @@ export default class SlotSection extends TranslatedComponent {
|
|||||||
if (targetSlot && canMount(this.props.ship, targetSlot, m.grp, m.class)) {
|
if (targetSlot && canMount(this.props.ship, targetSlot, m.grp, m.class)) {
|
||||||
const mCopy = m.clone();
|
const mCopy = m.clone();
|
||||||
this.props.ship.use(targetSlot, mCopy, false);
|
this.props.ship.use(targetSlot, mCopy, false);
|
||||||
|
// Copy power info
|
||||||
|
targetSlot.enabled = originSlot.enabled;
|
||||||
|
targetSlot.priority = originSlot.priority;
|
||||||
this.props.onChange();
|
this.props.onChange();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Store power info
|
||||||
|
const originEnabled = targetSlot.enabled;
|
||||||
|
const originPriority = targetSlot.priority;
|
||||||
|
const targetEnabled = originSlot.enabled;
|
||||||
|
const targetPriority = originSlot.priority;
|
||||||
// We want to move the module in to the target slot, and swap back any module that was originally in the target slot
|
// We want to move the module in to the target slot, and swap back any module that was originally in the target slot
|
||||||
if (targetSlot && m && canMount(this.props.ship, targetSlot, m.grp, m.class)) {
|
if (targetSlot && m && canMount(this.props.ship, targetSlot, m.grp, m.class)) {
|
||||||
// Swap modules if possible
|
// Swap modules if possible
|
||||||
if (targetSlot.m && canMount(this.props.ship, originSlot, targetSlot.m.grp, targetSlot.m.class)) {
|
if (targetSlot.m && canMount(this.props.ship, originSlot, targetSlot.m.grp, targetSlot.m.class)) {
|
||||||
this.props.ship.use(originSlot, targetSlot.m, true);
|
this.props.ship.use(originSlot, targetSlot.m, true);
|
||||||
} else { // Otherwise empty the origin slot
|
this.props.ship.use(targetSlot, m);
|
||||||
|
// Swap power
|
||||||
|
originSlot.enabled = originEnabled;
|
||||||
|
originSlot.priority = originPriority;
|
||||||
|
targetSlot.enabled = targetEnabled;
|
||||||
|
targetSlot.priority = targetPriority;
|
||||||
|
} else { // Otherwise empty the origin slot
|
||||||
|
// Store power
|
||||||
|
const targetEnabled = originSlot.enabled;
|
||||||
this.props.ship.use(originSlot, null, true); // Empty but prevent summary update
|
this.props.ship.use(originSlot, null, true); // Empty but prevent summary update
|
||||||
|
this.props.ship.use(targetSlot, m);
|
||||||
|
originSlot.enabled = 0;
|
||||||
|
originSlot.priority = 0;
|
||||||
|
targetSlot.enabled = targetEnabled;
|
||||||
|
targetSlot.priority = targetPriority;
|
||||||
}
|
}
|
||||||
this.props.ship.use(targetSlot, m); // update target slot
|
|
||||||
this.props.onChange();
|
this.props.onChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,6 +286,44 @@ export const terms = {
|
|||||||
bulkheads: 'Bulkheads',
|
bulkheads: 'Bulkheads',
|
||||||
reinforcement: 'Reinforcement',
|
reinforcement: 'Reinforcement',
|
||||||
|
|
||||||
|
// Panel headings and subheadings
|
||||||
|
'power and costs': 'power and costs',
|
||||||
|
'costs': 'costs',
|
||||||
|
'retrofit costs': 'retrofit costs',
|
||||||
|
'reload costs': 'reload costs',
|
||||||
|
'profiles': 'profiles',
|
||||||
|
'engine profile': 'engine profile',
|
||||||
|
'fsd profile': 'fsd profile',
|
||||||
|
'movement profile': 'movement profile',
|
||||||
|
'damage to opponent\'s shields': 'damage to opponent\'s shields',
|
||||||
|
'damage to opponent\'s hull': 'damage to opponent\'s hull',
|
||||||
|
'offence': 'offence',
|
||||||
|
'defence': 'defence',
|
||||||
|
'shield metrics': 'shield metrics',
|
||||||
|
'raw shield strength': 'raw shield strength',
|
||||||
|
'shield sources': 'shield sources',
|
||||||
|
'damage taken': 'damage taken',
|
||||||
|
'effective shield': 'effective shield',
|
||||||
|
'armour metrics': 'armour metrics',
|
||||||
|
'raw armour strength': 'raw armour strength',
|
||||||
|
'armour sources': 'armour sources',
|
||||||
|
'raw module armour': 'raw module armour',
|
||||||
|
'effective armour': 'effective armour',
|
||||||
|
'offence metrics': 'offence metrics',
|
||||||
|
'defence metrics': 'defence metrics',
|
||||||
|
// Misc items
|
||||||
|
'fuel carried': 'fuel carried',
|
||||||
|
'cargo carried': 'cargo carried',
|
||||||
|
'ship control': 'ship control',
|
||||||
|
'opponent': 'opponent',
|
||||||
|
'opponent\'s shields': 'opponent\'s shields',
|
||||||
|
'opponent\'s armour': 'opponent\'s armour',
|
||||||
|
'shield damage sources': 'shield damage sources',
|
||||||
|
'armour damage sources': 'armour damage sources',
|
||||||
|
'never': 'never',
|
||||||
|
'stock': 'stock',
|
||||||
|
'boost': 'boost',
|
||||||
|
|
||||||
// Help text
|
// Help text
|
||||||
HELP_TEXT: `
|
HELP_TEXT: `
|
||||||
<h1>Introduction</h1>
|
<h1>Introduction</h1>
|
||||||
|
|||||||
@@ -167,14 +167,15 @@ export default class ModuleSet {
|
|||||||
/**
|
/**
|
||||||
* Find the lightest Power Plant that provides sufficient power
|
* Find the lightest Power Plant that provides sufficient power
|
||||||
* @param {number} powerNeeded Power requirements in MJ
|
* @param {number} powerNeeded Power requirements in MJ
|
||||||
|
* @param {string} rating The optional rating of the power plant
|
||||||
* @return {Object} Power Plant
|
* @return {Object} Power Plant
|
||||||
*/
|
*/
|
||||||
lightestPowerPlant(powerNeeded) {
|
lightestPowerPlant(powerNeeded, rating) {
|
||||||
let pp = this.standard[0][0];
|
let pp = this.standard[0][0];
|
||||||
|
|
||||||
for (let p of this.standard[0]) {
|
for (let p of this.standard[0]) {
|
||||||
// Provides enough power, is lighter or the same mass as current power plant but better output/efficiency
|
// Provides enough power, is lighter or the same mass as current power plant but better output/efficiency
|
||||||
if (p.pgen >= powerNeeded && (p.mass < pp.mass || (p.mass == pp.mass && p.pgen > pp.pgen))) {
|
if (p.pgen >= powerNeeded && (p.mass < pp.mass || (p.mass == pp.mass && p.pgen > pp.pgen)) && (!rating || rating == p.rating)) {
|
||||||
pp = p;
|
pp = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user