change make_mao_file to use new save function

This commit is contained in:
2024-04-04 03:36:10 +02:00
parent d67e7a44cd
commit 084310d8a1
+4 -3
View File
@@ -10,8 +10,9 @@ if __name__ == '__main__':
game_map = Map("./Map") game_map = Map("./Map")
game_map.make_file() game_map.make_file()
os.makedirs(CONFIG['map_file']['path'], exist_ok=True) game_map.save_to_file({
with open(f"{CONFIG['map_file']['path']}/{CONFIG['map_file']['filename']}", "wb") as f: "path": f"{CONFIG['map_file']['path']}/{CONFIG['map_file']['filename']}",
my_pickle.dump(game_map, f, lzma) "compression": lzma
})
print(game_map.story) print(game_map.story)