Industrial hood
This commit is contained in:
parent
55d2dd87e5
commit
f75b48ce5a
@ -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'},
|
||||
}
|
||||
})
|
3
init.lua
3
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")
|
||||
|
@ -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=Направление к эвакуационному выходу налево вниз
|
||||
Direction to the emergency exit left down=Направление к эвакуационному выходу налево вниз
|
||||
Industrial hood = Промышленная вытяжка
|
BIN
models/hood.png
BIN
models/hood.png
Binary file not shown.
Before Width: | Height: | Size: 884 B |
54
nodes.lua
54
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(),
|
||||
})
|
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB |
BIN
textures/plant_blocks_hood.png
Normal file
BIN
textures/plant_blocks_hood.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 946 B |
Loading…
Reference in New Issue
Block a user