Fix for engineered modules in SLEF imports from Inara. Unused function removed.

This commit is contained in:
Alexey Gorb
2021-08-11 12:04:25 +02:00
parent 74829a09c0
commit 50f9c0faa1

View File

@@ -377,23 +377,6 @@ export function setRandom(ship, m) {
setPercent(ship, m, Math.random() * 100);
}
/**
* Set a modification feature value
* @param {Object} ship The ship for which to perform the modifications
* @param {Object} m The module for which to perform the modifications
* @param {string} featureName The feature being set
* @param {number} value The value being set for the feature
*/
function _setValue(ship, m, featureName, value) {
if (Modifications.modifications[featureName].type == 'percentage') {
ship.setModification(m, featureName, value * 10000);
} else if (Modifications.modifications[featureName].type == 'numeric') {
ship.setModification(m, featureName, value * 100);
} else {
ship.setModification(m, featureName, value);
}
}
/**
* Provide 'percent' primary query
* @param {Object} m The module for which to perform the query