コード例 #1
0
def detailedSetting_func1():
    flowRetun = CreatorPlayerPanel.detailedSetting1Panel()
    playerSex = CacheContorl.playObject['object']['0']['Sex']
    sexList = TextLoading.getTextData(TextLoading.roleId, 'Sex')
    if flowRetun == 0:
        PyCmd.clr_cmd()
        detailedSetting_func2()
    elif flowRetun == 1:
        if playerSex == sexList[0]:
            CacheContorl.featuresList['Age'] = featuresList["Age"][0]
        elif playerSex == sexList[1]:
            CacheContorl.featuresList['Age'] = featuresList["Age"][1]
        else:
            CacheContorl.featuresList['Age'] = featuresList["Age"][2]
        PyCmd.clr_cmd()
        CacheContorl.temporaryObject[
            'Features'] = CacheContorl.featuresList.copy()
        playerAgeTemName = AttrCalculation.getAgeTemList()[1]
        playerAge = AttrCalculation.getAge(playerAgeTemName)
        playerTem = TextLoading.getTextData(TextLoading.temId,
                                            'TemList')[playerSex]
        playerHeigt = AttrCalculation.getHeight(playerTem, playerAge)
        playerWeight = AttrCalculation.getWeight('Ordinary',
                                                 playerHeigt['NowHeight'])
        playerMeasurements = AttrCalculation.getMeasurements(
            playerTem, playerHeigt['NowHeight'], 'Ordinary')
        CacheContorl.temporaryObject['Age'] = playerAge
        CacheContorl.temporaryObject['Height'] = playerHeigt
        CacheContorl.temporaryObject['Weight'] = playerWeight
        CacheContorl.temporaryObject['Measurements'] = playerMeasurements
        detailedSetting_func2()
コード例 #2
0
ファイル: SeePlayerAttr.py プロジェクト: Sleeplessy/dieloli
def acknowledgmentAttributeAns(inputList):
    playerId = CacheContorl.playObject['objectId']
    yrn = GameInit.askfor_All(inputList)
    showAttrHandleData = TextLoading.getTextData(TextLoading.cmdId,'seeAttrPanelHandle')
    PyCmd.clr_cmd()
    if yrn in panelList:
        PanelStateHandle.panelStateChange(yrn)
        acknowledgmentAttribute_func()
    elif yrn == '0':
        GameTime.initTime()
        AttrCalculation.setAttrOver(playerId)
        CharacterHandle.initCharacterList()
        SeePlayerAttrPanel.initShowAttrPanelList()
        playerPosition = CacheContorl.playObject['object'][playerId]['Position']
        MapHandle.playerMoveScene('0', playerPosition, playerId)
        import script.Flow.Main as mainframe
        mainframe.mainFrame_func()
    elif yrn == '1':
        CacheContorl.wframeMouse['wFrameRePrint'] = 1
        EraPrint.pnextscreen()
        SeePlayerAttrPanel.initShowAttrPanelList()
        import Design.StartFlow as mainflow
        mainflow.main_func()
    elif yrn in showAttrHandleData:
        index = showAttrHandleData.index(yrn)
        index = str(index)
        CacheContorl.panelState['AttrShowHandlePanel'] = index
        acknowledgmentAttribute_func()
コード例 #3
0
def attributeGenerationBranchPanel():
    playerId = CacheContorl.playObject['objectId']
    AttrCalculation.setAttrDefault(playerId)
    PyCmd.clr_cmd()
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messageId, '9'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu, 1)
    return yrn
コード例 #4
0
def detailedSetting_func2():
    ansList = TextLoading.getTextData(TextLoading.cmdId, 'detailedSetting2')
    flowReturn = CreatorPlayerPanel.detailedSetting2Panel()
    if flowReturn == ansList[len(ansList) - 1]:
        PyCmd.clr_cmd()
        detailedSetting_func3()
    else:
        PyCmd.clr_cmd()
        AttrCalculation.setAnimalCache(flowReturn)
        detailedSetting_func3()
コード例 #5
0
ファイル: SeePlayerAttr.py プロジェクト: Sleeplessy/dieloli
def acknowledgmentAttribute_func():
    playerId = CacheContorl.playObject['objectId']
    AttrCalculation.setAttrOver(playerId)
    inputS = []
    attrInpurList = seeAttrInEveryTime_func()
    inputS = ValueHandle.listAppendToList(attrInpurList,inputS)
    flowReturn = SeePlayerAttrPanel.inputAttrOverPanel()
    inputS = ValueHandle.listAppendToList(flowReturn,inputS)
    acknowledgmentAttributeAns(inputS)
    pass
コード例 #6
0
def inputNamePanel():
    playerId = CacheContorl.playObject['objectId']
    CacheContorl.playObject['object'][
        playerId] = CacheContorl.temporaryObject.copy()
    AttrCalculation.setDefaultCache()
    EraPrint.p('\n')
    EraPrint.pline()
    EraPrint.pl(TextLoading.getTextData(TextLoading.messageId, '4'))
    yrn = CmdButtonQueue.optionint(CmdButtonQueue.currencymenu, 1)
    EraPrint.p('\n')
    return yrn
コード例 #7
0
def detailedSetting_func3():
    flowReturn = CreatorPlayerPanel.detailedSetting3Panel()
    sexTemDataList = ValueHandle.dictKeysToList(
        TextLoading.getTextData(TextLoading.temId, 'SexExperience'))
    sexTemDataList = ValueHandle.reverseArrayList(sexTemDataList)
    sexTemName = sexTemDataList[flowReturn]
    if flowReturn != len(sexTemDataList) - 1:
        CacheContorl.featuresList['Chastity'] = ''
    else:
        pass
    playerSexExperienceData = AttrCalculation.getSexExperience(sexTemName)
    CacheContorl.temporaryObject['SexExperience'] = playerSexExperienceData
    CacheContorl.temporaryObject['SexGrade'] = AttrCalculation.getSexGrade(
        playerSexExperienceData)
    PyCmd.clr_cmd()
    detailedSettind_func4()
コード例 #8
0
def inputSexConfirm_func():
    flowReturn = CreatorPlayerPanel.inputSexPanel()
    sexId = CacheContorl.playObject['object'][playerId]['Sex']
    if flowReturn == 0:
        AttrCalculation.setSexCache(sexId)
        if sexId == TextLoading.getTextData(TextLoading.roleId, 'Sex')[2]:
            CacheContorl.temporaryObject['Features'][
                'Sex'] = TextLoading.getTextData(TextLoading.roleId,
                                                 'Features')['Sex'][0]
        elif sexId == TextLoading.getTextData(TextLoading.roleId, 'Sex')[3]:
            CacheContorl.temporaryObject['Features'][
                'Sex'] = TextLoading.getTextData(TextLoading.roleId,
                                                 'Features')['Sex'][1]
        PyCmd.clr_cmd()
        attributeGenerationBranch_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        inputSexChoice_func()
    elif flowReturn == 2:
        PyCmd.clr_cmd()
        inputNickName_func()
    pass
コード例 #9
0
ファイル: CharacterHandle.py プロジェクト: Sleeplessy/dieloli
def initCharacterList():
    characterListPath = os.path.join(gamepath,'data',language,'character')
    characterList = GameData.getPathList(characterListPath)
    for i in range(0,len(characterList)):
        AttrCalculation.initTemporaryObject()
        playerId = str(i + 1)
        CacheContorl.playObject['object'][playerId] = CacheContorl.temporaryObject.copy()
        AttrCalculation.setDefaultCache()
        characterDataName = characterList[i]
        characterAttrTemPath = os.path.join(characterListPath,characterDataName,'AttrTemplate.json')
        characterData = GameData._loadjson(characterAttrTemPath)
        characterName = characterData['Name']
        characterSex = characterData['Sex']
        characterSexTem = TextLoading.getTextData(TextLoading.temId,'TemList')[characterSex]
        CacheContorl.playObject['object'][playerId]['Sex'] = characterSex
        characterDataKeys = ValueHandle.dictKeysToList(characterData)
        defaultAttr = AttrCalculation.getAttr(characterSexTem)
        defaultAttr['Name'] = characterName
        defaultAttr['Sex'] = characterSex
        AttrCalculation.setSexCache(characterSex)
        defaultAttr['Features'] = CacheContorl.featuresList.copy()
        if 'Age' in characterDataKeys:
            ageTem = characterData['Age']
            characterAge = AttrCalculation.getAge(ageTem)
            defaultAttr['Age'] = characterAge
        elif 'Features' in characterDataKeys:
            AttrCalculation.setAddFeatures(characterData['Features'])
            defaultAttr['Features'] = CacheContorl.featuresList.copy()
        temList = AttrCalculation.getTemList()
        height = AttrCalculation.getHeight(temList[characterSex], defaultAttr['Age'])
        defaultAttr['Height'] = height
        if 'Weight' in characterData:
            weightTemName = characterData['Weight']
        else:
            weightTemName = 'Ordinary'
        weight = AttrCalculation.getWeight(weightTemName, height['NowHeight'])
        defaultAttr['Weight'] = weight
        measurements = AttrCalculation.getMeasurements(temList[characterSex], height['NowHeight'], weightTemName)
        defaultAttr['Measurements'] = measurements
        for keys in defaultAttr:
            CacheContorl.temporaryObject[keys] = defaultAttr[keys]
        CacheContorl.featuresList = {}
        CacheContorl.playObject['object'][playerId] = CacheContorl.temporaryObject.copy()
        CacheContorl.temporaryObject = CacheContorl.temporaryObjectBak.copy()
    initPlayerPosition()
    pass
コード例 #10
0
import random
from Core import CacheContorl, PyCmd, TextLoading, EraPrint, ValueHandle
from Design import AttrCalculation
from Panel import CreatorPlayerPanel
from Flow import SeePlayerAttr

playerId = '0'
featuresList = AttrCalculation.getFeaturesList()


# 请求玩家输入姓名流程
def inputName_func():
    CacheContorl.playObject['objectId'] = playerId
    flowReturn = CreatorPlayerPanel.inputNamePanel()
    if flowReturn == 0:
        PyCmd.clr_cmd()
        inputNickName_func()
    elif flowReturn == 1:
        PyCmd.clr_cmd()
        CreatorPlayerPanel.startInputNamePanel()
        PyCmd.clr_cmd()
        inputName_func()
    elif flowReturn == 2:
        CacheContorl.wframeMouse['wFrameRePrint'] = 1
        EraPrint.pnextscreen()
        import Design.StartFlow as mainflow
        mainflow.main_func()
    pass


# 请求玩家输入昵称流程