Fix whitespace in files, replace spaces with tabs etc

This commit is contained in:
Lewin Kelly 2023-04-30 12:15:48 +01:00
parent 496a3fb9d8
commit 4596d66d94
23 changed files with 164 additions and 165 deletions

View File

@ -9,10 +9,10 @@
<ProtectedString name="Source">function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
end
-- declarations
@ -41,7 +41,7 @@ function regenHealth()
end
Humanoid.HealthChanged:connect(regenHealth)
</ProtectedString>
</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
@ -77,7 +77,7 @@ function UpdateGUI(health)
tray.bar.Position = UDim2.new(x ,0, y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
-- If more than 1/4 health, bar = green.Else, bar = red.
if( (health / humanoid.MaxHealth) &gt; 0.25 ) then
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
else

View File

@ -13,7 +13,7 @@
"filter_after_early_return",
{
rule: "rename_variables",
globals: ["$default", "$roblox"],
globals: ["$default", "$roblox"],
}
]
}

View File

@ -9,10 +9,10 @@
<ProtectedString name="Source">function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
end
-- declarations
@ -41,7 +41,7 @@ function regenHealth()
end
Humanoid.HealthChanged:connect(regenHealth)
</ProtectedString>
</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
@ -77,7 +77,7 @@ function UpdateGUI(health)
tray.bar.Position = UDim2.new(x,0,y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
-- If more than 1/4 health, bar = green. Else, bar = red.
if( (health / humanoid.MaxHealth) &gt; 0.25 ) then
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
else

View File

@ -816,28 +816,28 @@ MouseButton1Click:connect(function()return au()end)al.MouseButton1Click:connect(
function()return au()end)if ad then return ag,ar,ak,ai else return ag,aq,ak,ai
end end b.Help=function(aa)if aa=='CreatePropertyDropDownMenu'or aa==b.
CreatePropertyDropDownMenu then return
[[Function CreatePropertyDropDownMenu. Arguments: (instance, propertyName, enumType). Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType']]
[[Function CreatePropertyDropDownMenu. Arguments: (instance, propertyName, enumType). Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType']]
elseif aa=='CreateDropDownMenu'or aa==b.CreateDropDownMenu then return
[[Function CreateDropDownMenu. Arguments: (items, onItemSelected). Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items]]
[[Function CreateDropDownMenu. Arguments: (items, onItemSelected). Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items]]
elseif aa=='CreateMessageDialog'or aa==b.CreateMessageDialog then return
[[Function CreateMessageDialog. Arguments: (title, message, buttons). Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button]]
[[Function CreateMessageDialog. Arguments: (title, message, buttons). Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button]]
elseif aa=='CreateStyledMessageDialog'or aa==b.CreateStyledMessageDialog then
return
[[Function CreateStyledMessageDialog. Arguments: (title, message, style, buttons). Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm]]
[[Function CreateStyledMessageDialog. Arguments: (title, message, style, buttons). Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm]]
elseif aa=='GetFontHeight'or aa==b.GetFontHeight then return
[[Function GetFontHeight. Arguments: (font, fontSize). Side effect: returns the size in pixels of the given font + fontSize]]
[[Function GetFontHeight. Arguments: (font, fontSize). Side effect: returns the size in pixels of the given font + fontSize]]
elseif aa=='CreateScrollingFrame'or aa==b.CreateScrollingFrame then return
[[Function CreateScrollingFrame. Arguments: (orderList, style) Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)]]
[[Function CreateScrollingFrame. Arguments: (orderList, style) Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)]]
elseif aa=='CreateTrueScrollingFrame'or aa==b.CreateTrueScrollingFrame then
return
[[Function CreateTrueScrollingFrame. Arguments: (nil) Side effect: returns 2 objects, (scrollFrame, controlFrame). 'scrollFrame' can be filled with GuiObjects, and they will be clipped if not inside the frame's bounds. controlFrame has children scrollup and scrolldown, as well as a slider. controlFrame can be parented to any guiobject and it will readjust itself to fit.]]
[[Function CreateTrueScrollingFrame. Arguments: (nil) Side effect: returns 2 objects, (scrollFrame, controlFrame). 'scrollFrame' can be filled with GuiObjects, and they will be clipped if not inside the frame's bounds. controlFrame has children scrollup and scrolldown, as well as a slider. controlFrame can be parented to any guiobject and it will readjust itself to fit.]]
elseif aa=='AutoTruncateTextObject'or aa==b.AutoTruncateTextObject then return
[[Function AutoTruncateTextObject. Arguments: (textLabel) Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument]]
[[Function AutoTruncateTextObject. Arguments: (textLabel) Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument]]
elseif aa=='CreateSlider'or aa==b.CreateSlider then return
[[Function CreateSlider. Arguments: (steps, width, position) Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on.]]
[[Function CreateSlider. Arguments: (steps, width, position) Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on.]]
elseif aa=='CreateLoadingFrame'or aa==b.CreateLoadingFrame then return
[[Function CreateLoadingFrame. Arguments: (name, size, position) Side effect: Creates a gui that can be manipulated to show progress for a particular action. Name appears above the loading bar, and size and position are udim2 values (both size and position are optional arguments). Returns 3 arguments, the first being the gui created. The second being updateLoadingGuiPercent, which is a bindable function. This function takes one argument (two optionally), which should be a number between 0 and 1, representing the percentage the loading gui should be at. The second argument to this function is a boolean value that if set to true will tween the current percentage value to the new percentage value, therefore our third argument is how long this tween should take. Our third returned argument is a BindableEvent, that when fired means that someone clicked the cancel button on the dialog.]]
[[Function CreateLoadingFrame. Arguments: (name, size, position) Side effect: Creates a gui that can be manipulated to show progress for a particular action. Name appears above the loading bar, and size and position are udim2 values (both size and position are optional arguments). Returns 3 arguments, the first being the gui created. The second being updateLoadingGuiPercent, which is a bindable function. This function takes one argument (two optionally), which should be a number between 0 and 1, representing the percentage the loading gui should be at. The second argument to this function is a boolean value that if set to true will tween the current percentage value to the new percentage value, therefore our third argument is how long this tween should take. Our third returned argument is a BindableEvent, that when fired means that someone clicked the cancel button on the dialog.]]
elseif aa=='CreateTerrainMaterialSelector'or aa==b.CreateTerrainMaterialSelector
then return
[[Function CreateTerrainMaterialSelector. Arguments: (size, position) Side effect: Size and position are UDim2 values that specifies the selector's size and position. Both size and position are optional arguments. This method returns 3 objects (terrainSelectorGui, terrainSelected, forceTerrainSelection). terrainSelectorGui is just the gui object that we generate with this function, parent it as you like. TerrainSelected is a BindableEvent that is fired whenever a new terrain type is selected in the gui. ForceTerrainSelection is a function that takes an argument of Enum.CellMaterial and will force the gui to show that material as currently selected.]]
[[Function CreateTerrainMaterialSelector. Arguments: (size, position) Side effect: Size and position are UDim2 values that specifies the selector's size and position. Both size and position are optional arguments. This method returns 3 objects (terrainSelectorGui, terrainSelected, forceTerrainSelection). terrainSelectorGui is just the gui object that we generate with this function, parent it as you like. TerrainSelected is a BindableEvent that is fired whenever a new terrain type is selected in the gui. ForceTerrainSelection is a function that takes an argument of Enum.CellMaterial and will force the gui to show that material as currently selected.]]
end end return b

View File

@ -1,6 +1,5 @@
print'[Mercury]: Loaded corescript 45374389'local a={}a.Foo=function()return
print'foo'end a.Bar=function()return print'bar'end a.Help=function(b)if'Foo'==b
or a.Foo==b then return
'Function Foo. Arguments: None. Side effect: prints foo'elseif'Bar'==b or a.
Bar==b then return'Function Bar. Arguments: None. Side effect: prints bar'end
end return a
or a.Foo==b then return'Function Foo. Arguments: None. Side effect: prints foo'
elseif'Bar'==b or a.Bar==b then return
'Function Bar. Arguments: None. Side effect: prints bar'end end return a

View File

@ -110,7 +110,7 @@ UDim2.new(0.5,-250,0.5,-200),Size=UDim2.new(0,500,0,400),BackgroundTransparency=
'Report Abuse',TextColor3=g(221,221,221),Position=UDim2.new(0.5,0,0,30),Font=
Enum.Font.ArialBold,FontSize=Enum.FontSize.Size36}),e('TextLabel','Description',
{Text=
[[This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action.]]
[[This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action.]]
,TextColor3=g(221,221,221),Position=UDim2.new(0.01,0,0,55),Size=UDim2.new(0.99,0
,0,40),BackgroundTransparency=1,Font=Enum.Font.Arial,FontSize=Enum.FontSize.
Size18,TextWrap=true,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum
@ -150,7 +150,7 @@ TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Top,Text=
Size48,Font='ArialBold'}),e('TextLabel','content',{Position=UDim2.new(0,10,0.2,0
),Size=UDim2.new(1,-30,0.4,0),TextScaled=true,BackgroundTransparency=1,
TextColor3=Color3.new(1,1,1),Text=
[[Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.
[[Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.
If anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats]]
,TextWrapped=true,TextYAlignment=Enum.TextYAlignment.Top,FontSize=Enum.FontSize.

View File

@ -142,9 +142,9 @@ else error('Bad entry ('..tostring(q)..' => '..tostring(r)..') in Create body',2
Create=setmetatable({},{['__call']=function(l,...)return k(...)end})a.Create.E=
function(l)return{__eventname=l}end a.Help=function(l)if'DecodeJSON'==l or a.
DecodeJSON==l then return
[[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]]
[[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]]
elseif'EncodeJSON'==l or a.EncodeJSON==l then return
[[Function EncodeJSON. Arguments: (table). Side effect: returns a string composed of argument table in JSON data format]]
[[Function EncodeJSON. Arguments: (table). Side effect: returns a string composed of argument table in JSON data format]]
elseif'MakeWedge'==l or a.MakeWedge==l then return
[[Function MakeWedge. Arguments: (x, y, z, [default material]). Description: Makes a wedge at location x, y, z. Sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously was. Returns true if made a wedge, false if the cell remains a block ]]
elseif'SelectTerrainRegion'==l or a.SelectTerrainRegion==l then return

View File

@ -156,11 +156,11 @@ FindFirstChild'ClusterMaterial'if E then if E:IsA'Vector3Value'then aj=ai(E.
Value.X,ae,E.Value.Z)else aj=ai(E.Value,ae,0)end else aj=ai(1,ae,0)end end end
end return aj end a.SetupStamperDragger=function(ad,ae,af,ag,ah)if not ad then
error
[[SetupStamperDragger: modelToStamp (first arg) is nil! Should be a stamper model]]
[[SetupStamperDragger: modelToStamp (first arg) is nil! Should be a stamper model]]
return nil end if not ad:IsA'Model'and not ad:IsA'BasePart'then error
[[SetupStamperDragger: modelToStamp (first arg) is neither a Model or Part!]]
return nil end if not ae then error
[[SetupStamperDragger: Mouse (second arg) is nil! Should be a mouse object]]
[[SetupStamperDragger: Mouse (second arg) is nil! Should be a mouse object]]
return nil end if not ae:IsA'Mouse'then error
[[SetupStamperDragger: Mouse (second arg) is not of type Mouse!]]return nil end
local ai,aj,w if af then if not af:IsA'Model'then error
@ -474,7 +474,7 @@ if aB~=nil then aB:Destroy()end end end if y~=nil then do local aB=y.
CurrentParts if aB~=nil then aB:Destroy()end end end if E and E['Stamped']then E
.Stamped:Destroy()end E=nil end return E end a.Help=function(ad)if
'GetStampModel'==ad or a.GetStampModel==ad then return
[[Function GetStampModel. Arguments: assetId, useAssetVersionId. assetId is the asset to load in, define useAssetVersionId as true if assetId is a version id instead of a relative assetId. Side effect: returns a model of the assetId, or a string with error message if something fails]]
[[Function GetStampModel. Arguments: assetId, useAssetVersionId. assetId is the asset to load in, define useAssetVersionId as true if assetId is a version id instead of a relative assetId. Side effect: returns a model of the assetId, or a string with error message if something fails]]
elseif'SetupStamperDragger'==ad or a.SetupStamperDragger==ad then return
[[Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action.]]
[[Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action.]]
end end return a

View File

@ -63,7 +63,7 @@ settings()["Task Scheduler"].PriorityMethod=Enum.PriorityMethod.AccumulatedError
end)
game:GetService"ChangeHistoryService":SetEnabled(false)
pcall(function()
return game:GetService"Players":SetBuildUserPermissionsUrl"http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
return game:GetService"Players":SetBuildUserPermissionsUrl"http://banland.xyz/Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
end)
workspace:SetPhysicsThrottleEnabled(true)
local addedBuildTools,

View File

@ -857,7 +857,7 @@ userPurchaseProductActionsEnded = (userIsClosingDialog) ->
setButtonsVisible purchaseDialog.BodyFrame.OkPurchasedButton
hidePurchasing!
-- all the gui init. Would be nice if this didn't have to be a script
-- all the gui init. Would be nice if this didn't have to be a script
createPurchasePromptGui = ->
purchaseDialog = New "Frame", "PurchaseFrame"
Size: UDim2.new 0, 660, 0, 400

View File

@ -452,7 +452,7 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
startPinch = (firstTouch, secondTouch) ->
-- track pinching in new frame
pinchFrame?\Destroy!
-- make sure we didn't track in any mud
-- make sure we didn't track in any mud
pinchFrame = New "Frame"
Name: "PinchFrame"
BackgroundTransparency: 1

View File

@ -592,7 +592,7 @@ initializeDeveloperConsole = ->
.TextWrapped = wordWrapToggleOn
.Size = UDim2.new 0.98, 0, 0, 2000
.Parent = Dev_Container
.Text = "#{messageList[i].Time} -- #{messageList[i].Message}"
.Text = "#{messageList[i].Time} -- #{messageList[i].Message}"
.Size = UDim2.new 0.98, 0, 0, .TextBounds.Y
.Position = UDim2.new 0, 5, 0, posOffset
.Parent = Dev_TextHolder

View File

@ -30,7 +30,7 @@ waitForChild game\GetService"CoreGui", "RobloxGui"
screenGui = game\GetService"CoreGui"\FindFirstChild "RobloxGui"
if not touchEnabled
-- ToolTipper (creates tool tips for gui)
-- ToolTipper (creates tool tips for gui)
scriptContext\AddCoreScript 36868950, screenGui, "CoreScripts/ToolTip"
-- SettingsScript
scriptContext\AddCoreScript 46295863, screenGui, "CoreScripts/Settings"

View File

@ -41,7 +41,7 @@ local currentConversationDialog
local currentConversationPartner
local currentAbortDialogScript
tooFarAwayMessage = "You are too far away to chat!"
tooFarAwayMessage = "You are too far away to chat!"
tooFarAwaySize = 300
characterWanderedOffMessage = "Chat ended because you walked away"
characterWanderedOffSize = 350

View File

@ -3670,60 +3670,60 @@ t.CreatePluginFrame = (name, size, position, scrollable, parent) ->
t.Help = (funcNameOrFunc) ->
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
if funcNameOrFunc == "CreatePropertyDropDownMenu" or funcNameOrFunc == t.CreatePropertyDropDownMenu
"Function CreatePropertyDropDownMenu. " ..
"Arguments: (instance, propertyName, enumType). " ..
"Function CreatePropertyDropDownMenu. " ..
"Arguments: (instance, propertyName, enumType). " ..
"Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType'"
elseif funcNameOrFunc == "CreateDropDownMenu" or funcNameOrFunc == t.CreateDropDownMenu
"Function CreateDropDownMenu. " ..
"Arguments: (items, onItemSelected). " ..
"Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items"
"Function CreateDropDownMenu. " ..
"Arguments: (items, onItemSelected). " ..
"Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items"
elseif funcNameOrFunc == "CreateMessageDialog" or funcNameOrFunc == t.CreateMessageDialog
"Function CreateMessageDialog. " ..
"Function CreateMessageDialog. " ..
"Arguments: (title, message, buttons). " ..
"Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button"
"Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button"
elseif funcNameOrFunc == "CreateStyledMessageDialog" or funcNameOrFunc == t.CreateStyledMessageDialog
"Function CreateStyledMessageDialog. " ..
"Function CreateStyledMessageDialog. " ..
"Arguments: (title, message, style, buttons). " ..
"Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm"
"Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm"
elseif funcNameOrFunc == "GetFontHeight" or funcNameOrFunc == t.GetFontHeight
"Function GetFontHeight. " ..
"Function GetFontHeight. " ..
"Arguments: (font, fontSize). " ..
"Side effect: returns the size in pixels of the given font + fontSize"
elseif funcNameOrFunc == "CreateScrollingFrame" or funcNameOrFunc == t.CreateScrollingFrame
"Function CreateScrollingFrame. " ..
"Function CreateScrollingFrame. " ..
"Arguments: (orderList, style) " ..
"Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)"
"Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)"
elseif funcNameOrFunc == "CreateTrueScrollingFrame" or funcNameOrFunc == t.CreateTrueScrollingFrame
"Function CreateTrueScrollingFrame. " ..
"Function CreateTrueScrollingFrame. " ..
"Arguments: (nil) " ..
"Side effect: returns 2 objects, (scrollFrame, controlFrame). 'scrollFrame' can be filled with GuiObjects, and they will be clipped if not inside the frame's bounds. controlFrame has children scrollup and scrolldown, as well as a slider. controlFrame can be parented to any guiobject and it will readjust itself to fit."
"Side effect: returns 2 objects, (scrollFrame, controlFrame). 'scrollFrame' can be filled with GuiObjects, and they will be clipped if not inside the frame's bounds. controlFrame has children scrollup and scrolldown, as well as a slider. controlFrame can be parented to any guiobject and it will readjust itself to fit."
elseif funcNameOrFunc == "AutoTruncateTextObject" or funcNameOrFunc == t.AutoTruncateTextObject
"Function AutoTruncateTextObject. " ..
"Function AutoTruncateTextObject. " ..
"Arguments: (textLabel) " ..
"Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument"
"Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument"
elseif funcNameOrFunc == "CreateSlider" or funcNameOrFunc == t.CreateSlider
"Function CreateSlider. " ..
"Function CreateSlider. " ..
"Arguments: (steps, width, position) " ..
"Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on."
"Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on."
elseif funcNameOrFunc == "CreateLoadingFrame" or funcNameOrFunc == t.CreateLoadingFrame
"Function CreateLoadingFrame. " ..
"Function CreateLoadingFrame. " ..
"Arguments: (name, size, position) " ..
"Side effect: Creates a gui that can be manipulated to show progress for a particular action. Name appears above the loading bar, and size and position are udim2 values (both size and position are optional arguments). Returns 3 arguments, the first being the gui created. The second being updateLoadingGuiPercent, which is a bindable function. This function takes one argument (two optionally), which should be a number between 0 and 1, representing the percentage the loading gui should be at. The second argument to this function is a boolean value that if set to true will tween the current percentage value to the new percentage value, therefore our third argument is how long this tween should take. Our third returned argument is a BindableEvent, that when fired means that someone clicked the cancel button on the dialog."
"Side effect: Creates a gui that can be manipulated to show progress for a particular action. Name appears above the loading bar, and size and position are udim2 values (both size and position are optional arguments). Returns 3 arguments, the first being the gui created. The second being updateLoadingGuiPercent, which is a bindable function. This function takes one argument (two optionally), which should be a number between 0 and 1, representing the percentage the loading gui should be at. The second argument to this function is a boolean value that if set to true will tween the current percentage value to the new percentage value, therefore our third argument is how long this tween should take. Our third returned argument is a BindableEvent, that when fired means that someone clicked the cancel button on the dialog."
elseif funcNameOrFunc == "CreateTerrainMaterialSelector" or funcNameOrFunc == t.CreateTerrainMaterialSelector
"Function CreateTerrainMaterialSelector. " ..
"Function CreateTerrainMaterialSelector. " ..
"Arguments: (size, position) " ..
"Side effect: Size and position are UDim2 values that specifies the selector's size and position. Both size and position are optional arguments. This method returns 3 objects (terrainSelectorGui, terrainSelected, forceTerrainSelection). terrainSelectorGui is just the gui object that we generate with this function, parent it as you like. TerrainSelected is a BindableEvent that is fired whenever a new terrain type is selected in the gui. ForceTerrainSelection is a function that takes an argument of Enum.CellMaterial and will force the gui to show that material as currently selected."
"Side effect: Size and position are UDim2 values that specifies the selector's size and position. Both size and position are optional arguments. This method returns 3 objects (terrainSelectorGui, terrainSelected, forceTerrainSelection). terrainSelectorGui is just the gui object that we generate with this function, parent it as you like. TerrainSelected is a BindableEvent that is fired whenever a new terrain type is selected in the gui. ForceTerrainSelection is a function that takes an argument of Enum.CellMaterial and will force the gui to show that material as currently selected."
t

View File

@ -7,11 +7,11 @@ t.Foo = -> print "foo"
t.Bar = -> print "bar"
t.Help = (funcNameOrFunc) ->
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
switch funcNameOrFunc
when "Foo", t.Foo
"Function Foo. Arguments: None. Side effect: prints foo"
"Function Foo. Arguments: None. Side effect: prints foo"
when "Bar", t.Bar
"Function Bar. Arguments: None. Side effect: prints bar"
"Function Bar. Arguments: None. Side effect: prints bar"
t

View File

@ -186,7 +186,7 @@ resetLocalCharacter = ->
if player and
player.Character and
player.Character\FindFirstChild "Humanoid"
player.Character.Humanoid.Health = 0

View File

@ -581,7 +581,7 @@ AbuseSettingsFrame = New "Frame", "ReportAbuseStyle"
FontSize: Enum.FontSize.Size36
* New "TextLabel", "Description"
Text: "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action."
Text: "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action."
TextColor3: Color3I 221, 221, 221
Position: UDim2.new 0.01, 0, 0, 55
Size: UDim2.new 0.99, 0, 0, 40
@ -699,7 +699,7 @@ CalmingAbuseBox = New "Frame", "AbuseFeedbackBox"
TextScaled: true
BackgroundTransparency: 1
TextColor3: Color3.new 1, 1, 1
Text: "Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.\n\nIf anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats"
Text: "Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.\n\nIf anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats"
TextWrapped: true
TextYAlignment: Enum.TextYAlignment.Top
FontSize: Enum.FontSize.Size24
@ -1514,7 +1514,7 @@ RecreateScoreColumns = (ptable) ->
not entry["MyTeam"]["Frame"]\FindFirstChild scoreval["Name"]
ntitle = nentry\Clone!
--ntitle.TextXAlignment = 'Right'
--ntitle.TextXAlignmen = 'Right'
ntitle.Parent = entry["MyTeam"]["Frame"]

View File

@ -684,7 +684,7 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
children = gearClone\GetChildren!
for i = 1, #children
if children[i]\IsA "TextLabel"
children[i].ZIndex = if string.find children[i].Name, "Shadow"
children[i].ZIndex = if string.find children[i].Name, "Shadow"
8
else
9
@ -936,7 +936,7 @@ wait! -- let stuff initialize incase this is first heartbeat...
waitForChild player, "Backpack"
waitForProperty player, "Character"
-- not sure why this had no delay but the player.CharacterAdded one had one... this type of error would be easier to avoid with function reusage
-- not sure why this had no delay but the player.CharacterAdded one had one... this type of error would be easier to avoid with function reusage
delay 1, ->
backpackChildren = player.Backpack\GetChildren!
size = math.min 10, #backpackChildren

View File

@ -37,7 +37,7 @@ New = (className, name, props) ->
--JSON Encoder and Parser for Lua 5.1
--
--2007 Shaun Brown (http://www.chipmunkav.com)
--2007 Shaun Brown (http://www.chipmunkav.com)
assert = assert
Null = -> Null
@ -527,7 +527,7 @@ t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParen
-- helper function to update tag
incrementAliveCounter = ->
aliveCounter += 1
aliveCounter += 1
if aliveCounter > 1000000
aliveCounter = 0
@ -629,26 +629,26 @@ A 'Signal' object identical to the internal RBXScriptSignal object in it's publi
can be used to create "custom events" for user-made code.
API:
Method \connect function handler
Arguments: The function to connect to.
Returns: A new connection object which can be used to disconnect the connection
Arguments: The function to connect to.
Returns: A new connection object which can be used to disconnect the connection
Description: Connects this signal to the function specified by |handler|. That is, when |fire ...| is called for
the signal the |handler| will be called with the arguments given to |fire ...|. Note, the functions
connected to a signal are called in NO PARTICULAR ORDER, so connecting one function after another does
NOT mean that the first will be called before the second as a result of a call to |fire|.
the signal the |handler| will be called with the arguments given to |fire ...|. Note, the functions
connected to a signal are called in NO PARTICULAR ORDER, so connecting one function after another does
NOT mean that the first will be called before the second as a result of a call to |fire|.
Method \disconnect!
Arguments: None
Returns: None
Arguments: None
Returns: None
Description: Disconnects all of the functions connected to this signal.
Method \fire ...
Arguments: Any arguments are accepted
Returns: None
Arguments: Any arguments are accepted
Returns: None
Description: Calls all of the currently connected functions with the given arguments.
Method \wait!
Arguments: None
Returns: The arguments given to fire
Arguments: None
Returns: The arguments given to fire
Description: This call blocks until
]]
@ -721,81 +721,81 @@ which case it simply creates an object of the given type, or a table argument th
in which case it mutates the object in varying ways depending on the nature of the aggregate data. These are the
type of data and what operation each will perform:
1) A string key mapping to some value:
Key-Value pairs in this form will be treated as properties of the object, and will be assigned in NO PARTICULAR
ORDER. If the order in which properties is assigned matter, then they must be assigned somewhere else than the
|Create| call's body.
Key-Value pairs in this form will be treated as properties of the object, and will be assigned in NO PARTICULAR
ORDER. If the order in which properties is assigned matter, then they must be assigned somewhere else than the
|Create| call's body.
2) An integral key mapping to another Instance:
Normal numeric keys mapping to Instances will be treated as children if the object being created, and will be
parented to it. This allows nice recursive calls to Create to create a whole hierarchy of objects without a
need for temporary variables to store references to those objects.
Normal numeric keys mapping to Instances will be treated as children if the object being created, and will be
parented to it. This allows nice recursive calls to Create to create a whole hierarchy of objects without a
need for temporary variables to store references to those objects.
3) A key which is a value returned from Create.Event( eventname ), and a value which is a function function
The Create.E( string ) function provides a limited way to connect to signals inside of a Create hierarchy
for those who really want such a functionality. The name of the event whose name is passed to
Create.E( string )
The Create.E( string ) function provides a limited way to connect to signals inside of a Create hierarchy
for those who really want such a functionality. The name of the event whose name is passed to
Create.E( string )
4) A key which is the Create function itself, and a value which is a function
The function will be run with the argument of the object itself after all other initialization of the object is
done by create. This provides a way to do arbitrary things involving the object from withing the create
hierarchy.
Note: This function is called SYNCHRONOUSLY, that means that you should only so initialization in
it, not stuff which requires waiting, as the Create call will block until it returns. While waiting in the
constructor callback function is possible, it is probably not a good design choice.
Note: Since the constructor function is called after all other initialization, a Create block cannot have two
constructor functions, as it would not be possible to call both of them last, also, this would be unnecessary.
The function will be run with the argument of the object itself after all other initialization of the object is
done by create. This provides a way to do arbitrary things involving the object from withing the create
hierarchy.
Note: This function is called SYNCHRONOUSLY, that means that you should only so initialization in
it, not stuff which requires waiting, as the Create call will block until it returns. While waiting in the
constructor callback function is possible, it is probably not a good design choice.
Note: Since the constructor function is called after all other initialization, a Create block cannot have two
constructor functions, as it would not be possible to call both of them last, also, this would be unnecessary.
Some example usages:
A simple example which uses the Create function to create a model object and assign two of it's properties.
model = Create'Model'{
Name = 'A New model',
Parent = game.Workspace,
Name = 'A New model',
Parent = game.Workspace,
}
An example where a larger hierarchy of object is made. After the call the hierarchy will look like this:
Model_Container
|-ObjectValue
| |
| `-BoolValueChild
`-IntValue
|-ObjectValue
| |
| `-BoolValueChild
`-IntValue
model = Create'Model'{
Name = 'Model_Container',
Create'ObjectValue'{
Create'BoolValue'{
Name = 'BoolValueChild',
},
},
Create'IntValue'{},
Name = 'Model_Container',
Create'ObjectValue'{
Create'BoolValue'{
Name = 'BoolValueChild',
},
},
Create'IntValue'{},
}
An example using the event syntax:
part = Create'Part'{
[Create.E'Touched'] = function part
print("I was touched by "..part.Name)
end,
[Create.E'Touched'] = function part
print("I was touched by "..part.Name)
end,
}
An example using the general constructor syntax:
model = Create'Part'{
[Create] = function this
print("Constructor running!")
this.Name = GetGlobalFoosAndBars this
end,
[Create] = function this
print("Constructor running!")
this.Name = GetGlobalFoosAndBars this
end,
}
Note: It is also perfectly legal to save a reference to the function returned by a call Create, this will not cause
any unexpected behavior. EG:
partCreatingFunction = Create'Part'
part = partCreatingFunction()
any unexpected behavior. EG:
partCreatingFunction = Create'Part'
part = partCreatingFunction()
]]
--the Create function need to be created as a functor, not a function, in order to support the Create.E syntax, so it
@ -886,15 +886,15 @@ t.Create.E = (eventName) -> __eventname: eventName
t.Help = (funcNameOrFunc) ->
switch funcNameOrFunc
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
when "DecodeJSON", t.DecodeJSON
"Function DecodeJSON. " ..
"Arguments: (string). " ..
"Function DecodeJSON. " ..
"Arguments: (string). " ..
"Side effect: returns a table with all parsed JSON values"
when "EncodeJSON", t.EncodeJSON
"Function EncodeJSON. " ..
"Arguments: (table). " ..
"Function EncodeJSON. " ..
"Arguments: (table). " ..
"Side effect: returns a string composed of argument table in JSON data format"
when "MakeWedge", t.MakeWedge

View File

@ -9,13 +9,13 @@ t = {}
-- end
-- end
-- Do a line/plane intersection. The line starts at the camera. The plane is at y == 0, normal(0, 1, 0)
-- Do a line/plane intersection. The line starts at the camera. The plane is at y == 0, normal(0, 1, 0)
--
-- vectorPos - End point of the line.
--
-- Return:
-- cellPos - The terrain cell intersection point if there is one, vectorPos if there isn't.
-- hit - Whether there was a plane intersection. Value is true if there was, false if not.
-- hit - Whether there was a plane intersection. Value is true if there was, false if not.
PlaneIntersection = (vectorPos) ->
hit = false
currCamera = game.Workspace.CurrentCamera
@ -44,10 +44,10 @@ PlaneIntersection = (vectorPos) ->
-- mouse - Mouse to check the .hit for.
--
-- Return:
-- cellPos - Cell position hit. Nil if none.
-- cellPos - Cell position hit. Nil if none.
GetTerrainForMouse = (mouse) ->
-- There was no target, so all it could be is a plane intersection.
-- Check for a plane intersection. If there isn't one then nothing will get hit.
-- Check for a plane intersection. If there isn't one then nothing will get hit.
cell = game.Workspace.Terrain\WorldToCellPreferSolid Vector3.new mouse.hit.x, mouse.hit.y, mouse.hit.z
local planeLoc
-- If nothing was hit, do the plane intersection.
@ -156,7 +156,7 @@ setSeatEnabledStatus = (model, isEnabled) ->
else
-- put a weld called "SeatWeld" in every seat
-- this tricks it into thinking there's already someone sitting there, and it won't make you sit XD
-- this tricks it into thinking there's already someone sitting there, and it won't make you sit XD
for i = 1, #seatList
fakeWeld = Instance.new "Weld"
fakeWeld.Name = "SeatWeld"
@ -215,7 +215,7 @@ positionPartsAtCFrame3 = (aCFrame, currentParts) ->
calcRayHitTime = (rayStart, raySlope, intersectionPlane) ->
if math.abs(raySlope) < 0.01
return 0
-- 0 slope --> we just say intersection time is 0, and sidestep this dimension
-- 0 slope --> we just say intersection time is 0, and sidestep this dimension
(intersectionPlane - rayStart) / raySlope
@ -293,7 +293,7 @@ getBoundingBox2 = (partOrModel) ->
minVec = -maxVec
-- Adjust bounding box to reflect what the model or part author wants in terms of justification
-- Adjust bounding box to reflect what the model or part author wants in terms of justification
justifyValue = partOrModel\FindFirstChild "Justification"
if justifyValue?
-- find the multiple of 4 that contains the model
@ -482,12 +482,12 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
mouseHitInTarget = targetCFrame\pointToObjectSpace mouseHitInWorld
targetVectorInWorld = Vector3.new 0, 0, 0
if Mouse
-- DON'T WANT THIS IN TERMS OF THE MODEL CFRAME! (.TargetSurface is in terms of the part CFrame, so this would break, right? [HotThoth])
-- (ideally, we would want to make the Mouse.TargetSurface a model-targetsurface instead, but for testing will be using the converse)
-- DON'T WANT THIS IN TERMS OF THE MODEL CFRAME! (.TargetSurface is in terms of the part CFrame, so this would break, right? [HotThoth])
-- (ideally, we would want to make the Mouse.TargetSurface a model-targetsurface instead, but for testing will be using the converse)
--targetVectorInWorld = targetCFrame\vectorToWorldSpace(Vector3.FromNormalId(Mouse.TargetSurface))
targetVectorInWorld = targetPart.CFrame\vectorToWorldSpace Vector3.FromNormalId Mouse.TargetSurface -- better, but model cframe would be best
--[[if targetPart.Parent\IsA("Model")
hitFace = modelTargetSurface(targetPart.Parent, Mouse.Hit.p, game.Workspace.CurrentCamera.CoordinateFrame.p) -- best, if you get it right
hitFace = modelTargetSurface(targetPart.Parent, Mouse.Hit.p, game.Workspace.CurrentCamera.CoordinateFrame.p) -- best, if you get it right
WORLD_AXES = {Vector3.new(1, 0, 0), Vector3.new(0, 1, 0), Vector3.new(0, 0, 1)}
if hitFace > 0
targetVectorInWorld = targetCFrame\vectorToWorldSpace(WORLD_AXES[hitFace])
@ -674,7 +674,7 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
newTerrainPiece.BottomSurface = "Smooth"
newTerrainPiece.TopSurface = "Smooth"
-- can add decals or textures here if feeling particularly adventurous... for now, can make a table of look-up colors
-- can add decals or textures here if feeling particularly adventurous... for now, can make a table of look-up colors
newTerrainPiece.BrickColor = getClosestColorToTerrainMaterial cellMat
sideways = 0
@ -805,7 +805,7 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion, StampFailedFunc) ->
if not modelToStamp
error "SetupStamperDragger: modelToStamp (first arg) is nil! Should be a stamper model"
error "SetupStamperDragger: modelToStamp (first arg) is nil! Should be a stamper model"
return nil
if not modelToStamp\IsA"Model" and not modelToStamp\IsA "BasePart"
@ -813,7 +813,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
return nil
if not Mouse
error "SetupStamperDragger: Mouse (second arg) is nil! Should be a mouse object"
error "SetupStamperDragger: Mouse (second arg) is nil! Should be a mouse object"
return nil
if not Mouse\IsA "Mouse"
@ -922,8 +922,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
if HighScalabilityLine.Dimensions == 1
-- extract the line from these positions and limit to a 2D plane made from 2 of the world axes
-- then use dominating axis to limit line to be at 45-degree intervals
-- will use this internal representation of the line for the actual stamping
-- then use dominating axis to limit line to be at 45-degree intervals
-- will use this internal representation of the line for the actual stamping
line = (HighScalabilityLine.End - HighScalabilityLine.Start)
if math.abs(line.X) < math.abs(line.Y)
@ -1015,7 +1015,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
if gui and gui\IsA "PlayerGui"
if (HighScalabilityLine.Dimensions == 1 and line.magnitude > 3) or
HighScalabilityLine.Dimensions > 1
-- don't show if mouse hasn't moved enough
HighScalabilityLine.Adorn.Parent = gui
@ -1143,7 +1143,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
myModelInfo = stampData.CurrentParts\FindFirstChild "UnstampableFaces"
--if (modelInfo and modelInfo.Parent\FindFirstChild("UnstampableFaces")) or (modelInfo and myModelInfo) then -- need better targetSurface calcs
--if (modelInfo and modelInfo.Parent\FindFirstChild"UnstampableFaces") or (modelInfo and myModelInfo) -- need better targetSurface calcs
if true
breakingFaces = ""
myBreakingFaces = ""
@ -1417,7 +1417,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
part and
part\IsA"BasePart" and
part.Transparency > gDesiredTrans
newTrans = 1 - (((currTime - begTime) / transFadeInTime) * (gStaticTrans - gDesiredTrans))
if stampData["TransparencyTable"] and stampData.TransparencyTable[part]
part.Transparency = newTrans + (1 - newTrans) * stampData.TransparencyTable[part]
@ -1454,8 +1454,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
-- since we're cloning the old model instead of the new one, we will need to update the orientation based on the original value AND how many more
-- rotations we expect since then [either that or we need to store the just-stamped clusterMaterial.Value.Z somewhere]. This should fix the terrain rotation
-- issue (fingers crossed) [HotThoth]
-- rotations we expect since then [either that or we need to store the just-stamped clusterMaterial.Value.Z somewhere]. This should fix the terrain rotation
-- issue (fingers crossed) [HotThoth]
clusterMaterial = stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
if clusterMaterial and clusterMaterial\IsA"Vector3Value"
@ -1527,7 +1527,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
-----------------------------------------------------------------------------------
if not skipThisCell -- if we STILL aren't skipping... then we're good to go!
if not skipThisCell -- if we STILL aren't skipping... then we're good to go!
canSetCell = true
if checkHighScalabilityStamp -- check to see if cell is in region, if not we'll skip set
@ -1777,7 +1777,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
HighScalabilityLine.Start and
HighScalabilityLine.InternalLine and
HighScalabilityLine.InternalLine.magnitude > 0
-- we have an HSL line, test later
canStamp = true
checkHighScalabilityStamp = true
@ -1811,9 +1811,9 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
minBB, maxBB = getBoundingBoxInWorldCoordinates(stampData.CurrentParts)
-- HotThoth's note: Now that above CurrentParts positioning has been commented out, to be truly correct, we would need to use the
-- value of configFound from the previous onStamperMouseMove call which moved the CurrentParts
-- Shouldn't this be true when lastTargetCFrame has been set and false otherwise?
-- HotThoth's note: Now that above CurrentParts positioning has been commented out, to be truly correct, we would need to use the
-- value of configFound from the previous onStamperMouseMove call which moved the CurrentParts
-- Shouldn't this be true when lastTargetCFrame has been set and false otherwise?
configFound, targetCFrame = findConfigAtMouseTarget(Mouse, stampData)
if configFound and not HighScalabilityLine.Adorn.Parent
@ -1866,7 +1866,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
return false
-- something will be stamped! so set the "StampedSomething" toggle to true
-- something will be stamped! so set the "StampedSomething" toggle to true
if game\FindFirstChild "Players"
if game.Players["LocalPlayer"]
if game.Players.LocalPlayer["Character"]
@ -1965,7 +1965,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
-- kill the ghost part
stampData.CurrentParts.Parent = nil
-- Mark for undo. It has to happen here or the selection display will come back also.
-- Mark for undo. It has to happen here or the selection display will come back also.
try
game\GetService"ChangeHistoryService"\SetWaypoint "StamperSingle"
@ -1989,7 +1989,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
-- Post process: after positioning the part or model, restore transparency, material, anchored and collide states and create joints
if stampData.CurrentParts\IsA"Model" or stampData.CurrentParts\IsA "Tool"
if stampData.CurrentParts\IsA "Model"
-- Tyler's magical hack-code for allowing/preserving clones of both Surface and Manual Welds... just don't ask X<
-- Tyler's magical hack-code for allowing/preserving clones of both Surface and Manual Welds... just don't ask X<
manualWeldTable = {}
manualWeldParentTable = {}
saveTheWelds(stampData.CurrentParts, manualWeldTable, manualWeldParentTable)
@ -2134,8 +2134,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
* Vector3.new 1, 0, 0
* Vector3.new 0, 1, 0
* Vector3.new 0, 0, 1
-- maybe last one is negative? TODO: check this!
-- maybe last one is negative? TODO: check this!
isPositive = 1
if whichSurface < 0
isPositive *= -1
@ -2315,8 +2315,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
control.ResetRotation = -> -- resets the model rotation so new models are at default orientation
-- gInitial90DegreeRotations = 0
-- Note: This function will not always work quite the way we want it to; we will have to build this out further so it works with
-- High-Scalability and with the new model orientation setting methods (model\ResetOrientationToIdentity!) [HotThoth]
-- Note: This function will not always work quite the way we want it to; we will have to build this out further so it works with
-- High-Scalability and with the new model orientation setting methods (model\ResetOrientationToIdentity!) [HotThoth]
control.Destroy = -> -- Stops current Stamp operation and destroys control construct
for i = 1, #mouseCons
@ -2342,12 +2342,12 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
t.Help = (funcNameOrFunc) ->
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
switch funcNameOrFunc
when "GetStampModel", t.GetStampModel
"Function GetStampModel. Arguments: assetId, useAssetVersionId. assetId is the asset to load in, define useAssetVersionId as true if assetId is a version id instead of a relative assetId. Side effect: returns a model of the assetId, or a string with error message if something fails"
"Function GetStampModel. Arguments: assetId, useAssetVersionId. assetId is the asset to load in, define useAssetVersionId as true if assetId is a version id instead of a relative assetId. Side effect: returns a model of the assetId, or a string with error message if something fails"
when "SetupStamperDragger", t.SetupStamperDragger
"Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action."
"Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action."
t

View File

@ -136,7 +136,7 @@ try
settings!.Diagnostics.LuaRamLimit = 0
--settings!.Network\SetThroughputSensitivity(0.08, 0.01)
--settings!.Network.SendRate = 35
--settings!.Network.PhysicsSend = 0 -- 1==RoundRobin
--settings!.Network.PhysicsSend = 0 -- 1==RoundRobin
--shared["__time"] = 0
--game\GetService"RunService".Stepped\connect(function (time) shared["__time"] = time end)

View File

@ -68,7 +68,7 @@ try
try
game\SetCreatorID _CREATOR_ID, Enum.CreatorType.User
-- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting
-- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting
try
game\GetService"Players"\SetChatStyle Enum.ChatStyle.ClassicAndBubble