Skip to content

Commit 480de93

Browse files
authored
Merge v266 into release
2 parents 4ee42eb + 312cb0e commit 480de93

File tree

9 files changed

+106
-57
lines changed

9 files changed

+106
-57
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: build
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4.1.7
19+
- uses: actions/checkout@v4.2.2
2020

2121
- name: Layout file name
2222
id: naming
@@ -56,7 +56,7 @@ jobs:
5656
- name: Build
5757
run: rojo build -o ${{ steps.naming.outputs.output_name }}.rbxm .github/build.project.json
5858

59-
- uses: actions/upload-artifact@v4.3.6
59+
- uses: actions/upload-artifact@v4.6.2
6060
with:
6161
name: ${{ steps.naming.outputs.output_name }}
6262
path: ${{ steps.naming.outputs.output_name }}.rbxm
@@ -68,14 +68,14 @@ jobs:
6868
run: rojo build -o module.rbxm .github/module.deploy.project.json
6969

7070
- name: Send file nightly build to Discord channel
71-
uses: tsickert/discord-webhook@v6.0.0
71+
uses: tsickert/discord-webhook@v7.0.0
7272
if: github.repository == 'Epix-Incorporated/Adonis' && github.event_name == 'push' && github.ref_name == 'master'
7373
with:
7474
webhook-url: ${{ secrets.NIGHTLY_WEBHOOK }}
7575
filename: ${{ steps.naming.outputs.output_name }}.rbxm
7676

7777
- name: Publish Nightly MainModule
78-
uses: fjogeleit/http-request-action@v1.16.1
78+
uses: fjogeleit/http-request-action@v1.16.4
7979
if: github.repository == 'Epix-Incorporated/Adonis' && github.event_name == 'push' && github.ref_name == 'master'
8080
with:
8181
url: "${{ secrets.PUBURL2 }}/?assetId=${{ secrets.NIGHTLY_MODULE_ID }}"

Loader/Version.model.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"ClassName": "NumberValue",
33
"Properties": {
4-
"Value": 265
4+
"Value": 266
55
}
66
}

MainModule/Client/Core/UI.luau

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ return function(Vargs, GetEnv)
6363
UI.RunLast = nil;
6464
end
6565

66+
local function TruncatedCompare(s1: str, s2: str)
67+
local minLength = math.min(string.len(s1), string.len(s2))
68+
local s1Truncated = string.sub(s1, 1, minLength)
69+
local s2Truncated = string.sub(s2, 1, minLength)
70+
return s1Truncated == s2Truncated
71+
end
72+
6673
getfenv().client = nil
6774
getfenv().service = nil
6875
getfenv().script = nil
@@ -546,7 +553,23 @@ return function(Vargs, GetEnv)
546553
gTable:Register(gui)
547554

548555
return gTable,gIndex
549-
end
556+
end;
557+
558+
Autocomplete = function(provided: string, arg: string)
559+
local matches = {}
560+
if not provided or not arg then
561+
return matches
562+
end
563+
564+
for _, player in service.Players:GetPlayers() do
565+
local name = player.Name
566+
if provided == "$" or TruncatedCompare(string.lower(name), string.lower(provided)) then
567+
table.insert(matches, name)
568+
end
569+
end
570+
571+
return matches
572+
end;
550573
}
551574

552575
client.UI.RegisterGui = client.UI.Register

MainModule/Client/UI/Default/Console.rbxmx

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<token name="HorizontalScrollBarInset">0</token>
125125
<int name="LayoutOrder">0</int>
126126
<Content name="MidImage"><url>http://roblox.com/asset?id=158348114</url></Content>
127-
<string name="Name">PlayerList</string>
127+
<string name="Name">AutocompleteList</string>
128128
<Ref name="NextSelectionDown">null</Ref>
129129
<Ref name="NextSelectionLeft">null</Ref>
130130
<Ref name="NextSelectionRight">null</Ref>
@@ -560,7 +560,7 @@ return function(data, env)
560560
local frame = gui.Frame
561561
local text = frame.TextBox
562562
local scroll = frame.ScrollingFrame
563-
local players = frame.PlayerList
563+
local autoList = frame.AutocompleteList
564564
local entry = gui.Entry
565565

566566
local Settings = Remote.Get("Setting", {"SplitKey", "ConsoleKeyCode", "BatchKey", "Prefix"})
@@ -654,7 +654,7 @@ return function(data, env)
654654
scroll.ScrollingEnabled = false
655655
frame.Size = UDim2.new(1,0,0,40)
656656
scroll.Visible = false
657-
players.Visible = false
657+
autoList.Visible = false
658658
scrollOpen = false
659659

660660
if Variables.ChatEnabled then
@@ -687,15 +687,15 @@ return function(data, env)
687687
service.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
688688

689689
scroll.ScrollingEnabled = true
690-
players.ScrollingEnabled = true
690+
autoList.ScrollingEnabled = true
691691

692692
hideGuis()
693693

694694
consoleOpenTween:Play()
695695

696696
frame.Size = UDim2.new(1, 0, 0, 40)
697697
scroll.Visible = false
698-
players.Visible = false
698+
autoList.Visible = false
699699
scrollOpen = false
700700
text.Text = ""
701701
frame.Visible = true
@@ -728,58 +728,40 @@ return function(data, env)
728728

729729
text:GetPropertyChangedSignal("Text"):Connect(function()
730730
if text.Text ~= "" and openConsole then
731-
if string.sub(text.Text, string.len(text.Text)) == " " then
732-
if players:FindFirstChild("Entry 0") then
733-
local args = string.split(tostring(text.Text), " ") -- Get command args
731+
local tabWhiteSpace = " "
732+
if string.sub(text.Text, string.len(text.Text)) == tabWhiteSpace then
733+
if autoList:FindFirstChild("Entry 0") then
734+
local args = string.split(text.Text, splitKey) -- Get command args
734735
local textWithoutLastArg = string.sub(text.Text, 1, string.len(text.Text) - string.len(args[#args])) -- Remove the last arg
735736

736-
text.Text = `{textWithoutLastArg}{players["Entry 0"].Text} ` -- Combine the text witout the last arg and the player name
737+
text.Text = `{textWithoutLastArg}{autoList["Entry 0"].Text} ` -- Combine the text witout the last arg and the player name
737738
elseif scroll:FindFirstChild("Entry 0") then
738739
text.Text = string.split(scroll["Entry 0"].Text, "<")[1]
739-
else
740-
text.Text = text.Text..prefix
741740
end
741+
742742
text.CursorPosition = string.len(text.Text) + 1
743-
text.Text = string.gsub(text.Text, " ", "")
743+
text.Text = string.gsub(text.Text, tabWhiteSpace, "")
744744
end
745745
scroll:ClearAllChildren()
746-
players:ClearAllChildren()
746+
autoList:ClearAllChildren()
747747

748748
local nText = text.Text
749-
if string.match(nText, `.*{batchKey}([^']+)`) then
750-
nText = string.match(nText, `.*{batchKey}([^']+)`)
751-
nText = string.match(nText, "^%s*(.-)%s*$")
749+
local fullCmdStr = string.match(nText, `.*{batchKey}([^']+)`)
750+
if fullCmdStr then
751+
nText = string.match(fullCmdStr, "^%s*(.-)%s*$")
752752
end
753753

754-
local pNum = 0
755-
local pMatch = string.match(nText, `.+{splitKey}(.*)$`)
756-
for _, v in service.Players:GetPlayers() do
757-
if (pMatch and string.sub(string.lower(tostring(v)),1,#pMatch) == string.lower(pMatch)) or string.match(nText,`{splitKey}$`) then
758-
local new = entry:Clone()
759-
new.Text = tostring(v)
760-
new.Name = `Entry {pNum}`
761-
new.TextXAlignment = "Right"
762-
new.Visible = true
763-
new.Parent = players
764-
new.Position = UDim2.new(0,0,0,20*pNum)
765-
new.MouseButton1Down:Connect(function()
766-
text.Text = text.Text..tostring(v)
767-
text:CaptureFocus()
768-
end)
769-
pNum += 1
770-
end
771-
end
772-
773-
players.CanvasSize = UDim2.new(0,0,0,pNum*20)
774-
775754
local num = 0
755+
local selectedCmd = ""
776756
for _, v in commands do
777-
if string.sub(string.lower(v),1,#nText) == string.lower(nText) or string.find(string.lower(v), string.match(string.lower(nText), `^(.-){splitKey}`) or string.lower(nText), 1, true) then
757+
local cmdName = string.match(string.lower(nText), `^(.-){splitKey}`) or string.lower(nText)
758+
if string.sub(string.lower(v), 1, #nText) == string.lower(nText) or string.find(string.lower(v), cmdName, 1, true) then
759+
selectedCmd = v
778760
if not scrollOpen then
779761
scrollOpenTween:Play()
780762
--frame.Size = UDim2.new(1,0,0,140)
781763
scroll.Visible = true
782-
players.Visible = true
764+
autoList.Visible = true
783765
scrollOpen = true
784766
end
785767
local b = entry:Clone()
@@ -795,13 +777,38 @@ return function(data, env)
795777
num += 1
796778
end
797779
end
798-
frame.Size = UDim2.new(1, 0, 0, math.clamp((num*20)+40, 40, 140))
799-
scroll.CanvasSize = UDim2.fromOffset(0, num*20)
780+
781+
local aNum = 0
782+
local fullSplit = string.split(nText, splitKey)
783+
if num > 0 and #fullSplit > 1 then
784+
local provided = string.match(nText, `.+{splitKey}(.*)$`)
785+
local selectedSplit = string.split(selectedCmd, splitKey)
786+
787+
local arg = selectedSplit[#fullSplit]
788+
for _, v in UI.Autocomplete(provided, arg) do
789+
local new = entry:Clone()
790+
new.Text = v
791+
new.Name = `Entry {aNum}`
792+
new.TextXAlignment = "Right"
793+
new.Visible = true
794+
new.Parent = autoList
795+
new.Position = UDim2.new(0, 0, 0, 20 * aNum)
796+
new.MouseButton1Down:Connect(function()
797+
text.Text = text.Text..tostring(v)
798+
text:CaptureFocus()
799+
end)
800+
801+
aNum += 1
802+
end
803+
end
804+
805+
frame.Size = UDim2.new(1, 0, 0, math.clamp((math.max(num, aNum) * 20) + 40, 40, 140))
806+
scroll.CanvasSize = UDim2.fromOffset(0, num * 20)
800807
elseif text.Text == "" and opened then
801808
scrollCloseTween:Play()
802809
--service.SafeTweenSize(frame,UDim2.new(1,0,0,40), nil, nil,0.3, nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end)
803810
scroll.Visible = false
804-
players.Visible = false
811+
autoList.Visible = false
805812
scrollOpen = false
806813
scroll:ClearAllChildren()
807814
scroll.CanvasSize = UDim2.new()

MainModule/Server/Core/Admin.luau

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,15 +1461,22 @@ return function(Vargs, GetEnv)
14611461

14621462
StringToComLevel = function(str)
14631463
local strType = type(str)
1464-
if strType == "string" and string.lower(str) == "players" then
1465-
return 0
1466-
end
14671464
if strType == "number" then
14681465
return str
1466+
elseif strType == "string" then
1467+
if string.lower(str) == "players" then
1468+
return 0
1469+
end
1470+
1471+
local lvl = Settings.Ranks[str]
1472+
if not lvl then
1473+
return -1
1474+
end
1475+
1476+
return lvl.Level
14691477
end
14701478

1471-
local lvl = Settings.Ranks[str]
1472-
return (lvl and lvl.Level) or tonumber(str)
1479+
return tonumber(str)
14731480
end;
14741481

14751482
CheckComLevel = function(plrAdminLevel, comLevel)

MainModule/Server/Core/Commands.luau

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ return function(Vargs, GetEnv)
112112

113113
local lvl = cmd.AdminLevel
114114
if type(lvl) == "string" and lvl ~= "Donors" then
115-
cmd.AdminLevel = Admin.StringToComLevel(lvl)
115+
local resp = Admin.StringToComLevel(lvl)
116+
if resp == nil or resp == -1 then
117+
warn(`'AdminLevel' for command {ind} is provided as '{lvl}' but is invalid. Defaulting to 0.`)
118+
resp = 0
119+
end
120+
121+
cmd.AdminLevel = resp
116122
elseif type(lvl) == "table" then
117123
for b, v in lvl do
118124
lvl[b] = Admin.StringToComLevel(v)

MainModule/Server/Core/Logs.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ return function(Vargs, GetEnv)
146146
end)
147147
end
148148

149-
local temp = table.create(#oldLogs + #logsToSave + (Logs.Commands.__meta == "DLL" and Logs.Commands.count or 0))
149+
local temp = table.create((oldLogs and #oldLogs or 0) + #logsToSave + (Logs.Commands.__meta == "DLL" and Logs.Commands.count or 0))
150150

151151
local function insertLog(log)
152152
local isTable = type(log) == "table"

MainModule/Server/Shared/Changelog.luau

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
return {
2-
"Version: 265";
2+
"Version: 266";
33
"*Drag edges to expand*";
44
"*Report bugs/issues on our GitHub repository*";
55
"";
6+
"[v266 2025-03-31 18:28 UTC] @Dimenpsyonal";
7+
"(Git/StayBlue) Refactor Autocomplete suggestions in Default theme (#1853)";
8+
"(Git/convxors) Fix :oldlogs command (#1867)";
9+
"(Git/StayBlue) Fix invalid admin level giving no warning (#1852)";
10+
"(Git/EasternBloxxer) Blank message fix (#1868)";
11+
"";
612
"[v265 2025-03-22 19:42 UTC] @Dimenpsyonal";
713
"Change client dump to use print";
814
"(Git/Raineko826) Fixed :sword team kill argument not working (#1860)";

MainModule/Server/Shared/Service.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ return function(errorHandler, eventChecker, fenceSpecific, env)
595595
local new = table.create(#lines)
596596
for i = 1, #lines do
597597
local ran, newl = pcall(function()
598-
return service.TextService:FilterStringAsync(lines[i], from.UserId):GetChatForUserAsync(to.UserId)
598+
return service.TextService:FilterStringAsync(lines[i], from.UserId):GetNonChatStringForUserAsync(to.UserId)
599599
end)
600600
new[i] = ran and newl or lines[i] or ""
601601
end

0 commit comments

Comments
 (0)