massif-press / cc-lcp-editor

A tool for producing Lancer Content Packages for use with COMP/CON
9 stars 9 forks source link

Fields for numbers are translated into strings when exported to JSON/LCP #2

Closed Bluhman closed 3 years ago

Bluhman commented 3 years ago

Describe the bug When editing entries for weapons or systems part of licenses, certain fields that are meant to only accept numbers (i.e. License Level, Ranges) get translated into strings. This causes issues when imported into COMP/CON, and can cause various weapon or system entries to fail to appear if a license level is entered using the keyboard instead of when its increased or decreased with the Spin Button controls.

To Reproduce Steps to reproduce the behavior:

  1. Go to Manufacturers and Licenses and add a new System, Weapon, or Mod.
  2. While entering the information, click on the License Level field and type in a number.
  3. Export the weapons/system/mods.json component of the LCP & open it in a text editor
  4. See that the number entered is in quotes.

Expected behavior Fields such as this should always convert the value to numbers, even when typed in. Otherwise, license components can fail to appear in the appropriate sections when viewing them in the compendium or when choosing licenses in COMP/CON.

Screenshots image

An added example of "Range" not being parseable from a string causing the entire Mech Weapons compendium to fail to list: image

jarena3 commented 3 years ago

Wrote a fix for this one the C/C side. Will close this once that's tested and deployed.

jarena3 commented 3 years ago

Fixed in C/C