From 04ef881e7f1bc8eb62bef2628d55445dade46edd Mon Sep 17 00:00:00 2001 From: tacigar Date: Wed, 1 Jun 2016 21:59:28 +0900 Subject: [PATCH] Update --- api.lua | 5 +- depends.txt | 2 + init.lua | 2 +- maidroids.lua | 3 + module_generator.lua | 10 --- modules.lua | 1 + modules/empty_module.lua | 13 ++++ recipe.lua | 70 ++++++++++++++++++ textures/.DS_Store | Bin 0 -> 6148 bytes ...png => maidroid_chasing_player_module.png} | Bin 379 -> 379 bytes textures/maidroid_empty_module.png | Bin 0 -> 385 bytes textures/maidroid_farming_module.png | Bin 0 -> 404 bytes textures/maidroid_lumberjack_module.png | Bin 0 -> 409 bytes ...mal_maidroid.png => maidroid_maidroid.png} | Bin textures/maidroid_maidroid_mk2.png | Bin 0 -> 233 bytes textures/maidroid_maidroid_mk3.png | Bin 0 -> 232 bytes 16 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 depends.txt delete mode 100644 module_generator.lua create mode 100644 modules/empty_module.lua create mode 100644 recipe.lua create mode 100644 textures/.DS_Store rename textures/{normal_module.png => maidroid_chasing_player_module.png} (78%) mode change 100755 => 100644 create mode 100644 textures/maidroid_empty_module.png create mode 100644 textures/maidroid_farming_module.png create mode 100644 textures/maidroid_lumberjack_module.png rename textures/{normal_maidroid.png => maidroid_maidroid.png} (100%) create mode 100644 textures/maidroid_maidroid_mk2.png create mode 100644 textures/maidroid_maidroid_mk3.png 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 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0zA)t_KW=KSdbAE1aYF-JD%fR4Vl$uzQ znxasiS(2gP?&%wlqL<1J6o2aJ;uvCadgfO^Sr2hy694oRa>qdjpBCTV0>@OaL)4A=Q*2KoGDDY5u5W*IrkY$u1k0>6XX@-wPebKpht5KSNn53Oi-8- zr0ZB4>D6i2mN|>z#}6^J(;}kW`0k$=|37(-SOkg#I`w`D~x`!J)d)wp&+$rd7biYiF#AZ^`Gs( WSuU)oSXc2A6cV1UelF{r5}E)pyOfv! literal 0 HcmV?d00001 diff --git a/textures/maidroid_farming_module.png b/textures/maidroid_farming_module.png new file mode 100644 index 0000000000000000000000000000000000000000..61570c26e45f290113ba59c0eb94f12d61fbffd8 GIT binary patch literal 404 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPN8zYY#*M&zsPCy~q%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`CK#WBR<^wP;23y&xWxXSkwwXb3b>Ye?;!Z!TD6s{GG zE}AQ~FD#Wae;BxHox?(D1HN|&8(Nmm-YKv5=luWO-Cmj#6W98lvt&r>X%S%fa4-0} zt4nHM-o)<@<{XZi{g300S6-(^@|m`n+vis#U-^E;qVHwL9`#FGPu#0ci~JFIfBKx4 zjR(IyT_YBFY{nyn{eNnzQa9Mnk7qitc;lH(AL{C~{kjgA_-5vQefcz`!$I)ZjB~Ri zW?5gnT2|CDr&6}jtz}(a$M<;xOwDiC`|i1t9=XoLT0u s$6ZWtDPxpU^@{ow$;WGzUcdjteQMSG?LPhOxuC%DboFyt=akR{06w0mJpcdz literal 0 HcmV?d00001 diff --git a/textures/maidroid_lumberjack_module.png b/textures/maidroid_lumberjack_module.png new file mode 100644 index 0000000000000000000000000000000000000000..f3cd2b210bd5fcbc80dd2d075c1a8d8ef55f87d0 GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPN8zYab_>7ar5kMi?%#er@=ltB<)VvZPmw~~#C^fMp zHASI3vm`^o-P1Q9MK6^dDE`;e#WBR<^wP?YIkhPY3b!By{rw+*_{7zTkDv|Btx~RY(@^n2YcBM zSi1j=bqV=olKo6KGTZRj5$*$9pP6=CiVA;bR2LMv_>ceBTKVs1q9>G{eKRL{THo>M z@eKRy-(O5Sm96TMxwg1z%jeGznRC_N&68uWsQ+u=ecV8{% z{V?Qe){ekjN%c^Vxzj}@R%&f|+Gz3o!@b34OA0$Smt+_>u2(PoEHPWasr2-zj%x9h wf`VJwf1cM-TE!UAoU^iKVr9>Dr)lSZ@=te~U!Rr!E*cazopr0G9irEdT%j literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5fe21664e5fdd2647dffbe18db56d2eaa1ad20ac GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPN8zYaBNTi&{J)lsTr;B5V#O34;!HSRa;vjN_MJS*D5l%Ag6wm)6x0oT8I8xso3%G|alot;|4mXmXA|MtGW=?9n@ejc};m(F^# Q23pdB^7@+_rZtJ|ziDmH z&@nyxZ};!VaqbP7K3o0<9Ns2BwTsH&xZA&&k;p8LD}$^Y`166ZyRTKDF~J X*IDY!=Gxr_bO3{=tDnm{r-UW|_vTVA literal 0 HcmV?d00001