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 {
|
obj {
|
||||||
nam = 'car';
|
nam = 'car';
|
||||||
disp = 'автомобиль';
|
disp = 'ключи от автомобиля';
|
||||||
dsc = 'Недалеко от вас припаркован ваш {автомобиль.}';
|
dsc = 'Недалеко от вас припаркован ваш {автомобиль.}';
|
||||||
tak = function()
|
tak = function()
|
||||||
char.quests.car = 5
|
char.quests.car = 5
|
||||||
|
|
13
tools.lua
13
tools.lua
|
@ -219,11 +219,16 @@ fairadd = function(value, add)
|
||||||
end
|
end
|
||||||
-- TODO: глючное перечисление инвентаря. Пропускает вещи.
|
-- TODO: глючное перечисление инвентаря. Пропускает вещи.
|
||||||
listinv = function()
|
listinv = function()
|
||||||
local inv = pl:inventory()
|
|
||||||
local out = ''
|
local out = ''
|
||||||
for k, v in std.ipairs(inv) do
|
local comma = false
|
||||||
if not std.is_obj(v) or v:disabled() or v:closed() then
|
for k, v in std.ipairs(inv()) do
|
||||||
out = out .. ', ' .. v.disp
|
if v.disp and not v:disabled() then
|
||||||
|
if comma then
|
||||||
|
out = out .. ', '
|
||||||
|
else
|
||||||
|
comma = true
|
||||||
|
end
|
||||||
|
out = out .. v.disp
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if out == '' then
|
if out == '' then
|
||||||
|
|
Loading…
Reference in a new issue