diff --git a/spawners_mobs/api.lua b/spawners_mobs/api.lua index f67eaad..421428b 100644 --- a/spawners_mobs/api.lua +++ b/spawners_mobs/api.lua @@ -188,7 +188,7 @@ function spawners_mobs.start_spawning(spawn_area_random_pos, mob_name, mod_prefi minetest.sound_play(sound_name, { pos = spawn_area_random_pos[i], max_hear_distance = 8, - gain = 0.3 + gain = 0.5 }) end end @@ -385,7 +385,11 @@ function spawners_mobs.set_status(pos, set_status) if set_status == "active" then -- remove particles and add them again - keeps particles after server restart -- delete particles - if id_flame and id_smoke and id_flame ~= nil and id_smoke ~= nil then + + -- print("id_flame: "..id_flame) + -- print("id_smoke: "..id_smoke) + + if id_flame and id_smoke then minetest.delete_particlespawner(id_flame) minetest.delete_particlespawner(id_smoke) end @@ -410,7 +414,7 @@ function spawners_mobs.set_status(pos, set_status) -- elseif set_status == "waiting" and meta_status ~= set_status then -- delete particles - if id_flame and id_smoke and id_flame ~= nil and id_smoke ~= nil then + if id_flame and id_smoke then minetest.delete_particlespawner(id_flame) minetest.delete_particlespawner(id_smoke) end @@ -434,7 +438,7 @@ function spawners_mobs.set_status(pos, set_status) -- elseif set_status == "rusty" and meta_status ~= set_status then -- delete particles - if id_flame and id_smoke and id_flame ~= nil and id_smoke ~= nil then + if id_flame and id_smoke then minetest.delete_particlespawner(id_flame) minetest.delete_particlespawner(id_smoke) end diff --git a/spawners_mobs/spawners_mobs.lua b/spawners_mobs/spawners_mobs.lua index 8705b4e..abf5bd9 100644 --- a/spawners_mobs/spawners_mobs.lua +++ b/spawners_mobs/spawners_mobs.lua @@ -63,6 +63,8 @@ function spawners_mobs.create(mob_table, idx) after_place_node = function(pos, placer, itemstack, pointed_thing) local meta = minetest.get_meta(pos) meta:set_string("owner", placer:get_player_name()) + + meta:set_string("infotext", mob_name.." spawner\nowner: "..placer:get_player_name().."\nspawner is active") end, on_destruct = function(pos)