mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
Use cargo hatch info on import if available
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
* Ignore rounds per shot for EPS and HPS calculations; it's already factored in to the numbers
|
* Ignore rounds per shot for EPS and HPS calculations; it's already factored in to the numbers
|
||||||
* Ensure that clip size modification imports result in whole numbers
|
* Ensure that clip size modification imports result in whole numbers
|
||||||
* Rework of separate offence/defence/movement sections to a unified interface
|
* Rework of separate offence/defence/movement sections to a unified interface
|
||||||
|
* Use cargo hatch information on import if available
|
||||||
|
|
||||||
#2.2.19
|
#2.2.19
|
||||||
* Power management panel now displays modules in descending order of power usage by default
|
* Power management panel now displays modules in descending order of power usage by default
|
||||||
|
|||||||
@@ -130,9 +130,15 @@ export function shipFromJson(json) {
|
|||||||
let ship = new Ship(shipModel, shipTemplate.properties, shipTemplate.slots);
|
let ship = new Ship(shipModel, shipTemplate.properties, shipTemplate.slots);
|
||||||
ship.buildWith(null);
|
ship.buildWith(null);
|
||||||
|
|
||||||
// Set the cargo hatch. We don't have any information on it so guess it's priority 5 and disabled
|
// Set the cargo hatch
|
||||||
ship.cargoHatch.enabled = false;
|
if (json.modules.CargoHatch) {
|
||||||
ship.cargoHatch.priority = 4;
|
ship.cargoHatch.enabled = json.modules.CargoHatch.module.on == true;
|
||||||
|
ship.cargoHatch.priority = json.modules.CargoHatch.module.priority;
|
||||||
|
} else {
|
||||||
|
// We don't have any information on it so guess it's priority 5 and disabled
|
||||||
|
ship.cargoHatch.enabled = false;
|
||||||
|
ship.cargoHatch.priority = 4;
|
||||||
|
}
|
||||||
|
|
||||||
// Add the bulkheads
|
// Add the bulkheads
|
||||||
const armourJson = json.modules.Armour.module;
|
const armourJson = json.modules.Armour.module;
|
||||||
|
|||||||
Reference in New Issue
Block a user