Formatting improvement etc
This commit is contained in:
parent
0e4523c8ca
commit
ef74699fe8
|
|
@ -5,23 +5,32 @@ print "[Mercury]: Loaded corescript 60595695"
|
||||||
-- This script is used to register RbxLua libraries on game servers, so game scripts have
|
-- This script is used to register RbxLua libraries on game servers, so game scripts have
|
||||||
-- access to all of the libraries (otherwise only local scripts do)
|
-- access to all of the libraries (otherwise only local scripts do)
|
||||||
|
|
||||||
local sc = game:GetService "ScriptContext"
|
local ScriptContext
|
||||||
local tries = 0
|
|
||||||
|
|
||||||
while not sc and tries < 3 do
|
for i = 1, 4 do
|
||||||
tries += 1
|
ScriptContext = game:GetService "ScriptContext"
|
||||||
sc = game:GetService "ScriptContext"
|
if ScriptContext then
|
||||||
|
break
|
||||||
|
end
|
||||||
wait(0.2)
|
wait(0.2)
|
||||||
end
|
end
|
||||||
|
|
||||||
if sc then
|
local function RegisterLibraries(t: { [string]: number })
|
||||||
sc:RegisterLibrary("Libraries/RbxFusion", "10000001")
|
for name, id in pairs(t) do
|
||||||
sc:RegisterLibrary("Libraries/RbxRed", "10000002")
|
ScriptContext:RegisterLibrary(`Libraries/Rbx{name}`, tostring(id))
|
||||||
sc:RegisterLibrary("Libraries/RbxGui", "45284430")
|
end
|
||||||
sc:RegisterLibrary("Libraries/RbxGear", "45374389")
|
end
|
||||||
sc:RegisterLibrary("Libraries/RbxUtility", "60595411")
|
|
||||||
sc:RegisterLibrary("Libraries/RbxStamper", "73157242")
|
if ScriptContext then
|
||||||
sc:LibraryRegistrationComplete()
|
RegisterLibraries {
|
||||||
|
Fusion = 10000001,
|
||||||
|
Red = 10000002,
|
||||||
|
Gui = 45284430,
|
||||||
|
Gear = 45374389,
|
||||||
|
Utility = 60595411,
|
||||||
|
Stamper = 73157242,
|
||||||
|
}
|
||||||
|
ScriptContext:LibraryRegistrationComplete()
|
||||||
else
|
else
|
||||||
print "failed to find script context, libraries did not load"
|
print "failed to find script context, libraries did not load"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1148,8 +1148,8 @@ function Chat:UpdateChat(cPlayer, message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Chat:RecalculateSpacing()
|
-- function Chat:RecalculateSpacing()
|
||||||
--[[for i = 1, #self.MessageQueue do
|
--[[for i = 1, #self.MessageQueue do
|
||||||
local pLabel = self.MessageQueue[i]['Player']
|
local pLabel = self.MessageQueue[i]['Player']
|
||||||
local mLabel = self.MessageQueue[i]['Message']
|
local mLabel = self.MessageQueue[i]['Message']
|
||||||
|
|
||||||
|
|
@ -1166,7 +1166,7 @@ function Chat:RecalculateSpacing()
|
||||||
|
|
||||||
Chat:UpdateQueue(self.MessageQueue[i], diff)
|
Chat:UpdateQueue(self.MessageQueue[i], diff)
|
||||||
end ]]
|
end ]]
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- function Chat:ApplyFilter(str)
|
-- function Chat:ApplyFilter(str)
|
||||||
-- --[[for _, word in pair(self.Filter_List) do
|
-- --[[for _, word in pair(self.Filter_List) do
|
||||||
|
|
@ -1316,7 +1316,7 @@ function Chat:ScreenSizeChanged()
|
||||||
while self.Frame.AbsoluteSize.Y > 120 do
|
while self.Frame.AbsoluteSize.Y > 120 do
|
||||||
self.Frame.Size -= UDim2.new(0, 0, 0.005, 0)
|
self.Frame.Size -= UDim2.new(0, 0, 0.005, 0)
|
||||||
end
|
end
|
||||||
Chat:RecalculateSpacing()
|
-- Chat:RecalculateSpacing()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Chat:FindButtonTree(scButton, rootList)
|
function Chat:FindButtonTree(scButton, rootList)
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,6 @@ end)
|
||||||
-- functions ---------------------------------------
|
-- functions ---------------------------------------
|
||||||
local loadingState = 0
|
local loadingState = 0
|
||||||
local function setLoadingMessage(message: string)
|
local function setLoadingMessage(message: string)
|
||||||
-- todo: animated "..."
|
|
||||||
local dots = ""
|
local dots = ""
|
||||||
loadingState += 1
|
loadingState += 1
|
||||||
local currentLoadingState = loadingState
|
local currentLoadingState = loadingState
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue