Esempio n. 1
0
def play():
    AssetManager.clearScreen()

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

    areaSelection()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 6
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     saveManipulation()
Esempio n. 7
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     settings()
Esempio n. 8
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     play()
Esempio n. 9
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     ModPage()
Esempio n. 10
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     mainMenu()
Esempio n. 11
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     createSave()
Esempio n. 12
0
 def event(down):
     if not down: return
     Keys.unhookAll()
     loadSave()