diff --git a/api.lua b/api.lua index ab79de4..3324c6f 100644 --- a/api.lua +++ b/api.lua @@ -28,6 +28,7 @@ function maidroid.register_module(module_name, def) minetest.register_craftitem(module_name, { description = def.description, stack_max = 1, + inventory_image = def.inventory_image, }) end @@ -139,8 +140,10 @@ function maidroid.register_maidroid(product_name, def) end, }) -- スポーンエッグを登録 - minetest.register_craftitem(product_name.."_swawn_egg", { + minetest.register_craftitem(product_name.."_spawn_egg", { description = def.description.." Swapn Egg", + inventory_image = def.inventory_image, + stack_max = 1, on_use = function(itemstack, user, pointed_thing) minetest.add_entity(pointed_thing.above, product_name) return itemstack diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..2717bef --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +default +dye diff --git a/init.lua b/init.lua index 0bd96ea..6813f8b 100644 --- a/init.lua +++ b/init.lua @@ -12,4 +12,4 @@ dofile(maidroid.modpath.."/util.lua") dofile(maidroid.modpath.."/api.lua") dofile(maidroid.modpath.."/modules.lua") dofile(maidroid.modpath.."/maidroids.lua") - +dofile(maidroid.modpath.."/recipe.lua") diff --git a/maidroids.lua b/maidroids.lua index 652048c..c13a501 100644 --- a/maidroids.lua +++ b/maidroids.lua @@ -6,16 +6,19 @@ maidroid.register_maidroid("maidroid:maidroid", { hp_max = 10, description = "Maidroid : Maidroid", + inventory_image = "maidroid_maidroid.png", }) maidroid.register_maidroid("maidroid:maidroid_mk2", { hp_max = 10, description = "Maidroid : Maidroid MkII", textures = {"maidroid_mk2.png"}, + inventory_image = "maidroid_maidroid_mk2.png", }) maidroid.register_maidroid("maidroid:maidroid_mk3", { hp_max = 10, description = "Maidroid : Maidroid MkIII", textures = {"maidroid_mk3.png"}, + inventory_image = "maidroid_maidroid_mk3.png", }) diff --git a/module_generator.lua b/module_generator.lua deleted file mode 100644 index 88fb4a6..0000000 --- a/module_generator.lua +++ /dev/null @@ -1,10 +0,0 @@ ------------------------------------------------------------- --- Copyright (c) 2016 tacigar --- https://github.com/tacigar/maidroid ------------------------------------------------------------- - -minetest.register_node("maidroid:module_generator", { - drawtype = "nodebox", - visual_scale = 1.0, - tiles = {}, -}) diff --git a/modules.lua b/modules.lua index 1e85998..1a8688d 100644 --- a/modules.lua +++ b/modules.lua @@ -7,6 +7,7 @@ maidroid.modules = {} local modules_dir = maidroid.modpath.."/modules" dofile(modules_dir.."/_aux.lua") +dofile(modules_dir.."/empty_module.lua") dofile(modules_dir.."/chasing_player_module.lua") dofile(modules_dir.."/farming_module.lua") dofile(modules_dir.."/lumberjack_module.lua") diff --git a/modules/empty_module.lua b/modules/empty_module.lua new file mode 100644 index 0000000..e72c738 --- /dev/null +++ b/modules/empty_module.lua @@ -0,0 +1,13 @@ +------------------------------------------------------------ +-- Copyright (c) 2016 tacigar +-- https://github.com/tacigar/maidroid +------------------------------------------------------------ + +-- 何もしないモジュール +maidroid.register_module("maidroid:empty_module", { + description = "Maidroid Module : Empty Module", + inventory_image = "maidroid_empty_module.png", + initialize = function(self) end, + finalize = function(self) end, + on_step = function(self, dtime) end, +}) diff --git a/recipe.lua b/recipe.lua new file mode 100644 index 0000000..5ad833c --- /dev/null +++ b/recipe.lua @@ -0,0 +1,70 @@ +------------------------------------------------------------ +-- Copyright (c) 2016 tacigar +-- https://github.com/tacigar/maidroid +------------------------------------------------------------ + +-- maidroids +minetest.register_craft{ + output = "maidroid:maidroid_spawn_egg", + recipe = { + {"default:diamond", "default:diamond", "default:diamond"}, + {"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"}, + {"default:papyrus", "default:mese_crystal", "default:papyrus"}, + }, +} + +minetest.register_craft{ + output = "maidroid:maidroid_mk2_spawn_egg", + recipe = { + {"dye:blue", "dye:blue", "dye:blue"}, + {"dye:blue", "maidroid:maidroid_spawn_egg", "dye:blue"}, + {"dye:blue", "dye:blue", "dye:blue"}, + }, +} + +minetest.register_craft{ + output = "maidroid:maidroid_mk3_spawn_egg", + recipe = { + {"dye:pink", "dye:pink", "dye:pink"}, + {"dye:pink", "maidroid:maidroid_spawn_egg", "dye:pink"}, + {"dye:pink", "dye:pink", "dye:pink"}, + }, +} + +-- modules +minetest.register_craft{ + output = "maidroid:empty_module", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:obsidian", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + }, +} + +minetest.register_craft{ + output = "maidroid:chasing_player_module", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "maidroid:empty_module", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + }, +} + +minetest.register_craft{ + output = "maidroid:farming_module", + recipe = { + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + {"default:gold_ingot", "maidroid:empty_module", "default:gold_ingot"}, + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + }, +} + +minetest.register_craft{ + output = "maidroid:lumberjack_module", + recipe = { + {"default:diamond", "default:diamond", "default:diamond"}, + {"default:diamond", "maidroid:empty_module", "default:diamond"}, + {"default:diamond", "default:diamond", "default:diamond"}, + }, +} + diff --git a/textures/.DS_Store b/textures/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/textures/.DS_Store differ diff --git a/textures/normal_module.png b/textures/maidroid_chasing_player_module.png old mode 100755 new mode 100644 similarity index 78% rename from textures/normal_module.png rename to textures/maidroid_chasing_player_module.png index 9c21c64..913ed35 Binary files a/textures/normal_module.png and b/textures/maidroid_chasing_player_module.png differ diff --git a/textures/maidroid_empty_module.png b/textures/maidroid_empty_module.png new file mode 100644 index 0000000..0a702fd Binary files /dev/null and b/textures/maidroid_empty_module.png differ diff --git a/textures/maidroid_farming_module.png b/textures/maidroid_farming_module.png new file mode 100644 index 0000000..61570c2 Binary files /dev/null and b/textures/maidroid_farming_module.png differ diff --git a/textures/maidroid_lumberjack_module.png b/textures/maidroid_lumberjack_module.png new file mode 100644 index 0000000..f3cd2b2 Binary files /dev/null and b/textures/maidroid_lumberjack_module.png differ diff --git a/textures/normal_maidroid.png b/textures/maidroid_maidroid.png similarity index 100% rename from textures/normal_maidroid.png rename to textures/maidroid_maidroid.png diff --git a/textures/maidroid_maidroid_mk2.png b/textures/maidroid_maidroid_mk2.png new file mode 100644 index 0000000..5fe2166 Binary files /dev/null and b/textures/maidroid_maidroid_mk2.png differ diff --git a/textures/maidroid_maidroid_mk3.png b/textures/maidroid_maidroid_mk3.png new file mode 100644 index 0000000..66a73bf Binary files /dev/null and b/textures/maidroid_maidroid_mk3.png differ