mirror of
https://github.com/EDCD/coriolis-data.git
synced 2025-12-08 23:23:23 +00:00
@@ -154,7 +154,7 @@
|
||||
"mass": 4,
|
||||
"mount": "G",
|
||||
"piercing": 35,
|
||||
"power": 0.99,
|
||||
"power": 1,
|
||||
"range": 3000,
|
||||
"rating": "D",
|
||||
"thermload": 5.3,
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
"mass": 4,
|
||||
"mount": "F",
|
||||
"piercing": 25,
|
||||
"power": 0.93,
|
||||
"power": 1.01,
|
||||
"range": 3000,
|
||||
"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,
|
||||
|
||||
21
modules/mod.py
Normal file
21
modules/mod.py
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user