mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Migrate changes of 87fc3b6cbb
This commit is contained in:
@@ -178,7 +178,7 @@ export default class ModificationsMenu extends TranslatedComponent {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const classes = cn('button-inline-menu', {
|
const classes = cn('button-inline-menu', {
|
||||||
active: m.blueprint && m.blueprint.special && m.blueprint.special.edname == specialName
|
active: m.blueprint && m.blueprint.special && m.blueprint.special.key == specialName
|
||||||
});
|
});
|
||||||
if (classes.indexOf('active') >= 0) this.selectedSpecialId = specialName;
|
if (classes.indexOf('active') >= 0) this.selectedSpecialId = specialName;
|
||||||
const close = this._specialSelected.bind(this, specialName);
|
const close = this._specialSelected.bind(this, specialName);
|
||||||
@@ -437,7 +437,7 @@ export default class ModificationsMenu extends TranslatedComponent {
|
|||||||
let specialTt;
|
let specialTt;
|
||||||
if (m.blueprint && m.blueprint.special) {
|
if (m.blueprint && m.blueprint.special) {
|
||||||
specialLabel = m.blueprint.special.name;
|
specialLabel = m.blueprint.special.name;
|
||||||
specialTt = specialToolTip(translate, m.blueprint.grades[m.blueprint.grade], m.grp, m, m.blueprint.special.edname);
|
specialTt = specialToolTip(translate, m.blueprint.grades[m.blueprint.grade], m.grp, m, m.blueprint.special.key);
|
||||||
} else {
|
} else {
|
||||||
specialLabel = translate('PHRASE_SELECT_SPECIAL');
|
specialLabel = translate('PHRASE_SELECT_SPECIAL');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default class Module {
|
|||||||
|
|
||||||
if ((!raw) && this.blueprint && this.blueprint.special) {
|
if ((!raw) && this.blueprint && this.blueprint.special) {
|
||||||
// This module has a special effect, see if we need to alter our returned value
|
// This module has a special effect, see if we need to alter our returned value
|
||||||
const modifierActions = Modifications.modifierActions[this.blueprint.special.edname];
|
const modifierActions = Modifications.modifierActions[this.blueprint.special.key];
|
||||||
if (modifierActions && modifierActions[name]) {
|
if (modifierActions && modifierActions[name]) {
|
||||||
// this special effect modifies our returned value
|
// this special effect modifies our returned value
|
||||||
const modification = Modifications.modifications[name];
|
const modification = Modifications.modifications[name];
|
||||||
@@ -83,7 +83,7 @@ export default class Module {
|
|||||||
}
|
}
|
||||||
if (valueiswithspecial && this.blueprint && this.blueprint.special) {
|
if (valueiswithspecial && this.blueprint && this.blueprint.special) {
|
||||||
// This module has a special effect, see if we need to alter the stored value
|
// This module has a special effect, see if we need to alter the stored value
|
||||||
const modifierActions = Modifications.modifierActions[this.blueprint.special.edname];
|
const modifierActions = Modifications.modifierActions[this.blueprint.special.key];
|
||||||
if (modifierActions && modifierActions[name]) {
|
if (modifierActions && modifierActions[name]) {
|
||||||
// This special effect modifies the value being set, so we need to revert it prior to storing the value
|
// This special effect modifies the value being set, so we need to revert it prior to storing the value
|
||||||
const modification = Modifications.modifications[name];
|
const modification = Modifications.modifications[name];
|
||||||
@@ -816,7 +816,7 @@ export default class Module {
|
|||||||
if (clipSize) {
|
if (clipSize) {
|
||||||
// If auto-loader is applied, effective clip size will be nearly doubled
|
// If auto-loader is applied, effective clip size will be nearly doubled
|
||||||
// as you get one reload for every two shots fired.
|
// as you get one reload for every two shots fired.
|
||||||
if (this.blueprint && this.blueprint.special && this.blueprint.special.edname === 'special_auto_loader' && modified) {
|
if (this.blueprint && this.blueprint.special && this.blueprint.special.key === 'special_auto_loader' && modified) {
|
||||||
clipSize += clipSize - 1;
|
clipSize += clipSize - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ export function blueprintTooltip(translate, blueprint, engineers, grp, m) {
|
|||||||
|
|
||||||
// We also add in any benefits from specials that aren't covered above
|
// We also add in any benefits from specials that aren't covered above
|
||||||
if (m.blueprint && m.blueprint.special) {
|
if (m.blueprint && m.blueprint.special) {
|
||||||
for (const feature in Modifications.modifierActions[m.blueprint.special.edname]) {
|
for (const feature in Modifications.modifierActions[m.blueprint.special.key]) {
|
||||||
if (!blueprint.features[feature] && !m.mods.feature) {
|
if (!blueprint.features[feature] && !m.mods.feature) {
|
||||||
const featureDef = Modifications.modifications[feature];
|
const featureDef = Modifications.modifications[feature];
|
||||||
if (featureDef && !featureDef.hidden) {
|
if (featureDef && !featureDef.hidden) {
|
||||||
|
|||||||
Reference in New Issue
Block a user