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 (!world.ShipDefinitions.TryGetValue(recipe.ShipOutputId, out var shipDefinition)
|
||||
|| !CanLaunchShipFromStation(station))
|
||||
if (!world.ShipDefinitions.TryGetValue(recipe.ShipOutputId, out var shipDefinition))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -387,8 +386,6 @@ public sealed partial class SimulationEngine
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
"recipeId": "frigate-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
@@ -84,10 +81,7 @@
|
||||
"recipeId": "destroyer-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
@@ -147,10 +141,7 @@
|
||||
"recipeId": "cruiser-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
@@ -216,10 +207,7 @@
|
||||
"recipeId": "carrier-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
@@ -284,10 +272,7 @@
|
||||
"recipeId": "hauler-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
@@ -348,10 +333,7 @@
|
||||
"recipeId": "constructor-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
@@ -417,10 +399,7 @@
|
||||
"recipeId": "miner-construction",
|
||||
"facilityCategory": "station",
|
||||
"requiredModules": [
|
||||
"ship-factory",
|
||||
"dock-bay-small",
|
||||
"container-bay",
|
||||
"power-core"
|
||||
"ship-factory"
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user