Keep subsystem module in the same position when swapping them out (see #932)

This commit is contained in:
blitzman
2017-01-04 23:17:56 -05:00
parent d6b1e4465e
commit 43f1ac78a6

View File

@@ -172,10 +172,11 @@ class HandledModuleList(HandledList):
self[index] = mod
def freeSlot(self, slot):
for i in range(len(self) - 1, -1, -1):
for i in range(len(self)):
mod = self[i]
if mod.getModifiedItemAttr("subSystemSlot") == slot:
del self[i]
self.toDummy(i)
break
class HandledDroneCargoList(HandledList):