coil
2019-12-30 da95be53ec5703e808233d7b45fc42fb500863dd
technic/machines/other/frames.lua
@@ -155,7 +155,7 @@
   end
   for _, obj in ipairs(objects) do
      obj:setpos(vector.add(obj:getpos(), vect))
      obj:set_pos(vector.add(obj:get_pos(), vect))
   end
   for _, n in ipairs(nodelist) do
@@ -276,7 +276,7 @@
      end,
      on_punch = function(pos, node, puncher)
         local ppos = puncher:getpos()
         local ppos = puncher:get_pos()
         local pvect = puncher:get_look_dir()
         local pface = get_face(pos, ppos, pvect)
@@ -431,14 +431,14 @@
   end,
   dig = function(self)
      minetest.handle_node_drops(self.object:getpos(), { ItemStack("technic:frame_111111") }, self.last_puncher)
      local pos = vector.round(self.object:getpos())
      minetest.handle_node_drops(self.object:get_pos(), { ItemStack("technic:frame_111111") }, self.last_puncher)
      local pos = vector.round(self.object:get_pos())
      frames_pos[pos_to_string(pos)] = nil
      self.object:remove()
   end,
   on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
      local pos = self.object:getpos()
      local pos = self.object:get_pos()
      if self.damage_object == nil then
         self.damage_object = minetest.add_entity(pos, "technic:damage_entity")
         self.damage_object:get_luaentity().remaining_time = 0.25
@@ -450,7 +450,7 @@
      end
      self.last_puncher = puncher
      local ppos = puncher:getpos()
      local ppos = puncher:get_pos()
      local pvect = puncher:get_look_dir()
      local pface = get_face(pos, ppos, pvect)
      if pface == nil then return end
@@ -468,8 +468,8 @@
   end,
   on_rightclick = function(self, clicker)
      local pos = self.object:getpos()
      local ppos = clicker:getpos()
      local pos = self.object:get_pos()
      local ppos = clicker:get_pos()
      local pvect = clicker:get_look_dir()
      local pface = get_face(pos, ppos, pvect)
@@ -547,7 +547,7 @@
            local entity = obj:get_luaentity()
            if entity and (entity.name == "technic:frame_entity" or
                  entity.name == "technic:damage_entity") then
               obj:setpos(t.pos)
               obj:set_pos(t.pos)
            end
         end
      end
@@ -979,7 +979,7 @@
   output = 'technic:frame_111111',
   recipe = {
      { '',              'default:stick',       '' },
      { 'default:stick', 'technic:brass_ingot', 'default:stick' },
      { 'default:stick', 'basic_materials:brass_ingot', 'default:stick' },
      { '',              'default:stick',       '' },
   }
})
@@ -988,7 +988,7 @@
   output = 'technic:frame_motor',
   recipe = {
      { '',                                  'technic:frame_111111', '' },
      { 'group:mesecon_conductor_craftable', 'technic:motor',        'group:mesecon_conductor_craftable' },
      { 'group:mesecon_conductor_craftable', 'basic_materials:motor',        'group:mesecon_conductor_craftable' },
      { '',                                  'technic:frame_111111', '' },
   }
})
@@ -996,9 +996,9 @@
minetest.register_craft({
   output = 'technic:template 10',
   recipe = {
      { '',                    'technic:brass_ingot',  '' },
      { 'technic:brass_ingot', 'default:mese_crystal', 'technic:brass_ingot' },
      { '',                    'technic:brass_ingot',  '' },
      { '',                    'basic_materials:brass_ingot',  '' },
      { 'basic_materials:brass_ingot', 'default:mese_crystal', 'basic_materials:brass_ingot' },
      { '',                    'basic_materials:brass_ingot',  '' },
   }
})
@@ -1016,7 +1016,7 @@
   output = 'technic:template_motor',
   recipe = {
      { '',                                  'technic:template', '' },
      { 'group:mesecon_conductor_craftable', 'technic:motor',    'group:mesecon_conductor_craftable' },
      { 'group:mesecon_conductor_craftable', 'basic_materials:motor',    'group:mesecon_conductor_craftable' },
      { '',                                  'technic:template', '' },
   }
})