[UPDATE] Update something

This commit is contained in:
tacigar 2016-09-14 17:34:16 +09:00
parent 139f8f00d1
commit 72f08d1611
5 changed files with 34 additions and 7 deletions

View File

@ -41,21 +41,48 @@ end) ();
-- register a definition of a core entity. -- register a definition of a core entity.
(function() (function()
minetest.register_node("maidroid_tool:core_node", { local node_box = {
tiles = {"maidroid_core_empty.png"}, type = "fixed",
fixed = {
{ -0.5, -0.5, -0.125, 0.5, -0.4375, 0.125},
{ -0.125, -0.5, -0.5, 0.125, -0.4375, 0.5},
{ -0.25, -0.5, -0.4375, 0.25, -0.4375, 0.4375},
{ -0.375, -0.5, -0.375, 0.375, -0.4375, 0.375},
{-0.4375, -0.5, -0.25, 0.4375, -0.4375, 0.25},
},
}
local tiles = {
"maidroid_tool_core_top.png",
"maidroid_tool_core_top.png",
"maidroid_tool_core_right.png",
"maidroid_tool_core_right.png",
"maidroid_tool_core_right.png",
"maidroid_tool_core_right.png",
}
minetest.register_node("maidroid_tool:core_node", {
drawtype = "nodebox",
tiles = tiles,
node_box = node_box,
paramtype = "light",
paramtype2 = "facedir",
}) })
minetest.register_entity("maidroid_tool:core_entity", { minetest.register_entity("maidroid_tool:core_entity", {
physical = false, physical = false,
visual = "wielditem", visual = "wielditem",
visual_size = {x = 0.5, y = 0.5}, visual_size = {x = 0.5, y = 0.5},
nodename = "maidroid_tool:core_node", collisionbox = {0, 0, 0, 0, 0, 0},
on_activate = function(self, staticdata) on_activate = function(self, staticdata)
self.object:set_properties{textures = {"maidroid_tool:core_node"}} self.object:set_properties{textures = {"maidroid_tool:core_node"}}
end, end,
on_step = function(self, dtime)
local yaw = self.object:getyaw()
self.object:setyaw(yaw + 0.1)
end,
}) })
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

Binary file not shown.