Closed juk0de closed 4 months ago
Implements support for patchwork armor (see #4), by changing the armor and structure JSON layout and checking for nested keys.
armor
structure
Here is an example for the ZEU-X mech, that raises an exception during conversion without this PR:
ZEU-X
MTF:
Armor:Patchwork LA Armor:Reactive(Inner Sphere):26 RA Armor:Reactive(Inner Sphere):26 LT Armor:Standard(IS/Clan):26 RT Armor:Standard(IS/Clan):26 CT Armor:Standard(IS/Clan):38 HD Armor:Standard(IS/Clan):9 LL Armor:Reactive(Inner Sphere):34 RL Armor:Reactive(Inner Sphere):34 RTL Armor:8 RTR Armor:8 RTC Armor:12
JSON:
"armor": { "type": "Patchwork", "left_arm": { "pips": 26, "type": "Reactive(Inner Sphere)" }, "right_arm": { "pips": 26, "type": "Reactive(Inner Sphere)" }, "left_torso": { "front": { "pips": 26, "type": "Standard(IS/Clan)" }, "rear": { "pips": 8 } }, "right_torso": { "front": { "pips": 26, "type": "Standard(IS/Clan)" }, "rear": { "pips": 8 } }, "center_torso": { "front": { "pips": 38, "type": "Standard(IS/Clan)" }, "rear": { "pips": 12 } }, "head": { "pips": 9, "type": "Standard(IS/Clan)" }, "left_leg": { "pips": 34, "type": "Reactive(Inner Sphere)" }, "right_leg": { "pips": 34, "type": "Reactive(Inner Sphere)" } },
Implements support for patchwork armor (see #4), by changing the
armor
andstructure
JSON layout and checking for nested keys.Here is an example for the
ZEU-X
mech, that raises an exception during conversion without this PR:MTF:
JSON: