Rename modem to NIC, add textures, craft, and docs

This commit is contained in:
cheapie
2016-12-24 02:27:36 -06:00
parent 99eab9dd58
commit 81b896e74a
3 changed files with 37 additions and 9 deletions

View File

@@ -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