From 104cc0ea83fc2317caf0c0232d548b846b3c5ffc Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 27 Aug 2021 20:46:23 +0200 Subject: [PATCH] document World.hidden --- Main.py | 2 +- worlds/AutoWorld.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Main.py b/Main.py index 16f91ae6..8554e405 100644 --- a/Main.py +++ b/Main.py @@ -147,7 +147,7 @@ def main(args, seed=None): longest_name = max(len(text) for text in AutoWorld.AutoWorldRegister.world_types) numlength = 8 for name, cls in AutoWorld.AutoWorldRegister.world_types.items(): - if not getattr(cls, "hidden", False): + if not cls.hidden: logger.info(f" {name:{longest_name}}: {len(cls.item_names):3} Items | " f"{len(cls.location_names):3} Locations") logger.info(f" Item IDs: {min(cls.item_id_to_name):{numlength}} - " diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index 09943f23..eec29fd2 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -91,6 +91,9 @@ class World(metaclass=AutoWorldRegister): # the client finds its own items in its own world. remote_items: bool = True + # Hide World Type from various views. Does not remove functionality. + hidden = False + # autoset on creation: world: MultiWorld player: int