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

15 lines
No EOL
490 B
Lua

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