diff options
author | HybridDog <ovvv@web.de> | 2018-07-16 17:26:39 +0200 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-07-16 17:26:39 +0200 |
commit | 41f175986d18ef9cf697b95e4570555471068857 (patch) | |
tree | d1b28a5f13e096d176430ffad3e9b8ea8e765a7b /technic/machines/power_monitor.lua | |
parent | 6af0376c23e000b7e2cd4db2659ff5d632c4e60b (diff) |
Show EU power values more readable (#424)
Add the EU_string helper function
In comparison to pretty_num it uses SI prefixes, adds "EU" (e.g. kEU) and rounds the number for readability
Add a constant_digit_count boolean setting
Diffstat (limited to 'technic/machines/power_monitor.lua')
-rw-r--r-- | technic/machines/power_monitor.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/technic/machines/power_monitor.lua b/technic/machines/power_monitor.lua index 4d722a2..7e8b850 100644 --- a/technic/machines/power_monitor.lua +++ b/technic/machines/power_monitor.lua @@ -55,7 +55,7 @@ minetest.register_abm({ local demand = sw_meta:get_int("demand") meta:set_string("infotext", S("Power Monitor. Supply: @1 Demand: @2", - technic.pretty_num(supply), technic.pretty_num(demand))) + technic.EU_string(supply), technic.EU_string(demand))) else meta:set_string("infotext",S("Power Monitor Has No Network")) end |