Example #1
0
def showSceneNameListPanel() -> str:
    '''
    地图下场景名称绘制面板
    '''
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '86')
    EraPrint.p(titleText)
    panelState = CacheContorl.panelState['SeeSceneNameListPanel']
    if panelState == '0':
        PyCmd.pcmd(panelStateOffText, "SeeSceneNameListPanel")
        EraPrint.p('\n')
        nowMap = CacheContorl.nowMap
        nowPosition = CacheContorl.characterData['character']['0']['Position']
        nowScene = MapHandle.getSceneIdInMapForScenePathOnMapPath(
            nowPosition, nowMap)
        nowMapMapSystemStr = MapHandle.getMapSystemPathStrForList(nowMap)
        sceneNameData = MapHandle.getSceneNameListForMapPath(
            nowMapMapSystemStr)
        sceneNameList = {}
        nullScene = nowScene
        for scene in sceneNameData:
            sceneNameList[scene] = scene + ':' + sceneNameData[scene]
        CmdButtonQueue.optionstr(None, 4, 'center', False, False,
                                 list(sceneNameList.values()), nullScene,
                                 list(sceneNameList.keys()))
    else:
        PyCmd.pcmd(panelStateOnText, 'SeeSceneNameListPanel')
        EraPrint.p('\n')
    EraPrint.plittleline()
    return 'SeeSceneNameListPanel'
Example #2
0
def seeCharacterListPanel(maxPage):
    titleText = TextLoading.getTextData(TextLoading.stageWordPath,'74')
    EraPrint.plt(titleText)
    inputS = []
    pageId = int(CacheContorl.panelState['SeeCharacterListPanel'])
    pageShow = int(GameConfig.characterlist_show)
    maxPage = int(maxPage)
    characterMax = CharacterHandle.getCharacterIndexMax()
    if pageId == maxPage:
        showPageStart = pageShow * pageId
        showPageOver = showPageStart + (characterMax + 1 - showPageStart)
    else:
        showPageOver = pageShow * (pageId + 1)
        showPageStart = showPageOver - pageShow
    for i in range(showPageStart,showPageOver):
        characterId = str(i)
        cmdId = i - showPageStart
        cmdIdText = CmdButtonQueue.idIndex(cmdId)
        cmdText = AttrText.getCharacterAbbreviationsInfo(characterId)
        cmdIdTextIndex = TextHandle.getTextIndex(cmdIdText)
        windowWidth = int(GameConfig.text_width)
        textWidth = windowWidth - cmdIdTextIndex
        cmdText = TextHandle.align(cmdText,'center',textWidth=textWidth)
        cmdText = cmdIdText + ' ' + cmdText
        cmdId = str(cmdId)
        EraPrint.plittleline()
        PyCmd.pcmd(cmdText, cmdId, None)
        inputS.append(cmdId)
        EraPrint.p('\n')
    pageText = '(' + str(pageId) + '/' + str(maxPage) + ')'
    EraPrint.printPageLine(sample = '-',string = pageText)
    EraPrint.p('\n')
    return inputS
Example #3
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)
    sceneData = CacheContorl.sceneData[scenePathStr].copy()
    sceneName = 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()
Example #4
0
def seeCharacterEquipmentPanel(characterId: str) -> str:
    '''
    查看角色装备面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '37'))
    panelState = CacheContorl.panelState['CharacterEquipmentPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterEquipmentPanel')
        characterData = AttrHandle.getAttrData(characterId)
        EraPrint.p('\n')
        EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '39'))
        EraPrint.p('\n')
        characterClothingList = characterData['Clothing']
        characterClothingText = AttrText.getClothingText(characterClothingList)
        EraPrint.plist(characterClothingText, 4, 'center')
        EraPrint.p('\n')
        EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '40'))
        EraPrint.p('\n')
        characterSexItemList = characterData['SexItem']
        characterSexItemText = AttrText.getSexItemText(characterSexItemList)
        EraPrint.plist(characterSexItemText, 5, 'center')
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterEquipmentPanel', None)
        EraPrint.p('\n')
    return 'CharacterEquipmentPanel'
Example #5
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()
Example #6
0
def seeCharacterInfoPanel():
    '''
    查看当前互动对象信息面板
    '''
    characterInfo = TextLoading.getTextData(TextLoading.stageWordPath, '77')
    EraPrint.p(characterInfo)
    characterId = CacheContorl.characterData['characterId']
    characterData = CacheContorl.characterData['character'][characterId]
    characterName = characterData.Name
    EraPrint.p(characterName)
    EraPrint.p(' ')
    sex = characterData.Sex
    sexText = TextLoading.getTextData(TextLoading.stageWordPath,
                                      '2') + AttrText.getSexText(sex)
    EraPrint.p(sexText)
    EraPrint.p(' ')
    intimateInfo = TextLoading.getTextData(TextLoading.stageWordPath, '16')
    gracesInfo = TextLoading.getTextData(TextLoading.stageWordPath, '17')
    characterIntimateText = intimateInfo + f'{characterData.Intimate}'
    characterGracesText = gracesInfo + f'{characterData.Graces}'
    EraPrint.p(characterIntimateText)
    EraPrint.p(' ')
    EraPrint.p(characterGracesText)
    stateText = AttrText.getStateText(characterId)
    EraPrint.p(' ')
    EraPrint.p(stateText)
    EraPrint.plittleline()
Example #7
0
def gameHelpPanel():
    PyCmd.clr_cmd()
    titleInfo = TextLoading.getTextData(TextLoading.stageWordPath, '85')
    EraPrint.plt(titleInfo)
    EraPrint.p(TextLoading.getTextData(TextLoading.messagePath, '31'))
    EraPrint.p('\n')
    inputs = CmdButtonQueue.optionint(CmdButtonQueue.gamehelp, askfor=False)
    EraPrint.plittleline()
    return inputs
Example #8
0
def seeCharacterWearClothes(characterId:str,changeButton:bool):
    '''
    查看角色穿戴服装列表面板
    Keyword arguments:
    characterId -- 角色id
    changeButton -- 将服装列表绘制成按钮的开关
    '''
    EraPrint.p('\n')
    characterClothingData = CacheContorl.characterData['character'][characterId]['Clothing']
    characterPutOnList = CacheContorl.characterData['character'][characterId]['PutOn']
    clothingTextData = {}
    tagTextIndex = 0
    for i in range(len(Clothing.clothingTypeTextList.keys())):
        clothingType = list(Clothing.clothingTypeTextList.keys())[i]
        clothingId = characterPutOnList[clothingType]
        if clothingId == '':
            clothingTextData[clothingType] = 'None'
        else:
            clothingData = characterClothingData[clothingType][clothingId]
            clothingText = Clothing.clothingTypeTextList[clothingType] + ':' + clothingData['Evaluation'] + clothingData['Tag'] + clothingData['Name']
            clothingTextData[clothingText] = {}
            for tag in Clothing.clothingTagTextList:
                tagText = Clothing.clothingTagTextList[tag] + str(clothingData[tag])
                clothingTextData[clothingText][tagText] = 0
                nowTagTextIndex = TextHandle.getTextIndex(tagText)
                if nowTagTextIndex > tagTextIndex:
                    tagTextIndex = nowTagTextIndex
    longClothingTextIndex = TextHandle.getTextIndex(max(clothingTextData.keys(),key=TextHandle.getTextIndex))
    i = 0
    inputS = []
    for clothingText in clothingTextData:
        drawText = ''
        EraPrint.plittleline()
        if clothingTextData[clothingText] == 'None':
            drawText = Clothing.clothingTypeTextList[clothingText] + ':' + TextLoading.getTextData(TextLoading.stageWordPath,'117')
        else:
            nowClothingTextIndex = TextHandle.getTextIndex(clothingText)
            drawText += clothingText + ' '
            if nowClothingTextIndex < longClothingTextIndex:
                drawText += ' ' * (longClothingTextIndex - nowClothingTextIndex)
            for tagText in clothingTextData[clothingText]:
                nowTagTextIndex = TextHandle.getTextIndex(tagText)
                if nowTagTextIndex < tagTextIndex:
                    drawText += ' ' + tagText + ' ' * (tagTextIndex - nowTagTextIndex)
                else:
                    drawText += ' ' + tagText
        if changeButton:
            idInfo = CmdButtonQueue.idIndex(i)
            cmdText = idInfo + drawText
            PyCmd.pcmd(cmdText,i,None)
        else:
            EraPrint.p(drawText)
        i += 1
        inputS.append(str(i))
        EraPrint.p('\n')
    return inputS
Example #9
0
def seeCharacterItemPanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '38'))
    panelState = CacheContorl.panelState['CharacterItemPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterItemPanel')
        EraPrint.p('\n')
        return 'CharacterItemPanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterItemPanel')
        EraPrint.p('\n')
        return 'CharacterItemPanel'
    pass
Example #10
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)
    sceneData = CacheContorl.sceneData[scenePathStr].copy()
    sceneName = sceneData['SceneName']
    sceneInfoHead = TextLoading.getTextData(TextLoading.stageWordPath, '76')
    sceneInfo = sceneInfoHead + sceneName
    EraPrint.p(sceneInfo)
    EraPrint.plittleline()
Example #11
0
def seeCharacterItemPanel(characterId: str) -> str:
    '''
    查看角色携带道具面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '38'))
    panelState = CacheContorl.panelState['CharacterItemPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterItemPanel')
        EraPrint.p('\n')
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterItemPanel')
        EraPrint.p('\n')
    return 'CharacterItemPanel'
Example #12
0
def seeCharacterEngravingPanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '7'))
    panelState = CacheContorl.panelState['CharacterEngravingPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterEngravingPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterEngraving = characterData['Engraving']
        characterEngravingText = AttrText.getEngravingText(characterEngraving)
        EraPrint.plist(characterEngravingText, 3, 'center')
        return 'CharacterEngravingPanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterEngravingPanel')
        EraPrint.p('\n')
        return 'CharacterEngravingPanel'
Example #13
0
def seeCharacterFeaturesPanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '6'))
    panelState = CacheContorl.panelState['CharacterFeaturesPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterFeatures = characterData['Features']
        characterFeaturesStr = AttrText.getFeaturesStr(characterFeatures)
        EraPrint.p(characterFeaturesStr)
        return 'CharacterFeaturesPanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
        return 'CharacterFeaturesPanel'
    pass
Example #14
0
def seeCharacterSexExperiencePanel(characterId: int):
    '''
    查看角色性经验面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.stageWordPath, '5'))
    characterData = CacheContorl.characterData['character'][characterId]
    characterSexGradeList = characterData.SexGrade
    characterSex = CacheContorl.characterData['character'][characterId].Sex
    characterSexGradeTextList = AttrText.getSexGradeTextList(
        characterSexGradeList, characterSex)
    EraPrint.plist(characterSexGradeTextList, 4, 'center')
    EraPrint.pl(TextLoading.getTextData(TextLoading.stageWordPath, '7'))
    characterEngraving = characterData.Engraving
    characterEngravingText = AttrText.getEngravingText(characterEngraving)
    EraPrint.plist(characterEngravingText, 3, 'center')
Example #15
0
def seeCharacterInfoPanel():
    characterInfo = TextLoading.getTextData(TextLoading.stageWordPath, '77')
    EraPrint.p(characterInfo)
    characterId = CacheContorl.characterData['characterId']
    characterData = CacheContorl.characterData['character'][characterId]
    characterName = characterData['Name']
    EraPrint.p(characterName)
    EraPrint.p(' ')
    intimateInfo = TextLoading.getTextData(TextLoading.stageWordPath,'16')
    gracesInfo = TextLoading.getTextData(TextLoading.stageWordPath,'17')
    characterIntimate = characterData['Intimate']
    characterGraces = characterData['Graces']
    characterIntimateText = intimateInfo + characterIntimate
    characterGracesText = gracesInfo + characterGraces
    EraPrint.p(characterIntimateText)
    EraPrint.p(' ')
    EraPrint.p(characterGracesText)
    EraPrint.plittleline()
Example #16
0
def seeCharacterExperiencePanel(characterId):
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '18'))
    panelState = CacheContorl.panelState['CharacterExperiencePanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterExperiencePanel')
        characterData = AttrHandle.getAttrData(characterId)
        EraPrint.p('\n')
        characterSexExperienceList = characterData['SexExperience']
        characterSex = CacheContorl.characterData['character'][characterId][
            'Sex']
        characterSexTextList = AttrText.getSexExperienceText(
            characterSexExperienceList, characterSex)
        EraPrint.plist(characterSexTextList, 4, 'center')
        return 'CharacterExperiencePanel'
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterExperiencePanel')
        EraPrint.p('\n')
        return 'CharacterExperiencePanel'
Example #17
0
def seeCharacterFeaturesPanel(characterId: str) -> str:
    '''
    查看角色特征面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '6'))
    panelState = CacheContorl.panelState['CharacterFeaturesPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterFeatures = characterData['Features']
        characterFeaturesStr = AttrText.getFeaturesStr(characterFeatures)
        EraPrint.p(characterFeaturesStr)
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterFeaturesPanel')
        EraPrint.p('\n')
    return 'CharacterFeaturesPanel'
Example #18
0
def seeCharacterLevelPanel(characterId: str) -> str:
    '''
    查看角色技能等级面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    EraPrint.plittleline()
    EraPrint.p(TextLoading.getTextData(TextLoading.stageWordPath, '5'))
    panelState = CacheContorl.panelState['CharacterLevelPanel']
    if panelState == "0":
        PyCmd.pcmd(panelStateOffText, 'CharacterLevelPanel')
        EraPrint.p('\n')
        characterData = AttrHandle.getAttrData(characterId)
        characterSexGradeList = characterData['SexGrade']
        characterSex = CacheContorl.characterData['character'][characterId][
            'Sex']
        characterSexGradeTextList = AttrText.getSexGradeTextList(
            characterSexGradeList, characterSex)
        EraPrint.plist(characterSexGradeTextList, 4, 'center')
    else:
        PyCmd.pcmd(panelStateOnText, 'CharacterLevelPanel')
        EraPrint.p('\n')
    return 'CharacterLevelPanel'
Example #19
0
def showSceneNameListPanel() -> str:
    '''
    地图下场景名称绘制面板
    '''
    titleText = TextLoading.getTextData(TextLoading.stageWordPath, '86')
    EraPrint.p(titleText)
    panelState = CacheContorl.panelState['SeeSceneNameListPanel']
    if panelState == '0':
        PyCmd.pcmd(panelStateOffText, "SeeSceneNameListPanel")
        EraPrint.p('\n')
        nowMap = CacheContorl.nowMap
        nowMapMapSystemStr = MapHandle.getMapSystemPathStrForList(nowMap)
        sceneNameData = MapHandle.getSceneNameListForMapPath(
            nowMapMapSystemStr)
        sceneNameList = []
        for scene in sceneNameData:
            sceneNameList.append(scene + ':' + sceneNameData[scene])
        EraPrint.plist(sceneNameList, 5, 'center')
    else:
        PyCmd.pcmd(panelStateOnText, 'SeeSceneNameListPanel')
        EraPrint.p('\n')
    EraPrint.plittleline()
    return 'SeeSceneNameListPanel'
Example #20
0
def seeCharacterClothesPanel(characterId: str, clothingType: str,
                             maxPage: int):
    '''
    用于查看角色服装列表的面板
    Keyword arguments:
    characterId -- 角色id
    clothingType -- 服装类型
    maxPage -- 服装列表最大页数
    '''
    EraPrint.p('\n')
    characterClothingData = CacheContorl.characterData['character'][
        characterId].Clothing[clothingType]
    characterPutOnList = CacheContorl.characterData['character'][
        characterId].PutOn
    clothingTextData = {}
    tagTextIndex = 0
    nowPageId = int(CacheContorl.panelState["SeeCharacterClothesPanel"])
    nowPageMax = GameConfig.see_character_clothes_max
    nowPageStartId = nowPageId * nowPageMax
    nowPageEndId = nowPageStartId + nowPageMax
    if characterClothingData == {}:
        EraPrint.p(TextLoading.getTextData(TextLoading.messagePath, '34'))
        EraPrint.p('\n')
        return []
    if nowPageEndId > len(characterClothingData.keys()):
        nowPageEndId = len(characterClothingData.keys())
    passId = None
    for i in range(nowPageStartId, nowPageEndId):
        clothingId = list(characterClothingData.keys())[i]
        if clothingId == CacheContorl.characterData['character'][
                characterId].PutOn[clothingType]:
            passId = i - nowPageStartId
        clothingData = characterClothingData[clothingId]
        clothingText = clothingData['Evaluation'] + clothingData[
            'Tag'] + clothingData['Name']
        clothingTextData[clothingText] = {}
        for tag in Clothing.clothingTagTextList:
            tagText = Clothing.clothingTagTextList[tag] + str(
                clothingData[tag])
            clothingTextData[clothingText][tagText] = 0
            nowTagTextIndex = TextHandle.getTextIndex(tagText)
            if nowTagTextIndex == nowTagTextIndex:
                tagTextIndex = nowTagTextIndex
    longClothingTextIndex = TextHandle.getTextIndex(
        max(clothingTextData.keys(), key=TextHandle.getTextIndex))
    i = 0
    inputS = []
    for clothingText in clothingTextData:
        drawText = ''
        EraPrint.plittleline()
        nowClothingTextIndex = TextHandle.getTextIndex(clothingText)
        drawText += clothingText + ' '
        if nowClothingTextIndex < longClothingTextIndex:
            drawText += ' ' * (longClothingTextIndex - nowClothingTextIndex)
        for tagText in clothingTextData[clothingText]:
            nowTagTextIndex = TextHandle.getTextIndex(tagText)
            if nowTagTextIndex < tagTextIndex:
                drawText += ' ' + tagText + ' ' * (tagTextIndex -
                                                   nowTagTextIndex)
            else:
                drawText += ' ' + tagText
        if i == passId:
            drawText += ' ' + TextLoading.getTextData(
                TextLoading.stageWordPath, '125')
        idInfo = CmdButtonQueue.idIndex(i)
        cmdText = idInfo + drawText
        inputS.append(f'{i}')
        PyCmd.pcmd(cmdText, i, None)
        i += 1
    EraPrint.p('\n')
    pageText = '(' + str(nowPageId) + '/' + str(maxPage) + ')'
    EraPrint.printPageLine(sample='-', string=pageText)
    EraPrint.p('\n')
    return inputS
Example #21
0
def seeSaveListPanel(pageSaveValue: int,
                     lastSavePageValue: int,
                     autoSave=False) -> list:
    '''
    查看存档页面面板
    Keyword arguments:
    pageSaveValue -- 单页最大存档显示数量
    lastSavePageValue -- 最后一页存档显示数量
    autoSave -- 自动存档显示开关 (default False)
    '''
    savePanelPage = int(CacheContorl.panelState['SeeSaveListPanel']) + 1
    inputS = []
    idTextList = []
    idInfoText = TextLoading.getTextData(TextLoading.stageWordPath, '72')
    textWidth = int(GameConfig.text_width)
    saveNoneText = TextLoading.getTextData(TextLoading.messagePath, '20')
    if savePanelPage == int(GameConfig.save_page) + 1:
        startSaveId = int(pageSaveValue) * (savePanelPage - 1)
        overSaveId = startSaveId + lastSavePageValue
    else:
        overSaveId = int(pageSaveValue) * savePanelPage
        startSaveId = overSaveId - int(pageSaveValue)
    for i in range(0, overSaveId - startSaveId):
        id = CmdButtonQueue.idIndex(i)
        saveId = startSaveId + i
        if autoSave == True and SaveHandle.judgeSaveFileExist(saveId) != '1':
            idText = idInfoText + " " + str(saveId) + ":"
            idTextList.append(idText)
        else:
            idText = id + idInfoText + " " + str(saveId) + ":"
            idTextList.append(idText)
    for i in range(0, overSaveId - startSaveId):
        id = str(i)
        idText = idTextList[i]
        EraPrint.plittleline()
        saveId = SaveHandle.getSavePageSaveId(pageSaveValue, i)
        if SaveHandle.judgeSaveFileExist(saveId) == '1':
            saveInfoHead = SaveHandle.loadSaveInfoHead(saveId)
            gameTimeData = saveInfoHead['gameTime']
            gameTimeText = GameTime.getDateText(gameTimeData)
            characterName = saveInfoHead['characterName']
            saveVerson = saveInfoHead['gameVerson']
            saveText = characterName + ' ' + gameTimeText + ' ' + saveVerson
            idTextIndex = int(TextHandle.getTextIndex(idText))
            fixIdWidth = textWidth - idTextIndex
            saveAlign = TextHandle.align(saveText,
                                         'center',
                                         textWidth=fixIdWidth)
            idText = idText + saveAlign
            PyCmd.pcmd(idText, id, None)
            EraPrint.p('\n')
            inputS.append(id)
        else:
            idTextIndex = int(TextHandle.getTextIndex(idText))
            fixIdWidth = textWidth - idTextIndex
            saveNoneAlign = TextHandle.align(saveNoneText,
                                             'center',
                                             textWidth=fixIdWidth)
            idText = idText + saveNoneAlign
            if autoSave == True:
                EraPrint.p(idText)
                EraPrint.p('\n')
            else:
                PyCmd.pcmd(idText, id, None)
                inputS.append(id)
                EraPrint.p('\n')
    if autoSave == True:
        autoInfoText = TextLoading.getTextData(TextLoading.stageWordPath, "73")
        i = pageSaveValue
        id = CmdButtonQueue.idIndex(i)
        EraPrint.plittleline()
        if SaveHandle.judgeSaveFileExist('auto') == '1':
            saveInfoHead = SaveHandle.loadSaveInfoHead('auto')
            gameTimeData = saveInfoHead['gameTime']
            gameTimeText = GameTime.getDateText(gameTimeData)
            characterName = saveInfoHead['characterName']
            saveVerson = saveInfoHead['gameVerson']
            saveText = characterName + ' ' + gameTimeText + ' ' + saveVerson
            idText = id + autoInfoText
            idTextIndex = int(TextHandle.getTextIndex(idText))
            fixIdWidth = textWidth - idTextIndex
            saveTextAlign = TextHandle.align(saveText,
                                             'center',
                                             textWidth=fixIdWidth)
            idText = idText + saveTextAlign
            PyCmd.pcmd(idText, id, None)
            inputS.append(id)
            EraPrint.p('\n')
        else:
            idTextIndex = int(TextHandle.getTextIndex(autoInfoText))
            fixIdWidth = textWidth - idTextIndex
            saveNoneAlign = TextHandle.align(saveNoneText,
                                             'center',
                                             textWidth=fixIdWidth)
            idText = autoInfoText + saveNoneAlign
            EraPrint.p(idText)
            EraPrint.p('\n')
    return inputS
Example #22
0
def seeCharacterMainAttrPanel(characterId:int):
    '''
    查看角色主属性面板
    Keyword arguments:
    characterId -- 角色Id
    '''
    title1 = TextLoading.getTextData(TextLoading.stageWordPath, '1')
    EraPrint.plt(title1)
    characterIdText = f"{TextLoading.getTextData(TextLoading.stageWordPath, '0')}{characterId}"
    characterData = CacheContorl.characterData['character'][characterId]
    name = characterData.Name
    nickName = characterData.NickName
    characterName = TextLoading.getTextData(TextLoading.stageWordPath,'13') + name
    characterNickName = TextLoading.getTextData(TextLoading.stageWordPath,'12') + nickName
    sex = characterData.Sex
    sexText = TextLoading.getTextData(TextLoading.stageWordPath, '2') + AttrText.getSexText(sex)
    nameText = characterIdText + ' ' + characterName + ' ' + characterNickName + ' ' + sexText
    hpBar = AttrPrint.getHpOrMpBar(characterId,'HitPoint',GameConfig.text_width / 2 - 4)
    EraPrint.plist([nameText,hpBar],2,'center')
    EraPrint.pl()
    stateText = AttrText.getStateText(characterId)
    mpBar = AttrPrint.getHpOrMpBar(characterId,'ManaPoint',GameConfig.text_width / 2 - 4)
    EraPrint.plist([stateText,mpBar],2,'center')
    EraPrint.pl()
    EraPrint.plittleline()
    statureText = AttrText.getStatureText(characterId)
    EraPrint.pl(statureText)
    EraPrint.pline('.')
    EraPrint.pl(AttrText.getCharacterDormitoryPathText(characterId))
    EraPrint.plittleline()
    characterSpecies = f"{TextLoading.getTextData(TextLoading.stageWordPath, '15')}{characterData.Species}"
    characterAge = f"{TextLoading.getTextData(TextLoading.stageWordPath, '3')}{characterData.Age}"
    birthdayText = f"{TextLoading.getTextData(TextLoading.stageWordPath,'140')}{characterData.Birthday['month']}{TextLoading.getTextData(TextLoading.stageWordPath,'60')}{characterData.Birthday['day']}{TextLoading.getTextData(TextLoading.stageWordPath,'61')}"
    EraPrint.plist([characterSpecies,characterAge,birthdayText],3,'center')
    EraPrint.pline('.')
    characterIntimate = f"{TextLoading.getTextData(TextLoading.stageWordPath, '16')}{characterData.Intimate}"
    characterGraces = f"{TextLoading.getTextData(TextLoading.stageWordPath, '17')}{characterData.Graces}"
    EraPrint.plist([characterIntimate,characterGraces],2,'center')
    EraPrint.pline('.')
    characterChest = characterData.Chest['NowChest']
    chestGroup = AttrCalculation.judgeChestGroup(characterChest)
    chestText = TextLoading.getTextData(TextLoading.stageWordPath,'141') + TextLoading.getTextData(TextLoading.stageWordPath,'142')[chestGroup]
    EraPrint.plist([chestText],1,'center')
    EraPrint.pline('.')
    characterHeight = characterData.Height['NowHeight']
    characterWeight = characterData.Weight
    characterHeightText = str(round(characterHeight,2))
    characterWeightText = str(round(characterWeight,2))
    characterHeightInfo = TextLoading.getTextData(TextLoading.stageWordPath,'80') + characterHeightText
    characterWeightInfo = TextLoading.getTextData(TextLoading.stageWordPath,'81') + characterWeightText
    EraPrint.plist([characterHeightInfo,characterWeightInfo],2,'center')
    EraPrint.pline('.')
    characterMeasurements = characterData.Measurements
    characterBust = str(round(characterMeasurements['Bust'],2))
    characterWaist = str(round(characterMeasurements['Waist'],2))
    characterHip = str(round(characterMeasurements['Hip'],2))
    characterBustInfo = TextLoading.getTextData(TextLoading.stageWordPath,'82') + characterBust
    characterWaistInfo = TextLoading.getTextData(TextLoading.stageWordPath,'83') + characterWaist
    characterHipInfo = TextLoading.getTextData(TextLoading.stageWordPath,'84') + characterHip
    EraPrint.plist([characterBustInfo,characterWaistInfo,characterHipInfo],3,'center')
    EraPrint.pline('.')
Example #23
0
def inSceneButtonPanel():
    inputs = CmdButtonQueue.optionint(cmdList=CmdButtonQueue.inscenelist1, cmdColumn=9, askfor=False, cmdSize='center')
    EraPrint.plittleline()
    return inputs