-
Notifications
You must be signed in to change notification settings - Fork 2
/
craft.lua
67 lines (59 loc) · 1.43 KB
/
craft.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
56
57
58
59
60
61
62
63
64
65
66
67
local circuit = 'default:mese_crystal'
local body = 'default:steel_ingot'
local wires = 'default:copper_ingot'
local glass = 'default:glass'
local antenna = wires
local battery = 'default:mese_crystal'
if minetest.get_modpath("basic_materials") then
circuit = 'basic_materials:ic'
body = 'basic_materials:plastic_sheet'
wires = 'basic_materials:copper_wire'
antenna = wires
battery = 'basic_materials:energy_crystal_simple'
end
if minetest.get_modpath("technic") then
antenna = 'technic:copper_coil'
battery = 'technic:battery'
end
minetest.register_craftitem("ham_radio:circuit", {
description = "Radio Circuit",
inventory_image = "ham_radio_circuit.png",
})
minetest.register_craft({
output = "ham_radio:circuit",
recipe = {
{circuit, wires, circuit},
{body, battery, body},
}
})
minetest.register_craft({
output = "ham_radio:handheld_receiver",
recipe = {
{'', antenna, ''},
{'','ham_radio:circuit', ''},
{body, body, body}
}
})
minetest.register_craft({
output = "ham_radio:receiver",
recipe = {
{body, antenna, body},
{glass,'ham_radio:circuit', glass},
{body, body, body}
}
})
minetest.register_craft({
output = "ham_radio:transmitter",
recipe = {
{wires, antenna, wires},
{glass, 'ham_radio:circuit', glass},
{body, body, body}
}
})
minetest.register_craft({
output = "ham_radio:beacon",
recipe = {
{antenna, body},
{wires, 'ham_radio:circuit'},
}
})