diff --git a/backend/abyssal_modules/templates/abyssal_modules/module.html b/backend/abyssal_modules/templates/abyssal_modules/module.html
index ba1d41a..c9f8af9 100644
--- a/backend/abyssal_modules/templates/abyssal_modules/module.html
+++ b/backend/abyssal_modules/templates/abyssal_modules/module.html
@@ -8,7 +8,7 @@
{% block metadata %}
-
+
diff --git a/backend/abyssal_modules/templatetags/module_stats.py b/backend/abyssal_modules/templatetags/module_stats.py
index d042a3f..d68d270 100644
--- a/backend/abyssal_modules/templatetags/module_stats.py
+++ b/backend/abyssal_modules/templatetags/module_stats.py
@@ -1,6 +1,9 @@
from django import template
-from abyssal_modules.utils import format_attribute_basic as fb
+from abyssal_modules.utils import (
+ format_attribute_basic as fb,
+ render_attribute_value as rv,
+)
register = template.Library()
@@ -10,7 +13,7 @@
def format_attribute(mod, attr):
val = mod.get_value(attr)
- return fb(val, attr)
+ return fb(rv(val, attr), attr)
@register.filter
diff --git a/backend/abyssal_modules/utils.py b/backend/abyssal_modules/utils.py
index 6592b30..755de7c 100644
--- a/backend/abyssal_modules/utils.py
+++ b/backend/abyssal_modules/utils.py
@@ -23,6 +23,14 @@ def format_attribute_basic(val, attr):
return "%.2f" % val
elif attr == 6:
return "%.2f" % val
+ elif attr == 2335:
+ return "%.3f" % val
+ elif attr == 2336:
+ return "%.3f" % val
+ elif attr == 2337:
+ return "%.3f" % val
+ elif attr == 2338:
+ return "%.3f" % val
else:
return "%.1f" % val
@@ -46,6 +54,14 @@ def render_attribute_value(val, attr):
return 100 * (1 - val)
elif attr == 977:
return 100 * (1 - val)
+ elif attr == 2335:
+ return 100 * (val - 1)
+ elif attr == 2336:
+ return 100 * (val - 1)
+ elif attr == 2337:
+ return -100 * (val - 1)
+ elif attr == 2338:
+ return -100 * (val - 1)
else:
return val
@@ -61,5 +77,9 @@ def correct_high_is_good(val, attr):
return not val
elif attr == 977:
return not val
+ elif attr == 2337:
+ return not val
+ elif attr == 2338:
+ return not val
else:
return val