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

View File

@ -644,13 +644,16 @@ minetest.register_entity(":__builtin:item", {
local fg = minetest.get_item_group(nn, "fire") local fg = minetest.get_item_group(nn, "fire")
local dg = minetest.get_item_group(nn, "destroys_items") local dg = minetest.get_item_group(nn, "destroys_items")
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
--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 if dg ~= 2 then
minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}, true) minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5})
end end
self._removed = true self._removed = true
self.object:remove() self.object:remove()
return return
end end
end
-- Push item out when stuck inside solid opaque node -- Push item out when stuck inside solid opaque node
if def and def.walkable and def.groups and def.groups.opaque == 1 then if def and def.walkable and def.groups and def.groups.opaque == 1 then

View File

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

View File

@ -150,7 +150,7 @@ function mcl_experience.set_player_xp_level(player,level)
return return
end end
pool[name].level = level 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)}) hud_manager.change_hud({player = player, hud_name = "xp_level", element = "text", data = tostring(level)})
-- we may don't update the bar -- we may don't update the bar
end 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 not node_replaceable(nn.name) then
if #nodes >= maximum then return nil, false end 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 -- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions -- the vectors must be absolute positions
@ -195,10 +195,9 @@ function mesecon.mvps_set_owner(pos, placer)
end end
end end
local function are_protected(positions, player_name) local function are_protected(nodes, player_name)
local name = player_name for _, node in pairs(nodes) do
for _, pos in pairs(positions) do if minetest.is_protected(node.pos, player_name) then
if is_protected(pos, name) then
return true return true
end end
end end

View File

@ -97,7 +97,7 @@ local piston_on = function (pos, node)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local success, stack, oldstack = mesecon.mvps_push(np, dir, PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos) local success, stack, oldstack = mesecon.mvps_push(np, dir, PISTON_MAXIMUM_PUSH, meta:get_string("owner"), pos)
if success then 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}) 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}) 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 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 piston_off = function (pos, node)
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston 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) piston_remove_pusher (pos, node)
if not pistonspec.sticky then if not pistonspec.sticky then
return return

View File

@ -97,7 +97,7 @@ for _, row in ipairs(block.dyes) do
_doc_items_create_entry = create_entry, _doc_items_create_entry = create_entry,
_doc_items_entry_name = ename_cp, _doc_items_entry_name = ename_cp,
tiles = {"mcl_colorblocks_concrete_powder_"..name..".png"}, 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, stack_max = 64,
is_ground_content = false, is_ground_content = false,
sounds = mcl_sounds.node_sound_sand_defaults(), sounds = mcl_sounds.node_sound_sand_defaults(),
@ -212,7 +212,16 @@ minetest.register_abm({
-- the ABM on the new concrete node, which isn't part of this ABM! -- the ABM on the new concrete node, which isn't part of this ABM!
if harden_to then if harden_to then
node.name = harden_to 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) 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
end, end,
}) })