Ensure that hidden blueprint effects are applied when a blueprint is selected

This commit is contained in:
Cmdr McDonald
2017-05-11 12:45:57 +01:00
parent f30a904a02
commit 2fd2af3e31
3 changed files with 12 additions and 1 deletions

View File

@@ -435,6 +435,14 @@ export default class Ship {
*/
setModuleBlueprint(m, bp) {
m.blueprint = bp;
this.clearModifications(m);
// Set any hidden items for the blueprint now
const features = m.blueprint.grades[m.blueprint.grade].features;
for (const featureName in features) {
if (Modifications.modifications[featureName].hidden) {
this.setModification(m, featureName, bp.grades[bp.grade].features[featureName][0]);
}
}
this.updateModificationsString();
}