diff --git a/README.md b/README.md index 76d4d0b..1695853 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,6 @@ |-------------|----------------------------------------------------------------------| | `/src` | The source code! This file will be compiled into `kristify.lua`. | | `/services` | Different services. Mainly the different product types. | -| `/data` | All types of data. Example: Config, products, chests, etc. | +| `/config` | All types of data. Example: Config, products, chests, etc. | | `/docs` | The documentation folder. This folder is not included in production. | | `/.github` | All github related stuff. Not included in production | diff --git a/config/config.lua b/config/config.lua new file mode 100644 index 0000000..585712d --- /dev/null +++ b/config/config.lua @@ -0,0 +1,8 @@ +return { + payment = { + paymentType = "name", + key = "jhfuiojdnhiotujnhoifdjhydtfydfty-345", + keyFormat = "pkey", + name = "kristname" + } +}; diff --git a/config/products.lua b/config/products.lua new file mode 100644 index 0000000..8392fdc --- /dev/null +++ b/config/products.lua @@ -0,0 +1,20 @@ +local products = { + { + displayName = "Dirt", + type = "item", + price = 2, + params = { + amount = 203, + id = "minecraft:dirt" + } + }, + { + displayName = "MiloX", + type = "link", + price = 20, + params = { + link = "https://devbin.dev/8f3wy" + } + } +}; +return products; diff --git a/config/services.lua b/config/services.lua new file mode 100644 index 0000000..39f2713 --- /dev/null +++ b/config/services.lua @@ -0,0 +1,15 @@ +local services = { + item = { + chests = { + { + first = "minecraft:chest_", + ids = { + 193, + 195, + "199->205" + } + } + } + } +}; +return services; diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..d9a0b67 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,4 @@ + +# kristify.github.io + +The docs for Kristify diff --git a/init.lua b/init.lua deleted file mode 100644 index e67301b..0000000 --- a/init.lua +++ /dev/null @@ -1,23 +0,0 @@ --- make a copy of package.path -local old_path = package.path - -package.path = string.format( - "/%s/?.lua;/rom/modules/main/?.lua", - fs.getDir(shell.getRunningProgram()) -) - -local function main(...) - -- main init code -end - -local args = table.pack(...) -xpcall(function() - main(table.unpack(args,1,args.n)) -end,function(err) - -- error display - - printError(err) -end) - --- restores package path to original -package.path = old_path diff --git a/services/item.lua b/services/item.lua new file mode 100644 index 0000000..cbac891 --- /dev/null +++ b/services/item.lua @@ -0,0 +1 @@ +-- Item service \ No newline at end of file diff --git a/services/link.lua b/services/link.lua new file mode 100644 index 0000000..5754563 --- /dev/null +++ b/services/link.lua @@ -0,0 +1 @@ +-- Link service \ No newline at end of file diff --git a/src/init.lua b/src/init.lua new file mode 100644 index 0000000..e67301b --- /dev/null +++ b/src/init.lua @@ -0,0 +1,23 @@ +-- make a copy of package.path +local old_path = package.path + +package.path = string.format( + "/%s/?.lua;/rom/modules/main/?.lua", + fs.getDir(shell.getRunningProgram()) +) + +local function main(...) + -- main init code +end + +local args = table.pack(...) +xpcall(function() + main(table.unpack(args,1,args.n)) +end,function(err) + -- error display + + printError(err) +end) + +-- restores package path to original +package.path = old_path