Улучшение определения. Теперь можно определять и первые слова предложений.
This commit is contained in:
parent
9cf08dff23
commit
556eeca7a4
16
engine.lua
16
engine.lua
|
@ -143,16 +143,20 @@ end
|
|||
|
||||
function is_activated(previous, current, room)
|
||||
for i,v in ipairs(room.obj) do
|
||||
if v ~= nil then
|
||||
for j,word in ipairs(v.obj) do
|
||||
if (word ~= nil) then
|
||||
if (word._word == previous) then
|
||||
if (v.obj[j+2]._word == current) then --следующее слово _после пробела_
|
||||
return v.obj[j+2]._enabled;
|
||||
if (word._word ~= nil) then
|
||||
if (previous ~= nil) then
|
||||
if (word._word == previous) then
|
||||
if (v.obj[j+2]._word == current) then --следующее слово _после пробела_
|
||||
return v.obj[j+2]._enabled
|
||||
end
|
||||
end
|
||||
else
|
||||
if (word._word == current) then
|
||||
return word._enabled
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue