Engineers. Are. Back. Probably.

This commit is contained in:
Willyb321
2018-04-14 14:50:37 +10:00
parent 8375ad95b3
commit 58b55eb3da
5 changed files with 166 additions and 155 deletions

View File

@@ -225,7 +225,13 @@ export function isValueBeneficial(feature, value) {
*/
export function getBlueprint(name, module) {
// Start with a copy of the blueprint
const blueprint = JSON.parse(JSON.stringify(Modifications.blueprints[name]));
const findMod = val => Object.keys(Modifications.blueprints).find(elem => elem.toString().toLowerCase().search(val.toString().toLowerCase().replace(/(OutfittingFieldType_|persecond)/igm, '')) >= 0)
const found = Modifications.blueprints[findMod(name)];
if (!found || !found.fdname) {
return undefined;
}
const blueprint = JSON.parse(JSON.stringify(found));
console.log(blueprint)
if (module) {
if (module.grp === 'bh' || module.grp === 'hr' || module.grp === 'sg' || module.grp === 'psg' || module.grp === 'bsg') {
// Bulkheads, hull reinforcements and shield generators need to have their resistances altered by the base values