+ i = add_vec(pos,order)
+ x=i.x
+ y=i.y
+ z=i.z
+ if mem_map.dust[x] and mem_map.dust[x][y] and mem_map.dust[x][y][z] then
+ if mem_map.dust[x][y][z].dust < power then
+ mem_map.dust[x][y][z].dust = power
+ redstone_distribute(new_vec(x,y,z),power,mem_map,nil)
+ end
+ end
+ end
+ end
+ return(mem_map)
+end
+
+
+--[[
+ ,
+ ,. | \
+ |: \ ; :\
+ :' ;\| ::\
+ \ : | `::\
+ _) | `:`.
+ ,' , `. ;: ;
+ ,' ;: ;"' ,:: |_
+ /, ` . ;::: |:`-.__
+ _,' _o\ ,::.`:' ; ; . '
+ _,-' `:. ;""\,
+ ,-' ,: `-;,
+ \, ;: ;--._
+ `.______,-,----._ ,' ;: ,/ , ,`
+ / /,-';' \ ; `: ,'/,::.:::
+ ,',;-'-'_,--; ; :. ,',',;::::::
+ ( /___,-' `. ;::,,'o/ ,:::::::
+ `' ) ;:,'o / ;"- -::
+ \__ _,'o ,' ,::
+ ) `--' ,..::::
+ ; `. ,:::::::
+ ; ``::. :::::::
+]]-- sic em boy!
+local i
+local index
+local function dust_sniff(pos,mem_map,boundary,single,origin,ignore)
+ if not single then
+ --print("all position index--")
+ for _,order in pairs(order) do
+ i = add_vec(pos,order)
+
+ if not mem_map[i.x] then mem_map[i.x] = {} end
+ if not mem_map[i.x][i.y] then mem_map[i.x][i.y] = {} end
+
+ if not mem_map[i.x][i.y][i.z] then
+ if i and boundary and boundary[i.x] and boundary[i.x][i.y] and boundary[i.x][i.y][i.z] then
+ index = boundary[i.x][i.y][i.z]
+
+ if index.dust then
+
+ mem_map[i.x][i.y][i.z] = true
+
+ if not mem_map.dust[i.x] then mem_map.dust[i.x] = {} end
+ if not mem_map.dust[i.x][i.y] then mem_map.dust[i.x][i.y] = {} end
+
+ mem_map.dust[i.x][i.y][i.z] = index
+
+ dust_sniff(i,mem_map,boundary)
+
+ elseif index.torch and index.torch > 1 then
+ if index.torch_directional and vec_equals(pos,index.output) then
+
+ mem_map[i.x][i.y][i.z] = true
+
+ if not mem_map.torch[i.x] then mem_map.torch[i.x] = {} end
+ if not mem_map.torch[i.x][i.y] then mem_map.torch[i.x][i.y] = {} end
+
+ mem_map.torch[i.x][i.y][i.z] = index
+
+
+ elseif not index.torch_directional then
+
+ mem_map[i.x][i.y][i.z] = true
+
+ if not mem_map.torch[i.x] then mem_map.torch[i.x] = {} end
+ if not mem_map.torch[i.x][i.y] then mem_map.torch[i.x][i.y] = {} end
+
+ mem_map.torch[i.x][i.y][i.z] = index
+ end
+ end
+
+ if index.activator then
+ mem_map[i.x][i.y][i.z] = true
+
+ if not mem_map.activator[i.x] then mem_map.activator[i.x] = {} end
+ if not mem_map.activator[i.x][i.y] then mem_map.activator[i.x][i.y] = {} end
+
+ mem_map.activator[i.x][i.y][i.z] = index
+ elseif index.directional_activator and vec_equals(pos,index.input) then
+
+ mem_map[i.x][i.y][i.z] = true
+
+ if not mem_map.activator[i.x] then mem_map.activator[i.x] = {} end
+ if not mem_map.activator[i.x][i.y] then mem_map.activator[i.x][i.y] = {} end
+
+ mem_map.activator[i.x][i.y][i.z] = index
+ end
+ end
+ end
+ end
+ else
+ --print("single position index")
+
+ i = pos
+
+
+ if not mem_map[i.x] then mem_map[i.x] = {} end
+ if not mem_map[i.x][i.y] then mem_map[i.x][i.y] = {} end
+
+ if not mem_map[i.x][i.y][i.z] then