Core: ensure slot_data and er_hint_info are only base data types (#5144)

---------

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
This commit is contained in:
Fabian Dill
2025-07-07 15:51:39 +02:00
committed by GitHub
parent e68b1ad428
commit 4623d59206
3 changed files with 27 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import unittest
from Fill import distribute_items_restrictive
from NetUtils import encode
from NetUtils import convert_to_base_types
from worlds.AutoWorld import AutoWorldRegister, call_all
from worlds import failed_world_loads
from . import setup_solo_multiworld
@@ -47,7 +47,7 @@ class TestImplemented(unittest.TestCase):
call_all(multiworld, "post_fill")
for key, data in multiworld.worlds[1].fill_slot_data().items():
self.assertIsInstance(key, str, "keys in slot data must be a string")
self.assertIsInstance(encode(data), str, f"object {type(data).__name__} not serializable.")
convert_to_base_types(data) # only put base data types into slot data
def test_no_failed_world_loads(self):
if failed_world_loads: