Formatting improvement etc

This commit is contained in:
Lewin Kelly 2024-03-03 12:05:49 +00:00
parent 0e4523c8ca
commit ef74699fe8
3 changed files with 26 additions and 18 deletions

View File

@ -5,23 +5,32 @@ print "[Mercury]: Loaded corescript 60595695"
-- 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)
local sc = game:GetService "ScriptContext"
local tries = 0
local ScriptContext
while not sc and tries < 3 do
tries += 1
sc = game:GetService "ScriptContext"
for i = 1, 4 do
ScriptContext = game:GetService "ScriptContext"
if ScriptContext then
break
end
wait(0.2)
end
if sc then
sc:RegisterLibrary("Libraries/RbxFusion", "10000001")
sc:RegisterLibrary("Libraries/RbxRed", "10000002")
sc:RegisterLibrary("Libraries/RbxGui", "45284430")
sc:RegisterLibrary("Libraries/RbxGear", "45374389")
sc:RegisterLibrary("Libraries/RbxUtility", "60595411")
sc:RegisterLibrary("Libraries/RbxStamper", "73157242")
sc:LibraryRegistrationComplete()
local function RegisterLibraries(t: { [string]: number })
for name, id in pairs(t) do
ScriptContext:RegisterLibrary(`Libraries/Rbx{name}`, tostring(id))
end
end
if ScriptContext then
RegisterLibraries {
Fusion = 10000001,
Red = 10000002,
Gui = 45284430,
Gear = 45374389,
Utility = 60595411,
Stamper = 73157242,
}
ScriptContext:LibraryRegistrationComplete()
else
print "failed to find script context, libraries did not load"
end

View File

@ -1148,8 +1148,8 @@ function Chat:UpdateChat(cPlayer, message)
end
end
function Chat:RecalculateSpacing()
--[[for i = 1, #self.MessageQueue do
-- function Chat:RecalculateSpacing()
--[[for i = 1, #self.MessageQueue do
local pLabel = self.MessageQueue[i]['Player']
local mLabel = self.MessageQueue[i]['Message']
@ -1166,7 +1166,7 @@ function Chat:RecalculateSpacing()
Chat:UpdateQueue(self.MessageQueue[i], diff)
end ]]
end
-- end
-- function Chat:ApplyFilter(str)
-- --[[for _, word in pair(self.Filter_List) do
@ -1316,7 +1316,7 @@ function Chat:ScreenSizeChanged()
while self.Frame.AbsoluteSize.Y > 120 do
self.Frame.Size -= UDim2.new(0, 0, 0.005, 0)
end
Chat:RecalculateSpacing()
-- Chat:RecalculateSpacing()
end
function Chat:FindButtonTree(scButton, rootList)

View File

@ -93,7 +93,6 @@ end)
-- functions ---------------------------------------
local loadingState = 0
local function setLoadingMessage(message: string)
-- todo: animated "..."
local dots = ""
loadingState += 1
local currentLoadingState = loadingState