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

24 lines
No EOL
698 B
Lua

---@class XRestaurantGetActionIdNode : XLuaBehaviorNode
---@field AgentProxy XRestaurantCharAgent
local XRestaurantGetActionIdNode = XLuaBehaviorManager.RegisterNode(XLuaBehaviorNode,
"RestaurantGetActionId", CsBehaviorNodeType.Action, true, false)
function XRestaurantGetActionIdNode:OnAwake()
if self.Fields == nil then
self.Node.Status = CsNodeStatus.ERROR
return
end
if self.Fields["Index"] == nil then
self.Node.Status = CsNodeStatus.ERROR
return
end
self.Index = self.Fields["Index"]
end
function XRestaurantGetActionIdNode:OnEnter()
self.AgentProxy:DoGetActionId(self.Index)
self.Node.Status = CsNodeStatus.SUCCESS
end