Update
5
api.lua
|
@ -28,6 +28,7 @@ function maidroid.register_module(module_name, def)
|
||||||
minetest.register_craftitem(module_name, {
|
minetest.register_craftitem(module_name, {
|
||||||
description = def.description,
|
description = def.description,
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
|
inventory_image = def.inventory_image,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -139,8 +140,10 @@ function maidroid.register_maidroid(product_name, def)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
-- スポーンエッグを登録
|
-- スポーンエッグを登録
|
||||||
minetest.register_craftitem(product_name.."_swawn_egg", {
|
minetest.register_craftitem(product_name.."_spawn_egg", {
|
||||||
description = def.description.." Swapn Egg",
|
description = def.description.." Swapn Egg",
|
||||||
|
inventory_image = def.inventory_image,
|
||||||
|
stack_max = 1,
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
minetest.add_entity(pointed_thing.above, product_name)
|
minetest.add_entity(pointed_thing.above, product_name)
|
||||||
return itemstack
|
return itemstack
|
||||||
|
|
2
depends.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
default
|
||||||
|
dye
|
2
init.lua
|
@ -12,4 +12,4 @@ dofile(maidroid.modpath.."/util.lua")
|
||||||
dofile(maidroid.modpath.."/api.lua")
|
dofile(maidroid.modpath.."/api.lua")
|
||||||
dofile(maidroid.modpath.."/modules.lua")
|
dofile(maidroid.modpath.."/modules.lua")
|
||||||
dofile(maidroid.modpath.."/maidroids.lua")
|
dofile(maidroid.modpath.."/maidroids.lua")
|
||||||
|
dofile(maidroid.modpath.."/recipe.lua")
|
||||||
|
|
|
@ -6,16 +6,19 @@
|
||||||
maidroid.register_maidroid("maidroid:maidroid", {
|
maidroid.register_maidroid("maidroid:maidroid", {
|
||||||
hp_max = 10,
|
hp_max = 10,
|
||||||
description = "Maidroid : Maidroid",
|
description = "Maidroid : Maidroid",
|
||||||
|
inventory_image = "maidroid_maidroid.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
maidroid.register_maidroid("maidroid:maidroid_mk2", {
|
maidroid.register_maidroid("maidroid:maidroid_mk2", {
|
||||||
hp_max = 10,
|
hp_max = 10,
|
||||||
description = "Maidroid : Maidroid MkII",
|
description = "Maidroid : Maidroid MkII",
|
||||||
textures = {"maidroid_mk2.png"},
|
textures = {"maidroid_mk2.png"},
|
||||||
|
inventory_image = "maidroid_maidroid_mk2.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
maidroid.register_maidroid("maidroid:maidroid_mk3", {
|
maidroid.register_maidroid("maidroid:maidroid_mk3", {
|
||||||
hp_max = 10,
|
hp_max = 10,
|
||||||
description = "Maidroid : Maidroid MkIII",
|
description = "Maidroid : Maidroid MkIII",
|
||||||
textures = {"maidroid_mk3.png"},
|
textures = {"maidroid_mk3.png"},
|
||||||
|
inventory_image = "maidroid_maidroid_mk3.png",
|
||||||
})
|
})
|
||||||
|
|
|
@ -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 = {},
|
|
||||||
})
|
|
|
@ -7,6 +7,7 @@ maidroid.modules = {}
|
||||||
local modules_dir = maidroid.modpath.."/modules"
|
local modules_dir = maidroid.modpath.."/modules"
|
||||||
|
|
||||||
dofile(modules_dir.."/_aux.lua")
|
dofile(modules_dir.."/_aux.lua")
|
||||||
|
dofile(modules_dir.."/empty_module.lua")
|
||||||
dofile(modules_dir.."/chasing_player_module.lua")
|
dofile(modules_dir.."/chasing_player_module.lua")
|
||||||
dofile(modules_dir.."/farming_module.lua")
|
dofile(modules_dir.."/farming_module.lua")
|
||||||
dofile(modules_dir.."/lumberjack_module.lua")
|
dofile(modules_dir.."/lumberjack_module.lua")
|
||||||
|
|
13
modules/empty_module.lua
Normal 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
|
@ -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
BIN
textures/normal_module.png → textures/maidroid_chasing_player_module.png
Executable file → Normal file
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
BIN
textures/maidroid_empty_module.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
textures/maidroid_farming_module.png
Normal file
After Width: | Height: | Size: 404 B |
BIN
textures/maidroid_lumberjack_module.png
Normal file
After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
BIN
textures/maidroid_maidroid_mk2.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
textures/maidroid_maidroid_mk3.png
Normal file
After Width: | Height: | Size: 232 B |