EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
988 stars 155 forks source link

Can't import to Coriolis #25

Closed AnthorNet closed 9 years ago

AnthorNet commented 9 years ago

Hi, I tried importing the JSON for Coriolis, but keep having some invalid data ^^

Here is my file:

    {
      "$schema": "http://cdn.coriolis.io/schemas/ship-loadout/2.json#", 
      "name": "Asp Explorer", 
      "ship": "Asp Explorer", 
      "components": {
        "standard": {
          "bulkheads": "Lightweight Alloy", 
          "cargoHatch": {
            "enabled": true, 
            "priority": 2
          }, 
          "powerPlant": null, 
          "thrusters": {
            "class": "5", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2
          }, 
          "frameShiftDrive": {
            "class": "5", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2
          }, 
          "lifeSupport": {
            "class": "4", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2
          }, 
          "powerDistributor": {
            "class": "4", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2
          }, 
          "sensors": {
            "class": "5", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2
          }, 
          "fuelTank": {
            "class": "5", 
            "rating": "C", 
            "enabled": true, 
            "priority": 2
          }
        }, 
        "hardpoints": [
          null, 
          null, 
          {
            "class": "1", 
            "rating": "F", 
            "enabled": true, 
            "priority": 2, 
            "group": "Pulse Laser", 
            "mount": "Fixed"
          }, 
          {
            "class": "1", 
            "rating": "F", 
            "enabled": true, 
            "priority": 2, 
            "group": "Pulse Laser", 
            "mount": "Fixed"
          }, 
          {
            "class": "1", 
            "rating": "E", 
            "enabled": true, 
            "priority": 1, 
            "group": "Beam Laser", 
            "mount": "Fixed"
          }, 
          {
            "class": "1", 
            "rating": "E", 
            "enabled": true, 
            "priority": 1, 
            "group": "Beam Laser", 
            "mount": "Fixed"
          }
        ], 
        "utility": [
          null, 
          null, 
          null, 
          null
        ], 
        "internal": [
          {
            "class": "5", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2, 
            "group": "Cargo Rack"
          }, 
          {
            "class": "5", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2, 
            "group": "Shield Generator"
          }, 
          {
            "class": "2", 
            "rating": "E", 
            "enabled": true, 
            "priority": 2, 
            "group": "Cargo Rack"
          }, 
          {
            "class": "3", 
            "rating": "B", 
            "enabled": true, 
            "priority": 1, 
            "group": "Fuel Scoop"
          }, 
          null, 
          {
            "class": "1", 
            "rating": "D", 
            "enabled": true, 
            "priority": 2, 
            "group": "Scanner", 
            "name": "Intermediate Discovery Scanner"
          }, 
          {
            "class": "1", 
            "rating": "C", 
            "enabled": true, 
            "priority": 2, 
            "group": "Scanner", 
            "name": "Detailed Surface Scanner"
          }
        ]
      }
    }
cmmcleod commented 9 years ago

Power Plant cannot be null:

"standard": {
          "bulkheads": "Lightweight Alloy", 
          "cargoHatch": {
            "enabled": true, 
            "priority": 2
          }, 
          "powerPlant": null, 
....
Marginal commented 9 years ago

@AnthorNet Please run from source and send me the .json file that is produced when you "Update".

AnthorNet commented 9 years ago

The API Json?

Marginal commented 9 years ago

Yes please

AnthorNet commented 9 years ago

Loadout: 128064048: Unknown module "PowerPlant"

Here the concerned part:

    "PowerPlant": {
        "module": {
          "free": false, 
          "health": 1000000, 
          "id": 128064048, 
          "name": "Int_PowerPlant_Size5_Class1", 
          "on": true, 
          "priority": 1, 
          "unloaned": 63012, 
          "value": 63012
        }
      }, 
Marginal commented 9 years ago

Thanks. I get "Powerplant" not "PowerPlant" - looks like I'll have to make the lookup case insensitive.