mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Game Support: Show correct conf file name
This commit is contained in:
parent
bb41ea7dcc
commit
c7ee42a4d5
@ -765,6 +765,14 @@ class Package(db.Model):
|
||||
review_scores = [ 100 * r.as_weight() for r in self.reviews ]
|
||||
self.score = self.score_downloads + sum(review_scores)
|
||||
|
||||
def get_conf_file_name(self):
|
||||
if self.type == PackageType.MOD:
|
||||
return "mod.conf"
|
||||
elif self.type == PackageType.TXP:
|
||||
return "texture_pack.conf"
|
||||
elif self.type == PackageType.GAME:
|
||||
return "game.conf"
|
||||
|
||||
|
||||
class MetaPackage(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
|
@ -48,7 +48,7 @@
|
||||
{% elif support.confidence == 11 %}
|
||||
{{ _("Added by Editor") }}
|
||||
{% elif support.confidence == 10 %}
|
||||
{{ _("mod.conf") }}
|
||||
{{ package.get_conf_file_name() }}
|
||||
{% else %}
|
||||
{{ support.confidence }}
|
||||
{% endif %}
|
||||
@ -72,7 +72,7 @@
|
||||
</div>
|
||||
|
||||
{% if mod_conf_lines %}
|
||||
<h3>{{ _("Generated mod.conf lines") }}</h3>
|
||||
<h3>{{ _("Generated %(conf)s lines", conf=package.get_conf_file_name()) }}</h3>
|
||||
<pre><code>{{ mod_conf_lines }}</code></pre>
|
||||
{% endif %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user