mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 20:43:42 +01:00
Progressive mode: Fix crash on player leaving
This commit is contained in:
parent
b6181ebd7a
commit
4c0371c5cc
10
init.lua
10
init.lua
@ -898,11 +898,6 @@ M.register_on_joinplayer(function(player)
|
|||||||
init_data(name)
|
init_data(name)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
M.register_on_leaveplayer(function(player)
|
|
||||||
local name = player:get_player_name()
|
|
||||||
player_data[name] = nil
|
|
||||||
end)
|
|
||||||
|
|
||||||
if sfinv_only then
|
if sfinv_only then
|
||||||
sfinv.register_page("craftguide:craftguide", {
|
sfinv.register_page("craftguide:craftguide", {
|
||||||
title = S("Craft Guide"),
|
title = S("Craft Guide"),
|
||||||
@ -1152,6 +1147,11 @@ if progressive_mode then
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.register_on_leaveplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
player_data[name] = nil
|
||||||
|
end)
|
||||||
|
|
||||||
M.register_chatcommand("craft", {
|
M.register_chatcommand("craft", {
|
||||||
description = S("Show recipe(s) of the pointed node"),
|
description = S("Show recipe(s) of the pointed node"),
|
||||||
func = function(name)
|
func = function(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user