-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs, and improve docs for retryer and race
- Loading branch information
1 parent
39b7d6c
commit e587c80
Showing
16 changed files
with
113 additions
and
26 deletions.
There are no files selected for viewing
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,4 @@ | ||
# Character | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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
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
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,3 @@ | ||
# Linked List | ||
|
||
A doubly-linked list implementation in luau |
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,3 @@ | ||
# Linked List | ||
|
||
A doubly-linked list implementation in luau |
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,3 @@ | ||
# Linked List | ||
|
||
A doubly-linked list implementation in luau |
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,4 @@ | ||
# Log Analytics | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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,4 @@ | ||
# Player Zone | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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
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,6 @@ | ||
# Random | ||
|
||
A implementation of robloxs random class in pure luau | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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,4 @@ | ||
# Ratelimit | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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,4 @@ | ||
|
||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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 |
---|---|---|
@@ -1,27 +1,68 @@ | ||
### Retryer | ||
# Retryer | ||
|
||
Module for easily retrying functions | ||
A utility for easily retrying functions | ||
|
||
#### example | ||
```luau | ||
local StarterGui = game:GetService("StarterGui") | ||
local retryer = require("retryer") | ||
local SET_CORE = StarterGui.SetCore | ||
retryer.inf(10, StarterGui.SetCore, "ResetButtonCallback", false) | ||
local function foo(n: number) | ||
return n + 1 | ||
end | ||
``` | ||
|
||
-- delay between retrys, max retrys, function to retry, function args | ||
local success, added = retryer.delay(10, 20, foo, 1) | ||
## Methods | ||
|
||
### `__call` | ||
|
||
Retrys a function x times, based on how many retries its allowed to make | ||
|
||
```luau | ||
-- max retrys, function to retry, function args | ||
local success, other_added = retryer(20, foo, 1) | ||
local success, added = retryer(20, function(n: number) | ||
return n + 3 | ||
end, 1) | ||
other_added -= 3 | ||
``` | ||
|
||
### `delay` | ||
|
||
Retrys a function x times, based on how many retries its allowed to make. | ||
With a delay in between thats provided as the first argument | ||
|
||
```luau | ||
-- delay between retrys, max retrys, function to retry, function args | ||
local success, added = retryer.delay(20, 10, function(n: number) | ||
return n + 3 | ||
end, 1) | ||
other_added -= 3 | ||
``` | ||
|
||
> [!DANGER] | ||
> The infinite methods can infinitely yield so its reccomened to not use them unless you have to | ||
> such as with [`StarterGui:SetCore()`](https://create.roblox.com/docs/reference/engine/classes/StarterGui#SetCore) | ||
### `inf` | ||
|
||
Works like [`__call`](#call), except that it infinitely retries until it succeeds | ||
|
||
```luau | ||
-- function to retry, function args | ||
local added = retryer(function(n: number) | ||
return n + 3 | ||
end, 1) | ||
other_added -= 3 | ||
``` | ||
|
||
-- infretry is useful for stuff like StarterGui:SetCore() | ||
-- where it will fail for a bit unless ur script is parented to StarterGui | ||
retryer.infretry(SET_CORE, "ResetButtonCallback", false) | ||
### `infdelay` | ||
|
||
Works like [`delay`](#delay), except that it infinitely retries until it succeeds | ||
|
||
```luau | ||
local StarterGui = game:GetService("StarterGui") | ||
retryer.infdelay(10, StarterGui.SetCore, "ResetButtonCallback", false) | ||
``` | ||
|
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,6 @@ | ||
# Safe Teleport | ||
|
||
A teleport async wrapper that makes teleporting simple | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
lol | ||
# Text Chat | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
lol | ||
# Url | ||
|
||
> [!INFO] | ||
> The docs for this library are incomplete |