Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceleratis authored Dec 11, 2021
2 parents 1431179 + 66ce813 commit 5feb0f3
Show file tree
Hide file tree
Showing 29 changed files with 1,634 additions and 476 deletions.
21 changes: 15 additions & 6 deletions MainModule/Client/Client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ return service.NewProxy({
log("Begin init");

local remoteName,depsName = string.match(data.Name, "(.*)\\(.*)")
Folder = service.Wrap(data.Folder or folder and folder:Clone() or Folder)
Folder = service.Wrap(data.Folder --[[or folder and folder:Clone()]] or Folder)

setfenv(1,setmetatable({}, {__metatable = unique}))
client.Folder = Folder;
Expand All @@ -458,11 +458,20 @@ return service.NewProxy({
client.LoadingTime = data.LoadingTime
client.RemoteName = remoteName

client.MatIcons = setmetatable({}, {
__index = function(t, k)
return "rbxassetid://"..require(client.Shared.MatIcons)[k]
end,
})
client.Changelog = oldReq(service_UnWrap(client.Shared.Changelog))
do
local MaterialIcons = oldReq(service_UnWrap(client.Shared.MatIcons))
client.MatIcons = setmetatable({}, {
__index = function(self, ind)
local materialIcon = MaterialIcons[ind]
if materialIcon then
self[ind] = string.format("rbxassetid://%d", materialIcon)
return self[ind]
end
end,
__metatable = "Adonis"
})
end

--// Toss deps into a table so we don't need to directly deal with the Folder instance they're in
log("Get dependencies")
Expand Down
3 changes: 2 additions & 1 deletion MainModule/Client/Core/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Routine = nil
GetEnv = nil
origEnv = nil
logError = nil
log = nil

--// Core
return function()
Expand Down Expand Up @@ -106,7 +107,7 @@ return function()
client.Core = {
Init = Init;
RunLast = RunLast;
RunAfterLoaded = RunAfterLoaded;
--RunAfterLoaded = RunAfterLoaded;
RunAfterPlugins = RunAfterPlugins;
Name = script.Name;
Special = script.Name;
Expand Down
2 changes: 1 addition & 1 deletion MainModule/Client/Core/Functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ return function()
local keyVal = tonumber(keyVal);
if keyVal then
for i,e in ipairs(Enum.KeyCode:GetEnumItems()) do
if e.Value == tonumber(keyVal) then
if e.Value == keyVal then
return e.Name;
end
end
Expand Down
1 change: 1 addition & 0 deletions MainModule/Client/Core/Process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Routine = nil
GetEnv = nil
origEnv = nil
logError = nil
log = nil

--// Processing
return function()
Expand Down
1 change: 1 addition & 0 deletions MainModule/Client/Core/Remote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Routine = nil
GetEnv = nil
origEnv = nil
logError = nil
log = nil

--// Remote
return function()
Expand Down
1 change: 1 addition & 0 deletions MainModule/Client/Core/Variables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ return function()
savedUI = {};
localSounds = {};
ESPObjects = {};
CommunicationsHistory = {};
LightingSettings = {
Ambient = service.Lighting.Ambient;
Brightness = service.Lighting.Brightness;
Expand Down
150 changes: 150 additions & 0 deletions MainModule/Client/UI/Default/CommsCentre.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@

client = nil
service = nil

return function(data)
local gTable, window, commslog, layout;
local messageObjs = {};

local function newMessage(Type, Title, Message, Icon, Time, Function)
print(Icon)

local newMsg = commslog:Add("Frame", {
Size = UDim2.new(1, 0, 0, 50);
BackgroundTransparency = 1;
AutomaticSize = "Y";
Children = {
{ClassName = "Frame";
Name = "LoggedItem";
Size = UDim2.new(1, -10, 1, -10);
Position = UDim2.new(0, 5, 0, 5);
BackgroundTransparency = 0.5;
AutomaticSize = "Y";
Children = {
{ClassName = "ImageButton";
Name = "Icon";
Size = UDim2.new(0, 48, 0, 48);
Position = UDim2.new(0, 1, 0, 1);
Image = Icon;
OnClick = Function;
BackgroundTransparency = 1;
};

{ClassName = "TextButton";
Name = "Title";
Size = UDim2.new(1, -55, 0, 15);
Position = UDim2.new(0, 55, 0, 0);
Text = Title;
TextSize = "14";
TextXAlignment = "Left";
BackgroundTransparency = 1;
OnClick = Function;
};

{ClassName = "TextButton";
Name = "Type";
Size = UDim2.new(1, -55, 0, 15);
Position = UDim2.new(0, 55, 0, 0);
Text = Type;
TextSize = "14";
TextXAlignment = "Right";
BackgroundTransparency = 1;
OnClick = Function;
};

{ClassName = "TextButton";
Name = "Time";
Size = UDim2.new(1, -55, 0, 15);
Position = UDim2.new(0, 55, 0, 15);
Text = Time;
TextSize = "14";
TextXAlignment = "Right";
BackgroundTransparency = 1;
OnClick = Function;
};

{ClassName = "TextButton";
Name = "Function";
Size = UDim2.new(1, -55, 0, 15);
Position = UDim2.new(0, 55, 0, 30);
Text = Function and "Clickable" or "Not clickable";
TextSize = "14";
TextXAlignment = "Right";
BackgroundTransparency = 1;
OnClick = Function;
};

{ClassName = "TextButton";
Name = "Message";
Size = UDim2.new(1, -55, 0, 10);
Position = UDim2.new(0, 55, 0, 15);
Text = Message;
TextXAlignment = "Left";
TextYAlignment = "Top";
AutomaticSize = "Y";
TextWrapped = true;
TextScaled = false;
RichText = true;
BackgroundTransparency = 1;
OnClick = Function;
};
}
}
}
})

table.insert(messageObjs, newMsg);

if #messageObjs > 200 then
messageObjs[1]:Destroy();
table.remove(messageObjs, 1);
end
end

local result, code = pcall(function()
service.LocalizationService:GetCountryRegionForPlayerAsync(game.Players.LocalPlayer)
end)

window = client.UI.Make("Window",{
Name = "CommunicationsCentre";
Title = (result and code == "US") and "Communications Center" or "Communications Centre";
Icon = client.MatIcons.Forum;
Size = {500,300};
OnClose = function()
client.Variables.CommsCentreBindableEvent = nil;
end;
})

commslog = window:Add("ScrollingFrame",{
Size = UDim2.new(1, 0, 1, 0);
Position = UDim2.new(0, 0, 0, 0);
CanvasSize = UDim2.new(0, 0, 0, 0);
BackgroundTransparency = 0.9;
})

layout = service.New("UIListLayout", {
Parent = commslog;
FillDirection = "Vertical";
HorizontalAlignment = "Left";
VerticalAlignment = "Bottom";
SortOrder = "LayoutOrder";
})

layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
commslog.CanvasSize = UDim2.new(0, 0, 0, layout.AbsoluteContentSize.Y)
commslog.CanvasPosition = Vector2.new(0, layout.AbsoluteContentSize.Y)
end)

if client.Variables.CommunicationsHistory then
for i,v in ipairs(client.Variables.CommunicationsHistory) do
newMessage(v.Type, v.Title, v.Message, v.Icon, v.Time, v.Function);
end
end

service.HookEvent('CommsCentre', function(v)
newMessage(v.Type, v.Title, v.Message, v.Icon, v.Time, v.Function)
end)

gTable = window.gTable
window:Ready();
end
14 changes: 13 additions & 1 deletion MainModule/Client/UI/Default/Hint.rbxmx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ return function(data)
local str = data.Message
local time = data.Time or 15

local log = {
Type = "Hint";
Title = "Hint";
Message = str;
Icon = "rbxassetid://7501175708";
Time = os.date("%X");
Function = nil;
}

table.insert(client.Variables.CommunicationsHistory, log)
service.Events.CommsCentre:fire(log)

--client.UI.Make("HintHolder")
local container = client.UI.Get("HintHolder",nil,true)
if not container then
Expand Down Expand Up @@ -321,4 +333,4 @@ end]]></ProtectedString>
</Item>
</Item>
</Item>
</roblox>
</roblox>
12 changes: 12 additions & 0 deletions MainModule/Client/UI/Default/Message.rbxmx
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,18 @@ return function(data)
msg.TextStrokeTransparency = 1
frame.BackgroundTransparency = 1

local log = {
Type = "Full Screen Message";
Title = title;
Message = message;
Icon = "rbxassetid://7501175708";
Time = os.date("%X");
Function = nil;
}

table.insert(client.Variables.CommunicationsHistory, log)
service.Events.CommsCentre:fire(log)


local blur = service.New("BlurEffect")
blur.Enabled = false
Expand Down
15 changes: 14 additions & 1 deletion MainModule/Client/UI/Default/Notif.rbxmx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ return function(data)

client.UI.Remove("Notif",script.Parent.Parent)

local log = {
Type = "Notif";
Title = "Notif";
Message = str;
Icon = "rbxassetid://7501175708";
Time = os.date("%X");
Function = nil;
}

table.insert(client.Variables.CommunicationsHistory, log)
service.Events.CommsCentre:fire(log)


if str and type(str)=="string" then
label.Text = str
label.Position = UDim2.new(0, 0, 0, ((topbar and 40) or 0) - 35)
Expand Down Expand Up @@ -156,4 +169,4 @@ end]]></ProtectedString>
</Properties>
</Item>
</Item>
</roblox>
</roblox>
Loading

0 comments on commit 5feb0f3

Please sign in to comment.