示例#1
0
 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())
示例#2
0
 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()
示例#3
0
 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
示例#4
0
 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()
示例#5
0
 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
示例#6
0
 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