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
|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user