summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2016-12-24 02:27:36 -0600
committercheapie <no-email-for-you@example.com>2016-12-24 02:27:36 -0600
commit81b896e74a4d7853b8230dcb0c76257638f3bd82 (patch)
tree8a27a94ca6dece149c73f253b4a1133d45dc455c
parent99eab9dd58223664a6e78da4def93f69f38d1990 (diff)
downloaddigistuff-81b896e74a4d7853b8230dcb0c76257638f3bd82.tar
digistuff-81b896e74a4d7853b8230dcb0c76257638f3bd82.tar.gz
digistuff-81b896e74a4d7853b8230dcb0c76257638f3bd82.tar.bz2
digistuff-81b896e74a4d7853b8230dcb0c76257638f3bd82.tar.xz
digistuff-81b896e74a4d7853b8230dcb0c76257638f3bd82.zip
Rename modem to NIC, add textures, craft, and docs
-rw-r--r--README4
-rw-r--r--init.lua42
-rw-r--r--textures/digistuff_nic_top.pngbin0 -> 3435 bytes
3 files changed, 37 insertions, 9 deletions
diff --git a/README b/README
index 3318cd6..5743f20 100644
--- a/README
+++ b/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.
diff --git a/init.lua b/init.lua
index 1eb13b4..332d92d 100644
--- a/init.lua
+++ b/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
diff --git a/textures/digistuff_nic_top.png b/textures/digistuff_nic_top.png
new file mode 100644
index 0000000..da49613
--- /dev/null
+++ b/textures/digistuff_nic_top.png
Binary files differ