summaryrefslogtreecommitdiff
path: root/init.lua
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 /init.lua
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
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua42
1 files changed, 33 insertions, 9 deletions
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