From 81b896e74a4d7853b8230dcb0c76257638f3bd82 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 24 Dec 2016 02:27:36 -0600 Subject: [PATCH] Rename modem to NIC, add textures, craft, and docs --- README | 4 ++++ init.lua | 42 ++++++++++++++++++++++++++------- textures/digistuff_nic_top.png | Bin 0 -> 3435 bytes 3 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 textures/digistuff_nic_top.png 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 0000000000000000000000000000000000000000..da4961324fb8505761b4c02c61e5bee93cf9fd73 GIT binary patch literal 3435 zcmcgudsNd$7M{ci2`I3jpdt@le5}R5(pEGA2?z!bMb>tyqDJt6=nDAQfIO2QAaazR z#QFeNl<@E<1seo}C4GQuu%yH2q6iCJae{#J;L@wDX)|Rv|eGJ6`QUj02>m1?(M1g*U2LJ^C761~256^7{00KuC z0G#1xcGJhY3wBoa#BEyT?#Mh(L&x>hEhOmod*B@C4ZE`$+^(2p@5Vz*`uPZ-RU3QW zM=z<{qE_B;8K}$;lDO z%FE7pqs|mZ_%b&?WuaKa*zQwLiE5=MUoMb!NR)+qLu2o~qCt zgg`}yw4G$oHDf~pnN+WiuAIBxBCg3RQPuZE`eWZVgl+E7*!y4@DPb+Bte`h{3u`L* z1}R9oH?8-Do=` zR+YD}8B-Efx(;|%T>}3Hp-v<6{q#@6PJ)MlEQsCc6Qfaf8`8UCZ0qK%%MTH&xP~ANVX0f*Vdn~CFn~kq$$?cZ>(pHJ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