Fix misleading message in /replay_solution

This commit is contained in:
Wuzzy 2024-12-15 14:50:06 +01:00
parent 6e8d9ab419
commit 63401f3e87

View File

@ -556,16 +556,15 @@ if minetest.settings:get_bool("lzr_debug", false) == true then
params = "",
description = S("Replay saved solution for current level, if one exists"),
func = function(name, param)
local gstate = lzr_gamestate.get_state()
if gstate ~= lzr_gamestate.LEVEL then
return false, S("Not playing in a level!")
end
if state == "playing" then
return false, S("Already replaying a solution!")
elseif state == "recording" then
return false, S("Already recording!")
end
local gstate = lzr_gamestate.get_state()
if gstate ~= lzr_gamestate.LEVEL and gstate ~= lzr_gamestate.LEVEL_TEST then
return false, S("Not playing in a level!")
end
local level_data = lzr_levels.get_current_level_data()
local level_id = lzr_levels.get_current_level()