| | |
| | | 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 |
| | |
| | | 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) |
| | | |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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) |
| | | |
| | |
| | | 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 |
| | |
| | | output = 'technic:frame_111111', |
| | | recipe = { |
| | | { '', 'default:stick', '' }, |
| | | { 'default:stick', 'technic:brass_ingot', 'default:stick' }, |
| | | { 'default:stick', 'basic_materials:brass_ingot', 'default:stick' }, |
| | | { '', 'default:stick', '' }, |
| | | } |
| | | }) |
| | |
| | | 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', '' }, |
| | | } |
| | | }) |
| | |
| | | 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', '' }, |
| | | } |
| | | }) |
| | | |
| | |
| | | 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', '' }, |
| | | } |
| | | }) |