forked from minetest-mods/technic
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:
@ -11,9 +11,12 @@ switching station handles the network activity.
|
||||
|
||||
Helper functions
|
||||
----------------
|
||||
* `technic.EU_string(num)`
|
||||
* Converts num to a human-readable string (see pretty_num)
|
||||
and adds the `EU` unit
|
||||
* Use this function when showing players energy values
|
||||
* `technic.pretty_num(num)`
|
||||
* Converts the number `num` to a human-readable string.
|
||||
* Use this function when showing players power values.
|
||||
* Converts the number `num` to a human-readable string with SI prefixes
|
||||
* `technic.swap_node(pos, nodename)`
|
||||
* Same as `mintest.swap_node` but it only changes the nodename.
|
||||
* It uses `minetest.get_node` before swapping to ensure the new nodename
|
||||
|
Reference in New Issue
Block a user