Tim
2015-01-18 9087abcde029b12a8d21f90bf71fdf85ecff7d86
technic/machines/MV/power_radiator.lua
@@ -108,7 +108,7 @@
end
minetest.register_node("technic:power_radiator", {
   description = "Power Radiator",
   description = "MV Power Radiator",
   tiles  = {"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png",
             "technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"},
   groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2},
@@ -124,7 +124,7 @@
      local meta = minetest.get_meta(pos)
      meta:set_int("MV_EU_demand",1)               -- Demand on the primary side when idle
      meta:set_int("connected_EU_demand",0)        -- Potential demand of connected appliances
      meta:set_string("infotext", "Power Radiator")
      meta:set_string("infotext", "MV Power Radiator")
   end,
   on_dig = function(pos, node, digger)
      shutdown_inductive_appliances(pos)
@@ -138,9 +138,9 @@
minetest.register_craft({
   output = 'technic:power_radiator 1',
   recipe = {
      {'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'},
      {'technic:copper_coil',           'technic:mv_transformer',        'technic:copper_coil'},
      {'technic:rubber',                'technic:mv_cable0',       'technic:rubber'},
      {'technic:stainless_steel_ingot', 'technic:mv_transformer', 'technic:stainless_steel_ingot'},
      {'technic:copper_coil',           'technic:machine_casing', 'technic:copper_coil'},
      {'technic:rubber',                'technic:mv_cable0',      'technic:rubber'},
   }
})
@@ -149,7 +149,7 @@
   interval   = 1,
   chance     = 1,
   action = function(pos, node, active_object_count, active_object_count_wider)
      local meta             = minetest.env:get_meta(pos)
      local meta             = minetest.get_meta(pos)
      local eu_input  = meta:get_int("MV_EU_input")
      local eu_demand = meta:get_int("MV_EU_demand")
@@ -158,7 +158,7 @@
      if eu_input == 0 then
         -- No power
         meta:set_string("infotext", "Power Radiator is unpowered");
         meta:set_string("infotext", "MV Power Radiator is unpowered");
         -- meta:set_int("active", 1) -- used for setting textures someday maybe
         shutdown_inductive_appliances(pos)
         meta:set_int("connected_EU_demand", 0)
@@ -201,7 +201,7 @@
               -- The appliance has power from this node. Spend power if it is on.
               used_charge = used_charge + math.floor(meta1:get_int("EU_charge") / eff_factor)
            end
            meta:set_string("infotext", "Power Radiator is powered ("
            meta:set_string("infotext", "MV Power Radiator is powered ("
               ..math.floor(used_charge / max_charge * 100)
               .."% of maximum power)");
            if used_charge == 0 then