From c0b9fd76d79586bde8896240677969eb315fa18d Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 31 Mar 2017 16:52:28 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5?= =?UTF-8?q?=D0=BC=D1=8B=20#6:=20=D0=B8=D0=BD=D0=B2=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=D1=80=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locations/abandoned.lua | 2 +- tools.lua | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/locations/abandoned.lua b/locations/abandoned.lua index c4cf7d0..6e0456a 100644 --- a/locations/abandoned.lua +++ b/locations/abandoned.lua @@ -347,7 +347,7 @@ dlg { obj { nam = 'car'; - disp = 'автомобиль'; + disp = 'ключи от автомобиля'; dsc = 'Недалеко от вас припаркован ваш {автомобиль.}'; tak = function() char.quests.car = 5 diff --git a/tools.lua b/tools.lua index eeb8869..a7d6477 100644 --- a/tools.lua +++ b/tools.lua @@ -219,11 +219,16 @@ fairadd = function(value, add) end -- TODO: глючное перечисление инвентаря. Пропускает вещи. listinv = function() - local inv = pl:inventory() local out = '' - for k, v in std.ipairs(inv) do - if not std.is_obj(v) or v:disabled() or v:closed() then - out = out .. ', ' .. v.disp + local comma = false + for k, v in std.ipairs(inv()) do + if v.disp and not v:disabled() then + if comma then + out = out .. ', ' + else + comma = true + end + out = out .. v.disp end end if out == '' then