# Path: omnitool/colorlib.py

# 
# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():
# 
# Path: omnitool/pgu_override.py
# class Quitbutton(Button):
#     def __init__(self, app, text):
#         Button.__init__(self, text, width=300, height=40)
#         try:
#             self.connect(CLICK, app.quit, None)
#         except AttributeError:
#             self.connect(CLICK, app.close, None)
# 
# Path: omnitool/shared.py



import sys
import os
import pygame
import tempfile
import colorsys
import io
            import traceback
        import time
from random import randint
from time import sleep
from pgu import gui
from omnitool.colorlib import data, bad
from omnitool.database import multitiles, names
from omnitool.tlib import *
from omnitool.pgu_override import Quitbutton
from omnitool.shared import lang, theme, exit_prog, exit_prog, __version__
            from plugins.worldify_lib import jsonparse
                            #print dif, cdif
                            if dif < cdif:
                                cdif = dif
                                hit = hcolors[c]

                        set_tile(tiledata, (hit, None, 0, None))
                        value = tiledata.getvalue()
                        a.write(value)
                        cache[cachecolor] = value

                    #print hit, dif
                if z % w10 == 1:  #give lifesigns
                    n = ((total - z) * 100.0) / w
                    print("%6.2f%% done writing tiles" % n)
                z -= 1

        start = time.clock()
        self.tiles = tempfile.TemporaryFile()

        if func == "RGB":
            print("Finding closest match via euclidian RGB distance")
            rgb(self.tiles, surface, rcolors)
        else:
            print("Finding closest match via weighted HSV difference")
            hsv(self.tiles, surface, rcolors, weight)
        t = time.clock() - start
        n = (t, t / (w * h))
        print("%5f seconds taken, that is %0.10f seconds per pixel" % n)
        self.chests = [None] * 1000
        self.signs = [None] * 1000

# Path: omnitool/colorlib.py

# 
# Path: omnitool/database.py
# def get_custom_db(txt):
# def parse():
# 
# Path: omnitool/pgu_override.py
# class Quitbutton(Button):
#     def __init__(self, app, text):
#         Button.__init__(self, text, width=300, height=40)
#         try:
#             self.connect(CLICK, app.quit, None)
#         except AttributeError:
#             self.connect(CLICK, app.close, None)
# 
# Path: omnitool/shared.py



# Path: plugins/worldify.py
import sys
import os
import pygame
import tempfile
import colorsys
import io
            import traceback
        import time
from random import randint
from time import sleep
from pgu import gui
from omnitool.colorlib import data, bad
from omnitool.database import multitiles, names
from omnitool.tlib import *
from omnitool.pgu_override import Quitbutton
from omnitool.shared import lang, theme, exit_prog, exit_prog, __version__
            from plugins.worldify_lib import jsonparse

                            #print dif, cdif
                            if dif < cdif:
                                cdif = dif
                                hit = hcolors[c]

                        set_tile(tiledata, (hit, None, 0, None))
                        value = tiledata.getvalue()
                        a.write(value)
                        cache[cachecolor] = value

                    #print hit, dif
                if z % w10 == 1:  #give lifesigns
                    n = ((total - z) * 100.0) / w
                    print("%6.2f%% done writing tiles" % n)
                z -= 1

        start = time.clock()
        self.tiles = tempfile.TemporaryFile()

        if func == "RGB":
            print("Finding closest match via euclidian RGB distance")
            rgb(self.tiles, surface, rcolors)
        else:
            print("Finding closest match via weighted HSV difference")
            hsv(self.tiles, surface, rcolors, weight)
        t = time.clock() - start
        n = (t, t / (w * h))
        print("%5f seconds taken, that is %0.10f seconds per pixel" % n)
        self.chests = [None] * 1000
        self.signs = [None] * 1000

        self.names = names