-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrafts.lua
More file actions
68 lines (60 loc) · 1.37 KB
/
crafts.lua
File metadata and controls
68 lines (60 loc) · 1.37 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
--- Crafting
--
-- @topic crafting
-- pencil
local pencil = {
lead = "technic:lead_lump",
stick = "group:stick",
rubber = "technic:rubber",
}
-- FIXME: how to check if items are registered under "group:stick"
if core.global_exists("default") and
core.registered_items[pencil.lead] and core.registered_items[pencil.rubber] then
--- @craft pencil
-- @output alternode:pencil
-- @recipe
-- Key:
-- - L: technic:lead_lump
-- - S: group:stick
-- - R: technic:rubber
--
-- ╔═══╦═══╦═══╗
-- ║ ║ ║ L ║
-- ╠═══╬═══╬═══╣
-- ║ ║ S ║ ║
-- ╠═══╬═══╬═══╣
-- ║ R ║ ║ ║
-- ╚═══╩═══╩═══╝
core.register_craft({
output = alternode.modname .. ":pencil",
recipe = {
{"", "", pencil.lead},
{"", pencil.stick, ""},
{pencil.rubber, "", ""},
},
})
end
-- key
local key = {
main = "basic_materials:brass_ingot",
}
if core.registered_items[key.main] then
--- @craft key
-- @output alternode:key
-- @recipe
-- Key:
-- - B: basic_materials:brass_ingot
--
-- ╔═══╦═══╗
-- ║ ║ B ║
-- ╠═══╬═══╣
-- ║ B ║ ║
-- ╚═══╩═══╝
core.register_craft({
output = alternode.modname .. ":key",
recipe = {
{"", key.main},
{key.main, ""},
},
})
end