Reverts commit de87c9, and instead uses the mod variable to access the method needed.

Conflicts:
	service/fit.py
This commit is contained in:
blitzman
2017-02-10 00:29:25 -05:00
parent 1a9591d411
commit 134365c764
2 changed files with 13 additions and 13 deletions

View File

@@ -152,21 +152,23 @@ class HandledModuleList(HandledList):
for i in xrange(oldPos, len(self)):
self[i].position -= 1
def toDummy(self, index):
mod = self[index]
if not mod.isEmpty:
dummy = mod.buildEmpty(mod.slot)
dummy.position = index
self[index] = dummy
def toModule(self, index, mod):
mod.position = index
self[index] = mod
def toDummy(self, index, dummy):
mod = self[index]
if not mod.isEmpty:
dummy.position = index
self[index] = dummy
def freeSlot(self, slot, dummy):
def freeSlot(self, slot):
for i in range(len(self)):
mod = self[i]
if mod.getModifiedItemAttr("subSystemSlot") == slot:
self.toDummy(i, dummy)
self.toDummy(i)
break