From 1b1465e1fb7a3af5d5b254ac7939ec80d8db8d2b Mon Sep 17 00:00:00 2001 From: Anthony Recascino Date: Sat, 30 Jul 2016 12:23:57 -0400 Subject: [PATCH] Attempt callback --- factionsmod.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/factionsmod.lua b/factionsmod.lua index b1ff6d6..aae32ec 100644 --- a/factionsmod.lua +++ b/factionsmod.lua @@ -54,8 +54,7 @@ function factionsmod.add_faction(name) factionsmod.data.factionsmod[name].adminlist = {} factionsmod.data.factionsmod[name].invitations = {} factionsmod.data.factionsmod[name].owner = "" - factionsmod.data.factionsmod[name].chunk = {} - factionsmod.data.factionsmod[name].chunk[0] = {} + factionsmod.data.factionsmod[name].chunk = {} factionsmod.dynamic_data.membertable[name] = {} @@ -786,7 +785,10 @@ function factionsmod.load() minetest.register_on_dignode(function(pos,oldnode,digger) if next(factionsmod.data.factionsmod) ~= nil then for k,v in pairs(factionsmod.data.factionsmod) do - --for k,v in + for i =1, v.chunk.maxn() do + if v.chunk[i][1] == math.floor(pos.x/16) then + end + end end end end