From b2f654ef5d6a27cdd33b4a27e6650461fe5f3af3 Mon Sep 17 00:00:00 2001 From: tacigar Date: Mon, 19 Dec 2016 11:13:10 +0900 Subject: [PATCH] Add maidroid_aux mod --- maidroid_aux/init.lua | 9 +++++++++ maidroid_aux/table.lua | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 maidroid_aux/init.lua create mode 100644 maidroid_aux/table.lua 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