diff --git a/craft.lua b/craft.lua index 1e52d95..05e1bfa 100644 --- a/craft.lua +++ b/craft.lua @@ -179,3 +179,12 @@ minetest.register_craft({ {"plant_blocks:ruler", "plant_blocks:ruler"}, } }) + +minetest.register_craft({ + output = 'plant_blocks:hood', + recipe = { + {'plant_blocks:brush','basic_materials:motor', 'default:steel_ingot'}, + {'basic_materials:steel_strip','basic_materials:cement_block', 'dye:blue'}, + {'basic_materials:steel_strip','basic_materials:steel_strip', 'dye:yellow'}, + } +}) \ No newline at end of file diff --git a/init.lua b/init.lua index f93a38d..a8a1791 100644 --- a/init.lua +++ b/init.lua @@ -1,2 +1,5 @@ +plant_blocks = {} +plant_blocks.version = '0.1' + dofile(minetest.get_modpath("plant_blocks") .. "/nodes.lua") dofile(minetest.get_modpath("plant_blocks") .. "/craft.lua") diff --git a/locale/plant_blocks.ru.tr b/locale/plant_blocks.ru.tr index cbfc6af..01c0242 100644 --- a/locale/plant_blocks.ru.tr +++ b/locale/plant_blocks.ru.tr @@ -14,4 +14,5 @@ Industrial with yellow line floor=Промышленный пол с желто Direction to the emergency exit down right=Направление к эвакуационному выходу направо вниз Direction to the emergency exit to the right up=Направление к эвакуационному выходу направо вверх Direction to the emergency exit left up=Направление к эвакуационному выходу налево вверх -Direction to the emergency exit left down=Направление к эвакуационному выходу налево вниз \ No newline at end of file +Direction to the emergency exit left down=Направление к эвакуационному выходу налево вниз +Industrial hood = Промышленная вытяжка \ No newline at end of file diff --git a/models/hood.png b/models/hood.png deleted file mode 100644 index 1a13da8..0000000 Binary files a/models/hood.png and /dev/null differ diff --git a/nodes.lua b/nodes.lua index b457434..2451771 100644 --- a/nodes.lua +++ b/nodes.lua @@ -318,18 +318,14 @@ minetest.register_node("plant_blocks:e08", { groups = {crumbly=3}, }) ---[[ minetest.register_node("plant_blocks:hood", { - description = S("hood"), + description = S("Industrial hood"), drawtype = "mesh", - -- Holds the texture for each "material" tiles = { - "hood.png" + "plant_blocks_hood.png" }, paramtype2 = "facedir", - --place_param2 = 0, - -- Path to the mesh - mesh = "hood.obj", + mesh = "plant_blocks_hood.obj", paramtype = "light", bounding_boxes = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}}, selection_box = { @@ -345,46 +341,6 @@ minetest.register_node("plant_blocks:hood", { }, }, is_ground_content = false, - groups = {crumbly=3}, - on_construct = function(pos) - --local node = minetest.get_node(pos) - --local wheel = minetest.add_entity(pos, "modern:test", minetest.serialize({pos=pos, name=node.name})) - end, - on_rightclick = function(pos, node, clicker) - local wheel = minetest.add_entity(pos, "plant_blocks:test", minetest.serialize({pos=pos, name=node.name})) - end -}) - -minetest.register_entity("plant_blocks:test", { - visual = "mesh", - mesh = "hood_fan.obj", - textures = {"hood.png"}, - --visual_size = vector.new(0, 0, 0), - on_activate = function(self) - --self.timer = 0 - self.object:set_animation({x = 1, y = 1}, 60, 0, true) -- change 6 to 7 for successful replay - end, - on_step = function(self, dtime) - self.object:set_animation({x = 1, y = 30}, 100, 0, true) -- change 6 to 7 for successful replay - end, -})]] - -minetest.register_entity("plant_blocks:hood", { - visual = "mesh", - visual_size = {x = 10, y = 10, z = 10}, - mesh = "hood.b3d", - textures = {"hood.png"}, -- I just needed a texture - physical = true, - on_activate = function(self, staticdata) - self.object:set_animation({x = 0, y = 100}, 100, 0, true) - end, -}) - -minetest.register_craftitem("plant_blocks:hood", { - description = "Animation test", - inventory_image = "bones_bottom.png", - wield_image = "bones_bottom.png", - on_place = function(itemstack, placer, pointed_thing) - minetest.add_entity(pointed_thing.above, "plant_blocks:hood") - end, + groups = {cracky = 1, level = 2, concrete=1}, + sounds = default.node_sound_metal_defaults(), }) \ No newline at end of file diff --git a/textures/hood.png b/textures/hood.png deleted file mode 100644 index 076629a..0000000 Binary files a/textures/hood.png and /dev/null differ diff --git a/textures/plant_blocks_hood.png b/textures/plant_blocks_hood.png new file mode 100644 index 0000000..70585d7 Binary files /dev/null and b/textures/plant_blocks_hood.png differ