forked from Mirrorlandia_minetest/digistuff
Rename modem to NIC, add textures, craft, and docs
This commit is contained in:
parent
99eab9dd58
commit
81b896e74a
4
README
4
README
@ -30,3 +30,7 @@ Every second while a player is within the radius, a table listing the players in
|
||||
|
||||
How to use the digilines control panel:
|
||||
Once a channel is set, any messages sent on that channel will be shown on the "LCD". The buttons, when pressed, send the messages "up", "down", "left", "right", "back", and "enter" on the same channel. If the panel is placed in a protected area (all standard protection mods are supported), only the owner of the area (and players with the protection_bypass privilege) can set the channel. There is also a "lock" function in the bottom-right of the "LCD" area. Click the padlock icon to lock/unlock it. If locked, only the owner of the area is allowed to use the buttons. If unlocked, anyone can use the buttons, although channel setting and (for reasons that shuld be obvious) locking/unlocking is still limited to the area owner and players with protection_bypass.
|
||||
|
||||
|
||||
How to use the NIC:
|
||||
Send a digilines signal with the URL you want to download. The HTTPRequestResult table will be sent back on the same channel.
|
||||
|
42
init.lua
42
init.lua
@ -760,21 +760,38 @@ minetest.register_node("digistuff:piezo", {
|
||||
local http = minetest.request_http_api()
|
||||
|
||||
if http then
|
||||
minetest.register_node("digistuff:modem", {
|
||||
description = "Digilines Modem",
|
||||
minetest.register_node("digistuff:nic", {
|
||||
description = "Digilines NIC",
|
||||
groups = {cracky=3},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec","field[channel;Channel;${channel}")
|
||||
end,
|
||||
tiles = {
|
||||
"digistuff_piezo_top.png",
|
||||
"digistuff_piezo_sides.png",
|
||||
"digistuff_piezo_sides.png",
|
||||
"digistuff_piezo_sides.png",
|
||||
"digistuff_piezo_sides.png",
|
||||
"digistuff_piezo_sides.png"
|
||||
},
|
||||
"digistuff_nic_top.png",
|
||||
"jeija_microcontroller_bottom.png",
|
||||
"jeija_microcontroller_sides.png",
|
||||
"jeija_microcontroller_sides.png",
|
||||
"jeija_microcontroller_sides.png",
|
||||
"jeija_microcontroller_sides.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
selection_box = {
|
||||
--From luacontroller
|
||||
type = "fixed",
|
||||
fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 },
|
||||
},
|
||||
node_box = {
|
||||
--From Luacontroller
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}, -- Bottom slab
|
||||
{-5/16, -7/16, -5/16, 5/16, -6/16, 5/16}, -- Circuit board
|
||||
{-3/16, -6/16, -3/16, 3/16, -5/16, 3/16}, -- IC
|
||||
}
|
||||
},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
local name = sender:get_player_name()
|
||||
if minetest.is_protected(pos,name) and not minetest.check_player_privs(name,{protection_bypass=true}) then
|
||||
@ -804,4 +821,11 @@ if http then
|
||||
},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "digistuff:nic",
|
||||
recipe = {
|
||||
{"","","mesecons:wire_00000000_off"},
|
||||
{"digilines:wire_std_00000000","mesecons_luacontroller:luacontroller0000","mesecons:wire_00000000_off"}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
BIN
textures/digistuff_nic_top.png
Normal file
BIN
textures/digistuff_nic_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue
Block a user