ModuleScienceContainer: Treat container capacity of 0 as infinity, and accommodate containers which allow repeated subjects.
[AntennaRange.git] / ModuleLimitedDataTransmitter.cs
blob:a/ModuleLimitedDataTransmitter.cs -> blob:b/ModuleLimitedDataTransmitter.cs
--- a/ModuleLimitedDataTransmitter.cs
+++ b/ModuleLimitedDataTransmitter.cs
@@ -396,16 +396,19 @@
 			{
 				foreach (ModuleScienceContainer	scienceContainer in this.vessel.getModulesOfType<ModuleScienceContainer>())
 				{
-					if (scienceContainer.GetScienceCount() >= scienceContainer.capacity)
+					if (
+						scienceContainer.capacity != 0 &&
+						scienceContainer.GetScienceCount() >= scienceContainer.capacity
+					)
 					{
 						continue;
 					}
 
 					foreach (ScienceData data in dataQueue)
 					{
-						if (scienceContainer.HasData(data))
+						if (!scienceContainer.allowRepeatedSubjects && scienceContainer.HasData(data))
 						{
-							break;
+							continue;
 						}
 
 						if (scienceContainer.AddData(data))