本文整理汇总了Python中shared_utils.makeTupleByDict函数的典型用法代码示例。如果您正苦于以下问题:Python makeTupleByDict函数的具体用法?Python makeTupleByDict怎么用?Python makeTupleByDict使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeTupleByDict函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, serverSettings):
self.onServerSettingsChange = Event()
self.__serverSettings = serverSettings if serverSettings else {}
if 'roaming' in self.__serverSettings:
roamingSettings = self.__serverSettings['roaming']
self.__roamingSettings = RoamingSettings(roamingSettings[0], roamingSettings[1], [ _ServerInfo(*s) for s in roamingSettings[2] ])
else:
self.__roamingSettings = RoamingSettings.defaults()
if 'file_server' in self.__serverSettings:
self.__fileServerSettings = _FileServerSettings(self.__serverSettings['file_server'])
else:
self.__fileServerSettings = _FileServerSettings.defaults()
if 'regional_settings' in self.__serverSettings:
self.__regionalSettings = makeTupleByDict(_RegionalSettings, self.__serverSettings['regional_settings'])
else:
self.__regionalSettings = _RegionalSettings.defaults()
try:
self.__eSportCurrentSeason = makeTupleByDict(_ESportCurrentSeason, self.__serverSettings)
except TypeError:
self.__eSportCurrentSeason = _ESportCurrentSeason.defaults()
if 'clanProfile' in self.__serverSettings:
self.__updateClanProfile(self.__serverSettings)
else:
self.__clanProfile = _ClanProfile.defaults()
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:25,代码来源:serversettings.py
示例2: __init__
def __init__(self, results, dp):
super(ClubResults, self).__init__(results, dp)
personal = results['personal'].values()[0]
self._ownClub = makeTupleByDict(_ClubInfo, personal['club'])
self._enemyClub = makeTupleByDict(_ClubInfo, personal['enemyClub'])
self.__teamInfoCBs = {}
for clubDbID in (self._ownClub.clubDBID, self._enemyClub.clubDBID):
self.startClubListening(clubDbID)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:8,代码来源:club.py
示例3: updateState
def updateState(self):
params = {}
if self.__gasAttackMgr.state == GasAttackState.PREPARE:
params['state'] = GAS_ATTACK_STATE.PREPEARING
params['prevState'] = self.__state.state
params['center'] = self.__gasAttackMgr.settings.position
params['timeLeft'] = self.__getTimeLeft()
elif self.__gasAttackMgr.state in (GasAttackState.ATTACK, GasAttackState.DONE):
centerDistance = self.__getCenterDistance()
currentRadius = self.__getCurrentRadius()
cloudDistance = self.__getCloudDistance(currentRadius)
safeZoneDistance = self.__getSafeZoneDistance()
if not BigWorld.player().isVehicleAlive:
state = GAS_ATTACK_STATE.DEAD
elif safeZoneDistance == 0:
state = GAS_ATTACK_STATE.INSIDE_SAFE_ZONE
elif cloudDistance == 0:
state = GAS_ATTACK_STATE.INSIDE_CLOUD
elif cloudDistance <= _WARNING_DISTANCE:
state = GAS_ATTACK_STATE.NEAR_CLOUD
else:
state = GAS_ATTACK_STATE.NEAR_SAFE
params['state'] = state
params['prevState'] = self.__state.state
params['center'] = self.__gasAttackMgr.settings.position
params['timeLeft'] = self.__getTimeLeft()
params['currentRadius'] = currentRadius
params['safeZoneRadius'] = self.__gasAttackMgr.settings.endRadius
params['centerDistance'] = centerDistance
params['safeZoneDistance'] = safeZoneDistance
params['gasCloudDistance'] = cloudDistance
self.__state = makeTupleByDict(_GasAttackState, params)
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:32,代码来源:gas_attack_controller.py
示例4: getDataObj
def getDataObj(self, incomeData):
incomeData = incomeData or []
result = {}
for data in incomeData:
result[data['account_id']] = makeTupleByDict(items.AccountClanRatingsData, data)
return result
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:7,代码来源:contexts.py
示例5: getExtra
def getExtra(self):
if self._extras is None:
return
elif self._prebattleTypeID in _EXTRA_BY_PRB_TYPE:
return makeTupleByDict(_EXTRA_BY_PRB_TYPE[self._prebattleTypeID], self._extras)
else:
return
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:7,代码来源:clientunit.py
示例6: getBuildings
def getBuildings(self):
result = []
for b in self.buildings:
try:
result.append(makeTupleByDict(self._Building, b))
except:
LOG_WARNING('There is error while collecting Buildings list', self.buildings)
return result
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:9,代码来源:items.py
示例7: getTankmenData
def getTankmenData(self):
result = []
if self._value is not None:
for tankmanData in self._value:
if type(tankmanData) is str:
result.append(self._makeTmanInfoByDescr(tankmen.TankmanDescr(compactDescr=tankmanData)))
else:
result.append(makeTupleByDict(self._TankmanInfoRecord, tankmanData))
return result
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:10,代码来源:bonuses.py
示例8: __init__
def __init__(self, serverSettings):
self.__serverSettings = serverSettings if serverSettings else {}
if "roaming" in self.__serverSettings:
roamingSettings = self.__serverSettings["roaming"]
self.__roamingSettings = RoamingSettings(
roamingSettings[0], roamingSettings[1], [_ServerInfo(*s) for s in roamingSettings[2]]
)
else:
self.__roamingSettings = RoamingSettings.defaults()
if "file_server" in self.__serverSettings:
self.__fileServerSettings = _FileServerSettings(self.__serverSettings["file_server"])
else:
self.__fileServerSettings = _FileServerSettings.defaults()
if "regional_settings" in self.__serverSettings:
self.__regionalSettings = makeTupleByDict(_RegionalSettings, self.__serverSettings["regional_settings"])
else:
self.__regionalSettings = _RegionalSettings.defaults()
try:
self.__eSportCurrentSeason = makeTupleByDict(_ESportCurrentSeason, self.__serverSettings)
except TypeError:
self.__eSportCurrentSeason = _ESportCurrentSeason.defaults()
开发者ID:webiumsk,项目名称:WOT0.9.10,代码行数:21,代码来源:serversettings.py
示例9: getFalloutConfig
def getFalloutConfig(self, queueType):
arenaBonusType = QUEUE_TYPE_TO_ARENA_BONUS_TYPE.get(queueType, ARENA_BONUS_TYPE.UNKNOWN)
return makeTupleByDict(FalloutConfig, self.__getFallout().get(arenaBonusType, {}))
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:3,代码来源:eventscache.py
示例10: getFalloutConfig
def getFalloutConfig(self, battleType):
return makeTupleByDict(FalloutConfig, self.__getFallout().get(battleType, {}))
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:2,代码来源:eventscache.py
示例11: __init__
def __init__(self, results, dp):
self._dp = weakref.proxy(dp)
self._common = makeTupleByDict(stats.CommonInfo, results['common'])
self._personal = makeTupleByDict(stats.PersonalInfo, results['personal'].values()[0])
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:4,代码来源:abstract.py
注:本文中的shared_utils.makeTupleByDict函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论