Fix whitespace in files, replace spaces with tabs etc
This commit is contained in:
parent
496a3fb9d8
commit
4596d66d94
|
|
@ -9,10 +9,10 @@
|
||||||
<ProtectedString name="Source">function waitForChild(parent, childName)
|
<ProtectedString name="Source">function waitForChild(parent, childName)
|
||||||
local child = parent:findFirstChild(childName)
|
local child = parent:findFirstChild(childName)
|
||||||
if child then return child end
|
if child then return child end
|
||||||
while true do
|
while true do
|
||||||
child = parent.ChildAdded:wait()
|
child = parent.ChildAdded:wait()
|
||||||
if child.Name==childName then return child end
|
if child.Name==childName then return child end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- declarations
|
-- declarations
|
||||||
|
|
@ -41,7 +41,7 @@ function regenHealth()
|
||||||
end
|
end
|
||||||
|
|
||||||
Humanoid.HealthChanged:connect(regenHealth)
|
Humanoid.HealthChanged:connect(regenHealth)
|
||||||
</ProtectedString>
|
</ProtectedString>
|
||||||
<bool name="archivable">true</bool>
|
<bool name="archivable">true</bool>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
@ -77,7 +77,7 @@ function UpdateGUI(health)
|
||||||
|
|
||||||
tray.bar.Position = UDim2.new(x ,0, y, 0)
|
tray.bar.Position = UDim2.new(x ,0, y, 0)
|
||||||
tray.bar.Size = UDim2.new(width, 0, height, 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) > 0.25 ) then
|
if( (health / humanoid.MaxHealth) > 0.25 ) then
|
||||||
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
|
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
"filter_after_early_return",
|
"filter_after_early_return",
|
||||||
{
|
{
|
||||||
rule: "rename_variables",
|
rule: "rename_variables",
|
||||||
globals: ["$default", "$roblox"],
|
globals: ["$default", "$roblox"],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
<ProtectedString name="Source">function waitForChild(parent, childName)
|
<ProtectedString name="Source">function waitForChild(parent, childName)
|
||||||
local child = parent:findFirstChild(childName)
|
local child = parent:findFirstChild(childName)
|
||||||
if child then return child end
|
if child then return child end
|
||||||
while true do
|
while true do
|
||||||
child = parent.ChildAdded:wait()
|
child = parent.ChildAdded:wait()
|
||||||
if child.Name==childName then return child end
|
if child.Name==childName then return child end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- declarations
|
-- declarations
|
||||||
|
|
@ -41,7 +41,7 @@ function regenHealth()
|
||||||
end
|
end
|
||||||
|
|
||||||
Humanoid.HealthChanged:connect(regenHealth)
|
Humanoid.HealthChanged:connect(regenHealth)
|
||||||
</ProtectedString>
|
</ProtectedString>
|
||||||
<bool name="archivable">true</bool>
|
<bool name="archivable">true</bool>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
@ -77,7 +77,7 @@ function UpdateGUI(health)
|
||||||
|
|
||||||
tray.bar.Position = UDim2.new(x,0,y, 0)
|
tray.bar.Position = UDim2.new(x,0,y, 0)
|
||||||
tray.bar.Size = UDim2.new(width, 0, height, 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) > 0.25 ) then
|
if( (health / humanoid.MaxHealth) > 0.25 ) then
|
||||||
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
|
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -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
|
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.
|
end end b.Help=function(aa)if aa=='CreatePropertyDropDownMenu'or aa==b.
|
||||||
CreatePropertyDropDownMenu then return
|
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
|
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
|
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
|
elseif aa=='CreateStyledMessageDialog'or aa==b.CreateStyledMessageDialog then
|
||||||
return
|
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
|
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
|
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
|
elseif aa=='CreateTrueScrollingFrame'or aa==b.CreateTrueScrollingFrame then
|
||||||
return
|
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
|
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
|
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
|
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
|
elseif aa=='CreateTerrainMaterialSelector'or aa==b.CreateTerrainMaterialSelector
|
||||||
then return
|
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
|
end end return b
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
print'[Mercury]: Loaded corescript 45374389'local a={}a.Foo=function()return
|
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
|
print'foo'end a.Bar=function()return print'bar'end a.Help=function(b)if'Foo'==b
|
||||||
or a.Foo==b then return
|
or a.Foo==b then return'Function Foo. Arguments: None. Side effect: prints foo'
|
||||||
'Function Foo. Arguments: None. Side effect: prints foo'elseif'Bar'==b or a.
|
elseif'Bar'==b or a.Bar==b then return
|
||||||
Bar==b then return'Function Bar. Arguments: None. Side effect: prints bar'end
|
'Function Bar. Arguments: None. Side effect: prints bar'end end return a
|
||||||
end return a
|
|
||||||
|
|
@ -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=
|
'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',
|
Enum.Font.ArialBold,FontSize=Enum.FontSize.Size36}),e('TextLabel','Description',
|
||||||
{Text=
|
{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
|
,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.
|
,0,40),BackgroundTransparency=1,Font=Enum.Font.Arial,FontSize=Enum.FontSize.
|
||||||
Size18,TextWrap=true,TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum
|
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
|
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,
|
),Size=UDim2.new(1,-30,0.4,0),TextScaled=true,BackgroundTransparency=1,
|
||||||
TextColor3=Color3.new(1,1,1),Text=
|
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]]
|
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.
|
,TextWrapped=true,TextYAlignment=Enum.TextYAlignment.Top,FontSize=Enum.FontSize.
|
||||||
|
|
|
||||||
|
|
@ -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=
|
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.
|
function(l)return{__eventname=l}end a.Help=function(l)if'DecodeJSON'==l or a.
|
||||||
DecodeJSON==l then return
|
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
|
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
|
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 ]]
|
[[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
|
elseif'SelectTerrainRegion'==l or a.SelectTerrainRegion==l then return
|
||||||
|
|
|
||||||
|
|
@ -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
|
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
|
end return aj end a.SetupStamperDragger=function(ad,ae,af,ag,ah)if not ad then
|
||||||
error
|
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
|
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!]]
|
[[SetupStamperDragger: modelToStamp (first arg) is neither a Model or Part!]]
|
||||||
return nil end if not ae then error
|
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
|
return nil end if not ae:IsA'Mouse'then error
|
||||||
[[SetupStamperDragger: Mouse (second arg) is not of type Mouse!]]return nil end
|
[[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
|
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
|
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
|
.Stamped:Destroy()end E=nil end return E end a.Help=function(ad)if
|
||||||
'GetStampModel'==ad or a.GetStampModel==ad then return
|
'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
|
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
|
end end return a
|
||||||
|
|
@ -63,7 +63,7 @@ settings()["Task Scheduler"].PriorityMethod=Enum.PriorityMethod.AccumulatedError
|
||||||
end)
|
end)
|
||||||
game:GetService"ChangeHistoryService":SetEnabled(false)
|
game:GetService"ChangeHistoryService":SetEnabled(false)
|
||||||
pcall(function()
|
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)
|
end)
|
||||||
workspace:SetPhysicsThrottleEnabled(true)
|
workspace:SetPhysicsThrottleEnabled(true)
|
||||||
local addedBuildTools,
|
local addedBuildTools,
|
||||||
|
|
|
||||||
|
|
@ -857,7 +857,7 @@ userPurchaseProductActionsEnded = (userIsClosingDialog) ->
|
||||||
setButtonsVisible purchaseDialog.BodyFrame.OkPurchasedButton
|
setButtonsVisible purchaseDialog.BodyFrame.OkPurchasedButton
|
||||||
hidePurchasing!
|
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 = ->
|
createPurchasePromptGui = ->
|
||||||
purchaseDialog = New "Frame", "PurchaseFrame"
|
purchaseDialog = New "Frame", "PurchaseFrame"
|
||||||
Size: UDim2.new 0, 660, 0, 400
|
Size: UDim2.new 0, 660, 0, 400
|
||||||
|
|
|
||||||
|
|
@ -452,7 +452,7 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
|
||||||
startPinch = (firstTouch, secondTouch) ->
|
startPinch = (firstTouch, secondTouch) ->
|
||||||
-- track pinching in new frame
|
-- track pinching in new frame
|
||||||
pinchFrame?\Destroy!
|
pinchFrame?\Destroy!
|
||||||
-- make sure we didn't track in any mud
|
-- make sure we didn't track in any mud
|
||||||
pinchFrame = New "Frame"
|
pinchFrame = New "Frame"
|
||||||
Name: "PinchFrame"
|
Name: "PinchFrame"
|
||||||
BackgroundTransparency: 1
|
BackgroundTransparency: 1
|
||||||
|
|
|
||||||
|
|
@ -592,7 +592,7 @@ initializeDeveloperConsole = ->
|
||||||
.TextWrapped = wordWrapToggleOn
|
.TextWrapped = wordWrapToggleOn
|
||||||
.Size = UDim2.new 0.98, 0, 0, 2000
|
.Size = UDim2.new 0.98, 0, 0, 2000
|
||||||
.Parent = Dev_Container
|
.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
|
.Size = UDim2.new 0.98, 0, 0, .TextBounds.Y
|
||||||
.Position = UDim2.new 0, 5, 0, posOffset
|
.Position = UDim2.new 0, 5, 0, posOffset
|
||||||
.Parent = Dev_TextHolder
|
.Parent = Dev_TextHolder
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ waitForChild game\GetService"CoreGui", "RobloxGui"
|
||||||
screenGui = game\GetService"CoreGui"\FindFirstChild "RobloxGui"
|
screenGui = game\GetService"CoreGui"\FindFirstChild "RobloxGui"
|
||||||
|
|
||||||
if not touchEnabled
|
if not touchEnabled
|
||||||
-- ToolTipper (creates tool tips for gui)
|
-- ToolTipper (creates tool tips for gui)
|
||||||
scriptContext\AddCoreScript 36868950, screenGui, "CoreScripts/ToolTip"
|
scriptContext\AddCoreScript 36868950, screenGui, "CoreScripts/ToolTip"
|
||||||
-- SettingsScript
|
-- SettingsScript
|
||||||
scriptContext\AddCoreScript 46295863, screenGui, "CoreScripts/Settings"
|
scriptContext\AddCoreScript 46295863, screenGui, "CoreScripts/Settings"
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ local currentConversationDialog
|
||||||
local currentConversationPartner
|
local currentConversationPartner
|
||||||
local currentAbortDialogScript
|
local currentAbortDialogScript
|
||||||
|
|
||||||
tooFarAwayMessage = "You are too far away to chat!"
|
tooFarAwayMessage = "You are too far away to chat!"
|
||||||
tooFarAwaySize = 300
|
tooFarAwaySize = 300
|
||||||
characterWanderedOffMessage = "Chat ended because you walked away"
|
characterWanderedOffMessage = "Chat ended because you walked away"
|
||||||
characterWanderedOffSize = 350
|
characterWanderedOffSize = 350
|
||||||
|
|
|
||||||
|
|
@ -3670,60 +3670,60 @@ t.CreatePluginFrame = (name, size, position, scrollable, parent) ->
|
||||||
|
|
||||||
|
|
||||||
t.Help = (funcNameOrFunc) ->
|
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
|
if funcNameOrFunc == "CreatePropertyDropDownMenu" or funcNameOrFunc == t.CreatePropertyDropDownMenu
|
||||||
"Function CreatePropertyDropDownMenu. " ..
|
"Function CreatePropertyDropDownMenu. " ..
|
||||||
"Arguments: (instance, propertyName, enumType). " ..
|
"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'"
|
"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
|
elseif funcNameOrFunc == "CreateDropDownMenu" or funcNameOrFunc == t.CreateDropDownMenu
|
||||||
"Function CreateDropDownMenu. " ..
|
"Function CreateDropDownMenu. " ..
|
||||||
"Arguments: (items, onItemSelected). " ..
|
"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"
|
"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
|
elseif funcNameOrFunc == "CreateMessageDialog" or funcNameOrFunc == t.CreateMessageDialog
|
||||||
"Function CreateMessageDialog. " ..
|
"Function CreateMessageDialog. " ..
|
||||||
"Arguments: (title, message, buttons). " ..
|
"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
|
elseif funcNameOrFunc == "CreateStyledMessageDialog" or funcNameOrFunc == t.CreateStyledMessageDialog
|
||||||
"Function CreateStyledMessageDialog. " ..
|
"Function CreateStyledMessageDialog. " ..
|
||||||
"Arguments: (title, message, style, buttons). " ..
|
"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
|
elseif funcNameOrFunc == "GetFontHeight" or funcNameOrFunc == t.GetFontHeight
|
||||||
"Function GetFontHeight. " ..
|
"Function GetFontHeight. " ..
|
||||||
"Arguments: (font, fontSize). " ..
|
"Arguments: (font, fontSize). " ..
|
||||||
"Side effect: returns the size in pixels of the given font + fontSize"
|
"Side effect: returns the size in pixels of the given font + fontSize"
|
||||||
|
|
||||||
elseif funcNameOrFunc == "CreateScrollingFrame" or funcNameOrFunc == t.CreateScrollingFrame
|
elseif funcNameOrFunc == "CreateScrollingFrame" or funcNameOrFunc == t.CreateScrollingFrame
|
||||||
"Function CreateScrollingFrame. " ..
|
"Function CreateScrollingFrame. " ..
|
||||||
"Arguments: (orderList, style) " ..
|
"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
|
elseif funcNameOrFunc == "CreateTrueScrollingFrame" or funcNameOrFunc == t.CreateTrueScrollingFrame
|
||||||
"Function CreateTrueScrollingFrame. " ..
|
"Function CreateTrueScrollingFrame. " ..
|
||||||
"Arguments: (nil) " ..
|
"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
|
elseif funcNameOrFunc == "AutoTruncateTextObject" or funcNameOrFunc == t.AutoTruncateTextObject
|
||||||
"Function AutoTruncateTextObject. " ..
|
"Function AutoTruncateTextObject. " ..
|
||||||
"Arguments: (textLabel) " ..
|
"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
|
elseif funcNameOrFunc == "CreateSlider" or funcNameOrFunc == t.CreateSlider
|
||||||
"Function CreateSlider. " ..
|
"Function CreateSlider. " ..
|
||||||
"Arguments: (steps, width, position) " ..
|
"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
|
elseif funcNameOrFunc == "CreateLoadingFrame" or funcNameOrFunc == t.CreateLoadingFrame
|
||||||
"Function CreateLoadingFrame. " ..
|
"Function CreateLoadingFrame. " ..
|
||||||
"Arguments: (name, size, position) " ..
|
"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
|
elseif funcNameOrFunc == "CreateTerrainMaterialSelector" or funcNameOrFunc == t.CreateTerrainMaterialSelector
|
||||||
"Function CreateTerrainMaterialSelector. " ..
|
"Function CreateTerrainMaterialSelector. " ..
|
||||||
"Arguments: (size, position) " ..
|
"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
|
t
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,11 @@ t.Foo = -> print "foo"
|
||||||
t.Bar = -> print "bar"
|
t.Bar = -> print "bar"
|
||||||
|
|
||||||
t.Help = (funcNameOrFunc) ->
|
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
|
switch funcNameOrFunc
|
||||||
when "Foo", t.Foo
|
when "Foo", t.Foo
|
||||||
"Function Foo. Arguments: None. Side effect: prints foo"
|
"Function Foo. Arguments: None. Side effect: prints foo"
|
||||||
when "Bar", t.Bar
|
when "Bar", t.Bar
|
||||||
"Function Bar. Arguments: None. Side effect: prints bar"
|
"Function Bar. Arguments: None. Side effect: prints bar"
|
||||||
|
|
||||||
t
|
t
|
||||||
|
|
|
||||||
|
|
@ -581,7 +581,7 @@ AbuseSettingsFrame = New "Frame", "ReportAbuseStyle"
|
||||||
FontSize: Enum.FontSize.Size36
|
FontSize: Enum.FontSize.Size36
|
||||||
|
|
||||||
* New "TextLabel", "Description"
|
* 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
|
TextColor3: Color3I 221, 221, 221
|
||||||
Position: UDim2.new 0.01, 0, 0, 55
|
Position: UDim2.new 0.01, 0, 0, 55
|
||||||
Size: UDim2.new 0.99, 0, 0, 40
|
Size: UDim2.new 0.99, 0, 0, 40
|
||||||
|
|
@ -699,7 +699,7 @@ CalmingAbuseBox = New "Frame", "AbuseFeedbackBox"
|
||||||
TextScaled: true
|
TextScaled: true
|
||||||
BackgroundTransparency: 1
|
BackgroundTransparency: 1
|
||||||
TextColor3: Color3.new 1, 1, 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
|
TextWrapped: true
|
||||||
TextYAlignment: Enum.TextYAlignment.Top
|
TextYAlignment: Enum.TextYAlignment.Top
|
||||||
FontSize: Enum.FontSize.Size24
|
FontSize: Enum.FontSize.Size24
|
||||||
|
|
@ -1514,7 +1514,7 @@ RecreateScoreColumns = (ptable) ->
|
||||||
not entry["MyTeam"]["Frame"]\FindFirstChild scoreval["Name"]
|
not entry["MyTeam"]["Frame"]\FindFirstChild scoreval["Name"]
|
||||||
|
|
||||||
ntitle = nentry\Clone!
|
ntitle = nentry\Clone!
|
||||||
--ntitle.TextXAlignment = 'Right'
|
--ntitle.TextXAlignmen = 'Right'
|
||||||
ntitle.Parent = entry["MyTeam"]["Frame"]
|
ntitle.Parent = entry["MyTeam"]["Frame"]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -684,7 +684,7 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
|
||||||
children = gearClone\GetChildren!
|
children = gearClone\GetChildren!
|
||||||
for i = 1, #children
|
for i = 1, #children
|
||||||
if children[i]\IsA "TextLabel"
|
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
|
8
|
||||||
else
|
else
|
||||||
9
|
9
|
||||||
|
|
@ -936,7 +936,7 @@ wait! -- let stuff initialize incase this is first heartbeat...
|
||||||
waitForChild player, "Backpack"
|
waitForChild player, "Backpack"
|
||||||
waitForProperty player, "Character"
|
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, ->
|
delay 1, ->
|
||||||
backpackChildren = player.Backpack\GetChildren!
|
backpackChildren = player.Backpack\GetChildren!
|
||||||
size = math.min 10, #backpackChildren
|
size = math.min 10, #backpackChildren
|
||||||
|
|
|
||||||
116
yue/60595411.yue
116
yue/60595411.yue
|
|
@ -37,7 +37,7 @@ New = (className, name, props) ->
|
||||||
|
|
||||||
--JSON Encoder and Parser for Lua 5.1
|
--JSON Encoder and Parser for Lua 5.1
|
||||||
--
|
--
|
||||||
--2007 Shaun Brown (http://www.chipmunkav.com)
|
--2007 Shaun Brown (http://www.chipmunkav.com)
|
||||||
|
|
||||||
assert = assert
|
assert = assert
|
||||||
Null = -> Null
|
Null = -> Null
|
||||||
|
|
@ -527,7 +527,7 @@ t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParen
|
||||||
|
|
||||||
-- helper function to update tag
|
-- helper function to update tag
|
||||||
incrementAliveCounter = ->
|
incrementAliveCounter = ->
|
||||||
aliveCounter += 1
|
aliveCounter += 1
|
||||||
if aliveCounter > 1000000
|
if aliveCounter > 1000000
|
||||||
aliveCounter = 0
|
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.
|
can be used to create "custom events" for user-made code.
|
||||||
API:
|
API:
|
||||||
Method \connect function handler
|
Method \connect function handler
|
||||||
Arguments: The function to connect to.
|
Arguments: The function to connect to.
|
||||||
Returns: A new connection object which can be used to disconnect the connection
|
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
|
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
|
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
|
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|.
|
NOT mean that the first will be called before the second as a result of a call to |fire|.
|
||||||
|
|
||||||
Method \disconnect!
|
Method \disconnect!
|
||||||
Arguments: None
|
Arguments: None
|
||||||
Returns: None
|
Returns: None
|
||||||
Description: Disconnects all of the functions connected to this signal.
|
Description: Disconnects all of the functions connected to this signal.
|
||||||
|
|
||||||
Method \fire ...
|
Method \fire ...
|
||||||
Arguments: Any arguments are accepted
|
Arguments: Any arguments are accepted
|
||||||
Returns: None
|
Returns: None
|
||||||
Description: Calls all of the currently connected functions with the given arguments.
|
Description: Calls all of the currently connected functions with the given arguments.
|
||||||
|
|
||||||
Method \wait!
|
Method \wait!
|
||||||
Arguments: None
|
Arguments: None
|
||||||
Returns: The arguments given to fire
|
Returns: The arguments given to fire
|
||||||
Description: This call blocks until
|
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
|
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:
|
type of data and what operation each will perform:
|
||||||
1) A string key mapping to some value:
|
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
|
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
|
ORDER. If the order in which properties is assigned matter, then they must be assigned somewhere else than the
|
||||||
|Create| call's body.
|
|Create| call's body.
|
||||||
|
|
||||||
2) An integral key mapping to another Instance:
|
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
|
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
|
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.
|
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
|
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
|
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
|
for those who really want such a functionality. The name of the event whose name is passed to
|
||||||
Create.E( string )
|
Create.E( string )
|
||||||
|
|
||||||
4) A key which is the Create function itself, and a value which is a function
|
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
|
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
|
done by create. This provides a way to do arbitrary things involving the object from withing the create
|
||||||
hierarchy.
|
hierarchy.
|
||||||
Note: This function is called SYNCHRONOUSLY, that means that you should only so initialization in
|
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
|
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.
|
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
|
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.
|
constructor functions, as it would not be possible to call both of them last, also, this would be unnecessary.
|
||||||
|
|
||||||
|
|
||||||
Some example usages:
|
Some example usages:
|
||||||
|
|
||||||
A simple example which uses the Create function to create a model object and assign two of it's properties.
|
A simple example which uses the Create function to create a model object and assign two of it's properties.
|
||||||
model = Create'Model'{
|
model = Create'Model'{
|
||||||
Name = 'A New model',
|
Name = 'A New model',
|
||||||
Parent = game.Workspace,
|
Parent = game.Workspace,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
An example where a larger hierarchy of object is made. After the call the hierarchy will look like this:
|
An example where a larger hierarchy of object is made. After the call the hierarchy will look like this:
|
||||||
Model_Container
|
Model_Container
|
||||||
|-ObjectValue
|
|-ObjectValue
|
||||||
| |
|
| |
|
||||||
| `-BoolValueChild
|
| `-BoolValueChild
|
||||||
`-IntValue
|
`-IntValue
|
||||||
|
|
||||||
model = Create'Model'{
|
model = Create'Model'{
|
||||||
Name = 'Model_Container',
|
Name = 'Model_Container',
|
||||||
Create'ObjectValue'{
|
Create'ObjectValue'{
|
||||||
Create'BoolValue'{
|
Create'BoolValue'{
|
||||||
Name = 'BoolValueChild',
|
Name = 'BoolValueChild',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Create'IntValue'{},
|
Create'IntValue'{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
An example using the event syntax:
|
An example using the event syntax:
|
||||||
|
|
||||||
part = Create'Part'{
|
part = Create'Part'{
|
||||||
[Create.E'Touched'] = function part
|
[Create.E'Touched'] = function part
|
||||||
print("I was touched by "..part.Name)
|
print("I was touched by "..part.Name)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
An example using the general constructor syntax:
|
An example using the general constructor syntax:
|
||||||
|
|
||||||
model = Create'Part'{
|
model = Create'Part'{
|
||||||
[Create] = function this
|
[Create] = function this
|
||||||
print("Constructor running!")
|
print("Constructor running!")
|
||||||
this.Name = GetGlobalFoosAndBars this
|
this.Name = GetGlobalFoosAndBars this
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Note: It is also perfectly legal to save a reference to the function returned by a call Create, this will not cause
|
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:
|
any unexpected behavior. EG:
|
||||||
partCreatingFunction = Create'Part'
|
partCreatingFunction = Create'Part'
|
||||||
part = partCreatingFunction()
|
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
|
--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) ->
|
t.Help = (funcNameOrFunc) ->
|
||||||
switch 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
|
when "DecodeJSON", t.DecodeJSON
|
||||||
"Function DecodeJSON. " ..
|
"Function DecodeJSON. " ..
|
||||||
"Arguments: (string). " ..
|
"Arguments: (string). " ..
|
||||||
"Side effect: returns a table with all parsed JSON values"
|
"Side effect: returns a table with all parsed JSON values"
|
||||||
|
|
||||||
when "EncodeJSON", t.EncodeJSON
|
when "EncodeJSON", t.EncodeJSON
|
||||||
"Function EncodeJSON. " ..
|
"Function EncodeJSON. " ..
|
||||||
"Arguments: (table). " ..
|
"Arguments: (table). " ..
|
||||||
"Side effect: returns a string composed of argument table in JSON data format"
|
"Side effect: returns a string composed of argument table in JSON data format"
|
||||||
|
|
||||||
when "MakeWedge", t.MakeWedge
|
when "MakeWedge", t.MakeWedge
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ t = {}
|
||||||
-- end
|
-- end
|
||||||
-- 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.
|
-- vectorPos - End point of the line.
|
||||||
--
|
--
|
||||||
-- Return:
|
-- Return:
|
||||||
-- cellPos - The terrain cell intersection point if there is one, vectorPos if there isn't.
|
-- 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) ->
|
PlaneIntersection = (vectorPos) ->
|
||||||
hit = false
|
hit = false
|
||||||
currCamera = game.Workspace.CurrentCamera
|
currCamera = game.Workspace.CurrentCamera
|
||||||
|
|
@ -44,10 +44,10 @@ PlaneIntersection = (vectorPos) ->
|
||||||
-- mouse - Mouse to check the .hit for.
|
-- mouse - Mouse to check the .hit for.
|
||||||
--
|
--
|
||||||
-- Return:
|
-- Return:
|
||||||
-- cellPos - Cell position hit. Nil if none.
|
-- cellPos - Cell position hit. Nil if none.
|
||||||
GetTerrainForMouse = (mouse) ->
|
GetTerrainForMouse = (mouse) ->
|
||||||
-- There was no target, so all it could be is a plane intersection.
|
-- 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
|
cell = game.Workspace.Terrain\WorldToCellPreferSolid Vector3.new mouse.hit.x, mouse.hit.y, mouse.hit.z
|
||||||
local planeLoc
|
local planeLoc
|
||||||
-- If nothing was hit, do the plane intersection.
|
-- If nothing was hit, do the plane intersection.
|
||||||
|
|
@ -156,7 +156,7 @@ setSeatEnabledStatus = (model, isEnabled) ->
|
||||||
|
|
||||||
else
|
else
|
||||||
-- put a weld called "SeatWeld" in every seat
|
-- 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
|
for i = 1, #seatList
|
||||||
fakeWeld = Instance.new "Weld"
|
fakeWeld = Instance.new "Weld"
|
||||||
fakeWeld.Name = "SeatWeld"
|
fakeWeld.Name = "SeatWeld"
|
||||||
|
|
@ -215,7 +215,7 @@ positionPartsAtCFrame3 = (aCFrame, currentParts) ->
|
||||||
calcRayHitTime = (rayStart, raySlope, intersectionPlane) ->
|
calcRayHitTime = (rayStart, raySlope, intersectionPlane) ->
|
||||||
if math.abs(raySlope) < 0.01
|
if math.abs(raySlope) < 0.01
|
||||||
return 0
|
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
|
(intersectionPlane - rayStart) / raySlope
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -293,7 +293,7 @@ getBoundingBox2 = (partOrModel) ->
|
||||||
minVec = -maxVec
|
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"
|
justifyValue = partOrModel\FindFirstChild "Justification"
|
||||||
if justifyValue?
|
if justifyValue?
|
||||||
-- find the multiple of 4 that contains the model
|
-- find the multiple of 4 that contains the model
|
||||||
|
|
@ -482,12 +482,12 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
|
||||||
mouseHitInTarget = targetCFrame\pointToObjectSpace mouseHitInWorld
|
mouseHitInTarget = targetCFrame\pointToObjectSpace mouseHitInWorld
|
||||||
targetVectorInWorld = Vector3.new 0, 0, 0
|
targetVectorInWorld = Vector3.new 0, 0, 0
|
||||||
if Mouse
|
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])
|
-- 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)
|
-- (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 = targetCFrame\vectorToWorldSpace(Vector3.FromNormalId(Mouse.TargetSurface))
|
||||||
targetVectorInWorld = targetPart.CFrame\vectorToWorldSpace Vector3.FromNormalId Mouse.TargetSurface -- better, but model cframe would be best
|
targetVectorInWorld = targetPart.CFrame\vectorToWorldSpace Vector3.FromNormalId Mouse.TargetSurface -- better, but model cframe would be best
|
||||||
--[[if targetPart.Parent\IsA("Model")
|
--[[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)}
|
WORLD_AXES = {Vector3.new(1, 0, 0), Vector3.new(0, 1, 0), Vector3.new(0, 0, 1)}
|
||||||
if hitFace > 0
|
if hitFace > 0
|
||||||
targetVectorInWorld = targetCFrame\vectorToWorldSpace(WORLD_AXES[hitFace])
|
targetVectorInWorld = targetCFrame\vectorToWorldSpace(WORLD_AXES[hitFace])
|
||||||
|
|
@ -674,7 +674,7 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
||||||
newTerrainPiece.BottomSurface = "Smooth"
|
newTerrainPiece.BottomSurface = "Smooth"
|
||||||
newTerrainPiece.TopSurface = "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
|
newTerrainPiece.BrickColor = getClosestColorToTerrainMaterial cellMat
|
||||||
|
|
||||||
sideways = 0
|
sideways = 0
|
||||||
|
|
@ -805,7 +805,7 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
||||||
|
|
||||||
t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion, StampFailedFunc) ->
|
t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion, StampFailedFunc) ->
|
||||||
if not modelToStamp
|
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
|
return nil
|
||||||
|
|
||||||
if not modelToStamp\IsA"Model" and not modelToStamp\IsA "BasePart"
|
if not modelToStamp\IsA"Model" and not modelToStamp\IsA "BasePart"
|
||||||
|
|
@ -813,7 +813,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
if not Mouse
|
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
|
return nil
|
||||||
|
|
||||||
if not Mouse\IsA "Mouse"
|
if not Mouse\IsA "Mouse"
|
||||||
|
|
@ -922,8 +922,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
|
|
||||||
if HighScalabilityLine.Dimensions == 1
|
if HighScalabilityLine.Dimensions == 1
|
||||||
-- extract the line from these positions and limit to a 2D plane made from 2 of the world axes
|
-- 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
|
-- 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
|
-- will use this internal representation of the line for the actual stamping
|
||||||
line = (HighScalabilityLine.End - HighScalabilityLine.Start)
|
line = (HighScalabilityLine.End - HighScalabilityLine.Start)
|
||||||
|
|
||||||
if math.abs(line.X) < math.abs(line.Y)
|
if math.abs(line.X) < math.abs(line.Y)
|
||||||
|
|
@ -1143,7 +1143,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
|
|
||||||
myModelInfo = stampData.CurrentParts\FindFirstChild "UnstampableFaces"
|
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
|
if true
|
||||||
breakingFaces = ""
|
breakingFaces = ""
|
||||||
myBreakingFaces = ""
|
myBreakingFaces = ""
|
||||||
|
|
@ -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
|
-- 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
|
-- 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]
|
-- issue (fingers crossed) [HotThoth]
|
||||||
|
|
||||||
clusterMaterial = stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
|
clusterMaterial = stampData.CurrentParts\FindFirstChild "ClusterMaterial", true
|
||||||
if clusterMaterial and clusterMaterial\IsA"Vector3Value"
|
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
|
canSetCell = true
|
||||||
|
|
||||||
if checkHighScalabilityStamp -- check to see if cell is in region, if not we'll skip set
|
if checkHighScalabilityStamp -- check to see if cell is in region, if not we'll skip set
|
||||||
|
|
@ -1811,9 +1811,9 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
|
|
||||||
minBB, maxBB = getBoundingBoxInWorldCoordinates(stampData.CurrentParts)
|
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
|
-- 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
|
-- 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?
|
-- Shouldn't this be true when lastTargetCFrame has been set and false otherwise?
|
||||||
configFound, targetCFrame = findConfigAtMouseTarget(Mouse, stampData)
|
configFound, targetCFrame = findConfigAtMouseTarget(Mouse, stampData)
|
||||||
|
|
||||||
if configFound and not HighScalabilityLine.Adorn.Parent
|
if configFound and not HighScalabilityLine.Adorn.Parent
|
||||||
|
|
@ -1866,7 +1866,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
return false
|
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\FindFirstChild "Players"
|
||||||
if game.Players["LocalPlayer"]
|
if game.Players["LocalPlayer"]
|
||||||
if game.Players.LocalPlayer["Character"]
|
if game.Players.LocalPlayer["Character"]
|
||||||
|
|
@ -1965,7 +1965,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
-- kill the ghost part
|
-- kill the ghost part
|
||||||
stampData.CurrentParts.Parent = nil
|
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
|
try
|
||||||
game\GetService"ChangeHistoryService"\SetWaypoint "StamperSingle"
|
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
|
-- 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" or stampData.CurrentParts\IsA "Tool"
|
||||||
if stampData.CurrentParts\IsA "Model"
|
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 = {}
|
manualWeldTable = {}
|
||||||
manualWeldParentTable = {}
|
manualWeldParentTable = {}
|
||||||
saveTheWelds(stampData.CurrentParts, manualWeldTable, manualWeldParentTable)
|
saveTheWelds(stampData.CurrentParts, manualWeldTable, manualWeldParentTable)
|
||||||
|
|
@ -2135,7 +2135,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
* Vector3.new 0, 1, 0
|
* Vector3.new 0, 1, 0
|
||||||
* Vector3.new 0, 0, 1
|
* Vector3.new 0, 0, 1
|
||||||
|
|
||||||
-- maybe last one is negative? TODO: check this!
|
-- maybe last one is negative? TODO: check this!
|
||||||
isPositive = 1
|
isPositive = 1
|
||||||
if whichSurface < 0
|
if whichSurface < 0
|
||||||
isPositive *= -1
|
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
|
control.ResetRotation = -> -- resets the model rotation so new models are at default orientation
|
||||||
-- gInitial90DegreeRotations = 0
|
-- 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
|
-- 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]
|
-- High-Scalability and with the new model orientation setting methods (model\ResetOrientationToIdentity!) [HotThoth]
|
||||||
|
|
||||||
control.Destroy = -> -- Stops current Stamp operation and destroys control construct
|
control.Destroy = -> -- Stops current Stamp operation and destroys control construct
|
||||||
for i = 1, #mouseCons
|
for i = 1, #mouseCons
|
||||||
|
|
@ -2342,12 +2342,12 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
||||||
|
|
||||||
|
|
||||||
t.Help = (funcNameOrFunc) ->
|
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
|
switch funcNameOrFunc
|
||||||
when "GetStampModel", t.GetStampModel
|
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
|
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
|
t
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ try
|
||||||
settings!.Diagnostics.LuaRamLimit = 0
|
settings!.Diagnostics.LuaRamLimit = 0
|
||||||
--settings!.Network\SetThroughputSensitivity(0.08, 0.01)
|
--settings!.Network\SetThroughputSensitivity(0.08, 0.01)
|
||||||
--settings!.Network.SendRate = 35
|
--settings!.Network.SendRate = 35
|
||||||
--settings!.Network.PhysicsSend = 0 -- 1==RoundRobin
|
--settings!.Network.PhysicsSend = 0 -- 1==RoundRobin
|
||||||
|
|
||||||
--shared["__time"] = 0
|
--shared["__time"] = 0
|
||||||
--game\GetService"RunService".Stepped\connect(function (time) shared["__time"] = time end)
|
--game\GetService"RunService".Stepped\connect(function (time) shared["__time"] = time end)
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ try
|
||||||
try
|
try
|
||||||
game\SetCreatorID _CREATOR_ID, Enum.CreatorType.User
|
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
|
try
|
||||||
game\GetService"Players"\SetChatStyle Enum.ChatStyle.ClassicAndBubble
|
game\GetService"Players"\SetChatStyle Enum.ChatStyle.ClassicAndBubble
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue