Skip to content
Snippets Groups Projects
Commit 87964a30 authored by DarkGod's avatar DarkGod
Browse files

fix

parent ca9ea578
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -125,7 +125,7 @@ function _M:chatFormatActions(nodes, answer, node, stop_at)
end
---------------------------------------------------------------------------
if node.name == "chat" then
if node.name == "chat" or node.name == "entry-selector" then
answer.jump = node.data.chatid
---------------------------------------------------------------------------
elseif node.name == "lua-code" then
......@@ -170,6 +170,22 @@ function _M:chatFormatActions(nodes, answer, node, stop_at)
end
return self:chatFormatActions(nodes, answer, getnext(), stop_at)
---------------------------------------------------------------------------
elseif node.name == "object-has" then
add_cond(function(npc, player)
local actor = node.data.who == "player" and player or npc
if node.data['in'] == "all-inventories" then
return actor:findInAllInventoriesBy(node.data.search_by, node.data.search)
elseif node.data['in'] == "worn-inventories" then
return actor:findInAllWornInventoriesBy(true, node.data.search_by, node.data.search)
elseif node.data['in'] == "nonworn-inventories" then
return actor:findInAllWornInventoriesBy(false, node.data.search_by, node.data.search)
else
return actor:findInInventoryBy(actor:getInven(node.data['in']), node.data.search_by, node.data.search)
end
return
end)
return self:chatFormatActions(nodes, answer, getnext(), stop_at)
---------------------------------------------------------------------------
elseif node.name == "attr-inc" then
if not node.data.value:find("return ") then node.data.value = "return "..node.data.value end
local a, err = loadstring(node.data.value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment