documentation
parent
bd0ed40a31
commit
b0507dd1fa
|
@ -1,5 +1,5 @@
|
|||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
||||
#Basic functions
|
||||
# Minetest mod: Basic functions
|
||||
|
||||
Main repository:
|
||||
|
||||
|
@ -11,17 +11,17 @@ https://gitlab.com/ademant/basic_functions.git
|
|||
|
||||
https://github.com/ademant/basic_functions.git
|
||||
|
||||
##Short description
|
||||
## Short description
|
||||
Mod provide some functions, I need for several mods. Basically for import spreadsheet configurations.
|
||||
|
||||
##short api:
|
||||
## short api:
|
||||
function has_value(tab,val)
|
||||
check if val is inside list tab
|
||||
|
||||
function import_csv(infile,def)
|
||||
read configuration from infile
|
||||
def.as_numeric: all values not stated in col_num, col_tab or with name "name" are interpreted as numeric
|
||||
def.seperator: character to use as field delimiter
|
||||
def.seperator: character to use as field delimiter in infile
|
||||
def.col_num: turn this elements to numbers
|
||||
def.groups_num: put this elements as numbers into matrix groups
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ end
|
|||
local has_value=basic_functions.has_value
|
||||
|
||||
-- read table "infile" where in "def" is defined, which cols are numbers and which belongs to a group
|
||||
-- First line has to be the header.
|
||||
-- def.as_numeric: all values not stated in col_num, col_tab or with name "name" are interpreted as numeric
|
||||
-- def.seperator: character to use as field delimiter
|
||||
-- def.col_num: turn this elements to numbers
|
||||
|
|
Loading…
Reference in New Issue