PGRData/Script/matrix/xrestaurant/xnode/XRestaurantIsWorkWithBuffNode.lua
2024-09-01 22:49:41 +02:00

14 lines
No EOL
510 B
Lua

---@class XRestaurantIsWorkWithBuffNode : XLuaBehaviorNode
---@field AgentProxy XRestaurantCharAgent
local XRestaurantIsWorkWithBuffNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode,
"RestaurantIsWorkWithBuff", CsBehaviorNodeType.Condition, true, false)
function XRestaurantIsWorkWithBuffNode:OnEnter()
local isEqual = self.AgentProxy:DoIsWorkWithBuff()
if isEqual then
self.Node.Status = CsNodeStatus.SUCCESS
else
self.Node.Status = CsNodeStatus.FAILED
end
end