Merge branch 'fixes' into animated_chests
This commit is contained in:
commit
9dc0d103a1
|
@ -59,6 +59,15 @@ local boat = {
|
||||||
_animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards
|
_animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local function detach_player(player)
|
||||||
|
player:set_detach()
|
||||||
|
player:set_properties({visual_size = {x=1, y=1}})
|
||||||
|
mcl_player.player_attached[player:get_player_name()] = false
|
||||||
|
mcl_player.player_set_animation(player, "stand" , 30)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_respawnplayer(detach_player)
|
||||||
|
|
||||||
function boat.on_rightclick(self, clicker)
|
function boat.on_rightclick(self, clicker)
|
||||||
if not clicker or not clicker:is_player() then
|
if not clicker or not clicker:is_player() then
|
||||||
return
|
return
|
||||||
|
@ -66,10 +75,7 @@ function boat.on_rightclick(self, clicker)
|
||||||
local name = clicker:get_player_name()
|
local name = clicker:get_player_name()
|
||||||
if self._driver and clicker == self._driver then
|
if self._driver and clicker == self._driver then
|
||||||
self._driver = nil
|
self._driver = nil
|
||||||
clicker:set_detach()
|
detach_player(clicker)
|
||||||
clicker:set_properties({visual_size = {x=1, y=1}})
|
|
||||||
mcl_player.player_attached[name] = false
|
|
||||||
mcl_player.player_set_animation(clicker, "stand" , 30)
|
|
||||||
local pos = clicker:get_pos()
|
local pos = clicker:get_pos()
|
||||||
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
|
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
|
||||||
clicker:set_pos(pos)
|
clicker:set_pos(pos)
|
||||||
|
|
|
@ -106,9 +106,10 @@ function mcl_burning.damage(obj)
|
||||||
damage = 1
|
damage = 1
|
||||||
end
|
end
|
||||||
local new_hp = hp - damage
|
local new_hp = hp - damage
|
||||||
obj:set_hp(new_hp)
|
|
||||||
if health then
|
if health then
|
||||||
luaentity.health = new_hp
|
luaentity.health = new_hp
|
||||||
|
else
|
||||||
|
obj:set_hp(new_hp)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -331,7 +331,7 @@ function minetest.handle_node_drops(pos, drops, digger)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- Fixed Behavior
|
-- Fixed Behavior
|
||||||
local drop = get_fortune_drops(fortune_drops, fortune_level)
|
local drop = get_fortune_drops(fortune_drop, fortune_level)
|
||||||
drops = get_drops(drop, tool:get_name(), dug_node.param2, nodedef.paramtype2)
|
drops = get_drops(drop, tool:get_name(), dug_node.param2, nodedef.paramtype2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,7 @@ local rules_up = {{ x = 0, y = -1, z = 0, spread = true }}
|
||||||
|
|
||||||
function mcl_observers.observer_activate(pos)
|
function mcl_observers.observer_activate(pos)
|
||||||
minetest.after(mcl_vars.redstone_tick, function(pos)
|
minetest.after(mcl_vars.redstone_tick, function(pos)
|
||||||
node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -1450,10 +1450,11 @@ end
|
||||||
-- * tiles: Optional custom tiles
|
-- * tiles: Optional custom tiles
|
||||||
-- * sounds: Optional custom sounds
|
-- * sounds: Optional custom sounds
|
||||||
-- * clear_colorization: Optional. If true, will clear all paramtype2="color" related node def. fields
|
-- * clear_colorization: Optional. If true, will clear all paramtype2="color" related node def. fields
|
||||||
|
-- * desc: Item description
|
||||||
--
|
--
|
||||||
-- The snowable nodes also MUST have _mcl_snowed defined to contain the name
|
-- The snowable nodes also MUST have _mcl_snowed defined to contain the name
|
||||||
-- of the snowed node.
|
-- of the snowed node.
|
||||||
mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization)
|
mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, tiles, sounds, clear_colorization, desc)
|
||||||
local def = table.copy(minetest.registered_nodes[itemstring_clear])
|
local def = table.copy(minetest.registered_nodes[itemstring_clear])
|
||||||
local create_doc_alias
|
local create_doc_alias
|
||||||
if def.description then
|
if def.description then
|
||||||
|
@ -1462,7 +1463,7 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti
|
||||||
create_doc_alias = false
|
create_doc_alias = false
|
||||||
end
|
end
|
||||||
-- Just some group clearing
|
-- Just some group clearing
|
||||||
def.description = nil
|
def.description = desc
|
||||||
def._doc_items_longdesc = nil
|
def._doc_items_longdesc = nil
|
||||||
def._doc_items_usagehelp = nil
|
def._doc_items_usagehelp = nil
|
||||||
def._doc_items_create_entry = false
|
def._doc_items_create_entry = false
|
||||||
|
@ -1503,6 +1504,8 @@ mcl_core.register_snowed_node = function(itemstring_snowed, itemstring_clear, ti
|
||||||
def.sounds = sounds
|
def.sounds = sounds
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def._mcl_silk_touch_drop = {itemstring_clear}
|
||||||
|
|
||||||
-- Register stuff
|
-- Register stuff
|
||||||
minetest.register_node(itemstring_snowed, def)
|
minetest.register_node(itemstring_snowed, def)
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true)
|
mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", nil, nil, true, S("Dirt with Snow"))
|
||||||
|
|
||||||
minetest.register_node("mcl_core:grass_path", {
|
minetest.register_node("mcl_core:grass_path", {
|
||||||
tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"},
|
tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"},
|
||||||
|
@ -424,7 +424,7 @@ minetest.register_node("mcl_core:mycelium", {
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium")
|
mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium", nil, nil, false, S("Mycelium with Snow"))
|
||||||
|
|
||||||
minetest.register_node("mcl_core:podzol", {
|
minetest.register_node("mcl_core:podzol", {
|
||||||
description = S("Podzol"),
|
description = S("Podzol"),
|
||||||
|
@ -441,7 +441,7 @@ minetest.register_node("mcl_core:podzol", {
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol")
|
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow"))
|
||||||
|
|
||||||
minetest.register_node("mcl_core:dirt", {
|
minetest.register_node("mcl_core:dirt", {
|
||||||
description = S("Dirt"),
|
description = S("Dirt"),
|
||||||
|
@ -503,7 +503,7 @@ minetest.register_node("mcl_core:gravel", {
|
||||||
{items = {'mcl_core:gravel'}}
|
{items = {'mcl_core:gravel'}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[3] = "mcl_core:flint"
|
[3] = "mcl_core:flint",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1028,7 +1028,7 @@ for i=1,8 do
|
||||||
drop = "mcl_throwing:snowball "..(i+1),
|
drop = "mcl_throwing:snowball "..(i+1),
|
||||||
_mcl_blast_resistance = 0.1,
|
_mcl_blast_resistance = 0.1,
|
||||||
_mcl_hardness = 0.1,
|
_mcl_hardness = 0.1,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = {"mcl_core:snow " .. (i+1)},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user