Improve formatting and fix bugs in corescripts
This commit is contained in:
parent
37d28a3999
commit
a76055d3eb
|
|
@ -349,12 +349,8 @@ initializeDeveloperConsole = ->
|
|||
TextYAlignment: Enum.TextYAlignment.Top
|
||||
|
||||
---Saved Mouse Information
|
||||
local previousMousePos
|
||||
local pPos
|
||||
|
||||
local previousMousePosResize
|
||||
local pSize
|
||||
|
||||
local previousMousePos, pPos
|
||||
local previousMousePosResize, pSize
|
||||
local previousMousePosScroll
|
||||
|
||||
-- local pScrollHandle
|
||||
|
|
|
|||
|
|
@ -1127,7 +1127,6 @@ t.CreateTrueScrollingFrame = ->
|
|||
break if mouseYPos and mouseYPos < (scrollbar.AbsolutePosition.y + scrollbar.AbsoluteSize.x)
|
||||
break if not scrollDownButton.Active
|
||||
|
||||
|
||||
w = if tick! - t > 5
|
||||
0
|
||||
elseif tick! - t > 2
|
||||
|
|
@ -3258,16 +3257,16 @@ t.CreateLoadingFrame = (name, size, position) ->
|
|||
|
||||
|
||||
updateLoadingGuiPercent = (percent, tweenAction, tweenLength) ->
|
||||
if percent and type percent ~= "number"
|
||||
if percent and type(percent) ~= "number"
|
||||
error "updateLoadingGuiPercent expects number as argument, got #{type percent} instead"
|
||||
|
||||
|
||||
newSize = if percent < 0
|
||||
UDim2.new 0, 0, 1, 0
|
||||
newSize = UDim2.new if percent < 0
|
||||
0, 0, 1, 0
|
||||
elseif percent > 1
|
||||
UDim2.new 1, 0, 1, 0
|
||||
1, 0, 1, 0
|
||||
else
|
||||
UDim2.new percent, 0, 1, 0
|
||||
percent, 0, 1, 0
|
||||
|
||||
|
||||
if tweenAction
|
||||
|
|
@ -3477,10 +3476,10 @@ t.CreatePluginFrame = (name, size, position, scrollable, parent) ->
|
|||
else
|
||||
UDim2.new 0, dragBar.AbsoluteSize.X, size.Y.Scale, size.Y.Offset
|
||||
else
|
||||
if scrollable
|
||||
UDim2.new 0, 163, 0, 400
|
||||
UDim2.new 0, if scrollable
|
||||
163, 0, 400
|
||||
else
|
||||
UDim2.new 0, dragBar.AbsoluteSize.X, 0, 400
|
||||
dragBar.AbsoluteSize.X, 0, 400
|
||||
|
||||
if position
|
||||
widgetContainer.Position += UDim2.new 0, 0, 0, 20
|
||||
|
|
@ -3608,23 +3607,15 @@ t.CreatePluginFrame = (name, size, position, scrollable, parent) ->
|
|||
widgetContainer.Visible = not widgetContainer.Visible
|
||||
|
||||
|
||||
if minimizeFrame.Visible
|
||||
minimizeButton.Text = "+"
|
||||
minimizeButton.Text = if minimizeFrame.Visible
|
||||
"+"
|
||||
else
|
||||
minimizeButton.Text = "-"
|
||||
"-"
|
||||
|
||||
minimizeBigButton.MouseButton1Click\connect -> switchMinimize!
|
||||
minimizeButton.MouseButton1Click\connect -> switchMinimize!
|
||||
|
||||
minimizeBigButton.MouseButton1Click\connect ->
|
||||
switchMinimize!
|
||||
|
||||
minimizeButton.MouseButton1Click\connect ->
|
||||
switchMinimize!
|
||||
|
||||
|
||||
if scrollable
|
||||
dragBar, frame, helpFrame, closeEvent
|
||||
else
|
||||
dragBar, widgetContainer, helpFrame, closeEvent
|
||||
dragBar, (if scrollable then frame else widgetContainer), helpFrame, closeEvent
|
||||
|
||||
|
||||
t.Help = (funcNameOrFunc) ->
|
||||
|
|
|
|||
|
|
@ -821,10 +821,8 @@ centerGear = ->
|
|||
else
|
||||
table.insert gearButtons, i
|
||||
|
||||
|
||||
i.BackgroundTransparency = 1
|
||||
|
||||
|
||||
if lastSlotAdd
|
||||
table.insert gearButtons, lastSlotAdd
|
||||
|
||||
|
|
|
|||
|
|
@ -799,8 +799,9 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
Parent: root
|
||||
|
||||
|
||||
if terrainShape
|
||||
if root.Name == "MegaClusterCube"
|
||||
if terrainShape and
|
||||
root.Name == "MegaClusterCube"
|
||||
|
||||
if terrainShape == 6 -- insert an autowedging tag
|
||||
New "BoolValue", "AutoWedge"
|
||||
Parent: root
|
||||
|
|
@ -815,7 +816,6 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
else
|
||||
setupFakeTerrainPart 1, terrainShape, 0
|
||||
|
||||
|
||||
root
|
||||
|
||||
|
||||
|
|
@ -1104,15 +1104,15 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
-- don't drag into terrain
|
||||
if clusterPartsInRegion minBB + insertBoundingBoxOverlapVector, maxBB - insertBoundingBoxOverlapVector
|
||||
if lastTarget.CFrame
|
||||
if stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
|
||||
if lastTarget.CFrame and
|
||||
stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
|
||||
|
||||
theClusterMaterial = stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
|
||||
if theClusterMaterial\IsA "Vector3Value"
|
||||
stampClusterMaterial = stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
|
||||
if stampClusterMaterial
|
||||
stampClusterMaterial = clusterMat
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
|
@ -1870,9 +1870,10 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
|
||||
-- something will be stamped! so set the "StampedSomething" toggle to true
|
||||
if game\FindFirstChild "Players"
|
||||
if game.Players["LocalPlayer"]
|
||||
if game.Players.LocalPlayer["Character"]
|
||||
if game\FindFirstChild"Players" and
|
||||
game.Players["LocalPlayer"] and
|
||||
game.Players.LocalPlayer["Character"]
|
||||
|
||||
localChar = game.Players.LocalPlayer.Character
|
||||
stampTracker = localChar\FindFirstChild "StampTracker"
|
||||
if stampTracker and not stampTracker.Value
|
||||
|
|
|
|||
|
|
@ -1034,8 +1034,9 @@ Chat.UpdateQueue = (field, diff) =>
|
|||
for i = #@MessageQueue, 1, -1
|
||||
if @MessageQueue[i]
|
||||
for _, label in pairs @MessageQueue[i]
|
||||
if label and type(label) ~= "table" and type(label) ~= "number"
|
||||
if label\IsA"TextLabel" or label\IsA "TextButton"
|
||||
if (label and type(label) ~= "table" and type(label) ~= "number") and
|
||||
(label\IsA"TextLabel" or label\IsA "TextButton")
|
||||
|
||||
if diff
|
||||
label.Position = label.Position - UDim2.new 0, 0, diff, 0
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue