Add pseudo-pick
[minetest_pseudonodes.git] / init.lua
blob5283c112ad1cf118d4c8d8e9e51c9404c71bc741
1 minetest.register_node("pseudonodes:pseudo_block", {
2 description = "pseudo-block",
3 drawtype = "glasslike",
4 paramtype = "light",
5 tiles = { "pseudonodes_pseudo_block.png" },
6 inventory_image = minetest.inventorycube("pseudonodes_pseudo_block.png"),
7 groups = { pseudo = 1 },
8 sunlight_propagates = true,
9 walkable = false,
10 sounds = { dig = { name="", gain = 0 } },
11 alpha = 0
13 minetest.register_node("pseudonodes:replacable_pseudo_block", {
14 description = "replacable pseudo-block",
15 drawtype = "glasslike",
16 paramtype = "light",
17 tiles = { "pseudonodes_replacable_pseudo_block.png" },
18 inventory_image = minetest.inventorycube("pseudonodes_replacable_pseudo_block.png"),
19 groups = { pseudo = 1 },
20 sunlight_propagates = true,
21 walkable = false,
22 sounds = { dig = { name="", gain = 0 } },
23 alpha = 0,
24 buildable_to = true
27 minetest.register_node("pseudonodes:switch_block_off", {
28 description = "switch block (off)",
29 drawtype = "glasslike",
30 paramtype = "light",
31 tiles = { "pseudonodes_switch_block_off.png" },
32 inventory_image = minetest.inventorycube("pseudonodes_switch_block_off.png"),
33 sunlight_propagates = true,
34 walkable = false,
35 sounds = { dig = { name="", gain = 0 } },
36 groups = { pseudo = 1 },
37 alpha = 0,
38 on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
39 local newnode = node
40 newnode.name = "pseudonodes:switch_block_on"
41 minetest.swap_node(pos, newnode)
42 return itemstack
43 end,
46 minetest.register_node("pseudonodes:switch_block_on", {
47 description = "switch block (on)",
48 tiles = { "pseudonodes_switch_block_on.png" },
49 inventory_image = minetest.inventorycube("pseudonodes_switch_block_on.png"),
50 groups = { pseudo = 1 },
51 diggable = true,
52 walkable = true,
53 on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
54 local newnode = node
55 newnode.name = "pseudonodes:switch_block_off"
56 minetest.swap_node(pos, newnode)
57 return itemstack
58 end,
61 minetest.register_node("pseudonodes:ladder", {
62 description = "pseudo-ladder",
63 drawtype = "glasslike",
64 paramtype = "light",
65 tiles = { "pseudonodes_ladder.png" },
66 inventory_image = minetest.inventorycube("pseudonodes_ladder.png"),
67 groups = { pseudo = 1 },
68 sunlight_propagates = true,
69 walkable = false,
70 climbable = true,
71 sounds = { dig = { name="", gain = 0 } },
72 alpha = 0
76 minetest.register_tool("pseudonodes:pick", {
77 description = "pseudo-pick",
78 inventory_image = "pseudonodes_pick.png",
79 tool_capabilities = {
80 groupcaps = { pseudo = { times = {[1]=0}, maxlevel=1, maxwear=0 }},