This commit is contained in:
Lizzy Fleckenstein 2021-01-02 10:58:02 +01:00
commit 84708c3870
7 changed files with 42 additions and 21 deletions

View File

@ -2,7 +2,7 @@
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils.
Developed by Wuzzy and contributors. Not developed or endorsed by Mojang AB.
Version: 0.68.0
Version: 0.69.1
### Gameplay
You start in a randomly-generated world made entirely of cubes. You can explore

View File

@ -644,12 +644,15 @@ minetest.register_entity(":__builtin:item", {
local fg = minetest.get_item_group(nn, "fire")
local dg = minetest.get_item_group(nn, "destroys_items")
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
if dg ~= 2 then
minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}, true)
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
if self.age > 2 then
if dg ~= 2 then
minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5})
end
self._removed = true
self.object:remove()
return
end
self._removed = true
self.object:remove()
return
end
-- Push item out when stuck inside solid opaque node

View File

@ -2095,6 +2095,7 @@ local follow_flop = function(self)
or self.order == "follow")
and not self.following
and self.state ~= "attack"
and self.order ~= "sit"
and self.state ~= "runaway" then
local s = self.object:get_pos()
@ -2115,6 +2116,7 @@ local follow_flop = function(self)
if self.type == "npc"
and self.order == "follow"
and self.state ~= "attack"
and self.order ~= "sit"
and self.owner ~= "" then
-- npc stop following player if not owner
@ -2400,6 +2402,8 @@ local do_states = function(self, dtime)
set_velocity(self, 0)
self.state = "stand"
set_animation(self, "stand")
local yaw = self.object:get_yaw() or 0
yaw = set_yaw(self, yaw + 0.78, 8)
else
set_velocity(self, self.walk_velocity)
@ -2426,6 +2430,8 @@ local do_states = function(self, dtime)
set_velocity(self, 0)
self.state = "stand"
set_animation(self, "stand")
local yaw = self.object:get_yaw() or 0
yaw = set_yaw(self, yaw + 0.78, 8)
else
set_velocity(self, self.run_velocity)
set_animation(self, "run")
@ -2659,6 +2665,8 @@ local do_states = function(self, dtime)
set_velocity(self, 0)
set_animation(self, "stand")
local yaw = self.object:get_yaw() or 0
yaw = set_yaw(self, yaw + 0.78, 8)
else
if self.path.stuck then
@ -3565,6 +3573,8 @@ local mob_step = function(self, dtime)
set_velocity(self, 0)
self.state = "stand"
set_animation(self, "stand")
local yaw = self.object:get_yaw() or 0
yaw = set_yaw(self, yaw + 0.78, 8)
end
-- Despawning: when lifetimer expires, remove mob

View File

@ -150,7 +150,7 @@ function mcl_experience.set_player_xp_level(player,level)
return
end
pool[name].level = level
pool[name].xp, pool[name].bar_step, pool[name].next_level = mcl_experience.bar_to_xp(pool[name].bar, level)
pool[name].xp, pool[name].bar_step, pool[name].xp_next_level = mcl_experience.bar_to_xp(pool[name].bar, level)
hud_manager.change_hud({player = player, hud_name = "xp_level", element = "text", data = tostring(level)})
-- we may don't update the bar
end

View File

@ -145,7 +145,7 @@ function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
if not node_replaceable(nn.name) then
if #nodes >= maximum then return nil, false end
table.insert(nodes, {node = nn, pos = np})
table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
@ -195,10 +195,9 @@ function mesecon.mvps_set_owner(pos, placer)
end
end
local function are_protected(positions, player_name)
local name = player_name
for _, pos in pairs(positions) do
if is_protected(pos, name) then
local function are_protected(nodes, player_name)
for _, node in pairs(nodes) do
if minetest.is_protected(node.pos, player_name) then
return true
end
end

View File

@ -97,7 +97,7 @@ local piston_on = function (pos, node)
local meta = minetest.get_meta(pos)
local success, stack, oldstack = mesecon.mvps_push(np, dir, PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos)
if success then
minetest.set_node(pos, {param2 = node.param2, name = pistonspec.onname})
minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname})
minetest.set_node(np, {param2 = node.param2, name = pistonspec.pusher})
local below = minetest.get_node({x=np.x,y=np.y-1,z=np.z})
if below.name == "mcl_farming:soil" or below.name == "mcl_farming:soil_wet" then
@ -115,7 +115,7 @@ end
local piston_off = function (pos, node)
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
minetest.add_node(pos, {param2 = node.param2, name = pistonspec.offname})
minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.offname})
piston_remove_pusher (pos, node)
if not pistonspec.sticky then
return

View File

@ -97,7 +97,7 @@ for _, row in ipairs(block.dyes) do
_doc_items_create_entry = create_entry,
_doc_items_entry_name = ename_cp,
tiles = {"mcl_colorblocks_concrete_powder_"..name..".png"},
groups = {handy=1,shovely=1, concrete_powder=1,building_block=1,falling_node=1, material_sand=1},
groups = {handy=1,shovely=1, concrete_powder=1,building_block=1,falling_node=1, material_sand=1, float=1},
stack_max = 64,
is_ground_content = false,
sounds = mcl_sounds.node_sound_sand_defaults(),
@ -208,11 +208,20 @@ minetest.register_abm({
neighbors = {"group:water"},
action = function(pos, node)
local harden_to = minetest.registered_nodes[node.name]._mcl_colorblocks_harden_to
-- It should be impossible for harden_to to be nil, but a Minetest bug might call
-- the ABM on the new concrete node, which isn't part of this ABM!
if harden_to then
node.name = harden_to
minetest.set_node(pos, node)
end
-- It should be impossible for harden_to to be nil, but a Minetest bug might call
-- the ABM on the new concrete node, which isn't part of this ABM!
if harden_to then
node.name = harden_to
--Fix "float" group not lowering concrete into the water by 1.
local water_pos = { x = pos.x, y = pos.y-1, z = pos.z }
local water_node = minetest.get_node(water_pos)
if minetest.get_item_group(water_node.name, "water") == 0 then
minetest.set_node(pos, node)
else
minetest.set_node(water_pos,node)
minetest.set_node(pos, {name = "air"})
minetest.check_for_falling(pos) -- Update C. Powder that stacked above so they fall down after setting air.
end
end
end,
})