diff --git a/maidroid_aux/init.lua b/maidroid_aux/init.lua new file mode 100644 index 0000000..7217a30 --- /dev/null +++ b/maidroid_aux/init.lua @@ -0,0 +1,9 @@ +------------------------------------------------------------ +-- Copyright (c) 2016 tacigar. All rights reserved. +-- https://github.com/tacigar/maidroid +------------------------------------------------------------ + +maidroid_aux = {} + +maidroid_aux.modname = "maidroid_aux" +maidroid_aux.modpath = minetest.get_modpath(maidroid_aux.modname) diff --git a/maidroid_aux/table.lua b/maidroid_aux/table.lua new file mode 100644 index 0000000..0e1610f --- /dev/null +++ b/maidroid_aux/table.lua @@ -0,0 +1,15 @@ +------------------------------------------------------------ +-- Copyright (c) 2016 tacigar. All rights reserved. +-- https://github.com/tacigar/maidroid +------------------------------------------------------------ + +maidroid_aux.table = {} + +function maidroid_aux.table.find(t, v) + for _, value in ipairs(t) do + if v == value then + return true + end + end + return false +end