-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Patch: Update old samples and their sources."
This reverts commit 2f9a8a2. Revert "Enhancement: Update old samples and their sources." This reverts commit d005379.
- Loading branch information
1 parent
8fa4f1f
commit 481ae46
Showing
84 changed files
with
557 additions
and
434 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--// Authored by @sinlerdev (https://github.com/sinlerdev) | ||
--// Fetched from (https://github.com/vinum-team/Vinum/blob/b80a6c194e6901f9d400968293607218598e1386/src/Utils/createProcessor.luau) | ||
--// Licensed under the MIT License (https://github.com/vinum-team/Vinum/blob/b80a6c194e6901f9d400968293607218598e1386/LICENSE) | ||
|
||
--!strict | ||
local function createProcessor(valueChecker: (a: any, b: any) -> boolean, cleaner: (taskItem: any) -> ()) | ||
return function<T>(old: T, new: T, isDestroying: boolean) | ||
if isDestroying then | ||
cleaner(old) | ||
return false | ||
end | ||
|
||
if valueChecker(old, new) then | ||
return false | ||
end | ||
|
||
cleaner(old) | ||
return true | ||
end | ||
end | ||
|
||
return createProcessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--// Authored by @AmaranthineCodices (https://github.com/AmaranthineCodices) | ||
--// Fetched from (https://github.com/Floral-Abyss/recs/blob/be123afef8f1fddbd9464b7d34d5178393601ae3/recs/createSignal.luau) | ||
--// Licensed under the MIT License (https://github.com/Floral-Abyss/recs/blob/master/LICENSE.md) | ||
|
||
--!strict | ||
|
||
local function createSignal() | ||
local listeners = {} | ||
local signal = {} | ||
|
||
function signal:Connect(listener) | ||
listeners[listener] = true | ||
|
||
local connection = { | ||
Connected = true, | ||
} | ||
|
||
function connection.Disconnect() | ||
connection.Connected = false | ||
listeners[listener] = nil | ||
end | ||
connection.disconnect = connection.Disconnect | ||
|
||
return connection | ||
end | ||
signal.connect = signal.Connect | ||
|
||
local function fire(...) | ||
for listener, _ in pairs(listeners) do | ||
spawn(listener, ...) | ||
end | ||
end | ||
|
||
return signal, fire | ||
end | ||
|
||
return createSignal |
Oops, something went wrong.