Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2
This commit is contained in:
commit
5c3bb22036
|
@ -149,8 +149,8 @@ armor.set_player_armor = function(self, player)
|
||||||
if level then
|
if level then
|
||||||
local texture = def.texture or item:gsub("%:", "_")
|
local texture = def.texture or item:gsub("%:", "_")
|
||||||
local enchanted_addition = (mcl_enchanting.is_enchanted(item) and mcl_enchanting.overlay or "")
|
local enchanted_addition = (mcl_enchanting.is_enchanted(item) and mcl_enchanting.overlay or "")
|
||||||
table.insert(textures, "("..texture..".png"..enchanted_addition..")")
|
table.insert(textures, texture..".png"..enchanted_addition)
|
||||||
preview = "(player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..")"..(preview and "^"..preview or "")
|
preview = "player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..""..(preview and "^"..preview or "")
|
||||||
armor_level = armor_level + level
|
armor_level = armor_level + level
|
||||||
items = items + 1
|
items = items + 1
|
||||||
mcl_armor_points = mcl_armor_points + (def.groups["mcl_armor_points"] or 0)
|
mcl_armor_points = mcl_armor_points + (def.groups["mcl_armor_points"] or 0)
|
||||||
|
|
|
@ -302,7 +302,7 @@ ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
self._z_rotation = math.random(30, -30)
|
self._z_rotation = math.random(30, -30)
|
||||||
self._y_rotation = math.random(30, -30)
|
self._y_rotation = math.random(30, -30)
|
||||||
self.object:set_attach(obj, self._attach_parent, {x=self._x_position,y=self._y_position,z=random_arrow_positions('z', placement)}, {x=0,y=self._rotation_station + self._y_rotation,z=self._z_rotation})
|
self.object:set_attach(obj, self._attach_parent, {x=self._x_position,y=self._y_position,z=random_arrow_positions('z', placement)}, {x=0,y=self._rotation_station + self._y_rotation,z=self._z_rotation})
|
||||||
minetest.after(60, function()
|
minetest.after(150, function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,10 +11,8 @@ local entity_animations = {
|
||||||
},
|
},
|
||||||
chest = {
|
chest = {
|
||||||
speed = 25,
|
speed = 25,
|
||||||
open = {x = 0, y = 10},
|
open = {x = 0, y = 7},
|
||||||
open_partly = {x = 0, y = 7},
|
close = {x = 13, y = 20},
|
||||||
close = {x = 10, y = 20},
|
|
||||||
close_partly = {x = 13, y = 20},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,15 +32,14 @@ minetest.register_entity("mcl_chests:chest", {
|
||||||
self.object:set_animation(anim, anim_table.speed, 0, false)
|
self.object:set_animation(anim, anim_table.speed, 0, false)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
open = function(self, playername, partly)
|
open = function(self, playername)
|
||||||
self.players[playername] = true
|
self.players[playername] = true
|
||||||
if not self.is_open then
|
if not self.is_open then
|
||||||
self:set_animation(partly and "open_partly" or "open")
|
self:set_animation("open")
|
||||||
minetest.sound_play(self.sound_prefix .. "_open", {
|
minetest.sound_play(self.sound_prefix .. "_open", {
|
||||||
pos = self.node_pos,
|
pos = self.node_pos,
|
||||||
})
|
})
|
||||||
self.is_open = true
|
self.is_open = true
|
||||||
self.opened_partly = partly
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
@ -53,12 +50,11 @@ minetest.register_entity("mcl_chests:chest", {
|
||||||
for _ in pairs(playerlist) do
|
for _ in pairs(playerlist) do
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:set_animation(self.opened_partly and "close_partly" or "close")
|
self:set_animation("close")
|
||||||
minetest.sound_play(self.sound_prefix .. "_close", {
|
minetest.sound_play(self.sound_prefix .. "_close", {
|
||||||
pos = self.node_pos,
|
pos = self.node_pos,
|
||||||
})
|
})
|
||||||
self.is_open = false
|
self.is_open = false
|
||||||
self.opened_partly = false
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
@ -179,8 +175,7 @@ local player_chest_open = function(player, pos, node_name, textures, param2, dou
|
||||||
open_chests[name] = {pos = pos, node_name = node_name, textures = textures, param2 = param2, double = double, sound = sound, mesh = mesh, shulker = shulker}
|
open_chests[name] = {pos = pos, node_name = node_name, textures = textures, param2 = param2, double = double, sound = sound, mesh = mesh, shulker = shulker}
|
||||||
if animate_chests then
|
if animate_chests then
|
||||||
local dir = minetest.facedir_to_dir(param2)
|
local dir = minetest.facedir_to_dir(param2)
|
||||||
local blocked = not shulker and (back_is_blocked(pos, dir) or double and back_is_blocked(mcl_util.get_double_container_neighbor_pos(pos, param2, node_name:sub(-4)), dir))
|
find_or_create_entity(pos, node_name, textures, param2, double, sound, mesh, shulker and "shulker" or "chest", dir):open(name)
|
||||||
find_or_create_entity(pos, node_name, textures, param2, double, sound, mesh, shulker and "shulker" or "chest", dir):open(name, blocked)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user