added mobs menu spawner to spawn monster easy
added inventory textures mobs
@ -1586,3 +1586,63 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso,
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--Menu mobs spawner
|
||||
mobs.shown_spawner_menu = function(player_name)
|
||||
local formspec = {"size[7,9]label[2.7,0;Mobs Spawner]"}
|
||||
if mobs["spawning_mobs"] ~= nil then
|
||||
local Y = 1
|
||||
local X = 1
|
||||
for name, etat in pairs(mobs["spawning_mobs"]) do
|
||||
table.insert(formspec, "item_image_button["..X..","..Y..";1,1;"..name..";"..name..";]")
|
||||
X = X+1
|
||||
if X > 5 then
|
||||
X = 1
|
||||
Y = Y+1.2
|
||||
end
|
||||
end
|
||||
end
|
||||
table.insert(formspec, "button_exit[2.9,8.5;1.2,1;close;Close]")
|
||||
minetest.show_formspec(player_name, "mobs:spawner", table.concat(formspec))
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local player_name = player:get_player_name()
|
||||
if not player_name then return end
|
||||
if formname == "mobs:spawner" then
|
||||
for f in pairs(fields) do
|
||||
if string.find(f, "mobs:") then
|
||||
local pos = player:getpos()
|
||||
minetest.add_entity(pos, f)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
if (minetest.get_modpath("unified_inventory")) ~= nil then
|
||||
unified_inventory.register_button("menu_mobs", {
|
||||
type = "image",
|
||||
image = "mobs_dungeon_master_fireball.png",
|
||||
tooltip = "Mobs Spawner Menu",
|
||||
show_with = "server",
|
||||
action = function(player)
|
||||
local player_name = player:get_player_name()
|
||||
if not player_name then return end
|
||||
if minetest.check_player_privs(player_name, {server=true}) then
|
||||
mobs.shown_spawner_menu(player_name)
|
||||
end
|
||||
end,
|
||||
})
|
||||
else
|
||||
minetest.register_chatcommand("mobs_spawner", {
|
||||
params = "",
|
||||
description = "Spawn entity at given (or your) position",
|
||||
privs = {server=true},
|
||||
func = function(name, param)
|
||||
mobs.shown_spawner_menu(name)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
@ -122,7 +122,7 @@ mobs:register_mob("mobs:cow", {
|
||||
-- spawn on default;green;prairie grass between 0 and 20 light, 1 in 11000 chance, 1 cow in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:cow", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:cow", "Cow", "default_grass.png", 1)
|
||||
mobs:register_egg("mobs:cow", "Cow", "mobs_cow_inv.png", 1)
|
||||
|
||||
-- leather
|
||||
minetest.register_craftitem("mobs:leather", {
|
||||
|
@ -53,4 +53,4 @@ mobs:register_mob("mobs:dirt_monster", {
|
||||
-- spawn on dirt_with_grass and drygrass between -1 and 5 light, 1 in 10000 change, 1 dirt monster in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:dirt_monster", {"default:dirt_with_grass", "watershed:drygrass"}, {"air"}, -1, 5, 30, 10000, 1, -31000, 31000, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:dirt_monster", "Dirt Monster", "default_dirt.png", 1)
|
||||
mobs:register_egg("mobs:dirt_monster", "Dirt Monster", "mobs_dirtmonster_inv.png", 1)
|
||||
|
@ -70,7 +70,7 @@ mobs:register_mob("mobs:dungeon_master", {
|
||||
-- spawn on stone between 20 and -1 light, 1 in 7000 chance, 1 dungeon master in area starting at -100 and below
|
||||
mobs:spawn_specific("mobs:dungeon_master", {"default:stone", "default:sandstone", "nether:netherrack"}, {"air"}, -1, 20, 30, 7000, 1, -31000, -250, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:dungeon_master", "Dungeon Master", "fire_basic_flame.png", 1)
|
||||
mobs:register_egg("mobs:dungeon_master", "Dungeon Master", "mobs_dongeon_master_inv.png", 1)
|
||||
|
||||
-- fireball (weapon)
|
||||
mobs:register_arrow("mobs:fireball", {
|
||||
|
@ -64,4 +64,4 @@ mobs:register_mob("mobs:goat", {
|
||||
-- spawn on dirt_with_grass between -1 and 20 light, 1 in 20000 chance, 1 goat in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:goat", {"default:dirt_with_grass"}, {"air"}, -1, 20, 30, 10000, 1, -31000, 31000, true)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:goat", "Goat", "default_grass.png", 1)
|
||||
mobs:register_egg("mobs:goat", "Goat", "mobs_goat_inv.png", 1)
|
||||
|
@ -62,7 +62,7 @@ mobs:register_mob("mobs:minotaur", {
|
||||
-- spawns on desert sand between -1 and 20 light, 1 in 20000 chance, 1 Minotaur in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:minotaur", {"watershed:drygrass"}, {"air"}, -1, 20, 30, 100000, 1, -31000, 31000, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:minotaur", "Minotaur", "default_desert_sand.png", 1)
|
||||
mobs:register_egg("mobs:minotaur", "Minotaur", "mobs_minotaur_inv.png", 1)
|
||||
|
||||
minetest.register_craftitem("mobs:minotaur_eye", {
|
||||
description = "Minotaur Eye",
|
||||
|
@ -134,4 +134,4 @@ mobs:register_mob("mobs:npc", {
|
||||
-- spawning enable for now
|
||||
mobs:spawn_specific("mobs:npc", {"default:dirt_with_grass", "default:dirt", "default:junglegrass", "default:sand"}, {"air"}, -1, 20, 30, 100000, 1, -31000, 31000, true)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:npc", "Npc", "default_brick.png", 1)
|
||||
mobs:register_egg("mobs:npc", "Npc", "mobs_npc_male_inv.png", 1)
|
||||
|
@ -133,4 +133,4 @@ mobs:register_mob("mobs:npc_female", {
|
||||
-- spawning enable for now
|
||||
mobs:spawn_specific("mobs:npc_female", {"default:dirt_with_grass", "default:dirt", "default:junglegrass", "default:sand"}, {"air"}, -1, 20, 30, 100000, 1, -31000, 31000, true)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:npc_female", "Npc", "default_brick.png", 1)
|
||||
mobs:register_egg("mobs:npc_female", "Npc", "mobs_npc_female_inv.png", 1)
|
||||
|
@ -60,4 +60,4 @@ mobs:register_mob("mobs:oerkki", {
|
||||
-- spawns on stone/sandstone between 5 and -1 light, 1 in 7000 chance, 1 in area starting at -10 and below
|
||||
mobs:spawn_specific("mobs:oerkki", {"default:stone", "default:sandstone"}, {"air"}, -1, 5, 30, 7000, 1, -31000, -75, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:oerkki", "Oerkki", "default_obsidian.png", 1)
|
||||
mobs:register_egg("mobs:oerkki", "Oerkki", "mobs_oerkki_inv.png", 1)
|
||||
|
@ -47,7 +47,7 @@ mobs:register_mob("mobs:rat", {
|
||||
-- spawn on stone between 1 and 20 light, 1 in 7000 chance, 1 per area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:rat", {"default:stone", "default:sandstone"}, {"air"}, 0, 20, 30, 10000, 1, -31000, 31000, true)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:rat", "Rat", "mobs_rat_inventory.png", 0)
|
||||
mobs:register_egg("mobs:rat", "Rat", "mobs_rat_inv.png", 0)
|
||||
|
||||
-- cooked rat, yummy!
|
||||
minetest.register_craftitem("mobs:rat_cooked", {
|
||||
|
@ -54,4 +54,4 @@ mobs:register_mob("mobs:sand_monster", {
|
||||
-- spawns on desert sand between -1 and 20 light, 1 in 15000 chance, 1 sand monster in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:sand_monster", {"default:desert_sand", "default:sand"}, {"air"}, -1, 20, 30, 20000, 1, -31000, 31000, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:sand_monster", "Sand Monster", "default_desert_sand.png", 1)
|
||||
mobs:register_egg("mobs:sand_monster", "Sand Monster", "mobs_sand_monster_inv.png", 1)
|
||||
|
@ -59,4 +59,4 @@ mobs:register_mob("mobs:stone_monster", {
|
||||
-- spawns on stone between -1 and 5 light, 1 in 7000 chance, 1 in area below -25
|
||||
mobs:spawn_specific("mobs:stone_monster", {"default:stone", "default:sandstone"}, {"air"}, -1, 5, 30, 7000, 1, -31000, -25, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:stone_monster", "Stone Monster", "default_stone.png", 1)
|
||||
mobs:register_egg("mobs:stone_monster", "Stone Monster", "mobs_stone_monster_inv.png", 1)
|
||||
|
BIN
mods/mobs/textures/mobs_cow_inv.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 883 B After Width: | Height: | Size: 1.8 KiB |
BIN
mods/mobs/textures/mobs_dirt_monster_inv.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
mods/mobs/textures/mobs_dongeon_master_inv.png
Executable file
After Width: | Height: | Size: 2.2 KiB |
BIN
mods/mobs/textures/mobs_goat_inv.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
mods/mobs/textures/mobs_minotaur_inv.png
Executable file
After Width: | Height: | Size: 2.2 KiB |
BIN
mods/mobs/textures/mobs_npc_female_inv.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
mods/mobs/textures/mobs_npc_male_inv.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
mods/mobs/textures/mobs_oerkki_inv.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/mobs/textures/mobs_rat_inv.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/mobs/textures/mobs_sand_monster_inv.png
Executable file
After Width: | Height: | Size: 1.9 KiB |
BIN
mods/mobs/textures/mobs_stone_monster_inv.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
mods/mobs/textures/mobs_tree_monster_inv.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
mods/mobs/textures/mobs_warthog_inv.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/mobs/textures/mobs_yeti_inv.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
mods/mobs/textures/mobs_zombies_inv.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
@ -60,7 +60,7 @@ mobs:register_mob("mobs:tree_monster", {
|
||||
-- spawn on leaves and beech_leaves, between 0 and 5 light, 1 in 8000 chance, 1 in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:tree_monster", {"default:leaves", "moretrees:beech_leaves"}, {"air"}, 0, 5, 30, 8000, 1, -31000, 31000, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:tree_monster", "Tree Monster", "default_tree_top.png", 1)
|
||||
mobs:register_egg("mobs:tree_monster", "Tree Monster", "mobs_tree_monster_inv.png", 1)
|
||||
|
||||
-- ethereal sapling compatibility
|
||||
if not minetest.get_modpath("ethereal") then
|
||||
|
@ -97,7 +97,7 @@ mobs:register_mob("mobs:pumba", {
|
||||
-- spawns on dirt or junglegrass, between 8 and 20 light, 1 in 10000 chance, 1 in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:pumba", {"default:dirt", "default:junglegrass"}, {"air"}, 8, 20, 30, 10000, 1, -31000, 31000, true)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:pumba", "Warthog", "wool_pink.png", 1)
|
||||
mobs:register_egg("mobs:pumba", "Warthog", "mobs_warthog_inv.png", 1)
|
||||
|
||||
-- porkchop (raw and cooked)
|
||||
minetest.register_craftitem("mobs:pork_raw", {
|
||||
|
@ -60,7 +60,7 @@ mobs:register_mob("mobs:yeti", {
|
||||
-- spawn on stone between 20 and -1 light, 1 in 7000 chance, 1 in area below 31000
|
||||
mobs:spawn_specific("mobs:yeti", {"default:dirt_with_snow", "default:snow", "default:snowblock"}, {"air"}, -1, 20, 30, 30000, 1, -31000, 31000, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:yeti", "Yeti", "default_snow.png", 1)
|
||||
mobs:register_egg("mobs:yeti", "Yeti", "mobs_yeti_inv.png", 1)
|
||||
|
||||
-- snowball (weapon)
|
||||
mobs:register_arrow("mobs:snowball", {
|
||||
|
@ -61,7 +61,7 @@ mobs:register_mob("mobs:zombie", {
|
||||
-- spawn in nether forest between -1 and 5 light, 1 in 6000 change, 1 zombie in area up to 31000 in height
|
||||
mobs:spawn_specific("mobs:zombie", {"nether:dirt_top"}, {"air"}, -1, 5, 30, 6600, 1, -31000, 31000, false)
|
||||
-- register spawn egg
|
||||
mobs:register_egg("mobs:zombie", "Zombie", "mobs_zombie_head.png", 1)
|
||||
mobs:register_egg("mobs:zombie", "Zombie", "mobs_zombie_inv.png", 1)
|
||||
|
||||
minetest.register_craftitem("mobs:zombie_tibia", {
|
||||
description = "Zombie Tibia",
|
||||
|