Oreolek: >> `scope,edible` > Вероятно, `scene,edible` всё-таки. Тогда получается что нельзя кусать то, что есть в руках, а если положить на пол, то можно. По-моему, `scope` логичнее. >>а переопределение VerbHint не даёт вообще ничего. > Не понимаю о каком переопределении речь. Определение `VerbHint('#Eat', function(v) … end)` - я пробовал сделать через эту функцию, но она перекрывается фильтром в самом глаголе. Документация про это не предупреждает, но это уже ожидаемо. Короче вопрос был, как это тестить внутри игры, я его решил и если интересно, то это выглядит вот так: ``` function find_completion(thing, case) if thing == nil then return false end if type(thing) == 'string' then thing = _(thing) if thing == nil then return false end end if (case == nil) then case = 'вн' end local noun = thing:noun(case) for a, v in ipairs(mp.completions) do if v.word == noun then return true; end end return false; end […] describe('подсказки', function() it('общая проверка', function() mp:compl_reset(); mp:compl_fill(mp:compl('осмотреть ')); local hint = find_completion('shield'); expect(hint).to.be(true) end); it('поедание', function() if (here():srch('shi')) then move(_('shi'), 'main'); end mp:compl_reset(); mp:compl_fill(mp:compl('осмотреть ')); local hint = find_completion('shi'); expect(hint).to.be(false) —- сброс подсказок, ещё толком не разобрался почему compl_reset недостаточно parse('осмотреть себя'); mp:compl_reset(); mp:compl_fill(mp:compl('съесть ')); local hint = find_completion('shi'); expect(hint).to.be(false) expect(#mp.completions).to.be(0) move(_('shi'), here()); expect(here():srch('shi')).to.exist(); parse('осмотреть себя'); mp:compl_reset(); mp:compl_fill(mp:compl('осмотреть ')); hint = find_completion('shi'); expect(hint).to.be(true) parse('осмотреть себя'); mp:compl_reset(); mp:compl_fill(mp:compl('съесть ')); hint = find_completion('shi'); expect(hint).to.be(true) end); end); ``` ...
[>>>]