Changes:
  * Make rayIter a global utility, and use it for radiation too.
  * prettynum -> pretty_num and cleanup.
  * Remove resolve_name/function_exists (unused).
  * Cleanup nuclear reactor code.
This commit is contained in:
ShadowNinja
2016-03-12 13:28:01 -05:00
parent 4a993c2de8
commit 85a984982c
10 changed files with 398 additions and 392 deletions

View File

@ -151,7 +151,7 @@ function technic.register_battery_box(data)
..":technic_power_meter_fg.png]")
local infotext = S("@1 Battery Box: @2/@3", tier,
technic.prettynum(current_charge), technic.prettynum(max_charge))
technic.pretty_num(current_charge), technic.pretty_num(max_charge))
if eu_input == 0 then
infotext = S("%s Idle"):format(infotext)
end

View File

@ -30,7 +30,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", S("@1 Active (@2 EU)", machine_name, technic.prettynum(charge_to_give)))
meta:set_string("infotext", S("@1 Active (@2 EU)", machine_name, technic.pretty_num(charge_to_give)))
meta:set_int(tier.."_EU_supply", charge_to_give)
else
meta:set_string("infotext", S("%s Idle"):format(machine_name))