forked from mt-mods/missions
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwand.lua
55 lines (44 loc) · 1.27 KB
/
wand.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
minetest.register_craftitem("missions:wand_position", {
description = "Mission wand with position",
inventory_image = "missions_wand_position.png",
stack_max = 1
})
minetest.register_craftitem("missions:wand_chest", {
description = "Mission wand with chest-reference",
inventory_image = "missions_wand_chest.png",
stack_max = 1
})
minetest.register_craftitem("missions:wand_mission", {
description = "Mission wand with mission-reference",
inventory_image = "missions_wand_mission.png",
stack_max = 1
})
minetest.register_craftitem("missions:wand", {
description = "Mission wand",
inventory_image = "missions_wand.png",
on_use = function(itemstack, player, pointed_thing)
if pointed_thing and pointed_thing.type == "node" and pointed_thing.under then
missions.form.wand(pointed_thing.under, player)
end
return itemstack
end
})
-- crafts
minetest.register_craft({
type = "shapeless",
output = "missions:wand",
recipe = {"missions:wand_chest"}
})
minetest.register_craft({
type = "shapeless",
output = "missions:wand",
recipe = {"missions:wand_position"}
})
minetest.register_craft({
output = "missions:wand 3",
recipe = {
{"default:stick", "", "default:obsidian_shard"},
{"", "default:stick", ""},
{"default:mese_crystal_fragment", "", "default:stick"}
}
})