diff --git a/WebHostLib/__init__.py b/WebHostLib/__init__.py index c0179b22..a44afc74 100644 --- a/WebHostLib/__init__.py +++ b/WebHostLib/__init__.py @@ -69,6 +69,10 @@ class B64UUIDConverter(BaseConverter): app.url_map.converters["suuid"] = B64UUIDConverter app.jinja_env.filters['suuid'] = lambda value: base64.urlsafe_b64encode(value.bytes).rstrip(b'=').decode('ascii') +# has automatic patch integration +import Patch +app.jinja_env.filters['supports_apdeltapatch'] = lambda game_name: game_name in Patch.AutoPatchRegister.patch_types + def get_world_theme(game_name: str): if game_name in AutoWorldRegister.world_types: diff --git a/WebHostLib/templates/macros.html b/WebHostLib/templates/macros.html index 6ed2ca49..9a92edbb 100644 --- a/WebHostLib/templates/macros.html +++ b/WebHostLib/templates/macros.html @@ -40,7 +40,7 @@ {% elif patch.game == "Super Mario 64" and room.seed.slots|length == 1 %} Download APSM64EX File... - {% elif patch.game in ["A Link to the Past", "Secret of Evermore", "Super Metroid", "SMZ3"] %} + {% elif patch.game | supports_apdeltapatch %} Download Patch File... {% elif patch.game == "Dark Souls III" %}