From 8e5268229a44c8bca2453ca64fcb89ad508d8331 Mon Sep 17 00:00:00 2001 From: LyLo Date: Fri, 25 Aug 2023 19:30:46 -0400 Subject: [PATCH] Bug Fix on APL traits --- src/APL/APL.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/APL/APL.lua b/src/APL/APL.lua index 6de3bc3..209f217 100644 --- a/src/APL/APL.lua +++ b/src/APL/APL.lua @@ -231,7 +231,7 @@ end -- Add an item to the APL ---@param item Item ----@param condition fun(...):boolean +---@param condition? fun(...):boolean ---@return APLActor function APL:AddItem(item, condition) local usableFunc = item.UsableIfFunc @@ -268,8 +268,8 @@ end -- Execute the APL function APL:Execute() for _, actor in ipairs(self.apl) do - if actor:HasTraits() and actor:Evaluate() then - if actor:Execute() then + if actor:HasTraits() then + if actor:Evaluate() and actor:Execute() then break end else