feat: simplify ship construction
This commit is contained in:
@@ -229,8 +229,7 @@ public sealed partial class SimulationEngine
|
|||||||
{
|
{
|
||||||
if (recipe.ShipOutputId is not null)
|
if (recipe.ShipOutputId is not null)
|
||||||
{
|
{
|
||||||
if (!world.ShipDefinitions.TryGetValue(recipe.ShipOutputId, out var shipDefinition)
|
if (!world.ShipDefinitions.TryGetValue(recipe.ShipOutputId, out var shipDefinition))
|
||||||
|| !CanLaunchShipFromStation(station))
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -387,8 +386,6 @@ public sealed partial class SimulationEngine
|
|||||||
return 1f;
|
return 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool CanLaunchShipFromStation(StationRuntime station) =>
|
|
||||||
HasStationModules(station, "power-core", "ship-factory", "container-bay", "dock-bay-small");
|
|
||||||
|
|
||||||
private static bool FactionNeedsMoreWarships(SimulationWorld world, string factionId)
|
private static bool FactionNeedsMoreWarships(SimulationWorld world, string factionId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,10 +21,7 @@
|
|||||||
"recipeId": "frigate-construction",
|
"recipeId": "frigate-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
@@ -84,10 +81,7 @@
|
|||||||
"recipeId": "destroyer-construction",
|
"recipeId": "destroyer-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
@@ -147,10 +141,7 @@
|
|||||||
"recipeId": "cruiser-construction",
|
"recipeId": "cruiser-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
@@ -216,10 +207,7 @@
|
|||||||
"recipeId": "carrier-construction",
|
"recipeId": "carrier-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
@@ -284,10 +272,7 @@
|
|||||||
"recipeId": "hauler-construction",
|
"recipeId": "hauler-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
@@ -348,10 +333,7 @@
|
|||||||
"recipeId": "constructor-construction",
|
"recipeId": "constructor-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
@@ -417,10 +399,7 @@
|
|||||||
"recipeId": "miner-construction",
|
"recipeId": "miner-construction",
|
||||||
"facilityCategory": "station",
|
"facilityCategory": "station",
|
||||||
"requiredModules": [
|
"requiredModules": [
|
||||||
"ship-factory",
|
"ship-factory"
|
||||||
"dock-bay-small",
|
|
||||||
"container-bay",
|
|
||||||
"power-core"
|
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user