From 5ea7f2b4398d16a5d9bd48235fc5aebd65b1955e Mon Sep 17 00:00:00 2001 From: AntumDeluge Date: Tue, 30 Aug 2016 18:12:14 -0700 Subject: [PATCH] Add 'spawneggs' mod. --- README.md | 4 + mods/spawneggs/README.txt | 78 ++++++++++++++++ mods/spawneggs/depends.txt | 3 + mods/spawneggs/init.lua | 87 ++++++++++++++++++ .../textures/spawneggs_dirt_monster.png | Bin 0 -> 696 bytes .../textures/spawneggs_dungeon_master.png | Bin 0 -> 538 bytes mods/spawneggs/textures/spawneggs_egg.png | Bin 0 -> 804 bytes .../spawneggs/textures/spawneggs_friedegg.png | Bin 0 -> 741 bytes mods/spawneggs/textures/spawneggs_oerkki.png | Bin 0 -> 507 bytes mods/spawneggs/textures/spawneggs_rat.png | Bin 0 -> 475 bytes .../textures/spawneggs_sand_monster.png | Bin 0 -> 566 bytes mods/spawneggs/textures/spawneggs_sheep.png | Bin 0 -> 417 bytes .../textures/spawneggs_stone_monster.png | Bin 0 -> 511 bytes .../textures/spawneggs_tree_monster.png | Bin 0 -> 575 bytes 14 files changed, 172 insertions(+) create mode 100644 mods/spawneggs/README.txt create mode 100644 mods/spawneggs/depends.txt create mode 100644 mods/spawneggs/init.lua create mode 100644 mods/spawneggs/textures/spawneggs_dirt_monster.png create mode 100644 mods/spawneggs/textures/spawneggs_dungeon_master.png create mode 100644 mods/spawneggs/textures/spawneggs_egg.png create mode 100644 mods/spawneggs/textures/spawneggs_friedegg.png create mode 100644 mods/spawneggs/textures/spawneggs_oerkki.png create mode 100644 mods/spawneggs/textures/spawneggs_rat.png create mode 100644 mods/spawneggs/textures/spawneggs_sand_monster.png create mode 100644 mods/spawneggs/textures/spawneggs_sheep.png create mode 100644 mods/spawneggs/textures/spawneggs_stone_monster.png create mode 100644 mods/spawneggs/textures/spawneggs_tree_monster.png diff --git a/README.md b/README.md index b1c648b7..5f934a1d 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ The following mods are also included: * [walking_light][] ([WTFPL / CC-BY-SA](mods/player/walking_light/README.md)) * [wardrobe][] ([WTFPL](mods/player/wardrobe/README.txt)) * wieldview ([3d_armor modpack][3d_armor]) +* [spawneggs][] ([WTFPL][lic.spawneggs]) -- version [4650370 Git][ver.spawneggs] * [technic (modpack)][technic] ([LGPL](mods/technic/README.md)) * [tnt][] ([WTFPL](mods/tnt/README.txt)) (Git [d6a0b7d][tnt version]) * tools/ @@ -209,6 +210,7 @@ The following mods are also included: [quartz]: https://forum.minetest.net/viewtopic.php?t=5682 [signs_lib]: https://forum.minetest.net/viewtopic.php?f=11&t=13762 [simple_protection]: https://forum.minetest.net/viewtopic.php?t=9035 +[spawneggs]: https://forum.minetest.net/viewtopic.php?t=6214 [spectator_mode]: https://forum.minetest.net/viewtopic.php?t=13718 [spectator_mode lic]: mods/admin/spectator_mode/LICENSE [spectator_mode version]: https://github.com/minetest-mods/spectator_mode/tree/3459db48e1b507388ee5d24ba1531ea494e64dea @@ -236,6 +238,8 @@ The following mods are also included: [worldedge]: https://forum.minetest.net/viewtopic.php?t=10753 [lic.creeper]: mods/mobs_aggressive/creeper/LICENSE.md +[lic.spawneggs]: mods/spawneggs/README.txt [ver.creeper]: https://github.com/Rui-Minetest/creeper/tree/036666e2ccd26632a0c11585af0345c6eaa8c72d [ver.simple_protection]: https://github.com/SmallJoker/simple_protection/tree/c822e561e0349f02b70bf6a8c28059515603a0be +[ver.spawneggs]: https://github.com/thefamilygrog66/spawneggs/tree/46503709bb0a1bff586cd345aac6b36936c4c311 diff --git a/mods/spawneggs/README.txt b/mods/spawneggs/README.txt new file mode 100644 index 00000000..b3533bb2 --- /dev/null +++ b/mods/spawneggs/README.txt @@ -0,0 +1,78 @@ +Mob Spawn Eggs (spawneggs) mod for Minetest + + +by thefamilygrog66 + +Description: +This mod randomly spawns "spawning eggs", which when combined with various materials, will become mob spawning eggs (compatible only with PilzAdam's Simple Mobs mod). When the player places one of these, the corresponding mob will appear. + +If the player prefers to create a health item instead of a mob, they can simply cook the spawning egg, which will produce a FRIED EGG that can be eaten to regain hearts. + +Recipes: + +Dirt Monster ++---------------+---------------+ +| spawning egg | dirt | ++---------------+---------------+ + +Dungeon Master ++---------------+---------------+ +| spawning egg | mese | ++---------------+---------------+ + +Oerkki ++---------------+---------------+ +| spawning egg | obsidian | ++---------------+---------------+ + +Rat ++---------------+---------------+ +| spawning egg | rat | ++---------------+---------------+ + +Sand Monster ++---------------+---------------+ +| spawning egg | sand | ++---------------+---------------+ + +Sheep ++---------------+---------------+ +| spawning egg | white wool | ++---------------+---------------+ + +Stone Monster ++---------------+---------------+ +| spawning egg | stone | ++---------------+---------------+ + +Tree Monster ++---------------+---------------+ +| spawning egg | sapling | ++---------------+---------------+ + +Fried Egg +- cook spawning egg + + +Mod dependencies: default, mobs, wool + +License: +Sourcecode: WTFPL (see below) +Graphics: WTFPL (see below) + +See also: +http://minetest.net/ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/mods/spawneggs/depends.txt b/mods/spawneggs/depends.txt new file mode 100644 index 00000000..980589eb --- /dev/null +++ b/mods/spawneggs/depends.txt @@ -0,0 +1,3 @@ +default +mobs +wool diff --git a/mods/spawneggs/init.lua b/mods/spawneggs/init.lua new file mode 100644 index 00000000..7c821968 --- /dev/null +++ b/mods/spawneggs/init.lua @@ -0,0 +1,87 @@ +local spawneggs_list = { + { "Spawn Dirt Monster", "dirt_monster", "default:dirt"}, + { "Spawn Dungeon Master", "dungeon_master", "default:mese"}, + { "Spawn Oerkki", "oerkki", "default:obsidian"}, + { "Spawn Rat", "rat", "mobs:rat"}, + { "Spawn Sand Monster", "sand_monster", "default:sand"}, + { "Spawn Sheep", "sheep", "wool:white"}, + { "Spawn Stone Monster", "stone_monster", "default:stone"}, + { "Spawn Tree Monster", "tree_monster", "default:sapling"}, +} + +for i in ipairs(spawneggs_list) do + local spawneggdesc = spawneggs_list[i][1] + local eggtype = spawneggs_list[i][2] + local ingredient = spawneggs_list[i][3] + + minetest.register_craftitem("spawneggs:"..eggtype, { + description = spawneggdesc, + inventory_image = "spawneggs_"..eggtype..".png", + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.above then + minetest.env:add_entity(pointed_thing.above, "mobs:"..eggtype) + itemstack:take_item() + end + return itemstack + end, + }) + + minetest.register_craft({ + output = "spawneggs:"..eggtype, + recipe = { + {"spawneggs:egg", ingredient, ""}, + {"", "", ""}, + {"", "", ""}, + }, + }) +end + +minetest.register_node("spawneggs:egg", { + description = "Spawning Egg", + drawtype = "plantlike", + tiles = {"spawneggs_egg.png"}, + inventory_image = "spawneggs_egg.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125} + }, + groups = {dig_immediate = 3}, + drop = "spawneggs:egg", + sounds = default.node_sound_stone_defaults(), +}) + +-- Fried Egg +minetest.register_craftitem("spawneggs:friedegg", { + description = "Fried Egg", + inventory_image = "spawneggs_friedegg.png", + on_use = minetest.item_eat(4), +}) + +minetest.register_craft({ + type = 'cooking', + output = 'spawneggs:friedegg', + recipe = 'spawneggs:egg', + cooktime = 5, +}) + +-- Egg Spawning and De-spawning +minetest.register_abm( + {nodenames = {"default:grass_1"}, + interval = 600, + chance = 3000, + action = function(pos) + minetest.env:add_node(pos, {name="spawneggs:egg"}) + end, +}) + +minetest.register_abm( + {nodenames = {"spawneggs:egg"}, + interval = 600, + chance = 3000, + action = function(pos) + minetest.env:add_node(pos, {name="air"}) + end, +}) + diff --git a/mods/spawneggs/textures/spawneggs_dirt_monster.png b/mods/spawneggs/textures/spawneggs_dirt_monster.png new file mode 100644 index 0000000000000000000000000000000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koi>y%=?{>Wv_X3Tsw<@}VqJA(z|q zafBJ$#9-M^N>LyxEuPpXryT9nHbV#WOTEnL!;%KWyc xXID#G$Hqwd6JKLjC)q0Do?S3i*5&jt`~!P>iwbvi%~1dV002ovPDHLkV1jd>-&_Cy literal 0 HcmV?d00001 diff --git a/mods/spawneggs/textures/spawneggs_rat.png b/mods/spawneggs/textures/spawneggs_rat.png new file mode 100644 index 0000000000000000000000000000000000000000..002f8de885b8b58be8fe83fa16b6aa66a3e7f4f9 GIT binary patch literal 475 zcmV<10VMv3P)PD@+iVtZ>1?C}o3d|0x^U3%`IJE`-Fokw=x1*iMmT zTwrUR7rv%&W>wAsm`@Rrhlt%Hj>tZ|}EBf4F zKx6qnJ)wzY0MI!{=jK-a3Fumu^gca&xa%n93-K#H%Awh8CLqW0iOlc$NI{|3Kyl#>@- R=>7lz002ovPDHLkV1idu$Ql3u literal 0 HcmV?d00001 diff --git a/mods/spawneggs/textures/spawneggs_sand_monster.png b/mods/spawneggs/textures/spawneggs_sand_monster.png new file mode 100644 index 0000000000000000000000000000000000000000..175f5fe275df582e44bd577a9aaeec89fbf80526 GIT binary patch literal 566 zcmV-60?GY}P)$c+F10mDf| zK~y-)jgw7l6Hyd~pZhiGj3sEXLWvYy)`Gt!=t@PX75qmEB339}D!TCxxN%d#P5loB zf+1uwliZKvBAw85M)9r==e+mjaGrA%e|hJpM`DaYiI8nO?hoInE}g!f`10z>@aN~3 zG9Jy*Bmg8N&QFizzYOl(?SGO8d;5Kqv*^rF%{}AMobPAHEt8G5E{WyDuO(V3FdB)0dAT4jG6sX3loI76QrEt_gKsC#B+ne$ zfXfZbIue(HG2o+6l@Z&6M)TnDiQ4F(C>$V|Oe1Lg(v!K>h@1hJxl83r(;DJ*Rx_Cd z5JO4|V+<*R%^kJG%eu#8J*ru38`Lx5*3K4aLF=@E(0IMBYn>R6=52$W+d0N2lr~7D zg|MkNh+7o43I&qz)nb+K5TasICieFGYlOik?3Ed;4H`rZ#&TMBBGlF(F?27|kF#TG zFjmvhiLkeAI2gWFovW;@V0sEcW1T`oky)s#K!~6X$hGZnUD(Bk7a~5gs3P?uQB?u! zG`oWWfWwFH)ISXXzP^4ci#i|zHws7pW`@lj2OTH<2k&g-VJcppjsO4v07*qoM6N<$ Ef>D0@FaQ7m literal 0 HcmV?d00001 diff --git a/mods/spawneggs/textures/spawneggs_sheep.png b/mods/spawneggs/textures/spawneggs_sheep.png new file mode 100644 index 0000000000000000000000000000000000000000..219a7eb695af41910a3c6c736f634f7b82001a82 GIT binary patch literal 417 zcmV;S0bc%zP)gD?;rtP_2tP#`{ae~fg0$RkpufZP>yu>^uB7E&y5Z03qPERvWc)7jpg z+1Xu3SO7`R&ruXbp*V4W@%>YN-Y16$@l2T{+qUK9a^c}{pfP5;ejxc+QdzB5aL&OP z1Fbd6vc&0h0!c2}@#=F}Ye|xQ-&0CSYb{?UODRc`UDt8H-`^1KcDtYzD5W0M=iVnc z=WYnZvxX|A007tP6@B0TB?u87BS{Ry04b$^Op*lFS`Ao00000 LNkvXXu0mjf#JjB6 literal 0 HcmV?d00001 diff --git a/mods/spawneggs/textures/spawneggs_stone_monster.png b/mods/spawneggs/textures/spawneggs_stone_monster.png new file mode 100644 index 0000000000000000000000000000000000000000..9ec718b2e1f97a75ccb64d9fd246d6a2cfb64418 GIT binary patch literal 511 zcmV{e@uLnZs#ejqMLm4H;`3=*G(1Kd#ga{&c~Z-2$1A%|*^A}bH*em&nH8QmS8rY`ssMx-na%&oG2AG4`RelJ+1ZPEeR~Ula}Goh z;M3#*a3yU;QXS|4nqBgwT%n*K9Vz{{s%$u2=6R_D=u+002ovPDHLkV1ite B;F$mb literal 0 HcmV?d00001 diff --git a/mods/spawneggs/textures/spawneggs_tree_monster.png b/mods/spawneggs/textures/spawneggs_tree_monster.png new file mode 100644 index 0000000000000000000000000000000000000000..2efe54d5326937c8e4984731111b970e9c9c2e37 GIT binary patch literal 575 zcmV-F0>J%=P)N5qEmJ@1AqdJ@+aq;?e!K>ccYM5;cyyHxD>hU?(M6UBUo#hX^x9I^eEL4FKIPrLeHFNH zJjzK8jFOaITkt%OVVt71E|pfA`1sjtweVr#&B0;9Svup*yDv+({0oFwsacoQE>Hjf N002ovPDHLkV1k=V{OAAx literal 0 HcmV?d00001