Some corescript formatting fixes

This commit is contained in:
Lewin Kelly 2024-04-15 19:45:47 +01:00
parent 2ee432487e
commit cd89a4bf7f
7 changed files with 35 additions and 43 deletions

View File

@ -17,7 +17,7 @@ local NetworkServer = game:GetService "NetworkServer"
RunService:Run()
local url = _BASE_URL
local url = _BASE_URL -- can't use the BaseUrl module because ContentProvider.BaseUrl isn't set yet
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
@ -45,28 +45,26 @@ ScriptContext.ScriptsDisabled = true
-- game:SetPlaceId(nil, false)
ChangeHistoryService:SetEnabled(false)
if url ~= nil then
pcall(function()
Players:SetAbuseReportUrl(`{url}/Report/Games.ashx`)
end)
pcall(function()
ScriptInformationProvider:SetAssetUrl(`{url}/Asset/`)
end)
pcall(function()
ContentProvider:SetBaseUrl(`{url}/`)
end)
pcall(function()
Players:SetAbuseReportUrl(url .. "/Report/Games.ashx")
end)
pcall(function()
ScriptInformationProvider:SetAssetUrl(url .. "/Asset/")
end)
pcall(function()
ContentProvider:SetBaseUrl(url .. "/")
end)
BadgeService:SetIsBadgeLegalUrl ""
InsertService:SetBaseSetsUrl(
url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
)
InsertService:SetUserSetsUrl(
url .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
)
InsertService:SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d")
InsertService:SetAssetUrl(url .. "/asset?id=%d")
InsertService:SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d")
end
BadgeService:SetIsBadgeLegalUrl ""
InsertService:SetBaseSetsUrl(
url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
)
InsertService:SetUserSetsUrl(
url .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
)
InsertService:SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d")
InsertService:SetAssetUrl(url .. "/asset?id=%d")
InsertService:SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d")
pcall(function()
NetworkServer:SetIsPlayerAuthenticationRequired(true)

View File

@ -18,10 +18,6 @@ pcall(function()
game:SetPlaceId(_PLACE_ID, false)
end)
-- if we are on a touch device, no blocking http calls allowed! This can cause a crash on iOS
-- In general we need a long term strategy to remove blocking http calls from all platforms
-- local isTouchDevice = UserInputService.TouchEnabled
settings()["Game Options"].CollisionSoundEnabled = true
pcall(function()
settings().Rendering.EnableFRM = true
@ -35,8 +31,6 @@ pcall(function()
Enum.EnviromentalPhysicsThrottle.DefaultAuto
end)
-- arguments ---------------------------------------
-- (there aren't any)
local threadSleepTime = 15
-- local test = _IS_STUDIO_JOIN -- unused
@ -121,7 +115,6 @@ local function requestCharacter(replicator)
if not ok then
reportError(err)
return
end
end
@ -172,15 +165,16 @@ local function onConnectionRejected()
end
local function onPlayerIdled(idleTime)
if idleTime > 20 * 60 then
setMessage(
string.format(
"You were disconnected for being idle %d minutes",
idleTime / 60
)
)
Client:Disconnect()
if idleTime < 20 * 60 then
return
end
setMessage(
string.format(
"You were disconnected for being idle %d minutes",
idleTime / 60
)
)
Client:Disconnect()
end
-- main ------------------------------------------------------------
@ -229,6 +223,6 @@ pcall(function()
game:SetScreenshotInfo ""
end)
pcall(function()
game:SetVideoInfo '<?xml version="1.0"?><entry xmlns="http://w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007"><media:group><media:title type="plain"><![CDATA[Mercury Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit http://banland.xyz]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>Mercury, video, free game, online virtual world</media:keywords></media:group></entry>'
game:SetVideoInfo '<?xml version="1.0"?><entry xmlns="http://w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007"><media:group><media:title type="plain"><![CDATA[Mercury Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit https://mercury2.com]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>Mercury, video, free game, online virtual world</media:keywords></media:group></entry>'
end)
-- use single quotes here because the video info string may have unescaped double quotes

View File

@ -5,7 +5,7 @@ local ThumbnailGenerator =
game:GetService "ThumbnailGenerator" :: ThumbnailGenerator
local RenderModule = require "../Modules/Render"
local SetupAvatar = require "../Modules/Render/SetupAvatar"
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
local Render = RenderModule(_BASE_URL, "_PING_URL", _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
local New = require("../Modules/New").New
local player = SetupAvatar(

View File

@ -4,7 +4,7 @@
local ThumbnailGenerator = game:GetService "ThumbnailGenerator"
local RenderModule = require "../Modules/Render"
local SetupAvatar = require "../Modules/Render/SetupAvatar"
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
local Render = RenderModule(_BASE_URL, "_PING_URL", _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
SetupAvatar(
_BASE_URL,

View File

@ -3,7 +3,7 @@
local ThumbnailGenerator = game:GetService "ThumbnailGenerator"
local RenderModule = require "../Modules/Render"
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
local Render = RenderModule(_BASE_URL, "_PING_URL", _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
local New = require("../Modules/New").New
print(`[{game.JobId}] Starting new render for {_RENDER_TYPE} Id {_ASSET_ID}`)

View File

@ -3,7 +3,7 @@
local ThumbnailGenerator = game:GetService "ThumbnailGenerator"
local RenderModule = require "../Modules/Render"
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
local Render = RenderModule(_BASE_URL, "_PING_URL", _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
print(`[{game.JobId}] Starting new render for {_RENDER_TYPE} Id {_ASSET_ID}`)

View File

@ -48,7 +48,7 @@ InsertService:SetUserSetsUrl(
)
InsertService:SetCollectionUrl(path "game/tools/insertasset?sid=%d")
InsertService:SetAssetUrl(path "asset?id=%d")
InsertService:SetAssetVersionUrl(path "Asset/?assetversionid=%d")
InsertService:SetAssetVersionUrl(path "asset?assetversionid=%d")
pcall(function()
SocialService:SetFriendUrl(