From 169ea1ce76c549d2888f87c0dc2edf4654b02d42 Mon Sep 17 00:00:00 2001 From: XtremeHacker Date: Sun, 26 Feb 2017 09:12:52 -0800 Subject: [PATCH] Added Ores module --- doc/modules.md | 4 ++-- modules.conf | 1 + modules/crafting/init.lua | 32 ++++++++++++++++++++++++++++++++ modules/ores/init.lua | 0 modules/shared/init.lua | 8 ++++++++ 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 modules/crafting/init.lua create mode 100644 modules/ores/init.lua diff --git a/doc/modules.md b/doc/modules.md index d7c31c8..023ae1b 100644 --- a/doc/modules.md +++ b/doc/modules.md @@ -2,7 +2,7 @@ Non-API portions of MicroExpansion are loaded as modules to allow them to be easily enabled or disabled. Modules can be manually loaded or required from the API or from another module. Specific modules can be disabled using `modules.conf`, as documented below. ## Managing Modules -Modules listed in the configuration file are automatically loaded at startup unless specifically disabled. For the purpose of listing and/or disabling mods, we've introduced the `modules.conf` file. +Modules listed in the configuration file are automatically loaded at startup unless specifically disabled. For the purpose of listing and/or disabling mods, we've introduced the `modules.conf` file. Each module is listed on a new line, as if setting a variable. A module can be disabled or enabled by setting this variable to `true` or `false`. If a module is not listed here, or is set to `false` (disabled), it will not be automatically loaded. @@ -32,4 +32,4 @@ Attempts to load a module. If the module path is `nil`, `nil` is returned to ind #### `require_module(name)` __Usage:__ `microexpansion.require_module()` -Passes name to `load_module` if the mod was not disabled in `modules.conf`. For further documentation, see `load_module`. \ No newline at end of file +Passes name to `load_module` if the mod was not disabled in `modules.conf`. For further documentation, see `load_module`. diff --git a/modules.conf b/modules.conf index 894ec9a..a7644a5 100644 --- a/modules.conf +++ b/modules.conf @@ -1,3 +1,4 @@ shared = true power = true storage = true +oregen = true diff --git a/modules/crafting/init.lua b/modules/crafting/init.lua new file mode 100644 index 0000000..3d851c4 --- /dev/null +++ b/modules/crafting/init.lua @@ -0,0 +1,32 @@ +--ME Steel Infused Obsidian Ingot +minetest.register_craftitem("microexpansion:steel_infused_obsidian_ingot", { + description = "Steel Infused Obsidian Ingot", + inventory_image = "infused_obsidian_ingot.png" +}) + +minetest.register_craft({ + type = "shapeless", + output = "microexpansion:steel_infused_obsidian_ingot", + recipe = {"default:steel_ingot", "default:obsidian_shard", "default:steel_ingot"} +}) + +minetest.register_craftitem("microexpansion:machine_casing", { + description = "ME Machine Casing", + inventory_image = "machine_casing.png" +}) + + +--ME Machine Casing +minetest.register_craftitem("microexpansion:machine_casing", { + description = "machine_casing", + inventory_image = "machine_casing.png" +}) + +minetest.register_craft({ + output = "microexpansion:machine_casing", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} + } +}) diff --git a/modules/ores/init.lua b/modules/ores/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/modules/shared/init.lua b/modules/shared/init.lua index ced7f6e..f4ea723 100644 --- a/modules/shared/init.lua +++ b/modules/shared/init.lua @@ -19,4 +19,12 @@ me.register_item("steel_infused_obsidian_ingot", { -- [register item] Machine Casing me.register_item("machine_casing", { description = "Machine Casing", + recipe = { + "single", + { 1, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} + }, +}, })