Skip to content

Commit

Permalink
Engineering Panel
Browse files Browse the repository at this point in the history
* Added which Engineers are able to apply which Blueprints and what Grades of engineering they are able to do
* Improved appearance of positive/negative effects of each grade of a Blueprint
* Fixed incorrect positive/negative indicators for some values on Blueprints (should all be correct now)

Navigation Panel

* Added explicit support for gracefully displaying systems in the Witch Head nebular that were renamed after launch
* Fixed issues with some states not being reflected properly for some systems
* Improved appearance and text used on Navigation Route view
* Added number of jumps / total distance to destination on Navigation Route view

Ship Panel

* Improved appearance of values on Module Inspector Panel to more clearly highlight positive/negative engineering effects applied to a module

Other

* Internal refactoring and code cleanup of game event handling
  • Loading branch information
iaincollins committed Mar 18, 2022
1 parent c1507fc commit 7953c51
Show file tree
Hide file tree
Showing 23 changed files with 2,593 additions and 421 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "icarus",
"version": "0.8.0",
"version": "0.9.0",
"description": "ICARUS Terminal for Elite Dangerous",
"scripts": {
"build": "npm run build:web && npm run build:app && npm run build:service && npm run build:package",
Expand Down
4 changes: 2 additions & 2 deletions resources/data/edcd/coriolis/modifications/modifications.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"causres": {"id": 51, "name": "explres", "type": "percentage", "method": "additive", "higherbetter": true},
"clip": {"id": 4, "name": "clip", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"damage": {"id": 5, "name": "damage", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"damagedist": {"id": 40, "name": "damage", "type": "object", "hidden": true, "method": "overwrite"},
"damagedist": {"id": 40, "name": "damage", "type": "object", "hidden": true, "method": "overwrite", "higherbetter": true},
"distdraw": {"id": 6, "name": "distdraw", "type": "percentage", "method": "multiplicative", "higherbetter": false},
"duration": {"id": 7, "name": "duration", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"eff": {"id": 8, "name": "eff", "type": "percentage", "method": "multiplicative", "higherbetter": false},
Expand All @@ -16,7 +16,7 @@
"explres": {"id": 11, "name": "explres", "type": "percentage", "method": "additive", "higherbetter": true},
"facinglimit": {"id": 12, "name": "facinglimit", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"falloff": {"id": 45, "name": "falloff", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"fallofffromrange": {"id": 42, "name": "fallofffromrange", "type": "numeric", "aggregated": true, "method": "overwrite"},
"fallofffromrange": {"id": 42, "name": "fallofffromrange", "type": "numeric", "aggregated": true, "method": "overwrite", "higherbetter": true},
"hullboost": {"id": 13, "name": "hullboost", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"hullreinforcement": {"id": 14, "name": "hullreinforcement", "type": "percentage", "method": "multiplicative", "higherbetter": true},
"integrity": {"id": 15, "name": "integrity", "type": "percentage", "method": "multiplicative", "higherbetter": true},
Expand Down
22 changes: 21 additions & 1 deletion scripts/build-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,41 @@ function coriolisDataBlueprints () {
fs.mkdirSync(outputDir, { recursive: true })
const blueprints = JSON.parse(fs.readFileSync(`${ROOT_INPUT_DATA_DIR}/${dataDir}/blueprints.json`))
const modifications = JSON.parse(fs.readFileSync(`${ROOT_INPUT_DATA_DIR}/${dataDir}/modifications.json`))
const modules = JSON.parse(fs.readFileSync(`${ROOT_INPUT_DATA_DIR}/${dataDir}/modules.json`))

const moduleBlueprints = {}
Object.keys(modules).forEach(module => {
Object.keys(modules[module].blueprints).forEach(blueprintName => {
moduleBlueprints[blueprintName] = modules[module].blueprints[blueprintName]
})
})

const output = []
Object.keys(blueprints).forEach(blueprintSymbol => {
const blueprint = blueprints[blueprintSymbol]
blueprint.symbol = blueprintSymbol
blueprint.engineers = {}

Object.keys(blueprint.grades).forEach(grade => {
const features = {}

// Get all engineers who can make this grade
moduleBlueprints?.[blueprintSymbol]?.grades[grade]?.engineers.forEach(engineer => {
if (!blueprint.engineers[engineer]) {
blueprint.engineers[engineer] = { grades: [] }
}
blueprint.engineers[engineer].grades.push(grade)
})

Object.entries(blueprint.grades[grade].features).forEach(([k, v]) => {
features[getEngineeringPropertyName(k)] = {
value: v,
type: modifications[k].type,
method: modifications[k].method,
improvement: v[1] > 0 && modifications[k].higherbetter
improvement: ((Math.max(...v) > 0 && modifications[k].higherbetter === true) || (Math.min(...v) < 0 && modifications[k].higherbetter === false))
}
})

blueprint.grades[grade].features = features
})

Expand Down
Loading

0 comments on commit 7953c51

Please sign in to comment.