Merge branch 'feature/blueprints' into develop

This commit is contained in:
Cmdr McDonald
2017-01-22 17:15:54 +00:00
10 changed files with 13583 additions and 953 deletions

View File

@@ -2,9 +2,10 @@
* Fix incorrect base shield values for Cutter and Corvette
* Update weapons to have %-based damage distributions
* Remove power draw for detailed surface scanner - although shown in outfitting it is not part of active power
* Fix incorrect names for lightweight and kinetic armour
* Add engineering blueprints
#2.2.9
* Add falloff metric for weapons
* Add falloff metric for weapons
* Add falloff from range modification

2859
dist/index.js vendored

File diff suppressed because it is too large Load Diff

8418
dist/index.json vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,6 @@ module.exports = {
blueprints: require('./blueprints'),
modifications: require('./modifications'),
modifierActions: require('./modifierActions'),
specials: require('./specials'),
validity: require('./validity')
modules: require('./modules'),
specials: require('./specials')
};

View File

@@ -6,6 +6,7 @@
"burstrof": {"id": 41, "name": "burstrof", "type": "percentage", "method": "multiplicative"},
"clip": {"id": 4, "name": "clip", "type": "percentage", "method": "multiplicative"},
"damage": {"id": 5, "name": "damage", "type": "percentage", "method": "multiplicative"},
"damagedist": {"id": 40, "name": "damage", "type": "hidden", "method": "overwrite"},
"distdraw": {"id": 6, "name": "distdraw", "type": "percentage", "method": "multiplicative"},
"duration": {"id": 7, "name": "duration", "type": "percentage", "method": "multiplicative"},
"eff": {"id": 8, "name": "eff", "type": "percentage", "method": "multiplicative"},
@@ -40,6 +41,5 @@
"thermres": {"id": 36, "name": "thermres", "type": "percentage", "method": "additive"},
"wepcap": {"id": 37, "name": "wepcap", "type": "percentage", "method": "multiplicative"},
"weprate": {"id": 38, "name": "weprate", "type": "percentage", "method": "multiplicative"},
"shieldreinforcement": {"id": 39, "name": "shieldreinforcement", "type": "percentage", "method": "multiplicative"},
"type": {"id": 40, "name": "type", "type": "alphabetic", "method": "overwrite"}
"shieldreinforcement": {"id": 39, "name": "shieldreinforcement", "type": "percentage", "method": "multiplicative"}
}

View File

@@ -15,7 +15,7 @@
"Armour_Advanced": [1, 2, 3, 4, 5],
"Armour_Explosive": [1, 2, 3, 4, 5],
"Armour_HeavyDuty": [1, 2, 3, 4, 5],
"Armour_LightWeight": [1, 2, 3, 4, 5],
"Armour_Kinetic": [1, 2, 3, 4, 5],
"Armour_Thermic": [1, 2, 3, 4, 5]
},
"modifications": [
@@ -135,9 +135,9 @@
},
"cs": {
"blueprints": {
"ManifestScanner_LightWeight": [1, 2, 3, 4, 5],
"ManifestScanner_Reinforced": [1, 2, 3, 4, 5],
"ManifestScanner_Shielded": [1, 2, 3, 4, 5]
"CargoScanner_LightWeight": [1, 2, 3, 4, 5],
"CargoScanner_Reinforced": [1, 2, 3, 4, 5],
"CargoScanner_Shielded": [1, 2, 3, 4, 5]
},
"modifications": [
"boot",
@@ -217,7 +217,7 @@
},
"fs": {
"blueprints": {
"FuelScoop_Shielded": [1, 2, 3, 4, 5]
"FuelScoop_Shielded": [1, 2, 3, 4]
},
"modifications": [
"integrity",
@@ -273,9 +273,9 @@
"hr": {
"blueprints": {
"HullReinforcement_Advanced": [1, 2, 3, 4, 5],
"HullReinforcement_Explosive": [1, 2, 3, 4, 5],
"HullReinforcement_HeavyDuty": [1, 2, 3, 4, 5],
"HullReinforcement_Kinetic": [1, 2, 3, 4, 5],
"HullReinforcement_Lightweight": [1, 2, 3, 4, 5],
"HullReinforcement_Thermic": [1, 2, 3, 4, 5]
},
"modifications": [
@@ -595,6 +595,7 @@
},
"rf": {
"blueprints": {
"Refineries_Shielded": [1, 2, 3, 4]
},
"modifications": [
"integrity",

View File

@@ -1,380 +0,0 @@
{
"am": [
"integrity",
"power"
],
"bh": [
"explres",
"hullboost",
"kinres",
"mass",
"thermres"
],
"bl": [
"damage",
"damagedist",
"distdraw",
"fallofffromrange",
"integrity",
"mass",
"piercing",
"power",
"range",
"thermload"
],
"bsg": [
"boot",
"brokenregen",
"distdraw",
"explres",
"integrity",
"kinres",
"mass",
"optmass",
"optmul",
"power",
"regen",
"thermload",
"thermres"
],
"c": [
"ammo",
"clip",
"damage",
"damagedist",
"distdraw",
"fallofffromrange",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"reload",
"rof",
"thermload"
],
"cc": [
"integrity",
"mass",
"power"
],
"ch": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"cs": [
"boot",
"integrity",
"mass",
"power"
],
"ec": [
"integrity",
"mass",
"power"
],
"fc": [
"ammo",
"burst",
"burstrof",
"clip",
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"reload",
"rof",
"thermload"
],
"fi": [
"boot",
"facinglimit",
"integrity",
"mass",
"power",
"ranget"
],
"fs": [
"integrity",
"power"
],
"fsd": [
"boot",
"integrity",
"mass",
"maxfuel",
"optmass",
"power",
"thermload"
],
"fx": [
"integrity",
"mass",
"power"
],
"hb": [
"integrity",
"mass",
"power"
],
"hr": [
"hullreinforcement",
"explres",
"hullboost",
"kinres",
"mass",
"thermres"
],
"hs": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"kw": [
"boot",
"integrity",
"mass",
"power"
],
"ls": [
"boot",
"integrity",
"mass",
"power"
],
"mc": [
"ammo",
"clip",
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"reload",
"rof",
"thermload"
],
"mr": [
"ammo",
"clip",
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"reload",
"rof",
"thermload"
],
"nl": [
"ammo",
"boot",
"clip",
"damage",
"damagedist",
"fallofffromrange",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"reload",
"rof",
"thermload"
],
"pa": [
"ammo",
"clip",
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"reload",
"rof",
"thermload"
],
"pc": [
"integrity",
"mass",
"power"
],
"pd": [
"boot",
"engcap",
"engrate",
"integrity",
"mass",
"power",
"syscap",
"sysrate",
"wepcap",
"weprate"
],
"pl": [
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"rof",
"thermload"
],
"po": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"pp": [
"eff",
"integrity",
"mass",
"pgen"
],
"psg": [
"boot",
"brokenregen",
"distdraw",
"explres",
"integrity",
"kinres",
"mass",
"optmass",
"optmul",
"power",
"regen",
"thermload",
"thermres"
],
"rf": [
"integrity",
"power"
],
"rg": [
"ammo",
"clip",
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"reload",
"rof",
"thermload"
],
"sb": [
"explres",
"integrity",
"kinres",
"mass",
"power",
"shieldboost",
"thermres"
],
"scb": [
"boot",
"duration",
"integrity",
"power",
"shieldreinforcement",
"spinup",
"thermload"
],
"sg": [
"boot",
"brokenregen",
"distdraw",
"explres",
"integrity",
"kinres",
"mass",
"optmass",
"optmul",
"power",
"regen",
"thermload",
"thermres"
],
"t": [
"integrity",
"mass",
"optmass",
"optmul",
"power",
"thermload"
],
"tp": [
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"rof",
"thermload"
],
"ul": [
"burst",
"burstrof",
"damage",
"damagedist",
"fallofffromrange",
"distdraw",
"integrity",
"jitter",
"mass",
"piercing",
"power",
"range",
"rof",
"thermload"
],
"ws": [
"boot",
"integrity",
"mass",
"power"
]
}

View File

@@ -9,7 +9,7 @@
"homepage": "https://coriolis.edcd.io",
"bugs": "https://github.com/EDCD/coriolis/issues",
"private": true,
"engine": "node >= 0.12.2",
"engine": "node >= 4.0.0",
"license": "MIT",
"scripts": {
"lint": "eslint --plugin json --ext .json modules ships dist",
@@ -19,9 +19,9 @@
"start": "node generate_distribution.js"
},
"devDependencies": {
"eslint": "^1.10.3",
"eslint": "^2.2.0",
"eslint-plugin-json": "^1.1.0",
"jasmine-node": "^1.14.5",
"uglify-js": "^2.6.1"
"uglify-js": "^2.7.5"
}
}

View File

@@ -41,9 +41,9 @@ describe('JSON Data', function() {
expect(ids[id]).toBeFalsy('ID already exists: ' + id);
expect(group[i].edID > 0).toBeTruthy('Standard module ' + id + ' is missing E:D ID');
expect(group[i].eddbID > 0 || group[i].pp).toBeTruthy('Standard module ' + id + ' is missing EDDB ID');
if (s != 'ft' && s != 'pas' ) {
if (s != 'ft' && s != 'pas' ) {
expect(group[i].integrity).toBeDefined('Standard module ' + id + ' is missing integrity');
}
}
expect(group[i].grp).toBeDefined(`No group defined, Type: ${s}, ID: ${id}, Index: ${i}`);
expect(eddbIDs[group[i].eddbID]).toBeFalsy(`EDDB ID [${group[i].eddbID}] already exists for ID: ${id}, Index: ${i}`);
expect(edIDs[group[i].edID]).toBeFalsy(`E:D ID [${group[i].edID}] already exists for ID: ${id}, Index: ${i}`);
@@ -79,7 +79,7 @@ describe('JSON Data', function() {
if (group[i].edID) {
edIDs[group[i].edID] = true;
}
if (group[i].damage) {
if (group[i].damage) {
expect(group[i].damage).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing damage`);
expect(group[i].damagedist).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing damage distribution`);
if (group[i].grp != 'po') {
@@ -91,7 +91,7 @@ describe('JSON Data', function() {
expect(group[i].distdraw).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing distdraw`);
}
}
if ((group[i].ammo || group[i].reload || group[i].clip) && g != 'hs' && g != 'ec') {
if ((group[i].ammo || group[i].reload || group[i].clip) && g != 'hs' && g != 'ec') {
expect(group[i].ammo).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing ammo`);
expect(group[i].clip).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing clip`);
expect(group[i].reload).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing reload`);
@@ -174,6 +174,17 @@ describe('JSON Data', function() {
const blueprint = Modifications.blueprints[k];
expect(ids[blueprint.id]).toBeFalsy('ID already exists: ' + blueprint.id);
expect(blueprint.name).toBeDefined('Blueprint has no name, ID:' + blueprint.id);
for (var x in blueprint.features) {
var b = blueprint.features[x];
var bfs = {};
for (var bf in b) {
expect(bfs[bf]).toBeFalsy(`Blueprint feature [${bf}] already exists: ${blueprint.name}`);
expect(Modifications.modifications[bf]).toBeDefined(`Blueprint feature [${bf}] uknown: ${blueprint.name}`);
bfs[bf] = true;
}
}
ids[blueprint.id] = true;
}
});
@@ -189,6 +200,7 @@ describe('JSON Data', function() {
expect(modification.method).toBeDefined('Modification has no method, ID:' + modification.id);
ids[modification.id] = true;
}
});
it('has valid specials', function() {