def load(self, node): NamedObject.load(self, node) val = self.values.get('PossibleResources') if val: self.UnitsPerLiter = dict((r[0], float(r[1])) for r in (res.strip().split() for res in val.value.split(';')) if len(r) > 1)
def load(self, node): NamedObject.load(self, node) val = self.values.get('PossibleResources') if val: self.UnitsPerLiter = {r[0]: float(r[1]) for r in (res.strip().split() for res in val.value.split(';')) if len(r) > 1}
def __init__(self, name=None): NamedObject.__init__(self) if name: self.name = name
def __init__(self): NamedObject.__init__(self) self.UnitsPerLiter = dict()
def __init__(self): NamedObject.__init__(self) self.name = 'ModuleSwitchableTank'
def __init__(self): NamedObject.__init__(self) self.name = 'ModuleTankManager'