Core: Pad version string in world printout #5511
This commit is contained in:
9
Main.py
9
Main.py
@@ -54,13 +54,16 @@ def main(args, seed=None, baked_server_options: dict[str, object] | None = None)
|
|||||||
logger.info(f"Found {len(AutoWorld.AutoWorldRegister.world_types)} World Types:")
|
logger.info(f"Found {len(AutoWorld.AutoWorldRegister.world_types)} World Types:")
|
||||||
longest_name = max(len(text) for text in AutoWorld.AutoWorldRegister.world_types)
|
longest_name = max(len(text) for text in AutoWorld.AutoWorldRegister.world_types)
|
||||||
|
|
||||||
item_count = len(str(max(len(cls.item_names) for cls in AutoWorld.AutoWorldRegister.world_types.values())))
|
world_classes = AutoWorld.AutoWorldRegister.world_types.values()
|
||||||
location_count = len(str(max(len(cls.location_names) for cls in AutoWorld.AutoWorldRegister.world_types.values())))
|
|
||||||
|
version_count = max(len(cls.world_version.as_simple_string()) for cls in world_classes)
|
||||||
|
item_count = len(str(max(len(cls.item_names) for cls in world_classes)))
|
||||||
|
location_count = len(str(max(len(cls.location_names) for cls in world_classes)))
|
||||||
|
|
||||||
for name, cls in AutoWorld.AutoWorldRegister.world_types.items():
|
for name, cls in AutoWorld.AutoWorldRegister.world_types.items():
|
||||||
if not cls.hidden and len(cls.item_names) > 0:
|
if not cls.hidden and len(cls.item_names) > 0:
|
||||||
logger.info(f" {name:{longest_name}}: "
|
logger.info(f" {name:{longest_name}}: "
|
||||||
f"v{cls.world_version.as_simple_string()} |"
|
f"v{cls.world_version.as_simple_string():{version_count}} | "
|
||||||
f"Items: {len(cls.item_names):{item_count}} | "
|
f"Items: {len(cls.item_names):{item_count}} | "
|
||||||
f"Locations: {len(cls.location_names):{location_count}}")
|
f"Locations: {len(cls.location_names):{location_count}}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user