Core: expose world version to world classes and yaml (#5484)
* support version on new manifest * apply world version from manifest * Update Generate.py * docs * reduce mm2 version again * wrong version * validate game in world_types * Update Generate.py * let unknown game fall through to later exception * hide real world version behind property * named tuple is immutable * write minimum world version to template yaml, fix gen edge cases * punctuation * check for world version in autoworldregister * missed one --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
This commit is contained in:
@@ -1710,7 +1710,7 @@ def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], ge
|
||||
from jinja2 import Template
|
||||
|
||||
from worlds import AutoWorldRegister
|
||||
from Utils import local_path, __version__
|
||||
from Utils import local_path, __version__, tuplize_version
|
||||
|
||||
full_path: str
|
||||
|
||||
@@ -1753,7 +1753,10 @@ def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], ge
|
||||
|
||||
res = template.render(
|
||||
option_groups=option_groups,
|
||||
__version__=__version__, game=game_name, yaml_dump=yaml_dump_scalar,
|
||||
__version__=__version__,
|
||||
game=game_name,
|
||||
world_version=world.world_version.as_simple_string(),
|
||||
yaml_dump=yaml_dump_scalar,
|
||||
dictify_range=dictify_range,
|
||||
cleandoc=cleandoc,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user