fix 1.0.1

This commit is contained in:
EternityDev 2024-01-06 10:41:10 +07:00
parent 2e38eb4d74
commit 3e34c9cce9
5 changed files with 9 additions and 5 deletions

BIN
Warp.rbxm

Binary file not shown.

View file

@ -3,5 +3,5 @@
# To add a new tool, add an entry to this table. # To add a new tool, add an entry to this table.
[tools] [tools]
rojo = "rojo-rbx/rojo@7.2.1" rojo = "rojo-rbx/rojo@7.3.0"
wally = "UpliftGames/wally@0.3.2" wally = "UpliftGames/wally@0.3.2"

View file

@ -108,7 +108,7 @@ end
function ServerProcess.add(Identifier: string, originId: string, ratelimit: Type.rateLimitArg) function ServerProcess.add(Identifier: string, originId: string, ratelimit: Type.rateLimitArg)
if not serverQueue[Identifier] then if not serverQueue[Identifier] then
RateLimit.create(originId, ratelimit.maxEntrance, ratelimit.interval) RateLimit.create(originId, ratelimit.maxEntrance or 200, ratelimit.interval or 2)
serverQueue[Identifier] = {} serverQueue[Identifier] = {}
unreliableServerQueue[Identifier] = {} unreliableServerQueue[Identifier] = {}
serverCallback[Identifier] = {} serverCallback[Identifier] = {}
@ -119,6 +119,10 @@ function ServerProcess.add(Identifier: string, originId: string, ratelimit: Type
queueInRequest[2][Identifier] = {} queueInRequest[2][Identifier] = {}
queueOutRequest[1][Identifier] = {} queueOutRequest[1][Identifier] = {}
queueOutRequest[2][Identifier] = {} queueOutRequest[2][Identifier] = {}
for _, player: Player in ipairs(Players:GetPlayers()) do
task.spawn(initializeEachPlayer, player)
end
end end
end end

View file

@ -17,10 +17,10 @@ else
require(Client.ClientProcess).start() require(Client.ClientProcess).start()
end end
function Index.Server(Identifier: string): Type.Server function Index.Server(Identifier: string, rateLimit: Type.rateLimitArg?): Type.Server
Assert(IsServer, `[Warp]: Calling .Server({Identifier}) on client side (expected server side)`) Assert(IsServer, `[Warp]: Calling .Server({Identifier}) on client side (expected server side)`)
Assert(typeof(Identifier) == "string", "[Warp]: Identifier must be a string type") Assert(typeof(Identifier) == "string", "[Warp]: Identifier must be a string type")
return require(Server.Index)(Identifier) :: Type.Server return require(Server.Index)(Identifier, rateLimit) :: Type.Server
end end
function Index.Client(Identifier: string): Type.Client function Index.Client(Identifier: string): Type.Client
Assert(not IsServer, `[Warp]: Calling .Client({Identifier}) on server side (expected client side)`) Assert(not IsServer, `[Warp]: Calling .Client({Identifier}) on server side (expected client side)`)

View file

@ -1,6 +1,6 @@
[package] [package]
name = "imezx/warp" name = "imezx/warp"
version = "1.0.0" version = "1.0.1"
registry = "https://github.com/UpliftGames/wally-index" registry = "https://github.com/UpliftGames/wally-index"
realm = "shared" realm = "shared"
license = "MIT" license = "MIT"