Prevent users being able to enable support for all games when they shouldn't

This commit is contained in:
rubenwardy 2023-06-27 21:40:31 +01:00
parent 96f9adb95f
commit 1a8d28a2d8
2 changed files with 8 additions and 2 deletions

@ -671,7 +671,9 @@ def game_support(package):
force_game_detection = package.supported_games.filter(and_(
PackageGameSupport.confidence > 1, PackageGameSupport.supports == True)).count() == 0
can_support_all_games = package.type != PackageType.TXP
can_support_all_games = package.type != PackageType.TXP and \
package.supported_games.filter(and_(
PackageGameSupport.confidence == 1, PackageGameSupport.supports == True)).count() == 0
can_override = can_edit

@ -98,7 +98,11 @@
</p>
{% elif package.type.name == "TXP" %}
<p class="text-muted">
{{ _("It's not possible for texture packs to support all games") }}
{{ _("It's not possible for texture packs to support all games.") }}
</p>
{% elif package.type.name == "MOD" %}
<p class="text-muted">
{{ _("The package depends on a game-specific mod, and so cannot support all games.") }}
</p>
{% endif %}