diff --git a/utils.lua b/utils.lua --- a/utils.lua +++ b/utils.lua @@ -211,7 +211,7 @@ function darkroom(tab) end; tab.life = function(s) local hasLight = EngineUtils.getValue(s.has_light, s); - local plLight = EngineUtils.getValue(pl.has_light, pl); + local plLight = EngineUtils.getValue(me().has_light, pl); if (hasLight) then -- show all objects that were not explicitly disabled(any seen_level) for i = 1, #objs(s) do @@ -262,7 +262,7 @@ function darkroom(tab) tab.dsc = function(s) local lt; local hasLight = EngineUtils.getValue(s.has_light, s); - local plLight = EngineUtils.getValue(pl.has_light, pl); + local plLight = EngineUtils.getValue(me().has_light, pl); if (hasLight) then lt = EngineUtils.getValue(s.dsc_lit); elseif (plLight) then @@ -785,17 +785,17 @@ end; end; end}; {2, always = "true", function(s) - if (pl.has_light) then + if (me().has_light) then return "[Выключить фонарь]"; else return "[Включить фонарь]"; end; end, function(s) - if (pl.has_light) then - pl.has_light = false; + if (me().has_light) then + me().has_light = false; return "Вы выключаете фонарь. "; else - pl.has_light = true; + me().has_light = true; return "Вы включаете фонарь. "; end; end};