Compare commits

...

3 Commits
master ... 0.50

Author SHA1 Message Date
Wuzzy aea75f4669 Version 0.50.2 2019-03-14 12:15:08 +01:00
Wuzzy 78e5322f57 Fix crash in craftguide when player leaves 2019-03-14 12:14:34 +01:00
Wuzzy 50db5f5b85 Workaround for concrete powder hardening ABM crash 2019-03-14 12:13:53 +01:00
3 changed files with 25 additions and 13 deletions

View File

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

View File

@ -969,16 +969,7 @@ end
M.register_on_mods_loaded(get_init_items)
M.register_on_joinplayer(function(player)
local name = player:get_player_name()
init_data(name)
end)
M.register_on_leaveplayer(function(player)
local name = player:get_player_name()
player_data[name] = nil
end)
-- TODO: Remove sfinv support
if sfinv_only then
sfinv.register_page("craftguide:craftguide", {
title = S("Craft Guide"),
@ -1105,6 +1096,8 @@ if progressive_mode then
mcl_craftguide.add_recipe_filter("Default progressive filter", progressive_filter)
M.register_on_joinplayer(function(player)
local name = player:get_player_name()
init_data(name)
local meta = player:get_meta()
local name = player:get_player_name()
local data = player_data[name]
@ -1120,7 +1113,11 @@ if progressive_mode then
meta:set_string("inv_items", serialize(data.inv_items))
end
M.register_on_leaveplayer(save_meta)
M.register_on_leaveplayer(function(player)
save_meta(player)
local name = player:get_player_name()
player_data[name] = nil
end)
M.register_on_shutdown(function()
local players = M.get_connected_players()
@ -1129,6 +1126,16 @@ if progressive_mode then
save_meta(player)
end
end)
else
M.register_on_joinplayer(function(player)
local name = player:get_player_name()
init_data(name)
end)
M.register_on_leaveplayer(function(player)
local name = player:get_player_name()
player_data[name] = nil
end)
end
function mcl_craftguide.show(name)

View File

@ -169,7 +169,12 @@ minetest.register_abm({
neighbors = {"group:water"},
action = function(pos, node)
local harden_to = minetest.registered_nodes[node.name]._mcl_colorblocks_harden_to
minetest.swap_node(pos, { name = harden_to, param = node.param, param2 = node.param2 })
-- 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
end,
})