Add 'spawneggs' mod.

master
AntumDeluge 2016-08-30 18:12:14 -07:00
parent a978a49679
commit 5ea7f2b439
14 changed files with 172 additions and 0 deletions

View File

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

78
mods/spawneggs/README.txt Normal file
View File

@ -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 <sam@hocevar.net>
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.

View File

@ -0,0 +1,3 @@
default
mobs
wool

87
mods/spawneggs/init.lua Normal file
View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B