Core: Attribute per slot random directly to the World and discourage using MultiWorld's random (#1649)

* add a random object to the World

* use it in The Messenger

* the worlds don't exist until the end of set options

* set seed in lttp tests

* use world.random for shop shuffle
This commit is contained in:
Aaron Wagener
2023-07-02 05:50:14 -05:00
committed by GitHub
parent 6a88d5aa79
commit a6ba185c55
12 changed files with 17 additions and 5 deletions

View File

@@ -203,6 +203,9 @@ class World(metaclass=AutoWorldRegister):
location_names: ClassVar[Set[str]]
"""set of all potential location names"""
random: random.Random
"""This world's random object. Should be used for any randomization needed in world for this player slot."""
zip_path: ClassVar[Optional[pathlib.Path]] = None
"""If loaded from a .apworld, this is the Path to it."""
__file__: ClassVar[str]