From 5a3b50c643d94e0d910988425b106afcaab477c1 Mon Sep 17 00:00:00 2001 From: Mhoram Kerbin Date: Sat, 27 Aug 2022 10:57:44 +0200 Subject: [PATCH] Fix check that tests for Physical parts during Depot-Connecting The check was missing a lookup for Terminals. --- Source/WOLF/WOLF/Messenger.cs | 2 +- Source/WOLF/WOLF/Modules/WOLF_ConverterModule.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/WOLF/WOLF/Messenger.cs b/Source/WOLF/WOLF/Messenger.cs index f0b10e8d0..4e53e46d8 100644 --- a/Source/WOLF/WOLF/Messenger.cs +++ b/Source/WOLF/WOLF/Messenger.cs @@ -5,7 +5,7 @@ namespace WOLF public static class Messenger { public static string INVALID_DEPOT_PART_ATTACHMENT_MESSAGE = "#autoLOC_USI_WOLF_INVALID_DEPOT_PART_ATTACHMENT_MESSAGE"; // "Depots must be detached from other WOLF parts before deployment."; - public static string INVALID_HOPPER_PART_ATTACHMENT_MESSAGE = "#autoLOC_USI_WOLF_INVALID_HOPPER_PART_ATTACHMENT_MESSAGE"; // "Hoppers must be detached from other WOLF parts before deployment."; + public static string INVALID_HOPPER_PART_ATTACHMENT_MESSAGE = "#autoLOC_USI_WOLF_INVALID_HOPPER_PART_ATTACHMENT_MESSAGE"; // "Physical WOLF-connected parts (like hoppers and terminals) must be detached from other WOLF parts (like depots and converters) before deployment."; public static string INVALID_SITUATION_MESSAGE = "#autoLOC_USI_WOLF_INVALID_SITUATION_MESSAGE"; // "Your vessel must be landed or orbiting in order to connect to a depot."; public static string INVALID_ORBIT_SITUATION_MESSAGE = "#autoLOC_USI_WOLF_INVALID_ORBIT_SITUATION_MESSAGE"; // "Your vessel must be in a low orbit with eccentricity below 0.1 to connect to a orbital depot."; public static string MISSING_DEPOT_MESSAGE = "#autoLOC_USI_WOLF_MISSING_DEPOT_MESSAGE"; // "You must establish a depot in this biome first!"; diff --git a/Source/WOLF/WOLF/Modules/WOLF_ConverterModule.cs b/Source/WOLF/WOLF/Modules/WOLF_ConverterModule.cs index 139fa156e..f34b2608c 100644 --- a/Source/WOLF/WOLF/Modules/WOLF_ConverterModule.cs +++ b/Source/WOLF/WOLF/Modules/WOLF_ConverterModule.cs @@ -36,7 +36,8 @@ protected string CanConnectToDepot() return Messenger.INVALID_DEPOT_PART_ATTACHMENT_MESSAGE; } var otherHopperModules = vessel.FindPartModulesImplementing(); - if (otherHopperModules.Any()) + var otherTerminalModules = vessel.FindPartModulesImplementing(); + if (otherHopperModules.Any() || otherTerminalModules.Any()) { return Messenger.INVALID_HOPPER_PART_ATTACHMENT_MESSAGE; }