diff --git a/ChangeLog.md b/ChangeLog.md index ab8600e5..77370c4c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,12 @@ * Tidy up shipyard page; remove units from data columns and re-order for legibility * Allow basic drag/drop functionality in Edge/Internet Explorer 11 browser * Provide separate special effects for dumbfire and seeker missiles + * Include special effect modifiers in blueprint tooltip + * Use coriolis-data 2.3.4: + * Add missing Long Range blueprint to multi-cannon + * Fix values for thermal load of focused weapon grade 4 + * Fix internal module information for power plant blueprints + * Add 'FSD Interrupt' special to dumbfire missile racks; this module now has `specials_S` and `specials_D` keys for specials to differentiate #2.3.3 * Remove unused blueprint when hitting reset diff --git a/package.json b/package.json index c4b8aae5..e32028bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coriolis_shipyard", - "version": "2.3.4-b", + "version": "2.3.4", "repository": { "type": "git", "url": "https://github.com/EDCD/coriolis" diff --git a/src/app/utils/BlueprintFunctions.js b/src/app/utils/BlueprintFunctions.js index dd22bec3..42e6430c 100644 --- a/src/app/utils/BlueprintFunctions.js +++ b/src/app/utils/BlueprintFunctions.js @@ -87,6 +87,36 @@ export function blueprintTooltip(translate, blueprint, engineers, grp, m) { ); } } + + // We also add in any benefits from specials that aren't covered above + if (m.blueprint && m.blueprint.special) { + for (const feature in Modifications.modifierActions[m.blueprint.special.edname]) { + if (!blueprint.features[feature] && !m.mods.feature) { + const featureDef = Modifications.modifications[feature]; + let symbol = ''; + if (feature === 'jitter') { + symbol = '°'; + } else if (featureDef.type === 'percentage') { + symbol = '%'; + } + let current = m.getModValue(feature); + if (featureDef.type === 'percentage' || featureDef.name === 'burst' || featureDef.name === 'burstrof') { + current = Math.round(current / 10) / 10; + } else if (featureDef.type === 'numeric') { + current /= 100; + } + const currentIsBeneficial = isValueBeneficial(feature, current); + effects.push( +