mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-01 07:40:37 +02:00
Get rid of technic.format
This commit is contained in:
@ -24,7 +24,7 @@ local run = function(pos, node)
|
||||
local charge_to_give = math.floor((light + pos1.y) * 3)
|
||||
charge_to_give = math.max(charge_to_give, 0)
|
||||
charge_to_give = math.min(charge_to_give, 200)
|
||||
meta:set_string("infotext", technic.format(S("%s Active (%e EU)"), machine_name, charge_to_give))
|
||||
meta:set_string("infotext", S("@1 Active (@2 EU)", machine_name, technic.prettynum(charge_to_give)))
|
||||
meta:set_int("LV_EU_supply", charge_to_give)
|
||||
else
|
||||
meta:set_string("infotext", S("%s Idle"):format(machine_name))
|
||||
|
@ -55,7 +55,7 @@ local run = function(pos, node)
|
||||
meta:set_int("MV_EU_supply", power)
|
||||
end
|
||||
|
||||
meta:set_string("infotext", technic.format("%s (%eEU)", machine_name, power))
|
||||
meta:set_string("infotext", S("@1 (@2 EU)", machine_name, technic.prettynum(power)))
|
||||
end
|
||||
|
||||
minetest.register_node("technic:wind_mill", {
|
||||
|
@ -142,8 +142,8 @@ function technic.register_battery_box(data)
|
||||
.."^[lowpart:"..charge_percent
|
||||
..":technic_power_meter_fg.png]")
|
||||
|
||||
local infotext = technic.format(S("%s Battery Box: %e/%e"), tier,
|
||||
current_charge, max_charge)
|
||||
local infotext = S("@1 Battery Box: @2/@3", tier,
|
||||
technic.prettynum(current_charge), technic.prettynum(max_charge))
|
||||
if eu_input == 0 then
|
||||
infotext = S("%s Idle"):format(infotext)
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ function technic.register_solar_array(data)
|
||||
local charge_to_give = math.floor((light + pos.y) * data.power)
|
||||
charge_to_give = math.max(charge_to_give, 0)
|
||||
charge_to_give = math.min(charge_to_give, data.power * 50)
|
||||
meta:set_string("infotext", technic.format(S("%s Active (%e EU)"), machine_name, charge_to_give))
|
||||
meta:set_string("infotext", S("@1 Active (@2 EU)", machine_name, technic.prettynum(charge_to_give)))
|
||||
meta:set_int(tier.."_EU_supply", charge_to_give)
|
||||
else
|
||||
meta:set_string("infotext", S("%s Idle"):format(machine_name))
|
||||
|
@ -30,8 +30,7 @@ local run = function(pos, node)
|
||||
meta:set_int(from.."_EU_supply", 0)
|
||||
meta:set_int(to.."_EU_demand", 0)
|
||||
meta:set_int(to.."_EU_supply", input * remain)
|
||||
meta:set_string("infotext", machine_name
|
||||
..technic.format(" (%e %s -> %e %s)", input, from, input * remain, to))
|
||||
meta:set_string("infotext", S("@1 (@2 @3 -> @4 @5)", machine_name, technic.prettynum(input), from, technic.prettynum(input * remain), to))
|
||||
else
|
||||
meta:set_string("infotext", S("%s Has Bad Cabling"):format(machine_name))
|
||||
if to then
|
||||
|
@ -292,8 +292,8 @@ minetest.register_abm({
|
||||
--dprint("Total BA demand:"..BA_eu_demand)
|
||||
|
||||
meta:set_string("infotext",
|
||||
technic.format(S("%s. Supply: %e Demand: %e"),
|
||||
machine_name, PR_eu_supply, RE_eu_demand))
|
||||
S("@1. Supply: @2 Demand: @3",
|
||||
machine_name, technic.prettynum(PR_eu_supply), technic.prettynum(RE_eu_demand)))
|
||||
|
||||
-- If the PR supply is enough for the RE demand supply them all
|
||||
if PR_eu_supply >= RE_eu_demand then
|
||||
|
Reference in New Issue
Block a user