This commit is contained in:
tacigar 2016-06-01 21:59:28 +09:00
parent 5051654528
commit 04ef881e7f
16 changed files with 94 additions and 12 deletions

View File

@ -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

2
depends.txt Normal file
View File

@ -0,0 +1,2 @@
default
dye

View File

@ -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")

View File

@ -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",
})

View File

@ -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 = {},
})

View File

@ -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")

13
modules/empty_module.lua Normal file
View File

@ -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,
})

70
recipe.lua Normal file
View File

@ -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"},
},
}

BIN
textures/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

View File

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B