Skip to content

Commit 599a398

Browse files
authored
Merge pull request #1846 from Epix-Incorporated/master
Merge v264 into release
2 parents 8271f87 + 7ab3c17 commit 599a398

30 files changed

+2436
-2396
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ There is a very clear/obvious difference between unavoidably complex code and in
4242

4343
## Q: Is there a style guide for writing code?
4444

45-
**A:** Not really, but we would normally try to follow the format of the other existing code in the module we are editing, as well as the [Roblox Lua Style Guide](https://roblox.github.io/lua-style-guide/) where applicable. Also, be sure to use US English spellings for both code variable names and user-facing text.
45+
**A:** Not really, but we would normally try to follow the format of the other existing code in the module we are editing, as well as the [Roblox Luau Style Guide](https://roblox.github.io/lua-style-guide/) where applicable. Also, be sure to use US English spellings for both code variable names and user-facing text.
4646

4747
## Q: What are some things I should watch out for when submitting my changes?
4848

Loader/Config/API.luau

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--[[
22
If you're learning how to create in Adonis, the wiki may be of help.
3-
The wiki contains informationa about the Adonis API and how to use it;
3+
The wiki contains information about the Adonis API and how to use it;
44
as well as information about settings and how to use Adonis.
55
66
It can be viewed here:

Loader/Config/Settings.luau

Lines changed: 56 additions & 57 deletions
Large diffs are not rendered by default.

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": 263
4+
"Value": 264
55
}
66
}

MainModule/Client/UI/Default/ServerDetails.luau

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ return function(data, env)
163163
end)
164164
end
165165

166-
local success, isAmerica = xpcall(function()
167-
return service.LocalizationService:GetCountryRegionForPlayerAsync(service.Players.LocalPlayer) == "US"
168-
end, function() return false end)
169-
170166
do
171167

172168
local function show()
@@ -178,7 +174,7 @@ return function(data, env)
178174
{"Country", serii.country or "[Error]"},
179175
{"Region", serii.region or "[Error]"},
180176
{"City", serii.city or "[Error]"},
181-
{if isAmerica then "Zipcode" else "Postcode", serii.zipcode or "[Error]"},
177+
{if serii.country and (string.match(serii.country, "United States") or string.match(serii.country, "Philippines")) then "Zipcode" else "Postcode", serii.zipcode or "[Error]"},
182178
{"IP Address", serii.ip or "[Error]"},
183179
{"Coordinates", serii.coords or "[Error]"},
184180
}) do table.insert(entries, v) end

MainModule/Client/UI/Default/UserPanel.luau

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ return function(data, env)
497497
chatMod = Remote.Get("Setting",{"Prefix","SpecialPrefix","BatchKey","AnyPrefix","DonorCommands","DonorCapes"})
498498
settingsData = Remote.Get("AllSettings")
499499
Variables.Aliases = playerData.Aliases or {}
500-
commandPrefix = chatMod.Prefix
500+
commandPrefix = if type(chatMod.Prefix) == "table" then chatMod.Prefix[1] else chatMod.Prefix
501+
501502

502503
for _, v in loadingIcons do
503504
v:Destroy()

MainModule/Server/Commands/Admins.luau

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ return function(Vargs, env)
684684
Functions.Hint(string.format("Team '%s' already exists!", teamName), {plr})
685685
return;
686686
end
687-
687+
688688
service.New("Team", {
689689
Parent = service.Teams;
690690
Name = teamName;
@@ -1430,7 +1430,7 @@ return function(Vargs, env)
14301430
CanBan = Admin.CheckComLevel(Admin.GetLevel(plr),Commands.ServerBan.AdminLevel);
14311431
CanTimeBan = Admin.CheckComLevel(Admin.GetLevel(plr),Commands.TimeBan.AdminLevel);
14321432
CanPermBan = Admin.CheckComLevel(Admin.GetLevel(plr),Commands.PermanentBan.AdminLevel);
1433-
Prefix = Settings.Prefix;
1433+
Prefix = Functions.GetMainPrefix()
14341434
})
14351435
end,
14361436
};

MainModule/Server/Commands/Moderators.luau

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ return function(Vargs, env)
292292
Commands = {"cn", "customsmallmessage", "cnmessage"};
293293
Args = {"title", "message"};
294294
Filter = true;
295-
Description = `Same as {Settings.Prefix}n but says whatever you want the title to be instead of your name.`;
295+
Description = `Same as {Functions.GetMainPrefix()}n but says whatever you want the title to be instead of your name.`;
296296
AdminLevel = "Moderators";
297297
Function = function(plr: Player, args: {string})
298298
Functions.Notify(service.BroadcastFilter(assert(args[1], "Missing title"), plr), service.BroadcastFilter(assert(args[2], "Missing message") , plr), service.GetPlayers())
@@ -377,7 +377,7 @@ return function(Vargs, env)
377377

378378
Remote.RemoveGui(v, "Notify")
379379
Functions.Notify(`Warning from {service.FormatPlayer(plr)}`, reason, {v})
380-
Functions.Notification("Notification", `Warned {service.FormatPlayer(v)}`, {plr}, 5, "MatIcons://Shield", Core.Bytecode(`client.Remote.Send('ProcessCommand','{Settings.Prefix}warnings {v.Name}')`))
380+
Functions.Notification("Notification", `Warned {service.FormatPlayer(v)}`, {plr}, 5, "MatIcons://Shield", Core.Bytecode(`client.Remote.Send('ProcessCommand','{Functions.GetMainPrefix()}warnings {v.Name}')`))
381381
end
382382
end
383383
end
@@ -416,7 +416,7 @@ return function(Vargs, env)
416416
Core.CrossServer("RemovePlayer", v.Name, `Warning from {service.FormatPlayer(plr)}`, reason)
417417
end
418418

419-
Functions.Notification("Notification", `Kick-warned {service.FormatPlayer(v)}`, {plr}, 5, "MatIcons://Shield", Core.Bytecode(`client.Remote.Send('ProcessCommand','{Settings.Prefix}warnings {v.Name}')`))
419+
Functions.Notification("Notification", `Kick-warned {service.FormatPlayer(v)}`, {plr}, 5, "MatIcons://Shield", Core.Bytecode(`client.Remote.Send('ProcessCommand','{Functions.GetMainPrefix()}warnings {v.Name}')`))
420420
end
421421
end
422422
end
@@ -725,7 +725,7 @@ return function(Vargs, env)
725725
for k, t in v.Backpack:GetChildren() do
726726
t.Parent = tools
727727
end
728-
Admin.RunCommand(`{Settings.Prefix}name`, v.Name, `-AFK-_{service.FormatPlayer(v)}_-AFK-`)
728+
Admin.RunCommand(`{Functions.GetMainPrefix()}name`, v.Name, `-AFK-_{service.FormatPlayer(v)}_-AFK-`)
729729
local torso = v.Character.HumanoidRootPart
730730
local pos = torso.CFrame
731731
local running=true
@@ -738,7 +738,7 @@ return function(Vargs, env)
738738
for k, t in tools:GetChildren() do
739739
t.Parent = v.Backpack
740740
end
741-
Admin.RunCommand(`{Settings.Prefix}unname`, v.Name)
741+
Admin.RunCommand(`{Functions.GetMainPrefix()}unname`, v.Name)
742742
event:Disconnect()
743743
end)
744744
repeat torso.CFrame = pos wait() until not v or not v.Character or not torso or not running or not torso.Parent
@@ -811,7 +811,7 @@ return function(Vargs, env)
811811
Prefix = Settings.Prefix;
812812
Commands = {"fullgod", "totalgod"};
813813
Args = {"player"};
814-
Description = `Same as {server.Settings.Prefix}god, but also provides blast protection`;
814+
Description = `Same as {Functions.GetMainPrefix()}god, but also provides blast protection`;
815815
AdminLevel = "Moderators";
816816
Function = function(plr: Player, args: {string})
817817
for _, v in service.GetPlayers(plr, args[1]) do
@@ -1243,7 +1243,7 @@ return function(Vargs, env)
12431243
TitleButtons = {
12441244
{
12451245
Text = "";
1246-
OnClick = Core.Bytecode(`client.Remote.Send('ProcessCommand','{Settings.Prefix}tools')`);
1246+
OnClick = Core.Bytecode(`client.Remote.Send('ProcessCommand','{Functions.GetMainPrefix()}tools')`);
12471247
Children = {
12481248
{
12491249
Class = "ImageLabel";
@@ -1594,7 +1594,7 @@ return function(Vargs, env)
15941594
local command = args[3]
15951595
local name = string.lower(plr.Name)
15961596
assert(command, "Missing command name to repeat")
1597-
if string.lower(string.sub(command, 1, #Settings.Prefix+string.len("repeat"))) == string.lower(`{Settings.Prefix}repeat`) or string.sub(command, 1, #Settings.Prefix+string.len("loop")) == string.lower(`{Settings.Prefix}loop`) or string.find(command, `^{Settings.Prefix}loop`) or string.find(command, `^{Settings.Prefix}repeat`) then
1597+
if string.lower(string.sub(command, 1, #Functions.GetMainPrefix()+string.len("repeat"))) == string.lower(`{Settings.Prefix}repeat`) or string.sub(command, 1, #Functions.GetMainPrefix()+string.len("loop")) == string.lower(`{Settings.Prefix}loop`) or string.find(command, `^{Settings.Prefix}loop`) or string.find(command, `^{Settings.Prefix}repeat`) then
15981598
error("Cannot repeat the loop command in a loop command")
15991599
return
16001600
end
@@ -2116,7 +2116,7 @@ return function(Vargs, env)
21162116
local data = {
21172117
Tools = {};
21182118
SavedTools = {};
2119-
Prefix = Settings.Prefix;
2119+
Prefix = Functions.GetMainPrefix();
21202120
SplitKey = Settings.SplitKey;
21212121
SpecialPrefix = Settings.SpecialPrefix;
21222122
}
@@ -4468,7 +4468,7 @@ return function(Vargs, env)
44684468
AdminLevel = "Moderators";
44694469
Function = function(plr: Player, args: {[number]:string})
44704470
Remote.MakeGui(plr, "Teams", {
4471-
CmdPrefix = Settings.Prefix; CmdPlayerPrefix = Settings.PlayerPrefix; CmdSpecialPrefix = Settings.SpecialPrefix; CmdSplitKey = Settings.SplitKey;
4471+
CmdPrefix = Functions.GetMainPrefix(); CmdPlayerPrefix = Settings.PlayerPrefix; CmdSpecialPrefix = Settings.SpecialPrefix; CmdSplitKey = Settings.SplitKey;
44724472
})
44734473
end
44744474
};

MainModule/Server/Commands/Players.luau

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ return function(Vargs, env)
3131

3232
for _,alias in cmd.Commands do
3333
if #cmdAliases >= 4 and (#cmd.Commands - #cmdAliases) ~= 0 then
34-
table.insert(cmdAliases, `and {#cmd.Commands - #cmdAliases} more...`)
34+
table.insert(cmdAliases, `and {#cmd.Commands - #cmdAliases} more...`)
3535
break
3636
end
3737
end
38-
38+
3939
table.remove(cmdAliases, 1)
4040

4141
local permissionDesc = Admin.FormatCommandAdminLevel(cmd)
@@ -83,7 +83,7 @@ return function(Vargs, env)
8383
local cmd, ind
8484
for i, v in Admin.SearchCommands(plr, "all") do
8585
for _, p in v.Commands do
86-
if (v.Prefix or "")..string.lower(p) == string.lower(args[1]) then
86+
if (if type(v.Prefix) == "table" then v.Prefix[1] else v.Prefix or "")..string.lower(p) == string.lower(args[1]) then
8787
cmd, ind = v, i
8888
break
8989
end
@@ -107,7 +107,7 @@ return function(Vargs, env)
107107
Title = "Command Info";
108108
Icon = server.MatIcons.Info;
109109
Table = {
110-
{Text = `<b>Prefix:</b> {cmd.Prefix}`, Desc = "Prefix used to run the command"},
110+
{Text = `<b>Prefix:</b> {if type(cmd.Prefix) =="table" then table.concat(cmd.Prefix, ", ") else cmd.Prefix}`, Desc = "Prefix used to run the command"},
111111
{Text = `<b>Commands:</b> {SanitizeXML(table.concat(cmd.Commands, ", "))}`, Desc = "Valid default aliases for the command"},
112112
{Text = `<b>Arguments:</b> {if cmdArgs == "" then "-" else SanitizeXML(cmdArgs)}`, Desc = "Parameters taken by the command"},
113113
{Text = `<b>Admin Level:</b> {Admin.FormatCommandAdminLevel(cmd)}`, Desc = "Rank required to run the command"},
@@ -150,7 +150,7 @@ return function(Vargs, env)
150150
Description = "Shows you the command prefix using the :cmds command";
151151
AdminLevel = "Players";
152152
Function = function(plr: Player, args: {string})
153-
Functions.Hint(`{Settings.Prefix}cmds`, {plr})
153+
Functions.Hint(`{if type(Settings.Prefix) == "table" then Settings.Prefix[1] else Settings.Prefix}cmds`, {plr})
154154
end
155155
};
156156

@@ -567,46 +567,47 @@ return function(Vargs, env)
567567
Description = "Shows you how to use some syntax related things";
568568
AdminLevel = "Players";
569569
Function = function(plr: Player, args: {string})
570+
local Prefix = if type(Settings.Prefix) == "table" then Settings.Prefix[1] else Settings.Prefix
570571
local usage = {
571572
"";
572573
"Mouse over things in lists to expand them";
573574
"You can also resize windows by dragging the edges";
574575
"";
575-
`Put <b>/e</b> in front to silence commands in chat (<b>/e {Settings.Prefix}kill scel</b>) or enable chat command hiding in client settings`;
576+
`Put <b>/e</b> in front to silence commands in chat (<b>/e {Prefix}kill scel</b>) or enable chat command hiding in client settings`;
576577
`Player commands can be used by anyone, these commands have <b>{Settings.PlayerPrefix}</b> infront, such as <b>{Settings.PlayerPrefix}info</b> and <b>{Settings.PlayerPrefix}rejoin</b>`;
577578
"";
578579
`<b>――――― Player Selectors ―――――</b>`;
579-
`Usage example: <b>{Settings.Prefix}kill {Settings.SpecialPrefix}all</b> (where <b>{Settings.SpecialPrefix}all</b> is the selector)`;
580+
`Usage example: <b>{Prefix}kill {Settings.SpecialPrefix}all</b> (where <b>{Settings.SpecialPrefix}all</b> is the selector)`;
580581
`<b>{Settings.SpecialPrefix}me</b> - Yourself`;
581582
`<b>{Settings.SpecialPrefix}all</b> - Everyone in the server`;
582583
`<b>{Settings.SpecialPrefix}admins</b> - All admins in the server`;
583584
`<b>{Settings.SpecialPrefix}nonadmins</b> - Non-admins (normal players) in the server`;
584585
`<b>{Settings.SpecialPrefix}others</b> - Everyone except yourself`;
585586
`<b>{Settings.SpecialPrefix}random</b> - A random person in the server excluding those removed with -SELECTION`;
586-
`<b>@USERNAME</b> - Targets a specific player with that exact username Ex: <b>{Settings.Prefix}god @Sceleratis </b> would give a player with the username 'Sceleratis' god powers`;
587-
`<b>#NUM</b> - NUM random players in the server <b>{Settings.Prefix}ff #5</b> will ff 5 random players excluding those removed with -SELECTION.`;
587+
`<b>@USERNAME</b> - Targets a specific player with that exact username Ex: <b>{Prefix}god @Sceleratis </b> would give a player with the username 'Sceleratis' god powers`;
588+
`<b>#NUM</b> - NUM random players in the server <b>{Prefix}ff #5</b> will ff 5 random players excluding those removed with -SELECTION.`;
588589
`<b>{Settings.SpecialPrefix}friends</b> - Your friends who are in the server`;
589-
`<b>%TEAMNAME</b> - Members of the team TEAMNAME Ex: {Settings.Prefix}kill %raiders`;
590+
`<b>%TEAMNAME</b> - Members of the team TEAMNAME Ex: {Prefix}kill %raiders`;
590591
`<b>$GROUPID</b> - Members of the group with ID GROUPID (number in the Roblox group webpage URL)`;
591-
`<b>-SELECTION</b> - Inverts the selection, ie. will remove SELECTION from list of players to run command on. {Settings.Prefix}kill all,-%TEAM will kill everyone except players on TEAM`;
592-
`<b>+SELECTION</b> - Readds the selection, ie. will readd SELECTION from list of players to run command on. {Settings.Prefix}kill all,-%TEAM,+Lethalitics will kill everyone except players on TEAM but also Lethalitics`;
593-
`<b>radius-NUM</b> -- Anyone within a NUM-stud radius of you. {Settings.Prefix}ff radius-5 will ff anyone within a 5-stud radius of you.`;
592+
`<b>-SELECTION</b> - Inverts the selection, ie. will remove SELECTION from list of players to run command on. {Prefix}kill all,-%TEAM will kill everyone except players on TEAM`;
593+
`<b>+SELECTION</b> - Readds the selection, ie. will readd SELECTION from list of players to run command on. {Prefix}kill all,-%TEAM,+Lethalitics will kill everyone except players on TEAM but also Lethalitics`;
594+
`<b>radius-NUM</b> -- Anyone within a NUM-stud radius of you. {Prefix}ff radius-5 will ff anyone within a 5-stud radius of you.`;
594595
"";
595596
`<b>――――― Repetition ―――――</b>`;
596-
`Multiple player selections - <b>{Settings.Prefix}kill me,noob1,noob2,{Settings.SpecialPrefix}random,%raiders,$123456,{Settings.SpecialPrefix}nonadmins,-scel</b>`;
597-
`Multiple Commands at a time - <b>{Settings.Prefix}ff me {Settings.BatchKey} {Settings.Prefix}sparkles me {Settings.BatchKey} {Settings.Prefix}rocket jim</b>`;
598-
`You can add a delay if you want; <b>{Settings.Prefix}ff me {Settings.BatchKey} !wait 10 {Settings.BatchKey} {Settings.Prefix}m hi we waited 10 seconds</b>`;
599-
`<b>{Settings.Prefix}repeat 10(how many times to run the cmd) 1(how long in between runs) {Settings.Prefix}respawn jim</b>`;
597+
`Multiple player selections - <b>{Prefix}kill me,noob1,noob2,{Settings.SpecialPrefix}random,%raiders,$123456,{Settings.SpecialPrefix}nonadmins,-scel</b>`;
598+
`Multiple Commands at a time - <b>{Prefix}ff me {Settings.BatchKey} {Prefix}sparkles me {Settings.BatchKey} {Prefix}rocket jim</b>`;
599+
`You can add a delay if you want; <b>{Prefix}ff me {Settings.BatchKey} !wait 10 {Settings.BatchKey} {Prefix}m hi we waited 10 seconds</b>`;
600+
`<b>{Prefix}repeat 10(how many times to run the cmd) 1(how long in between runs) {Prefix}respawn jim</b>`;
600601
"";
601602
`<b>――――― Reference Info ―――――</b>`;
602-
`<b>{Settings.Prefix}cmds</b> for a list of available commands`;
603-
`<b>{Settings.Prefix}cmdinfo &lt;command&gt;</b> for detailed info about a specific command`;
603+
`<b>{Prefix}cmds</b> for a list of available commands`;
604+
`<b>{Prefix}cmdinfo &lt;command&gt;</b> for detailed info about a specific command`;
604605
`<b>{Settings.PlayerPrefix}brickcolors</b> for a list of BrickColors`;
605606
`<b>{Settings.PlayerPrefix}materials</b> for a list of materials`;
606607
"";
607-
`<b>{Settings.Prefix}capes</b> for a list of preset admin capes`;
608-
`<b>{Settings.Prefix}musiclist</b> for a list of preset audios`;
609-
`<b>{Settings.Prefix}insertlist</b> for a list of insertable assets using {Settings.Prefix}insert`;
608+
`<b>{Prefix}capes</b> for a list of preset admin capes`;
609+
`<b>{Prefix}musiclist</b> for a list of preset audios`;
610+
`<b>{Prefix}insertlist</b> for a list of insertable assets using {Prefix}insert`;
610611
}
611612
Remote.MakeGui(plr, "List", {
612613
Title = "Usage";
@@ -937,7 +938,7 @@ return function(Vargs, env)
937938
IsDonor = Admin.CheckDonor(v);
938939
GameData = gameData;
939940
IsServerOwner = v.UserId == game.PrivateServerOwnerId;
940-
CmdPrefix = Settings.Prefix;
941+
CmdPrefix = Functions.GetMainPrefix();
941942
CmdSplitKey = Settings.SplitKey;
942943
OnlineFriends = Remote.Get(v, "Function", "GetFriendsOnline");
943944
})
@@ -1018,7 +1019,7 @@ return function(Vargs, env)
10181019
ServerAge = service.FormatTime(os.time() - server.ServerStartTime);
10191020
ServerInternetInfo = serverInfo;
10201021
Refreshables = Logs.ListUpdaters.ServerDetails(plr);
1021-
CmdPrefix = Settings.Prefix;
1022+
CmdPrefix = if type(Settings.Prefix) == "table" then Settings.Prefix[1] else Settings.Prefix,
10221023
CmdPlayerPrefix = Settings.PlayerPrefix;
10231024
SplitKey = Settings.SplitKey;
10241025
})

0 commit comments

Comments
 (0)