Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a way to define cameras in settings #1777

Merged
merged 3 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Loader/Config/Settings.luau
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ settings.Aliases = {
[":examplealias <player> <fireColor>"] = ":ff <player> | :fling <player> | :fire <player> <fireColor>" --// Order arguments appear in alias string determines their required order in the command message when ran later
};

settings.Cameras = {
--[[
"Camera Name" would be the name of your camera
{
Name = "Camera Name";
Position = Vector3.new(0, 0, 0)
}
]]
}

settings.Banned = {} -- List of people banned from the game Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Muted = {} -- List of people muted (cannot send chat messages) Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Blacklist = {} -- List of people banned from running commands Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
Expand Down Expand Up @@ -406,6 +416,7 @@ descs.Creators = [[ Anyone to be identified as a place owner; Format: {"Username

descs.Permissions = [[ Command permissions; Format: {"Command:NewLevel";} ]]
descs.Aliases = [[ Command aliases; Format: {[":alias <arg1> <arg2> ..."] = ":command <arg1> <arg2> ..."} ]]
descs.Cameras = [[ Cameras; Format: {Name = "CamName", Position = Vector3.new(X, Y, Z)} ]]

descs.Commands = [[ Custom commands ]]
descs.Banned = [[ List of people banned from the game; Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID";} ]]
Expand Down Expand Up @@ -523,6 +534,7 @@ order = {
" ";
"Permissions";
"Aliases";
"Cameras";
" ";
"Commands";
"Banned";
Expand Down
15 changes: 15 additions & 0 deletions MainModule/Server/Core/Variables.luau
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ return function(Vargs, GetEnv)
Variables.ChatCreateRobloxCommands = Settings.ChatCreateRobloxCommands == nil and Variables.ChatCreateRobloxCommands or Settings.ChatCreateRobloxCommands
Variables.DisableRejoinAtMaxPlayers = Settings.DisableRejoinAtMaxPlayers or Variables.DisableRejoinAtMaxPlayers

for _, v in Settings.Cameras or {} do
local cam = service.New("Part", {
Parent = workspace;
Name = `Camera: {v.Name}`;
Position = v.Position;
Anchored = true;
CanCollide = false;
Locked = true;
Size = Vector3.new(1, 1, 1);
Transparency = 1;
})

table.insert(Variables.Cameras, {Brick = cam, Name = v.Name})
end

for _, v in Settings.MusicList or {} do table.insert(Variables.MusicList, v) end
for _, v in Settings.InsertList or {} do table.insert(Variables.InsertList, v) end
for _, v in Settings.CapeList or {} do table.insert(Variables.Capes, v) end
Expand Down
13 changes: 13 additions & 0 deletions MainModule/Server/Dependencies/DefaultSettings.luau
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ settings.Aliases = {
[":examplealias <player> <fireColor>"] = ":ff <player> | :fling <player> | :fire <player> <fireColor>" --// Order arguments appear in alias string determines their required order in the command message when ran later
};

--// Use the below table to define pre-set cameras
settings.Cameras = {
--[[
"Camera Name" would be the name of your camera
{
Name = "Camera Name";
Position = Vector3.new(0, 0, 0)
}
]]
}

settings.Banned = {} -- List of people banned from the game Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Muted = {} -- List of people muted (cannot send chat messages) Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Blacklist = {} -- List of people banned from running commands Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
Expand Down Expand Up @@ -407,6 +418,7 @@ descs.Creators = [[ Anyone to be identified as a place owner; Format: {"Username

descs.Permissions = [[ Command permissions; Format: {"Command:NewLevel";} ]]
descs.Aliases = [[ Command aliases; Format: {[":alias <arg1> <arg2> ..."] = ":command <arg1> <arg2> ..."} ]]
descs.Cameras = [[ Cameras; Format: {Name = "CamName", Position = Vector3.new(X, Y, Z)} ]]

descs.Commands = [[ Custom commands ]]
descs.Banned = [[ List of people banned from the game; Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID";} ]]
Expand Down Expand Up @@ -524,6 +536,7 @@ order = {
" ";
"Permissions";
"Aliases";
"Cameras";
" ";
"Commands";
"Banned";
Expand Down
Loading