mirror of
https://github.com/technix/ham_radio.git
synced 2024-11-27 17:33:49 +01:00
new craft recipes
This commit is contained in:
parent
4626d07702
commit
48f1c0406f
62
craft.lua
Normal file
62
craft.lua
Normal file
@ -0,0 +1,62 @@
|
||||
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:simple_energy_crystal'
|
||||
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, ''},
|
||||
{body, wires, body},
|
||||
{'', battery, ''},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ham_radio:receiver",
|
||||
recipe = {
|
||||
{antenna},
|
||||
{'ham_radio:circuit'},
|
||||
{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'},
|
||||
}
|
||||
})
|
1
init.lua
1
init.lua
@ -29,6 +29,7 @@ function ham_radio.delete_transmitter(frequency)
|
||||
mod_storage:set_string(tostring(frequency), nil)
|
||||
end
|
||||
|
||||
dofile(modpath.."/craft.lua")
|
||||
dofile(modpath.."/transmitter.lua")
|
||||
dofile(modpath.."/receiver.lua")
|
||||
dofile(modpath.."/hud.lua")
|
||||
|
@ -32,14 +32,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
return true
|
||||
end)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ham_radio:receiver",
|
||||
recipe = {
|
||||
{"default:glass"},
|
||||
{"default:steel_ingot"},
|
||||
{"default:glass"},
|
||||
}
|
||||
})
|
||||
|
||||
function ham_radio:locate_transmitter(player, transmitter_pos)
|
||||
local player_pos = player:get_pos()
|
||||
|
BIN
textures/ham_radio_circuit.png
Normal file
BIN
textures/ham_radio_circuit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
@ -1,13 +1,4 @@
|
||||
|
||||
minetest.register_craft({
|
||||
output = "ham_radio:transmitter",
|
||||
recipe = {
|
||||
{"default:glass"},
|
||||
{"default:mese"},
|
||||
{"default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("ham_radio:transmitter", {
|
||||
description = "Ham Radio Transmitter",
|
||||
tiles = {"ham_radio_transmitter_top.png", "ham_radio_transmitter.png"},
|
||||
|
Loading…
Reference in New Issue
Block a user