Fix some corescripts and add instructions for processing

This commit is contained in:
Lewin Kelly 2023-04-22 11:08:38 +01:00
parent 2abd435711
commit 2c8762b878
10 changed files with 15 additions and 11 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Corescripts
After installing Aftman and running `aftman install`, run `./compile.sh` to compile the corescripts from ./yue/*.yue to ./processed/*.lua.

3
aftman.toml Normal file
View File

@ -0,0 +1,3 @@
[tools]
darklua = "seaofvoices/darklua@0.8.0"
yue = "pigpigyyy/Yuescript@0.16.1"

1
compile.sh Normal file
View File

@ -0,0 +1 @@
yue ./yue && darklua process ./yue ./processed

View File

@ -6360,9 +6360,6 @@ structs:
method: true
CoordinateFrame:
any: true
deprecated:
message: this property is deprecated.
replace: []
DescendantAdded:
struct: Event
DescendantRemoving:

View File

@ -579,7 +579,7 @@ layoutGuiObjectsHelper = function(frame, guiObjects, settingsTable)
local totalPixels = frame.AbsoluteSize.Y
local pixelsRemaining = totalPixels
for _, child in ipairs(guiObjects) do
if child:IsA("TextLabel" or child:IsA("TextButton")) then
if child:IsA("TextLabel") or child:IsA("TextButton") then
local isLabel = child:IsA("TextLabel")
local settingsTableIndex = "Text" .. tostring((function()
if isLabel then

View File

@ -552,7 +552,7 @@ layoutGuiObjectsHelper = (frame, guiObjects, settingsTable) ->
totalPixels = pixelsRemaining = frame.AbsoluteSize.Y
for _, child in ipairs guiObjects
if child\IsA "TextLabel" or child\IsA "TextButton"
if child\IsA"TextLabel" or child\IsA "TextButton"
isLabel = child\IsA "TextLabel"
settingsTableIndex = "Text#{if isLabel then "Label" else "Button"}PositionPadY"
pixelsRemaining -= settingsTable[settingsTableIndex]

View File

@ -1593,7 +1593,7 @@ pcall(function()
local pos = 1
if children then
for _, player in ipairs(children) do
if player:IsA("Player" and player ~= localPlayer) then
if player:IsA("Player") and player ~= localPlayer then
playerNames[pos] = player.Name
nameToPlayer[player.Name] = player
pos = pos + 1

View File

@ -1931,7 +1931,7 @@ if LoadLibrary
pos = 1
if children
for _, player in ipairs children
if player\IsA "Player" and player ~= localPlayer
if player\IsA"Player" and player ~= localPlayer
playerNames[pos] = player.Name
nameToPlayer[player.Name] = player
pos += 1

View File

@ -1025,7 +1025,7 @@ Chat.UpdateQueue = function(self, field, diff)
if self.MessageQueue[i] then
for _, label in pairs(self.MessageQueue[i]) do
if label and type(label) ~= "table" and type(label) ~= "number" then
if label:IsA("TextLabel" or label:IsA("TextButton")) then
if label:IsA("TextLabel") or label:IsA("TextButton") then
if diff then
label.Position = label.Position - UDim2.new(0, 0, diff, 0)
else
@ -1209,7 +1209,7 @@ Chat.ToggleSafeChatMenu = function(self, scButton)
local list = Chat:FindButtonTree(scButton, self.SafeChatTree)
if list then
for button, _ in pairs(list) do
if button:IsA("TextButton" or button:IsA("ImageButton")) then
if button:IsA("TextButton") or button:IsA("ImageButton") then
button.Visible = not button.Visible
end
end

View File

@ -1034,7 +1034,7 @@ Chat.UpdateQueue = (field, diff) =>
if @MessageQueue[i]
for _, label in pairs @MessageQueue[i]
if label and type(label) ~= "table" and type(label) ~= "number"
if label\IsA "TextLabel" or label\IsA "TextButton"
if label\IsA"TextLabel" or label\IsA "TextButton"
if diff
label.Position = label.Position - UDim2.new(0, 0, diff, 0)
else
@ -1302,7 +1302,7 @@ Chat.ToggleSafeChatMenu = (scButton) =>
list = Chat\FindButtonTree scButton, @SafeChatTree
if list
for button, _ in pairs list
if button\IsA "TextButton" or button\IsA "ImageButton"
if button\IsA"TextButton" or button\IsA "ImageButton"
button.Visible = not button.Visible
return true
return false