Include z3pr's data files in the frozen package.

Warning: requires dev6 version of it
This commit is contained in:
Fabian Dill
2020-08-25 13:27:34 +02:00
parent 2096d6ae5b
commit 606f1fd4f8
2 changed files with 14 additions and 2 deletions

4
Rom.py
View File

@@ -1501,10 +1501,12 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr
if any(options.values()):
ColorF = z3pr.ColorF
data_dir = local_path("data") if is_bundled() else None
def next_color():
return ColorF(local_random.random(), local_random.random(), local_random.random())
z3pr.randomize(rom.buffer, "maseya", next_color, options)
z3pr.randomize(rom.buffer, "maseya", next_color, options, data_dir)
else:
logging.warning("Could not find z3pr palette shuffle. "
"If you want improved palette shuffling please install the maseya-z3pr package.")