1
0
Fork 0
mirror of https://gitlab.com/Oreolek/duel.git synced 2024-06-28 04:45:09 +03:00

Исправление проблемы #6: инвентарь

This commit is contained in:
Alexander Yakovlev 2017-03-31 16:52:28 +07:00
parent 06ca5a1392
commit c0b9fd76d7
2 changed files with 10 additions and 5 deletions

View file

@ -347,7 +347,7 @@ dlg {
obj {
nam = 'car';
disp = 'автомобиль';
disp = 'ключи от автомобиля';
dsc = 'Недалеко от вас припаркован ваш {автомобиль.}';
tak = function()
char.quests.car = 5

View file

@ -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