Fix global variables in corescripts and joinscripts to load correctly

This commit is contained in:
Lewin Kelly 2023-08-17 22:03:30 +01:00
parent de20338362
commit 29f87521ab
5 changed files with 19 additions and 11 deletions

View File

@ -9463,8 +9463,8 @@ declare class DataModel extends ServiceProvider
function SetFastStringForTesting(self, name: string, newValue: string): string
function SetFlagVersion(self, name: string, version: number): nil
function SetIsLoaded(self, value: boolean, placeSizeInBytes: number?): nil
function SetPlaceId(self, placeId: number, idk: boolean): nil
function SetPlaceID(self, placeId: number, idk: boolean): nil
function SetPlaceId(self, placeId: number, idk: boolean?): nil
function SetPlaceID(self, placeId: number, idk: boolean?): nil
function SetUniverseId(self, universeId: number): nil
function Shutdown(self): nil

View File

@ -1,6 +1,7 @@
{
rules: [
"remove_spaces",
"remove_compound_assignment",
"group_local_assignment",
// "compute_expression",
"remove_unused_if_branch",
@ -9,5 +10,9 @@
// "remove_method_definition",
"remove_function_call_parens",
"filter_after_early_return",
{
rule: "rename_variables",
globals: ["$default", "$roblox"],
},
],
}

View File

@ -11,8 +11,8 @@ local functionTable = {}
local buttonVector = {}
local buttonScreenGui, buttonFrame
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
local ContextDownImage = "http://banland.xyz/asset/?id=97166756"
local ContextUpImage = "http://banland.xyz/asset/?id=97166444"
local oldTouches = {}

View File

@ -10,6 +10,8 @@ local Players = game:GetService "Players"
local Client = game:GetService "NetworkClient"
local Visit = game:GetService "Visit"
local player, connectionFailed
-- MultiplayerSharedScript.lua inserted here ------ Prepended to Join.lua --
pcall(function()
@ -154,7 +156,7 @@ function requestCharacter(replicator)
end
-- called when the client connection is established
function onConnectionAccepted(url, replicator)
function onConnectionAccepted(_, replicator)
connectResolved = true
local waitingForMarker = true
@ -241,7 +243,8 @@ local success, err = pcall(function()
connectionFailed = Client.ConnectionFailed:connect(onConnectionFailed)
Client.Ticket = ""
local playerConnectSuccess, player = pcall(function()
local playerConnectSuccess
playerConnectSuccess, player = pcall(function()
return Client:PlayerConnect(
_USER_ID,
"_SERVER_ADDRESS",

View File

@ -11,13 +11,13 @@ local GamePassService = game:GetService "GamePassService"
local Visit = game:GetService "Visit"
local ScriptContext = game:GetService "ScriptContext"
local player
-- Prepended to Edit.lua and Visit.lua and Studio.lua and PlaySolo.lua--
do
pcall(function()
return game:SetPlaceID(_PLACE_ID)
end)
end
pcall(function()
return game:SetPlaceID(_PLACE_ID)
end)
local message = Instance.new "Message"