def askForMainFrame(ansList): playerId = CacheContorl.playObject['objectId'] playerData = AttrHandle.getAttrData(playerId) playerName = playerData['Name'] ans = GameInit.askfor_All(ansList) PyCmd.clr_cmd() if ans == playerName: mainFrameSeeAttrPanel() elif ans == '0': InScene.getInScene_func() elif ans == '1': SeePlayerList.seePlayerList_func('MainFramePanel') elif ans == '2': ChangeClothes.changePlayerClothes(playerId) elif ans == '3': Shop.shopMainFrame_func() elif ans == '4': GameSetting.changeGameSetting_func() elif ans == '5': pass elif ans == '6': SaveHandleFrame.establishSave_func('MainFramePanel') elif ans == '7': SaveHandleFrame.loadSave_func('MainFramePanel') pass
def seePlayerEngravingPanel(playerId): EraPrint.plittleline() EraPrint.p(TextLoading.getTextData(TextLoading.stageWordId, '7')) panelState = CacheContorl.panelState['PlayerEngravingPanel'] if panelState == "0": PyCmd.pcmd(panelStateOffText, 'PlayerEngravingPanel') EraPrint.p('\n') playerData = AttrHandle.getAttrData(playerId) playerEngraving = playerData['Engraving'] playerEngravingText = AttrText.getEngravingText(playerEngraving) EraPrint.plist(playerEngravingText, 3, 'center') return 'PlayerEngravingPanel' else: PyCmd.pcmd(panelStateOnText, 'PlayerEngravingPanel') EraPrint.p('\n') return 'PlayerEngravingPanel'
def seePlayerFeaturesPanel(playerId): EraPrint.plittleline() EraPrint.p(TextLoading.getTextData(TextLoading.stageWordId, '6')) panelState = CacheContorl.panelState['PlayerFeaturesPanel'] if panelState == "0": PyCmd.pcmd(panelStateOffText, 'PlayerFeaturesPanel') EraPrint.p('\n') playerData = AttrHandle.getAttrData(playerId) playerFeatures = playerData['Features'] playerFeaturesStr = AttrText.getFeaturesStr(playerFeatures) EraPrint.p(playerFeaturesStr) return 'PlayerFeaturesPanel' else: PyCmd.pcmd(panelStateOnText, 'PlayerFeaturesPanel') EraPrint.p('\n') return 'PlayerFeaturesPanel' pass
def seePlayerExperiencePanel(playerId): EraPrint.plittleline() EraPrint.p(TextLoading.getTextData(TextLoading.stageWordId, '18')) panelState = CacheContorl.panelState['PlayerExperiencePanel'] if panelState == "0": PyCmd.pcmd(panelStateOffText, 'PlayerExperiencePanel') playerData = AttrHandle.getAttrData(playerId) EraPrint.p('\n') playerSexExperienceList = playerData['SexExperience'] playerSex = CacheContorl.playObject['object'][playerId]['Sex'] playerSexTextList = AttrText.getSexExperienceText( playerSexExperienceList, playerSex) EraPrint.plist(playerSexTextList, 4, 'center') return 'PlayerExperiencePanel' else: PyCmd.pcmd(panelStateOnText, 'PlayerExperiencePanel') EraPrint.p('\n') return 'PlayerExperiencePanel'
def printHpAndMpBar(playerId): playerData = AttrHandle.getAttrData(playerId) playerHitPoint = playerData['HitPoint'] playerMaxHitPoint = playerData['HitPointMax'] hitPointText = TextLoading.getTextData(TextLoading.stageWordId, '8') hitPointBar = ProportionalBar.getProportionalBar(hitPointText, playerMaxHitPoint, playerHitPoint, 'hpbar') playerManaPoint = playerData['ManaPoint'] playerMaxManaPoint = playerData['ManaPointMax'] manaPointText = TextLoading.getTextData(TextLoading.stageWordId, '9') manaPointBar = ProportionalBar.getProportionalBar(manaPointText, playerMaxManaPoint, playerManaPoint, 'mpbar') hpmpBarList = [hitPointBar, manaPointBar] EraPrint.p('\n') EraPrint.plist(hpmpBarList, 2, 'center') EraPrint.p('\n')
def mainFramePanel(): cmdList = [] playerId = CacheContorl.playObject['objectId'] playerData = AttrHandle.getAttrData(playerId) titleText = TextLoading.getTextData(TextLoading.stageWordId, '64') EraPrint.plt(titleText) dateText = GameTime.getDateText() EraPrint.p(dateText) EraPrint.p(' ') weekDateText = GameTime.getWeekDayText() EraPrint.p(weekDateText) EraPrint.p(' ') playerName = playerData['Name'] PyCmd.pcmd(playerName, playerName, None) cmdList.append(playerName) EraPrint.p(' ') goldText = AttrText.getGoldText(playerId) EraPrint.p(goldText) EraPrint.p('\n') AttrPrint.printHpAndMpBar(playerId) mainMenuText = TextLoading.getTextData(TextLoading.stageWordId, '68') EraPrint.sontitleprint(mainMenuText) EraPrint.p('\n') askForMainMenu = CmdButtonQueue.optionint(CmdButtonQueue.mainmenu, 4, 'left', askfor=False, cmdSize='center') cmdList = cmdList + askForMainMenu systemMenuText = TextLoading.getTextData(TextLoading.stageWordId, '69') EraPrint.sontitleprint(systemMenuText) EraPrint.p('\n') systemMenuStartId = len(askForMainMenu) askForSystemMenu = CmdButtonQueue.optionint(CmdButtonQueue.systemmenu, 4, 'left', askfor=False, cmdSize='center', startId=systemMenuStartId) cmdList = cmdList + askForSystemMenu return cmdList
def seePlayerEquipmentPanel(playerId): EraPrint.plittleline() EraPrint.p(TextLoading.getTextData(TextLoading.stageWordId, '37')) panelState = CacheContorl.panelState['PlayerEquipmentPanel'] if panelState == "0": PyCmd.pcmd(panelStateOffText, 'PlayerEquipmentPanel') playerData = AttrHandle.getAttrData(playerId) EraPrint.p('\n') EraPrint.p(TextLoading.getTextData(TextLoading.stageWordId, '39')) EraPrint.p('\n') playerClothingList = playerData['Clothing'] playerClothingText = AttrText.getClothingText(playerClothingList) EraPrint.plist(playerClothingText, 4, 'center') EraPrint.p('\n') EraPrint.p(TextLoading.getTextData(TextLoading.stageWordId, '40')) EraPrint.p('\n') playerSexItemList = playerData['SexItem'] playerSexItemText = AttrText.getSexItemText(playerSexItemList) EraPrint.plist(playerSexItemText, 5, 'center') return 'PlayerEquipmentPanel' else: PyCmd.pcmd(panelStateOnText, 'PlayerEquipmentPanel', None) EraPrint.p('\n') return 'PlayerEquipmentPanel'
def seePlayerMainAttrPanel(playerId): title1 = TextLoading.getTextData(TextLoading.stageWordId, '1') EraPrint.plt(title1) playeridText = TextLoading.getTextData(TextLoading.stageWordId, '0') + playerId EraPrint.p(playeridText) panelState = CacheContorl.panelState['PlayerMainAttrPanel'] if panelState == "0": PyCmd.pcmd(panelStateOffText, 'PlayerMainAttrPanel', None) EraPrint.p('\n') attrListString = [] playerData = AttrHandle.getAttrData(playerId) playerSex = playerData['Sex'] playerAge = playerData['Age'] playerName = playerData['Name'] fixPlayerName = TextLoading.getTextData(TextLoading.stageWordId, '13') playerName = fixPlayerName + playerName attrListString.append(playerName) playerSelfName = playerData['SelfName'] fixPlayerSelfName = TextLoading.getTextData(TextLoading.stageWordId, '11') playerSelfName = fixPlayerSelfName + playerSelfName attrListString.append(playerSelfName) playerNickName = playerData['NickName'] playerNickName = TextLoading.getTextData(TextLoading.stageWordId, '12') + playerNickName attrListString.append(playerNickName) relationship = playerData['Relationship'] relationship = TextLoading.getTextData(TextLoading.stageWordId, '14') + relationship attrListString.append(relationship) playerSpecies = playerData['Species'] playerSpecies = TextLoading.getTextData(TextLoading.stageWordId, '15') + playerSpecies attrListString.append(playerSpecies) playerSex = TextLoading.getTextData(TextLoading.stageWordId, '2') + playerSex attrListString.append(playerSex) playerAge = TextLoading.getTextData(TextLoading.stageWordId, '3') + str(playerAge) attrListString.append(playerAge) EraPrint.p('\n') playerSan = playerData['San'] playerSan = TextLoading.getTextData(TextLoading.stageWordId, '10') + playerSan attrListString.append(playerSan) playerHeight = playerData['Height']['NowHeight'] playerWeight = playerData['Weight'] playerMeasurements = playerData['Measurements'] playerHeightText = str(round(playerHeight, 2)) playerWeightText = str(round(playerWeight, 2)) playerBust = str(round(playerMeasurements['Bust'], 2)) playerWaist = str(round(playerMeasurements['Waist'], 2)) playerHip = str(round(playerMeasurements['Hip'], 2)) playerHeightInfo = TextLoading.getTextData(TextLoading.stageWordId, '80') + playerHeightText attrListString.append(playerHeightInfo) playerWeightInfo = TextLoading.getTextData(TextLoading.stageWordId, '81') + playerWeightText attrListString.append(playerWeightInfo) playerBWHInfo = TextLoading.getTextData( TextLoading.stageWordId, '82') + playerBust + ',' + playerWaist + ',' + playerHip playerIntimate = playerData['Intimate'] playerIntimate = TextLoading.getTextData(TextLoading.stageWordId, '16') + playerIntimate attrListString.append(playerIntimate) playerGraces = playerData['Graces'] playerGraces = TextLoading.getTextData(TextLoading.stageWordId, '17') + playerGraces attrListString.append(playerGraces) attrListString.append(playerBWHInfo) EraPrint.plist(attrListString, 4, 'center') EraPrint.p('\n') AttrPrint.printHpAndMpBar(playerId) return 'PlayerMainAttrPanel' else: PyCmd.pcmd(panelStateOnText, 'PlayerMainAttrPanel', None) EraPrint.p('\n') return 'PlayerMainAttrPanel'