mirror of
https://gitlab.com/Oreolek/duel.git
synced 2024-06-30 13:55:10 +03:00
Исправление проблемы #6: инвентарь
This commit is contained in:
parent
06ca5a1392
commit
c0b9fd76d7
|
@ -347,7 +347,7 @@ dlg {
|
|||
|
||||
obj {
|
||||
nam = 'car';
|
||||
disp = 'автомобиль';
|
||||
disp = 'ключи от автомобиля';
|
||||
dsc = 'Недалеко от вас припаркован ваш {автомобиль.}';
|
||||
tak = function()
|
||||
char.quests.car = 5
|
||||
|
|
13
tools.lua
13
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
|
||||
|
|
Loading…
Reference in a new issue