From 14b92b2b10974b24747996e2580c5e5a7d214f8f Mon Sep 17 00:00:00 2001 From: Felix Linker Date: Sat, 27 Apr 2019 15:15:16 +0200 Subject: [PATCH 1/3] Fix medium gimballed beam laser powerdraw Closes https://github.com/EDCD/coriolis/issues/485 --- modules/hardpoints/beam_laser.json | 2 +- modules/mod.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 modules/mod.py diff --git a/modules/hardpoints/beam_laser.json b/modules/hardpoints/beam_laser.json index 8ef3c21..9c1e162 100644 --- a/modules/hardpoints/beam_laser.json +++ b/modules/hardpoints/beam_laser.json @@ -154,7 +154,7 @@ "mass": 4, "mount": "G", "piercing": 35, - "power": 0.99, + "power": 1, "range": 3000, "rating": "D", "thermload": 5.3, diff --git a/modules/mod.py b/modules/mod.py new file mode 100644 index 0000000..24bbe60 --- /dev/null +++ b/modules/mod.py @@ -0,0 +1,21 @@ +import json +import os + +def rof_to_fireint(module: dict): + rof = module.get('rof', None) + if rof is not None: + del module['rof'] + module['fireint'] = 1 / rof + return module + +if __name__ == "__main__": + for root, _, files in os.walk('./hardpoints'): + for f in files: + hardpoint_groups = None + path = os.path.join(root, f) + with open(path) as fp: + hardpoint_groups = json.load(fp) + + hardpoint_groups = { k: list(map(rof_to_fireint, v)) for k, v in hardpoint_groups.items() } + with open(path, 'w') as fp: + json.dump(hardpoint_groups, fp, indent=2) From ab78ed5fca4e5653e12e3f262a5a71d4f60fde72 Mon Sep 17 00:00:00 2001 From: Felix Linker Date: Sat, 27 Apr 2019 15:18:34 +0200 Subject: [PATCH 2/3] Fix medium subsufrace displacement missile power draw Closes https://github.com/EDCD/coriolis/issues/496 --- modules/hardpoints/sub_surface_displacement_missile.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hardpoints/sub_surface_displacement_missile.json b/modules/hardpoints/sub_surface_displacement_missile.json index aaf082f..645aac2 100644 --- a/modules/hardpoints/sub_surface_displacement_missile.json +++ b/modules/hardpoints/sub_surface_displacement_missile.json @@ -25,7 +25,7 @@ "mass": 4, "mount": "F", "piercing": 25, - "power": 0.93, + "power": 1.01, "range": 3000, "rating": "B", "rof": 0.5, From 132a7176e0264bde250f7f6379f42c9d527e8752 Mon Sep 17 00:00:00 2001 From: Felix Linker Date: Sat, 27 Apr 2019 15:19:26 +0200 Subject: [PATCH 3/3] Fix subsufrace displacement missiles fd symbols --- modules/hardpoints/sub_surface_displacement_missile.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hardpoints/sub_surface_displacement_missile.json b/modules/hardpoints/sub_surface_displacement_missile.json index 645aac2..e5611e2 100644 --- a/modules/hardpoints/sub_surface_displacement_missile.json +++ b/modules/hardpoints/sub_surface_displacement_missile.json @@ -30,7 +30,7 @@ "rating": "B", "rof": 0.5, "thermload": 2.9, - "symbol": "Hpt_Mining_SubSurfDispMisle_Turret_Medium" + "symbol": "Hpt_Mining_SubSurfDispMisle_Fixed_Medium" }, { "breachdmg": 0.5, @@ -94,7 +94,7 @@ "rating": "B", "rof": 0.5, "thermload": 2.2, - "symbol": "Hpt_Mining_SubSurfDispMisle_Turret_Small" + "symbol": "Hpt_Mining_SubSurfDispMisle_Fixed_Small" }, { "breachdmg": 0.5,