From b6c4e9a650f30139cfd543b458038adcbd7ba7d2 Mon Sep 17 00:00:00 2001 From: Qwreey Date: Wed, 12 Apr 2023 01:09:03 +0900 Subject: [PATCH] feat: GetChildren slotName argument --- DEV_CHANGELOG.txt | 7 +++++-- src/class.lua | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/DEV_CHANGELOG.txt b/DEV_CHANGELOG.txt index 6682ab6..e231f77 100644 --- a/DEV_CHANGELOG.txt +++ b/DEV_CHANGELOG.txt @@ -5,6 +5,9 @@ types 모듈이 삭제되며 init.lua 에 통합됨 이제 extend 에 대해서 Init(self) self 안에 props 기능이 내장되어있음 TODO: slot 기능 구현 -spring 구현 -TODO: !ChildRemoved 구현 \ No newline at end of file +TODO: spring 구현 + +TODO: !ChildRemoved 구현 + +TODO: AdvancedTween 을 submodule 로 변경 diff --git a/src/class.lua b/src/class.lua index f8a74a9..1069632 100644 --- a/src/class.lua +++ b/src/class.lua @@ -167,7 +167,8 @@ function module.init(shared) local setValue,tween = value:CalcWithNewValue(item,newValue,key) if tween then if not advancedTween then - return warn "[QUAD] module 'AdvancedTween' needs to be loaded for tween properties but it is not found on 'src.libs'. you should adding that to src.libs directory" + warn "[QUAD] Failed to execute register handler function. (Real Instance was not updated)" + return warn "[QUAD] module 'AdvancedTween' needs to be loaded for tween properties but it is not found on 'src.libs'. you should adding that to src.libs directory.\nPossible reason : Cloned repository without recursive option. => 'git submodule init ; git submodule update' to get submodules" end -- local ended, onStepped -- if tween.Ended then @@ -445,11 +446,18 @@ function module.init(shared) thisSignal:Fire(value) end - function this:GetChildren() - local children = rawget(self,"__child") - if not children then - return {} + function this:GetChildren(slotName) + if slotName then + local slot = rawget(slotName,"__slot") + if not slot then return {} end + local newSlot = {} + for _,v in pairs(slot) do + insert(newSlot,v) + end + return slot end + local children = rawget(self,"__child") + if not children then return {} end local newChildren = {} for _,v in pairs(children) do insert(newChildren,v)