# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():


import pygame
from pgu import gui
from omnitool.database import tiles, multitiles, walls, names, version
        from omnitool.shared import lang, theme, exit_prog, exit_prog
        from omnitool.pgu_override import Quitbutton

    def run(self):  #executed after gui
        sizetype = self.size
        size = [(4200, 1200), (6300, 1800), (8400, 2400), (2400, 2400), (2100, 600)][sizetype]
        spawn = [(2100, 300), (3150, 300), (4200, 300), (1200, 300), (1050, 200)][sizetype]
        ground = [385.0, 385.0, 385.0, 385.0, 225.0][sizetype]
        rock = [703.0, 703.0, 703.0, 703.0, 353.0][sizetype]
        self.header = {'spawn': spawn, 'groundlevel': ground, 'is_bloodmoon': 0,
                       'dungeon_xy': spawn, 'worldrect': (0, size[0] * 16, 0, size[1] * 16),
                       'is_meteor_spawned': 0, 'gob_inv_time': 0, 'rocklevel': rock,
                       'gob_inv_x': 0.0, 'is_day': 1, 'shadow_orbs_broken': 0,
                       'width': size[0], 'version': version, 'gob_inv_type': 0,
                       'bosses_slain': (0, 0, 0), "npcs_saved": (0, 0, 0), "special_slain": (0, 0, 0),
                       'gob_inv_size': 0, 'height': size[1],
                       'ID': 1394000079, 'moonphase': 0, 'name': "Flatworld", "hardmode": 0,
                       "altars_broken": 0,
                       'is_a_shadow_orb_broken': 0, 'time': 13000.0}
        self.npcs = []
        self.names = names
        self.signs = [None] * 1000
        self.chests = [None] * 1000
        sur = spawn[1]
        #self.tiles = []
        if self.wall == 0:
            self.wall = None
        #for x in range(size[0]):#for each column
        col = [(None, None, 0, None, 0)] * (sur)
        col.append((self.surface, None, 0, None, 0))
        col.extend([(self.tile, self.wall, 0, None, 0)] * (-len(col) + self.header["height"]))
        #self.tiles.append(col)

# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():


# Path: plugins/flatworld.py
import pygame
from pgu import gui
from omnitool.database import tiles, multitiles, walls, names, version
        from omnitool.shared import lang, theme, exit_prog, exit_prog
        from omnitool.pgu_override import Quitbutton


    def run(self):  #executed after gui
        sizetype = self.size
        size = [(4200, 1200), (6300, 1800), (8400, 2400), (2400, 2400), (2100, 600)][sizetype]
        spawn = [(2100, 300), (3150, 300), (4200, 300), (1200, 300), (1050, 200)][sizetype]
        ground = [385.0, 385.0, 385.0, 385.0, 225.0][sizetype]
        rock = [703.0, 703.0, 703.0, 703.0, 353.0][sizetype]
        self.header = {'spawn': spawn, 'groundlevel': ground, 'is_bloodmoon': 0,
                       'dungeon_xy': spawn, 'worldrect': (0, size[0] * 16, 0, size[1] * 16),
                       'is_meteor_spawned': 0, 'gob_inv_time': 0, 'rocklevel': rock,
                       'gob_inv_x': 0.0, 'is_day': 1, 'shadow_orbs_broken': 0,
                       'width': size[0], 'version': version, 'gob_inv_type': 0,
                       'bosses_slain': (0, 0, 0), "npcs_saved": (0, 0, 0), "special_slain": (0, 0, 0),
                       'gob_inv_size': 0, 'height': size[1],
                       'ID': 1394000079, 'moonphase': 0, 'name': "Flatworld", "hardmode": 0,
                       "altars_broken": 0,
                       'is_a_shadow_orb_broken': 0, 'time': 13000.0}
        self.npcs = []
        self.names = names
        self.signs = [None] * 1000
        self.chests = [None] * 1000
        sur = spawn[1]
        #self.tiles = []
        if self.wall == 0:
            self.wall = None
        #for x in range(size[0]):#for each column
        col = [(None, None, 0, None, 0)] * (sur)
        col.append((self.surface, None, 0, None, 0))
        col.extend([(self.tile, self.wall, 0, None, 0)] * (-len(col) + self.header["height"]))
        #self.tiles.append(col)

        self.tiles = [col] * self.header["width"]