From e96e5793ddcc29d7c9b31b384c94fd8b8d696da3 Mon Sep 17 00:00:00 2001 From: Izaya Orihara Date: Thu, 6 Oct 2016 15:00:03 +1100 Subject: [PATCH] Cleaned up the T416 a bit --- test3d_t416/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test3d_t416/init.lua b/test3d_t416/init.lua index a8a88b3..f54cf4b 100644 --- a/test3d_t416/init.lua +++ b/test3d_t416/init.lua @@ -20,7 +20,6 @@ local function t416_digiline_receive(pos, node, channel, msg) local memoffset = meta:get_int("startaddr") if channel:sub(1,#chan) == chan and tonumber(channel:sub(#chan+1),16)+1-memoffset <= MEMSIZE and tonumber(channel:sub(#chan+1),16)+1-memoffset > 0 then local memaddr = tonumber(channel:sub(#chan+1),16)+1-memoffset - print(memaddr) if tostring(msg):lower() == "get" then digiline:receptor_send(pos, digiline.rules.default, channel, tonumber(mem[memaddr] or 0)) print("Reading address "..tostring(memaddr)..": "..tostring(mem[memaddr])) @@ -39,7 +38,7 @@ print("Created T416 digiline function") local function t416_set_meta(pos) local meta = minetest.get_meta(pos) local ms = "" - for i = 1, 16 do + for i = 1, MEMSIZE do ms = ms .. "0\n" end meta:set_string("mem",ms)