Update init.lua, qrencode.lua
parent
04e7b27b16
commit
021c08d27e
3
init.lua
3
init.lua
|
@ -12,7 +12,7 @@ local function matrix_to_string(tab)
|
|||
str_tab[y + 1][x + 1] = "1"
|
||||
elseif tab[x][y] < 0 then
|
||||
str_tab[y + 1][x + 1] = "0"
|
||||
else
|
||||
else
|
||||
str_tab[y + 1][x + 1] = " "
|
||||
str_tab[y + 1][x + 2] = "1"
|
||||
end
|
||||
|
@ -47,7 +47,6 @@ minetest.register_chatcommand("qrcode", {
|
|||
print('Something went wrong')
|
||||
else
|
||||
local rows = matrix_to_string(tab_or_message)
|
||||
local string
|
||||
for x=1,#rows do
|
||||
for z=1,#rows do
|
||||
if rows[x][z] == "1" then
|
||||
|
|
|
@ -178,7 +178,6 @@ end
|
|||
-- See table 2 of the spec. We only support mode 1, 2 and 4.
|
||||
-- That is: numeric, alaphnumeric and binary.
|
||||
local function get_mode( str )
|
||||
local mode
|
||||
if string.match(str,"^[0-9]+$") then
|
||||
return 1
|
||||
elseif string.match(str,"^[0-9A-Z $%%*./:+-]+$") then
|
||||
|
|
Loading…
Reference in New Issue