Tag removal and new serverside structure

This commit is contained in:
2024-03-03 02:34:59 -05:00
parent a3a8720c91
commit 1af1c6919e
15 changed files with 72 additions and 88 deletions

View File

@@ -12,15 +12,16 @@ export type KeyBindMap = {
[Enum.KeyCode]: (KeyPressed: Enum.KeyCode) -> ()
}
}
export type InputBegan = RBXScriptConnection
export type InputEnded = RBXScriptConnection
type CallbackFunction = () -> ()
type BindConstructor = {
BindMap: KeyBindMap,
InputBegan: InputBegan,
InputEnded: InputEnded
}
export type InputBegan = RBXScriptConnection
export type InputEnded = RBXScriptConnection
type CallbackFunction = (KeyPressed: Enum.KeyCode) -> ()
local UIS = game:GetService("UserInputService")
function BindLink.constructor(gameProcessing: boolean) --Allow multiple bindings of the same keys, no overwrites

View File

@@ -2,17 +2,44 @@
--!native
--!strict
local Tags = {}
Tags.__index = Tags
local CS = game:GetService("CollectionService")
local exports: {[string]: Instance} = {}
type ExportedTags = {
[string]: Instance | {Instance}
}
local AllTags = CS:GetAllTags()
for i = 1, #AllTags do
local TagName = AllTags[i]
if TagName ~= "RopeMasterObject" and TagName ~= "ServerGuard_Physics" then
local Tagged = CS:GetTagged(TagName)
exports[TagName] = #Tagged>1 and Tagged or Tagged[1]
function Tags.constructor()
local Exports: ExportedTags = {}
local AllTags = CS:GetAllTags()
for n: number = 1, #AllTags do
local TagName = AllTags[n]
if TagName ~= "RopeMasterObject" and TagName ~= "ServerGuard_Physics" then
local Tagged = CS:GetTagged(TagName)
Exports[TagName] = #Tagged>1 and Tagged or Tagged[1]
end
end
return setmetatable({
Exports = Exports
}, Tags)
end
return exports
function Tags:Nuke()
local Exports = self.Exports
for i,v in Exports do
if type(v) == "table" then
for n: number = 1, #v do
CS:RemoveTag(v[n], i)
end
else
CS:RemoveTag(v, i)
end
end
warn("☢️ nuked all in-game tags. Left-over tags="..table.concat(CS:GetAllTags(), ", "))
end
return Tags