# Path: omnitool/loadbar.py
# class Bar():
#     def __init__(self, size = (500,20), caption = "Loading:", bg = pygame.Color("black"), fg = pygame.Color("grey"),
#                  abortable = True):
# 
#         pygame.display.init()#
#         self.abortable = abortable
#         self.size = size
#         pygame.display.set_caption(caption)
#         self.basecaption = caption
#         self.surface = pygame.display.set_mode(size)
#         self.rect = pygame.Rect((0,0), (0, self.size[1]))
#         self.fg = fg
#         self.bg = bg
#         self.scale = self.size[0]/100
#         self.set_progress(0)
# 
#     def set_progress(self, percent, caption = ""):
#         for event in pygame.event.get():
#             if event.type == 12 and self.abortable:
#                 pygame.quit()
#                 import sys
#                 sys.exit()
#         if caption:
#             pygame.display.set_caption(caption)
#         self.progress = percent
#         self.surface.fill(self.bg)
#         self.rect.width = self.progress*self.scale
#         pygame.gfxdraw.box(self.surface, self.rect, self.fg)
#         pygame.display.update(self.rect)
# 
# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():
# 
# Path: plugins/planetoids_lib/terragui.py
# def run(main=None):


import sys
    import os
import pygame
            import os
                import time
from math import cos, sin, pi
from collections import defaultdict
from random import *
from omnitool.loadbar import Bar
from omnitool.database import itemlist, names, tiles, ntiles
from omnitool.tinterface import *
from .planetoids_lib import terragui
from .planetoids_lib.tree import make_tree
from .planetoids_lib.terradata import *
                    pass
                if starttype not in valid:
                    print("Please input 1,2,3 or 4, then hit enter.")
            print("")
            valid = [1, 2, 3, 4]
            print("Select extra difficulty, you may select multiple by entering multiple numbers.")
            print("By entering nothing you play normal")
            print("1: Darkness! I dont need a puny sun!")
            print("2: Less loot! I want to keep exploring!")
            print("3: Atlantis, I want to conquer the world from my sunken planet!")
            print("4: No merchant at the start, I want to earn him!")
            dif = input("Difficulty:")

            if "1" in dif:
                sun = False
            else:
                sun = True
            if "2" in dif:
                loot = True
            else:
                loot = False
            if "3" in dif:
                atlantis = True
            else:
                atlantis = False
            if "4" in dif:
                merch = False
            else:
                merchant = True


# Path: omnitool/loadbar.py
# class Bar():
#     def __init__(self, size = (500,20), caption = "Loading:", bg = pygame.Color("black"), fg = pygame.Color("grey"),
#                  abortable = True):
# 
#         pygame.display.init()#
#         self.abortable = abortable
#         self.size = size
#         pygame.display.set_caption(caption)
#         self.basecaption = caption
#         self.surface = pygame.display.set_mode(size)
#         self.rect = pygame.Rect((0,0), (0, self.size[1]))
#         self.fg = fg
#         self.bg = bg
#         self.scale = self.size[0]/100
#         self.set_progress(0)
# 
#     def set_progress(self, percent, caption = ""):
#         for event in pygame.event.get():
#             if event.type == 12 and self.abortable:
#                 pygame.quit()
#                 import sys
#                 sys.exit()
#         if caption:
#             pygame.display.set_caption(caption)
#         self.progress = percent
#         self.surface.fill(self.bg)
#         self.rect.width = self.progress*self.scale
#         pygame.gfxdraw.box(self.surface, self.rect, self.fg)
#         pygame.display.update(self.rect)
# 
# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():
# 
# Path: plugins/planetoids_lib/terragui.py
# def run(main=None):


# Path: plugins/planetoids.py
import sys
    import os
import pygame
            import os
                import time
from math import cos, sin, pi
from collections import defaultdict
from random import *
from omnitool.loadbar import Bar
from omnitool.database import itemlist, names, tiles, ntiles
from omnitool.tinterface import *
from .planetoids_lib import terragui
from .planetoids_lib.tree import make_tree
from .planetoids_lib.terradata import *

                    pass
                if starttype not in valid:
                    print("Please input 1,2,3 or 4, then hit enter.")
            print("")
            valid = [1, 2, 3, 4]
            print("Select extra difficulty, you may select multiple by entering multiple numbers.")
            print("By entering nothing you play normal")
            print("1: Darkness! I dont need a puny sun!")
            print("2: Less loot! I want to keep exploring!")
            print("3: Atlantis, I want to conquer the world from my sunken planet!")
            print("4: No merchant at the start, I want to earn him!")
            dif = input("Difficulty:")

            if "1" in dif:
                sun = False
            else:
                sun = True
            if "2" in dif:
                loot = True
            else:
                loot = False
            if "3" in dif:
                atlantis = True
            else:
                atlantis = False
            if "4" in dif:
                merch = False
            else:
                merchant = True


        loadingbar = Bar(caption = "Planetoids: startup")