Skip to content

Commit

Permalink
use technic.pretty_num instead of technic.EU_string for compatibi…
Browse files Browse the repository at this point in the history
…lity
  • Loading branch information
OgelGames committed Mar 9, 2020
1 parent 8ee1a13 commit 4e2759e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ local function update_formspec(pos, charge, data)

local new_formspec = base_formspec..
"label[0,0;Powerbank Mk"..data.mark.."]"..
"label[5.4,2.25;Power Remaining: "..technic.EU_string(charge).."]"..
"label[5.4,2.25;Power Remaining: "..technic.pretty_num(charge).."EU]"..
"box[5.45,1.25;"..(fraction * 2.12)..",0.8;"..color.."]"
minetest.get_meta(pos):set_string("formspec", new_formspec)
end

local function update_infotext(pos, is_charging, data)
local meta = minetest.get_meta(pos)
local current_charge = technic.EU_string(meta:get_int("charge"))
local max_charge = technic.EU_string(data.max_charge)
local current_charge = technic.pretty_num(meta:get_int("charge")).."EU"
local max_charge = technic.pretty_num(data.max_charge).."EU"

local status = "Idle"
if is_charging then
Expand Down

0 comments on commit 4e2759e

Please sign in to comment.