def _resolveLoadCtx(self, ctx = None): rootCD = ctx['rootCD'] if ctx is not None and 'rootCD' in ctx else None if rootCD is None: if g_currentVehicle.isPresent(): self._data.setRootCD(g_currentVehicle.item.intCD) else: self._data.setRootCD(rootCD) SelectedNation.select(self._data.getNationID())
def getNationTreeData(self, nationName): if nationName not in nations.INDICES: LOG_ERROR('Nation not found', nationName) return {} nationIdx = nations.INDICES[nationName] SelectedNation.select(nationIdx) self._data.load(nationIdx) return self._data.dump()
def _resolveLoadCtx(self, ctx=None): nation = ctx['nation'] if ctx is not None and 'nation' in ctx else None if nation is not None and nation in nations.INDICES: nationIdx = nations.INDICES[nation] SelectedNation.select(nationIdx) else: SelectedNation.byDefault() return
def _resolveLoadCtx(self, ctx = None): nation = ctx['nation'] if ctx is not None and 'nation' in ctx else None if nation is not None and nation in nations.INDICES: nationIdx = nations.INDICES[nation] SelectedNation.select(nationIdx) else: SelectedNation.byDefault() return
def _resolveLoadCtx(self, ctx=None): rootCD = ctx['rootCD'] if ctx is not None and 'rootCD' in ctx else None if rootCD is None: if g_currentVehicle.isPresent(): self._data.setRootCD(g_currentVehicle.item.intCD) else: self._data.setRootCD(rootCD) SelectedNation.select(self._data.getNationID()) return