mirror of
http://repo.or.cz/minetest_pyramids/tsm_pyramids.git
synced 2024-12-23 07:50:18 +01:00
Drop a minetest.after
This commit is contained in:
parent
e3a6dac028
commit
76bd636df2
3
init.lua
3
init.lua
@ -40,7 +40,6 @@ else
|
|||||||
end
|
end
|
||||||
|
|
||||||
function tsm_pyramids.fill_chest(pos, stype, flood_sand)
|
function tsm_pyramids.fill_chest(pos, stype, flood_sand)
|
||||||
minetest.after(2, function()
|
|
||||||
local sand = "default:sand"
|
local sand = "default:sand"
|
||||||
if stype == "desert_sandstone" or stype == "desert_stone" then
|
if stype == "desert_sandstone" or stype == "desert_stone" then
|
||||||
sand = "default:desert_sand"
|
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])
|
inv:set_stack("main", math.random(1,32), stacks[s])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function add_spawner(pos, mummy_offset)
|
local function add_spawner(pos, mummy_offset)
|
||||||
|
@ -54,7 +54,7 @@ local function hit(self)
|
|||||||
self.object:set_properties(prop)
|
self.object:set_properties(prop)
|
||||||
minetest.after(0.4, function(self)
|
minetest.after(0.4, function(self)
|
||||||
local prop = {textures = mummy_texture,}
|
local prop = {textures = mummy_texture,}
|
||||||
if self.object ~= nil then
|
if self ~= nil and self.object ~= nil then
|
||||||
self.object:set_properties(prop)
|
self.object:set_properties(prop)
|
||||||
end
|
end
|
||||||
end, self)
|
end, self)
|
||||||
|
Loading…
Reference in New Issue
Block a user