mirror of
http://repo.or.cz/minetest_pyramids/tsm_pyramids.git
synced 2025-06-29 22:50:44 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
61ebaab55e | |||
8a449ea8a8 | |||
0abcd7960a | |||
f5fef5118d | |||
0974de93e4 |
@ -1,6 +1,6 @@
|
||||
# Pyramids (with Treasurer support) [`tsm_pyramids`]
|
||||
|
||||
* Version: 1.0.1
|
||||
* Version: 1.0.3
|
||||
|
||||
## Description
|
||||
This is a mod for Minetest Game which adds randomly spawned pyramids in deserts and
|
||||
|
13
mummy.lua
13
mummy.lua
@ -49,15 +49,11 @@ local ANIM_WALK_MINE = 5
|
||||
local ANIM_MINE = 6
|
||||
|
||||
local function hit(self)
|
||||
local prop = {
|
||||
mesh = mummy_mesh,
|
||||
textures = {"tsm_pyramids_mummy.png^tsm_pyramids_hit.png"},
|
||||
}
|
||||
self.object:set_properties(prop)
|
||||
self.object:set_texture_mod("^tsm_pyramids_hit.png")
|
||||
minetest.after(0.4, function(self)
|
||||
local prop = {textures = mummy_texture,}
|
||||
if self ~= nil and self.object ~= nil then
|
||||
self.object:set_properties(prop)
|
||||
self.object:set_texture_mod("")
|
||||
end
|
||||
end, self)
|
||||
end
|
||||
@ -65,7 +61,6 @@ end
|
||||
local function mummy_update_visuals_def(self)
|
||||
npc_anim = 0 -- Animation will be set further below immediately
|
||||
local prop = {
|
||||
mesh = mummy_mesh,
|
||||
textures = mummy_texture,
|
||||
}
|
||||
self.object:set_properties(prop)
|
||||
@ -128,6 +123,7 @@ spawner_DEF.on_step = function(self, dtime)
|
||||
if self.timer > 1 then
|
||||
if n and n.name and n.name ~= "tsm_pyramids:spawner_mummy" then
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -155,7 +151,7 @@ MUMMY_DEF.on_punch = function(self, puncher, time_from_last_punch, tool_capabili
|
||||
end
|
||||
self.attacker = puncher
|
||||
|
||||
if damage > 0 then
|
||||
if damage and damage > 0 then
|
||||
self.last_damage = {
|
||||
type = "punch",
|
||||
puncher = puncher,
|
||||
@ -244,6 +240,7 @@ MUMMY_DEF.on_step = function(self, dtime)
|
||||
self.on_death(self)
|
||||
end
|
||||
self.object:remove()
|
||||
return
|
||||
else
|
||||
hit(self)
|
||||
self.sound_timer = 0
|
||||
|
Reference in New Issue
Block a user