예제 #1
0
def play():
    AssetManager.clearScreen()

    if not PD:
        Keys.unhookAll()
        saveManipulation()
        return

    areaSelection()
예제 #2
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     AssetManager.clearScreen()
     print('Thank you for playing')
     if PD: PlayerData.saveToJson(PD, PD.filename)
     for num in range(0, 3):
         print('.')
         time.sleep(1)
     print('closing')
     os.abort()
예제 #3
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     Input.Input.flushInput()
     newSaveLocation = './saves/{}.json'.format(input('save name: '))
     f = open(newSaveLocation, 'w+')
     f.write('{}')
     f.close()
     print('Created! Press enter to continue.')
     input()
     Keys.unhookAll()
     saveManipulation()
예제 #4
0
    def event(down):
        global PD

        if not down: return
        if len(saves) == 0: return
        PD = PlayerData.generateFromJson('./saves/{}'.format(saves[selection]))
        Keys.unhookAll()
        Input.Input.flushInput()
        print(PD.__dict__)
        print('data loaded')
        input('enter to continue')
        play()
예제 #5
0
def main():
    AssetManager.clearScreen()
    Keys.start()

    for folder in os.listdir('./Mods'):
        print(folder)
        Mod = importlib.import_module('.{}'.format(folder), package='Mods')
        ModRegistry.registerItem(folder, Mod)
        for asset in os.listdir('./Mods/{}/assets'.format(folder)):
            f = open('./assets/{}'.format(asset), 'w+')
            f.writelines(
                open('./Mods/{}/assets/{}'.format(folder, asset)).readlines())
            f.close()
        Mod.Mod.Load(game)
    Input.Input.genAliveThread()
    mainMenu()
예제 #6
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     saveManipulation()
예제 #7
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     settings()
예제 #8
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     play()
예제 #9
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     ModPage()
예제 #10
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     mainMenu()
예제 #11
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     createSave()
예제 #12
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     loadSave()