Refactor how rack separation works
This commit is contained in:
@@ -122,6 +122,19 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
|
||||
return empty
|
||||
|
||||
@classmethod
|
||||
def buildDummy(cls, slot):
|
||||
empty = DummyModule(None)
|
||||
empty.__slot = slot
|
||||
empty.__hardpoint = Hardpoint.NONE
|
||||
empty.__item = 0
|
||||
empty.__charge = 0
|
||||
empty.dummySlot = slot
|
||||
empty.__itemModifiedAttributes = ModifiedAttributeDict()
|
||||
empty.__chargeModifiedAttributes = ModifiedAttributeDict()
|
||||
|
||||
return empty
|
||||
|
||||
@property
|
||||
def isEmpty(self):
|
||||
return self.dummySlot is not None
|
||||
@@ -622,3 +635,6 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut):
|
||||
copy.charge = self.charge
|
||||
copy.state = self.state
|
||||
return copy
|
||||
|
||||
class DummyModule(Module):
|
||||
pass
|
||||
@@ -23,7 +23,7 @@ from eos.saveddata.price import Price
|
||||
from eos.saveddata.user import User
|
||||
from eos.saveddata.damagePattern import DamagePattern
|
||||
from eos.saveddata.character import Character, Skill
|
||||
from eos.saveddata.module import Module, State, Slot, Hardpoint
|
||||
from eos.saveddata.module import Module, State, Slot, Hardpoint, DummyModule
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.implant import Implant
|
||||
from eos.saveddata.booster import SideEffect
|
||||
|
||||
Reference in New Issue
Block a user