Break out countermeasures to allow for individual modifications

This commit is contained in:
Cmdr McDonald
2016-11-02 12:20:35 +00:00
parent 2d307a5c8a
commit c36ffb9a83
10 changed files with 351 additions and 285 deletions

179
dist/index.js vendored
View File

@@ -7653,84 +7653,6 @@ module.exports = {
rating: "A",
time: 10
} ],
cm: [ {
ammo: 10,
class: 0,
clip: 1,
cost: 8500,
duration: 20,
edID: 128049513,
eddbID: 884,
eps: 4,
grp: "cm",
hps: 4,
id: "00",
integrity: 20,
mass: 1.3,
name: "Chaff Launcher",
passive: 1,
power: .2,
rating: "I",
reload: 10,
rof: 1
}, {
activepower: 4,
chargeup: 4,
class: 0,
cooldown: 10,
cost: 12500,
edID: 128049516,
eddbID: 885,
grp: "cm",
id: "01",
integrity: 20,
mass: 1.3,
name: "Electronic Countermeasure",
power: .2,
range: 3e3,
rating: "F"
}, {
ammo: 2,
class: 0,
clip: 1,
cost: 3500,
duration: 10,
edID: 128049519,
eddbID: 886,
eps: .4,
grp: "cm",
id: "02",
integrity: 20,
mass: 1.3,
name: "Heat Sink Launcher",
passive: 1,
power: .2,
rating: "I",
reload: 10,
rof: .2
}, {
ammo: 1e4,
burst: 4,
burstrof: 15,
class: 0,
clip: 50,
cost: 18550,
edID: 128049522,
eddbID: 887,
grp: "cm",
id: "03",
integrity: 20,
jitter: 1.5,
mass: .5,
name: "Point Defence",
passive: 1,
power: .2,
rating: "I",
reload: 0,
rof: 10,
speed: 1e3,
type: "K"
} ],
ws: [ {
class: 0,
cost: 13540,
@@ -7928,6 +7850,93 @@ module.exports = {
power: 1.2,
rating: "A",
shieldmul: .2
} ],
ch: [ {
ammo: 10,
class: 0,
clip: 1,
cost: 8500,
distdraw: 4,
duration: 20,
edID: 128049513,
eddbID: 884,
grp: "ch",
id: "00",
integrity: 20,
mass: 1.3,
name: "Chaff Launcher",
passive: 1,
power: .2,
rating: "I",
reload: 10,
thermload: 4,
rof: 1
} ],
ec: [ {
activepower: 4,
chargeup: 3,
class: 0,
cooldown: 10,
cost: 12500,
edID: 128049516,
eddbID: 885,
grp: "ec",
id: "01",
integrity: 20,
mass: 1.3,
name: "Electronic Countermeasure",
power: .2,
range: 3e3,
reload: 10,
rating: "F",
thermload: 4
} ],
hs: [ {
ammo: 2,
class: 0,
clip: 1,
cost: 3500,
distdraw: 2,
drain: 100,
duration: 10,
edID: 128049519,
eddbID: 886,
eps: .4,
grp: "hs",
id: "02",
integrity: 20,
mass: 1.3,
name: "Heat Sink Launcher",
passive: 1,
power: .2,
rating: "I",
reload: 10,
rof: .2
} ],
po: [ {
ammo: 1e4,
burst: 4,
burstrof: 15,
class: 0,
clip: 50,
cost: 18550,
edID: 128049522,
eddbID: 887,
grp: "cm",
id: "03",
integrity: 30,
jitter: 1.5,
mass: .5,
name: "Point Defence",
passive: 1,
power: .2,
range: 2500,
rating: "I",
reload: 0,
rof: 10,
speed: 1e3,
thermload: .1,
type: "K"
} ]
},
internal: {
@@ -12520,39 +12529,33 @@ module.exports = {
bsg: [ "boot", "brokenregen", "explres", "integrity", "kinres", "mass", "optmass", "optmul", "power", "regen", "thermload", "thermres" ],
c: [ "ammo", "armourpen", "clip", "damage", "distdraw", "integrity", "jitter", "mass", "power", "range", "reload", "rof", "thermload" ],
cc: [ "integrity", "mass", "power" ],
cr: [],
ch: [ "ammo", "integrity", "mass", "power", "reload" ],
cs: [ "boot", "integrity", "mass", "power" ],
dc: [],
ec: [ "integrity", "mass", "power" ],
fc: [ "ammo", "armourpen", "burst", "clip", "damage", "distdraw", "integrity", "jitter", "mass", "power", "range", "reload", "rof", "thermload" ],
fh: [],
fi: [ "boot", "facinglimit", "integrity", "mass", "power", "ranget" ],
fs: [ "integrity", "power" ],
fsd: [ "boot", "integrity", "mass", "maxfuel", "optmass", "power", "thermload" ],
ft: [],
fx: [ "integrity", "mass", "power" ],
hb: [ "integrity", "mass", "power" ],
hr: [ "armour", "explres", "hullboost", "kinres", "mass", "thermres" ],
hs: [ "ammo", "integrity", "mass", "power", "reload" ],
kw: [ "boot", "integrity", "mass", "power" ],
ls: [ "boot", "integrity", "mass", "power" ],
mc: [ "ammo", "armourpen", "clip", "damage", "distdraw", "integrity", "jitter", "mass", "power", "range", "reload", "rof", "thermload" ],
ml: [],
mr: [ "ammo", "armourpen", "clip", "damage", "distdraw", "integrity", "jitter", "mass", "power", "reload", "rof", "thermload" ],
nl: [ "ammo", "armourpen", "boot", "clip", "damage", "integrity", "jitter", "mass", "power", "reload", "rof", "thermload" ],
pa: [ "ammo", "armourpen", "clip", "damage", "distdraw", "integrity", "jitter", "mass", "power", "range", "reload", "rof", "thermload" ],
pc: [ "integrity", "mass", "power" ],
pci: [],
pcm: [],
pcq: [],
pd: [ "boot", "engcap", "engrate", "integrity", "mass", "power", "syscap", "sysrate", "wepcap", "weprate" ],
pl: [ "armourpen", "damage", "distdraw", "integrity", "jitter", "mass", "power", "range", "rof", "thermload" ],
po: [ "ammo", "integrity", "mass", "power", "reload" ],
pp: [ "eff", "integrity", "mass", "pGen" ],
psg: [ "boot", "brokenregen", "explres", "integrity", "kinres", "mass", "optmass", "optmul", "power", "regen", "thermload", "thermres" ],
pv: [],
rf: [ "integrity", "power" ],
rg: [ "ammo", "armourpen", "clip", "damage", "distdraw", "integrity", "jitter", "mass", "power", "range", "reload", "rof", "thermload" ],
s: [ "boot", "integrity", "mass", "power" ],
sb: [ "explres", "integrity", "kinres", "mass", "power", "shieldmul", "thermres" ],
sc: [],
scb: [ "boot", "duration", "integrity", "power", "shield", "spinup", "thermload" ],
sg: [ "boot", "brokenregen", "explres", "integrity", "kinres", "mass", "optmass", "optmul", "power", "regen", "thermload", "thermres" ],
t: [ "integrity", "mass", "optmass", "optmul", "power", "thermload" ],

214
dist/index.json vendored
View File

@@ -9652,89 +9652,6 @@
"time": 10
}
],
"cm": [
{
"ammo": 10,
"class": 0,
"clip": 1,
"cost": 8500,
"duration": 20,
"edID": 128049513,
"eddbID": 884,
"eps": 4,
"grp": "cm",
"hps": 4,
"id": "00",
"integrity": 20,
"mass": 1.3,
"name": "Chaff Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"rof": 1
},
{
"activepower": 4,
"chargeup": 4,
"class": 0,
"cooldown": 10,
"cost": 12500,
"edID": 128049516,
"eddbID": 885,
"grp": "cm",
"id": "01",
"integrity": 20,
"mass": 1.3,
"name": "Electronic Countermeasure",
"power": 0.2,
"range": 3000,
"rating": "F"
},
{
"ammo": 2,
"class": 0,
"clip": 1,
"cost": 3500,
"duration": 10,
"edID": 128049519,
"eddbID": 886,
"eps": 0.4,
"grp": "cm",
"id": "02",
"integrity": 20,
"mass": 1.3,
"name": "Heat Sink Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"rof": 0.2
},
{
"ammo": 10000,
"burst": 4,
"burstrof": 15,
"class": 0,
"clip": 50,
"cost": 18550,
"edID": 128049522,
"eddbID": 887,
"grp": "cm",
"id": "03",
"integrity": 20,
"jitter": 1.5,
"mass": 0.5,
"name": "Point Defence",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 0,
"rof": 10,
"speed": 1000,
"type": "K"
}
],
"ws": [
{
"class": 0,
@@ -9950,6 +9867,101 @@
"rating": "A",
"shieldmul": 0.2
}
],
"ch": [
{
"ammo": 10,
"class": 0,
"clip": 1,
"cost": 8500,
"distdraw": 4,
"duration": 20,
"edID": 128049513,
"eddbID": 884,
"grp": "ch",
"id": "00",
"integrity": 20,
"mass": 1.3,
"name": "Chaff Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"thermload": 4,
"rof": 1
}
],
"ec": [
{
"activepower": 4,
"chargeup": 3,
"class": 0,
"cooldown": 10,
"cost": 12500,
"edID": 128049516,
"eddbID": 885,
"grp": "ec",
"id": "01",
"integrity": 20,
"mass": 1.3,
"name": "Electronic Countermeasure",
"power": 0.2,
"range": 3000,
"reload": 10,
"rating": "F",
"thermload": 4
}
],
"hs": [
{
"ammo": 2,
"class": 0,
"clip": 1,
"cost": 3500,
"distdraw": 2,
"drain": 100,
"duration": 10,
"edID": 128049519,
"eddbID": 886,
"eps": 0.4,
"grp": "hs",
"id": "02",
"integrity": 20,
"mass": 1.3,
"name": "Heat Sink Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"rof": 0.2
}
],
"po": [
{
"ammo": 10000,
"burst": 4,
"burstrof": 15,
"class": 0,
"clip": 50,
"cost": 18550,
"edID": 128049522,
"eddbID": 887,
"grp": "cm",
"id": "03",
"integrity": 30,
"jitter": 1.5,
"mass": 0.5,
"name": "Point Defence",
"passive": 1,
"power": 0.2,
"range": 2500,
"rating": "I",
"reload": 0,
"rof": 10,
"speed": 1000,
"thermload": 0.1,
"type": "K"
}
]
},
"internal": {
@@ -14986,14 +14998,24 @@
"mass",
"power"
],
"cr": [],
"ch": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"cs": [
"boot",
"integrity",
"mass",
"power"
],
"dc": [],
"ec": [
"integrity",
"mass",
"power"
],
"fc": [
"ammo",
"armourpen",
@@ -15010,7 +15032,6 @@
"rof",
"thermload"
],
"fh": [],
"fi": [
"boot",
"facinglimit",
@@ -15032,7 +15053,6 @@
"power",
"thermload"
],
"ft": [],
"fx": [
"integrity",
"mass",
@@ -15051,6 +15071,13 @@
"mass",
"thermres"
],
"hs": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"kw": [
"boot",
"integrity",
@@ -15078,7 +15105,6 @@
"rof",
"thermload"
],
"ml": [],
"mr": [
"ammo",
"armourpen",
@@ -15127,9 +15153,6 @@
"mass",
"power"
],
"pci": [],
"pcm": [],
"pcq": [],
"pd": [
"boot",
"engcap",
@@ -15154,6 +15177,13 @@
"rof",
"thermload"
],
"po": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"pp": [
"eff",
"integrity",
@@ -15174,7 +15204,6 @@
"thermload",
"thermres"
],
"pv": [],
"rf": [
"integrity",
"power"
@@ -15209,7 +15238,6 @@
"shieldmul",
"thermres"
],
"sc": [],
"scb": [
"boot",
"duration",

View File

@@ -54,14 +54,24 @@
"mass",
"power"
],
"cr": [],
"ch": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"cs": [
"boot",
"integrity",
"mass",
"power"
],
"dc": [],
"ec": [
"integrity",
"mass",
"power"
],
"fc": [
"ammo",
"armourpen",
@@ -78,7 +88,6 @@
"rof",
"thermload"
],
"fh": [],
"fi": [
"boot",
"facinglimit",
@@ -100,7 +109,6 @@
"power",
"thermload"
],
"ft": [],
"fx": [
"integrity",
"mass",
@@ -119,6 +127,13 @@
"mass",
"thermres"
],
"hs": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"kw": [
"boot",
"integrity",
@@ -146,7 +161,6 @@
"rof",
"thermload"
],
"ml": [],
"mr": [
"ammo",
"armourpen",
@@ -195,9 +209,6 @@
"mass",
"power"
],
"pci": [],
"pcm": [],
"pcq": [],
"pd": [
"boot",
"engcap",
@@ -222,6 +233,13 @@
"rof",
"thermload"
],
"po": [
"ammo",
"integrity",
"mass",
"power",
"reload"
],
"pp": [
"eff",
"integrity",
@@ -242,7 +260,6 @@
"thermload",
"thermres"
],
"pv": [],
"rf": [
"integrity",
"power"
@@ -277,7 +294,6 @@
"shieldmul",
"thermres"
],
"sc": [],
"scb": [
"boot",
"duration",

View File

@@ -0,0 +1,25 @@
{
"ch": [
{
"ammo": 10,
"class": 0,
"clip": 1,
"cost": 8500,
"distdraw": 4,
"duration": 20,
"edID": 128049513,
"eddbID": 884,
"grp": "ch",
"id": "00",
"integrity": 20,
"mass": 1.3,
"name": "Chaff Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"thermload": 4,
"rof": 1
}
]
}

View File

@@ -1,85 +0,0 @@
{
"cm": [
{
"ammo": 10,
"class": 0,
"clip": 1,
"cost": 8500,
"duration": 20,
"edID": 128049513,
"eddbID": 884,
"eps": 4,
"grp": "cm",
"hps": 4,
"id": "00",
"integrity": 20,
"mass": 1.3,
"name": "Chaff Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"rof": 1
},
{
"activepower": 4,
"chargeup": 4,
"class": 0,
"cooldown": 10,
"cost": 12500,
"edID": 128049516,
"eddbID": 885,
"grp": "cm",
"id": "01",
"integrity": 20,
"mass": 1.3,
"name": "Electronic Countermeasure",
"power": 0.2,
"range": 3000,
"rating": "F"
},
{
"ammo": 2,
"class": 0,
"clip": 1,
"cost": 3500,
"duration": 10,
"edID": 128049519,
"eddbID": 886,
"eps": 0.4,
"grp": "cm",
"id": "02",
"integrity": 20,
"mass": 1.3,
"name": "Heat Sink Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"rof": 0.2
},
{
"ammo": 10000,
"burst": 4,
"burstrof": 15,
"class": 0,
"clip": 50,
"cost": 18550,
"edID": 128049522,
"eddbID": 887,
"grp": "cm",
"id": "03",
"integrity": 20,
"jitter": 1.5,
"mass": 0.5,
"name": "Point Defence",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 0,
"rof": 10,
"speed": 1000,
"type": "K"
}
]
}

View File

@@ -0,0 +1,23 @@
{
"ec": [
{
"activepower": 4,
"chargeup": 3,
"class": 0,
"cooldown": 10,
"cost": 12500,
"edID": 128049516,
"eddbID": 885,
"grp": "ec",
"id": "01",
"integrity": 20,
"mass": 1.3,
"name": "Electronic Countermeasure",
"power": 0.2,
"range": 3000,
"reload": 10,
"rating": "F",
"thermload": 4
}
]
}

View File

@@ -0,0 +1,26 @@
{
"hs": [
{
"ammo": 2,
"class": 0,
"clip": 1,
"cost": 3500,
"distdraw": 2,
"drain": 100,
"duration": 10,
"edID": 128049519,
"eddbID": 886,
"eps": 0.4,
"grp": "hs",
"id": "02",
"integrity": 20,
"mass": 1.3,
"name": "Heat Sink Launcher",
"passive": 1,
"power": 0.2,
"rating": "I",
"reload": 10,
"rof": 0.2
}
]
}

View File

@@ -0,0 +1,29 @@
{
"po": [
{
"ammo": 10000,
"burst": 4,
"burstrof": 15,
"class": 0,
"clip": 50,
"cost": 18550,
"edID": 128049522,
"eddbID": 887,
"grp": "cm",
"id": "03",
"integrity": 30,
"jitter": 1.5,
"mass": 0.5,
"name": "Point Defence",
"passive": 1,
"power": 0.2,
"range": 2500,
"rating": "I",
"reload": 0,
"rof": 10,
"speed": 1000,
"thermload": 0.1,
"type": "K"
}
]
}

View File

@@ -23,10 +23,13 @@ module.exports = {
nl: require('./hardpoints/mine_launcher').nl,
ml: require('./hardpoints/mining_laser').ml,
cs: require('./hardpoints/cargo_scanner').cs,
cm: require('./hardpoints/countermeasures').cm,
ws: require('./hardpoints/frame_shift_wake_scanner').ws,
kw: require('./hardpoints/kill_warrant_scanner').kw,
sb: require('./hardpoints/shield_booster').sb
sb: require('./hardpoints/shield_booster').sb,
ch: require('./hardpoints/chaff_launcher').ch,
ec: require('./hardpoints/electronic_countermeasure').ec,
hs: require('./hardpoints/heat_sink_launcher').hs,
po: require('./hardpoints/point_defence').po
},
internal: {
am: require('./internal/auto_field_maintenance_unit').am,

View File

@@ -56,10 +56,9 @@ describe('JSON Data', function() {
it('has valid hardpoints', function() {
var ids = {};
var groups = Modules.hardpoints;
for (var g in groups) {
var group = groups[g];
for (var g in Modules.hardpoints) {
var group = Modules.hardpoints[g];
for (var i = 0; i < group.length; i++) {
var id = group[i].id;
expect(ids[id]).toBeFalsy('ID already exists: ' + id);
@@ -85,7 +84,7 @@ describe('JSON Data', function() {
expect(group[i].eps).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing eps`);
expect(group[i].hps).toBeDefined(`Hardpoint ${group[i].grp}:${id} ${group[i].name ? group[i].name : ''} is missing hps`);
}
if (group[i].ammo || group[i].reload || group[i].clip) {
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`);
@@ -97,10 +96,9 @@ describe('JSON Data', function() {
it('has valid internal modules', function() {
var ids = {};
var groups = Modules.internal;
for (var g in groups) {
var group = groups[g];
for (var g in Modules.internal) {
var group = Modules.internal[g];
for (var i = 0; i < group.length; i++) {
var id = group[i].id;
expect(group[i].grp).toBeDefined(`No group defined, ID: ${id}`);