added check to textures.py prepareBiomeData so it will only run once per process
This commit is contained in:
@@ -753,12 +753,16 @@ grasscolor = None
|
|||||||
foliagecolor = None
|
foliagecolor = None
|
||||||
|
|
||||||
def prepareBiomeData(worlddir):
|
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")
|
biomeDir = os.path.join(worlddir, "EXTRACTEDBIOMES")
|
||||||
if not os.path.exists(biomeDir):
|
if not os.path.exists(biomeDir):
|
||||||
raise Exception("EXTRACTEDBIOMES not found")
|
raise Exception("EXTRACTEDBIOMES not found")
|
||||||
|
|
||||||
global grasscolor, foliagecolor
|
|
||||||
|
|
||||||
# try to find the biome color images. If _find_file can't locate them
|
# try to find the biome color images. If _find_file can't locate them
|
||||||
# then try looking in the EXTRACTEDBIOMES folder
|
# then try looking in the EXTRACTEDBIOMES folder
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user