mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-28 04:42:30 +01:00
Prevent users being able to enable support for all games when they shouldn't
This commit is contained in:
app
@ -671,7 +671,9 @@ def game_support(package):
|
|||||||
force_game_detection = package.supported_games.filter(and_(
|
force_game_detection = package.supported_games.filter(and_(
|
||||||
PackageGameSupport.confidence > 1, PackageGameSupport.supports == True)).count() == 0
|
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
|
can_override = can_edit
|
||||||
|
|
||||||
|
@ -98,7 +98,11 @@
|
|||||||
</p>
|
</p>
|
||||||
{% elif package.type.name == "TXP" %}
|
{% elif package.type.name == "TXP" %}
|
||||||
<p class="text-muted">
|
<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>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user