init, changed a few things for GEIGERnet-Server, added sounds for receiving RDS message
This commit is contained in:
commit
fe76810459
38 changed files with 1059 additions and 0 deletions
41
beacon.lua
Normal file
41
beacon.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
minetest.register_node("ham_radio:beacon", {
|
||||
description = "Radio Beacon",
|
||||
tiles = {
|
||||
"ham_radio_transmitter_top.png",
|
||||
"ham_radio_transmitter_top.png",
|
||||
"ham_radio_transmitter_side.png",
|
||||
"ham_radio_transmitter_side.png",
|
||||
"ham_radio_transmitter_side.png",
|
||||
"ham_radio_beacon_front.png"
|
||||
},
|
||||
groups = {cracky=2,oddly_breakable_by_hand=2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||
},
|
||||
light_source = 3,
|
||||
after_place_node = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos);
|
||||
if minetest.is_player(placer) then
|
||||
local name = placer:get_player_name()
|
||||
meta:set_string('operated_by', name)
|
||||
ham_radio.play_tuning_sound(placer)
|
||||
end
|
||||
meta:set_string("frequency", ham_radio.find_free_frequency(ham_radio.settings.beacon_frequency))
|
||||
ham_radio.transmitter_update_infotext(meta)
|
||||
ham_radio.save_transmitter(pos, meta)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
local name = player:get_player_name()
|
||||
return inv:is_empty("main") and not minetest.is_protected(pos, name)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, player)
|
||||
ham_radio.delete_transmitter(pos)
|
||||
end,
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue