Fix undoing of drone removal

This commit is contained in:
DarkPhoenix
2019-04-10 23:01:43 +03:00
parent 69ada4f3ad
commit 50e4e6fdcf
4 changed files with 53 additions and 23 deletions

View File

@@ -195,6 +195,7 @@ class HandledModuleList(HandledList):
class HandledDroneCargoList(HandledList):
def find(self, item):
for o in self:
if o.item == item:
@@ -210,6 +211,12 @@ class HandledDroneCargoList(HandledList):
if thing.isInvalid:
self.remove(thing)
def insert(self, idx, thing):
HandledList.insert(self, idx, thing)
if thing.isInvalid:
self.remove(thing)
class HandledImplantList(HandledList):