diff --git a/textures.py b/textures.py index a019037..4c93b98 100644 --- a/textures.py +++ b/textures.py @@ -753,12 +753,16 @@ grasscolor = None foliagecolor = None def prepareBiomeData(worlddir): + global grasscolor, foliagecolor + + # skip if the color files are already loaded + if grasscolor and foliagecolor: + return + biomeDir = os.path.join(worlddir, "EXTRACTEDBIOMES") if not os.path.exists(biomeDir): raise Exception("EXTRACTEDBIOMES not found") - global grasscolor, foliagecolor - # try to find the biome color images. If _find_file can't locate them # then try looking in the EXTRACTEDBIOMES folder try: