Exemplo n.º 1
0
def seeScenePanel():
    '''
    当前场景信息面板
    '''
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '75')
    EraPrint.plt(titleText)
    timeText = GameTime.getDateText()
    EraPrint.p(timeText)
    EraPrint.p(' ')
    scenePath = CacheContorl.characterData['character'][0].Position
    scenePathStr = MapHandle.getMapSystemPathStrForList(scenePath)
    mapList = MapHandle.getMapHierarchyListForScenePath(scenePath, [])
    mapPathText = ''
    mapList.reverse()
    for nowMap in mapList:
        nowMapMapSystemStr = MapHandle.getMapSystemPathStrForList(nowMap)
        mapName = CacheContorl.mapData[nowMapMapSystemStr]['MapName']
        mapPathText += mapName + '-'
    sceneData = CacheContorl.sceneData[scenePathStr].copy()
    sceneName = mapPathText + sceneData['SceneName']
    sceneInfoHead = TextLoading.getTextData(TextLoading.stageWordPath, '76')
    sceneInfo = sceneInfoHead + sceneName
    EraPrint.p(sceneInfo)
    panelState = CacheContorl.panelState['SeeSceneCharacterListPage']
    switch = panelStateOnText
    if panelState == '0':
        switch = panelStateOffText
    sceneCharacterList = sceneData['SceneCharacterData']
    if len(sceneCharacterList) > 1:
        EraPrint.p(' ')
        PyCmd.pcmd(switch, 'SeeSceneCharacterListPage')
    EraPrint.plittleline()
Exemplo n.º 2
0
def getCharacterDormitoryPathText(characterId: str) -> str:
    '''
    获取角色宿舍路径描述信息
    Keyword arguments:
    characterId -- 角色Id
    Return arguments:
    mapPathStr -- 宿舍路径描述文本
    '''
    dormitory = CacheContorl.characterData['character'][characterId].Dormitory
    dormitoryPath = MapHandle.getMapSystemPathForStr(dormitory)
    mapList = MapHandle.getMapHierarchyListForScenePath(dormitoryPath, [])
    mapPathText = TextLoading.getTextData(TextLoading.stageWordPath, '143')
    mapList.reverse()
    for nowMap in mapList:
        nowMapMapSystemStr = MapHandle.getMapSystemPathStrForList(nowMap)
        mapName = CacheContorl.mapData[nowMapMapSystemStr]['MapName']
        mapPathText += mapName + '-'
    mapPathText += CacheContorl.sceneData[dormitory]['SceneName']
    return mapPathText