mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-04 09:10:38 +02:00
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
This commit is contained in:
@ -60,7 +60,8 @@ local run = function(pos, node)
|
||||
elseif check == true then
|
||||
local power = math.min(pos.y * 100, 5000)
|
||||
meta:set_int("MV_EU_supply", power)
|
||||
meta:set_string("infotext", S("@1 (@2 EU)", machine_name, technic.pretty_num(power)))
|
||||
meta:set_string("infotext", S("@1 (@2)", machine_name,
|
||||
technic.EU_string(power)))
|
||||
end
|
||||
-- check == nil: assume nothing has changed
|
||||
end
|
||||
|
Reference in New Issue
Block a user