fix types & unreliable

This commit is contained in:
EternityDev 2024-01-09 13:26:47 +07:00
parent 3e34c9cce9
commit c12356af4e
8 changed files with 10 additions and 14 deletions

BIN
Warp.rbxm

Binary file not shown.

BIN
WarpPlayground.rbxl Normal file

Binary file not shown.

View file

@ -18,9 +18,6 @@ local clientRequestQueue: Type.QueueMap = {}
local queueIn: { local queueIn: {
[string]: {any} [string]: {any}
} = {} } = {}
local queueInRequest: {
[string]: {any}
} = {}
local queueInRequest: { local queueInRequest: {
[number]: { [number]: {
[string]: { [string]: {

View file

@ -5,7 +5,6 @@ Client.__index = Client
local Players = game:GetService("Players") local Players = game:GetService("Players")
local Util = script.Parent.Parent.Util local Util = script.Parent.Parent.Util
local Type = require(script.Parent.Parent.Type)
local ClientProcess = require(script.Parent.ClientProcess) local ClientProcess = require(script.Parent.ClientProcess)
local Assert = require(Util.Assert) local Assert = require(Util.Assert)
local Key = require(Util.Key) local Key = require(Util.Key)

View file

@ -4,20 +4,20 @@ local Type = require(script.Parent.Type)
if RunService:IsServer() then if RunService:IsServer() then
if not script:FindFirstChild("Event") then if not script:FindFirstChild("Event") then
Instance.new("RemoteEvent", script).Name = "Event" Instance.new("RemoteEvent", script).Name = "Reliable"
end end
if not script:FindFirstChild("Event2") then if not script:FindFirstChild("Event2") then
Instance.new("RemoteEvent", script).Name = "Event2" Instance.new("UnreliableRemoteEvent", script).Name = "Unreliable"
end end
if not script:FindFirstChild("Request") then if not script:FindFirstChild("Request") then
Instance.new("RemoteEvent", script).Name = "Request" Instance.new("RemoteEvent", script).Name = "Request"
end end
elseif not script:FindFirstChild("Event") or not script:FindFirstChild("Event2") or not script:FindFirstChild("Request") then elseif not script:FindFirstChild("Reliable") or not script:FindFirstChild("Unreliable") or not script:FindFirstChild("Request") then
repeat task.wait() until script:FindFirstChild("Event") and script:FindFirstChild("Event2") and script:FindFirstChild("Request") repeat task.wait() until script:FindFirstChild("Reliable") and script:FindFirstChild("Unreliable") and script:FindFirstChild("Request")
end end
return { return {
Reliable = script.Event, Reliable = script.Reliable,
Unreliable = script.Event2, Unreliable = script.Unreliable,
Request = script.Request Request = script.Request
} :: Type.Event } :: Type.Event

View file

@ -1,7 +1,7 @@
--!strict --!strict
export type rateLimitArg = { export type rateLimitArg = {
maxEntrance: number, maxEntrance: number?,
interval: number, interval: number?,
} }
export type Client = { export type Client = {

View file

@ -1,5 +1,5 @@
-- Warp Library (@Eternity_Devs) -- Warp Library (@Eternity_Devs)
-- version 1.0 -- version 1.0.2
--!strict --!strict
--!native --!native
local Index = require(script.Index) local Index = require(script.Index)

View file

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