Drop a minetest.after

This commit is contained in:
Wuzzy 2019-08-24 18:58:20 +02:00
parent e3a6dac028
commit 76bd636df2
2 changed files with 28 additions and 31 deletions

View File

@ -40,7 +40,6 @@ else
end
function tsm_pyramids.fill_chest(pos, stype, flood_sand)
minetest.after(2, function()
local sand = "default:sand"
if stype == "desert_sandstone" or stype == "desert_stone" then
sand = "default:desert_sand"
@ -71,9 +70,7 @@ function tsm_pyramids.fill_chest(pos, stype, flood_sand)
inv:set_stack("main", math.random(1,32), stacks[s])
end
end
end
end)
end
local function add_spawner(pos, mummy_offset)

View File

@ -54,7 +54,7 @@ local function hit(self)
self.object:set_properties(prop)
minetest.after(0.4, function(self)
local prop = {textures = mummy_texture,}
if self.object ~= nil then
if self ~= nil and self.object ~= nil then
self.object:set_properties(prop)
end
end, self)