Skip to content

Commit 73b4533

Browse files
committed
Make the signer better and 2017 rcc testing
1 parent 1f27993 commit 73b4533

File tree

133 files changed

+27881
-9941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+27881
-9941
lines changed

RCCService2017/RCCService.exe

-1.09 MB
Binary file not shown.

RCCService2017/RCCService.exe.bak

-16.9 MB
Binary file not shown.

RCCService2017/content/scripts/CoreScripts/BubbleChat.lua renamed to RCCService2017/content/scripts/CoreScripts/CoreScripts/BubbleChat.lua

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ local function createMap()
133133
end
134134

135135
function this:Get(key)
136+
if not key then return end
136137
if not this.data[key] then
137138
this.data[key] = createCharacterChats()
138139
local emptiedCon = nil
@@ -334,7 +335,7 @@ local function createChatOutput()
334335
end
335336

336337
function this:CreateBillboardGuiHelper(instance, onlyCharacter)
337-
if not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then
338+
if instance and not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then
338339
if not onlyCharacter then
339340
if instance:IsA("Part") then
340341
-- Create a new billboardGui object attached to this player
@@ -516,43 +517,47 @@ local function createChatOutput()
516517
end
517518

518519
function this:CreateChatLineRender(instance, line, onlyCharacter, fifo)
520+
if not instance then return end
521+
519522
if not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then
520523
this:CreateBillboardGuiHelper(instance, onlyCharacter)
521524
end
522525

523526
local billboardGui = this.CharacterSortedMsg:Get(instance)["BillboardGui"]
524-
local chatBubbleRender = this.ChatBubbleWithTail[line.BubbleColor]:Clone()
525-
chatBubbleRender.Visible = false
526-
local bubbleText = this:CreateBubbleText(line.Message)
527+
if billboardGui then
528+
local chatBubbleRender = this.ChatBubbleWithTail[line.BubbleColor]:Clone()
529+
chatBubbleRender.Visible = false
530+
local bubbleText = this:CreateBubbleText(line.Message)
527531

528-
bubbleText.Parent = chatBubbleRender
529-
chatBubbleRender.Parent = billboardGui.BillboardFrame
532+
bubbleText.Parent = chatBubbleRender
533+
chatBubbleRender.Parent = billboardGui.BillboardFrame
530534

531-
line.RenderBubble = chatBubbleRender
535+
line.RenderBubble = chatBubbleRender
532536

533-
local currentTextBounds = TextService:GetTextSize(bubbleText.Text, CHAT_BUBBLE_FONT_SIZE_INT, CHAT_BUBBLE_FONT,
534-
Vector2.new(BILLBOARD_MAX_WIDTH, BILLBOARD_MAX_HEIGHT))
535-
local bubbleWidthScale = math.max((currentTextBounds.x + CHAT_BUBBLE_WIDTH_PADDING)/BILLBOARD_MAX_WIDTH, 0.1)
536-
local numOflines = (currentTextBounds.y/CHAT_BUBBLE_FONT_SIZE_INT)
537+
local currentTextBounds = TextService:GetTextSize(bubbleText.Text, CHAT_BUBBLE_FONT_SIZE_INT, CHAT_BUBBLE_FONT,
538+
Vector2.new(BILLBOARD_MAX_WIDTH, BILLBOARD_MAX_HEIGHT))
539+
local bubbleWidthScale = math.max((currentTextBounds.x + CHAT_BUBBLE_WIDTH_PADDING)/BILLBOARD_MAX_WIDTH, 0.1)
540+
local numOflines = (currentTextBounds.y/CHAT_BUBBLE_FONT_SIZE_INT)
537541

538-
-- prep chat bubble for tween
539-
chatBubbleRender.Size = UDim2.new(0,0,0,0)
540-
chatBubbleRender.Position = UDim2.new(0.5,0,1,0)
542+
-- prep chat bubble for tween
543+
chatBubbleRender.Size = UDim2.new(0,0,0,0)
544+
chatBubbleRender.Position = UDim2.new(0.5,0,1,0)
541545

542-
local newChatBubbleOffsetSizeY = numOflines * CHAT_BUBBLE_LINE_HEIGHT
546+
local newChatBubbleOffsetSizeY = numOflines * CHAT_BUBBLE_LINE_HEIGHT
543547

544-
chatBubbleRender:TweenSizeAndPosition(UDim2.new(bubbleWidthScale, 0, 0, newChatBubbleOffsetSizeY),
545-
UDim2.new( (1-bubbleWidthScale)/2, 0, 1, -newChatBubbleOffsetSizeY),
546-
Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true,
547-
function() bubbleText.Visible = true end)
548+
chatBubbleRender:TweenSizeAndPosition(UDim2.new(bubbleWidthScale, 0, 0, newChatBubbleOffsetSizeY),
549+
UDim2.new( (1-bubbleWidthScale)/2, 0, 1, -newChatBubbleOffsetSizeY),
550+
Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true,
551+
function() bubbleText.Visible = true end)
548552

549-
-- todo: remove when over max bubbles
550-
this:SetBillboardGuiLOD(billboardGui, line.Origin)
551-
this:UpdateChatLinesForOrigin(line.Origin, -newChatBubbleOffsetSizeY)
553+
-- todo: remove when over max bubbles
554+
this:SetBillboardGuiLOD(billboardGui, line.Origin)
555+
this:UpdateChatLinesForOrigin(line.Origin, -newChatBubbleOffsetSizeY)
552556

553-
delay(line.BubbleDieDelay, function()
554-
this:DestroyBubble(fifo, chatBubbleRender)
555-
end)
557+
delay(line.BubbleDieDelay, function()
558+
this:DestroyBubble(fifo, chatBubbleRender)
559+
end)
560+
end
556561
end
557562

558563
local testLabel = Instance.new('TextLabel')
@@ -591,18 +596,15 @@ local function createChatOutput()
591596

592597
local line = createPlayerChatLine(chatType, sourcePlayer, safeMessage, not fromOthers)
593598

594-
local fifo = this.CharacterSortedMsg:Get(line.Origin).Fifo
595-
fifo:PushBack(line)
596-
597-
if sourcePlayer then
599+
if sourcePlayer and line.Origin then
600+
local fifo = this.CharacterSortedMsg:Get(line.Origin).Fifo
601+
fifo:PushBack(line)
598602
--Game chat (badges) won't show up here
599603
this:CreateChatLineRender(sourcePlayer.Character, line, true, fifo)
600604
end
601605
end
602606

603607
function this:OnGameChatMessage(origin, message, color)
604-
if not this:BubbleChatEnabled() then return end
605-
606608
local localPlayer = PlayersService.LocalPlayer
607609
local fromOthers = localPlayer ~= nil and (localPlayer.Character ~= origin)
608610

@@ -654,4 +656,4 @@ local success = pcall(function() isClient = game:GetService("RunService"):IsClie
654656
-- init only if we have a simulation going
655657
if isClient or not success then
656658
createChatOutput()
657-
end
659+
end

RCCService2017/content/scripts/CoreScripts/ContextActionTouch.lua renamed to RCCService2017/content/scripts/CoreScripts/CoreScripts/ContextActionTouch.lua

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
-- Variables
77
local contextActionService = game:GetService("ContextActionService")
88
local userInputService = game:GetService("UserInputService")
9+
local playersService = game:GetService("Players")
910
local isTouchDevice = userInputService.TouchEnabled
1011
local functionTable = {}
1112
local buttonVector = {}
1213
local buttonScreenGui = nil
1314
local buttonFrame = nil
1415

15-
local ContextDownImage = "http://www.roblox.com/asset/?id=97166756"
16-
local ContextUpImage = "http://www.roblox.com/asset/?id=97166444"
16+
local ContextDownImage = "https://www.roblox.com/asset/?id=97166756"
17+
local ContextUpImage = "https://www.roblox.com/asset/?id=97166444"
1718

1819
local oldTouches = {}
1920

@@ -32,9 +33,11 @@ local maxButtons = #buttonPositionTable
3233
game:GetService("ContentProvider"):Preload(ContextDownImage)
3334
game:GetService("ContentProvider"):Preload(ContextUpImage)
3435

35-
repeat wait() until game:GetService("Players").LocalPlayer
36-
37-
local localPlayer = game:GetService("Players").LocalPlayer
36+
local localPlayer = playersService.LocalPlayer
37+
while not localPlayer do
38+
playersService.ChildAdded:wait()
39+
localPlayer = playersService.LocalPlayer
40+
end
3841

3942
function createContextActionGui()
4043
if not buttonScreenGui and isTouchDevice then
@@ -103,10 +106,10 @@ function createNewButton(actionName, functionInfoTable)
103106
local contextButton = Instance.new("ImageButton")
104107
contextButton.Name = "ContextActionButton"
105108
contextButton.BackgroundTransparency = 1
106-
contextButton.Size = UDim2.new(0,90,0,90)
109+
contextButton.Size = UDim2.new(0,45,0,45)
107110
contextButton.Active = true
108111
if isSmallScreenDevice() then
109-
contextButton.Size = UDim2.new(0,70,0,70)
112+
contextButton.Size = UDim2.new(0,35,0,35)
110113
end
111114
contextButton.Image = ContextUpImage
112115
contextButton.Parent = buttonFrame
@@ -194,6 +197,9 @@ function createButton( actionName, functionInfoTable )
194197

195198
if buttonScreenGui and buttonScreenGui.Parent == nil then
196199
buttonScreenGui.Parent = localPlayer.PlayerGui
200+
if not buttonFrame.Parent then
201+
buttonFrame.Parent = buttonScreenGui
202+
end
197203
end
198204
end
199205

RCCService2017/content/scripts/CoreScripts/GamepadMenu.lua renamed to RCCService2017/content/scripts/CoreScripts/CoreScripts/GamepadMenu.lua

Lines changed: 75 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,6 @@ local isTenFootInterface = tenFootInterface:IsEnabled()
2828
local radialButtons = {}
2929
local lastInputChangedCon = nil
3030

31-
local function getButtonForCoreGuiType(coreGuiType)
32-
if coreGuiType == Enum.CoreGuiType.All then
33-
return radialButtons
34-
else
35-
for button, table in pairs(radialButtons) do
36-
if table["CoreGuiType"] == coreGuiType then
37-
return button
38-
end
39-
end
40-
end
41-
42-
return nil
43-
end
44-
4531
local function getImagesForSlot(slot)
4632
if slot == 1 then return "rbxasset://textures/ui/Settings/Radial/Top.png", "rbxasset://textures/ui/Settings/Radial/TopSelected.png",
4733
"rbxasset://textures/ui/Settings/Radial/Menu.png",
@@ -111,6 +97,26 @@ local function setButtonEnabled(button, enabled)
11197
radialButtons[button]["Disabled"] = not enabled
11298
end
11399

100+
local function setButtonVisible(button, visible)
101+
button.Visible = visible
102+
if not visible then
103+
setButtonEnabled(button, false)
104+
end
105+
end
106+
107+
local function enableVR()
108+
local visibleButtons = {
109+
Settings = true, LeaveGame = true,
110+
PlayerList = false, Notifications = false,
111+
Backpack = false, Chat = false
112+
}
113+
for button, _ in pairs(radialButtons) do
114+
if visibleButtons[button.Name] ~= nil then
115+
setButtonVisible(button, visibleButtons[button.Name])
116+
end
117+
end
118+
end
119+
114120
local emptySelectedImageObject = utility:Create'ImageLabel'
115121
{
116122
BackgroundTransparency = 1,
@@ -173,7 +179,7 @@ local function createRadialButton(name, text, slot, disabled, coreGuiType, activ
173179
TextColor3 = Color3.new(1,1,1),
174180
Name = "RadialLabel",
175181
Visible = false,
176-
ZIndex = 2,
182+
ZIndex = 3,
177183
Parent = radialButton
178184
};
179185
if not smallScreen then
@@ -297,7 +303,7 @@ local function createGamepadMenuGui()
297303
------------ Chat ---------------
298304
local chatFunc = function()
299305
toggleCoreGuiRadial()
300-
local ChatModule = require(GuiRoot.Modules.Chat)
306+
local ChatModule = require(GuiRoot.Modules.ChatSelector)
301307
ChatModule:ToggleVisibility()
302308
end
303309
local chatRadial = createRadialButton("Chat", "Chat", 6, not StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Chat), Enum.CoreGuiType.Chat, chatFunc)
@@ -380,6 +386,10 @@ local function createGamepadMenuGui()
380386
end
381387
end
382388
end)
389+
390+
if InputService.VREnabled then
391+
enableVR()
392+
end
383393
end
384394

385395
local function isCoreGuiDisabled()
@@ -523,14 +533,16 @@ local function setupGamepadControls()
523533
end
524534
end
525535

526-
function setOverrideMouseIconBehavior()
527-
pcall(function()
536+
function setOverrideMouseIconBehavior(override)
537+
if override then
528538
if InputService:GetLastInputType() == Enum.UserInputType.Gamepad1 then
529539
InputService.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.ForceHide
530540
else
531541
InputService.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.ForceShow
532542
end
533-
end)
543+
else
544+
InputService.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.None
545+
end
534546
end
535547

536548
function toggleCoreGuiRadial(goingToSettings)
@@ -539,8 +551,8 @@ local function setupGamepadControls()
539551
setVisibility()
540552

541553
if isVisible then
542-
setOverrideMouseIconBehavior()
543-
pcall(function() lastInputChangedCon = InputService.LastInputTypeChanged:connect(setOverrideMouseIconBehavior) end)
554+
setOverrideMouseIconBehavior(true)
555+
lastInputChangedCon = InputService.LastInputTypeChanged:connect(function() setOverrideMouseIconBehavior(true) end)
544556

545557
gamepadSettingsFrame.Visible = isVisible
546558

@@ -560,8 +572,7 @@ local function setupGamepadControls()
560572
lastInputChangedCon:disconnect()
561573
lastInputChangedCon = nil
562574
end
563-
pcall(function() InputService.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.None end)
564-
575+
565576
local settingsChildren = gamepadSettingsFrame:GetChildren()
566577
for i = 1, #settingsChildren do
567578
if settingsChildren[i]:IsA("GuiButton") then
@@ -571,6 +582,9 @@ local function setupGamepadControls()
571582
gamepadSettingsFrame:TweenSizeAndPosition(UDim2.new(0,102,0,102), UDim2.new(0.5,-51,0.5,-51),
572583
Enum.EasingDirection.Out, Enum.EasingStyle.Sine, 0.1, true,
573584
function()
585+
if not InputService.VREnabled then
586+
setOverrideMouseIconBehavior(false)
587+
end
574588
if not goingToSettings and not isVisible then GuiService:SetMenuIsOpen(false) end
575589
gamepadSettingsFrame.Visible = isVisible
576590
end)
@@ -601,9 +615,11 @@ local function setupGamepadControls()
601615

602616
doGamepadMenuButton = function(name, state, input)
603617
if state ~= Enum.UserInputState.Begin then return end
604-
605-
if not toggleCoreGuiRadial() then
606-
unbindAllRadialActions()
618+
619+
if game.IsLoaded then
620+
if not toggleCoreGuiRadial() then
621+
unbindAllRadialActions()
622+
end
607623
end
608624
end
609625

@@ -617,35 +633,47 @@ local function setupGamepadControls()
617633
end)
618634
end
619635

636+
-- some buttons always show/hide depending on platform
637+
local function canChangeButtonVisibleState(buttonType)
638+
if isTenFootInterface then
639+
if buttonType == Enum.CoreGuiType.Chat or buttonType == Enum.CoreGuiType.PlayerList then
640+
return false
641+
end
642+
end
643+
644+
return true
645+
end
646+
620647
local function setRadialButtonEnabled(coreGuiType, enabled)
621-
local returnValue = getButtonForCoreGuiType(coreGuiType)
622-
if not returnValue then return end
623-
624-
local buttonsToDisable = {}
625-
if type(returnValue) == "table" then
626-
for button, buttonTable in pairs(returnValue) do
627-
if buttonTable["CoreGuiType"] then
628-
if isTenFootInterface and buttonTable["CoreGuiType"] == Enum.CoreGuiType.Chat then
629-
else
630-
buttonsToDisable[#buttonsToDisable + 1] = button
648+
for button, buttonTable in pairs(radialButtons) do
649+
local buttonType = buttonTable["CoreGuiType"]
650+
if buttonType then
651+
if coreGuiType == buttonType or coreGuiType == Enum.CoreGuiType.All then
652+
if canChangeButtonVisibleState(buttonType) then
653+
setButtonEnabled(button, enabled)
631654
end
632655
end
633656
end
634-
else
635-
if isTenFootInterface and returnValue.Name == "Chat" then
636-
else
637-
buttonsToDisable[1] = returnValue
638-
end
639657
end
640-
641-
for i = 1, #buttonsToDisable do
642-
local button = buttonsToDisable[i]
643-
setButtonEnabled(button, enabled)
658+
end
659+
660+
local loadedConnection
661+
local function enableRadialMenu()
662+
ContextActionService:BindCoreAction(toggleMenuActionName, doGamepadMenuButton, false, Enum.KeyCode.ButtonStart)
663+
loadedConnection:disconnect()
664+
end
665+
666+
loadedConnection = game.Players.PlayerAdded:connect(function(plr)
667+
if game.Players.LocalPlayer and plr == game.Players.LocalPlayer then
668+
enableRadialMenu()
644669
end
670+
end)
671+
672+
if game.Players.LocalPlayer then
673+
enableRadialMenu()
645674
end
675+
646676
StarterGui.CoreGuiChangedSignal:connect(setRadialButtonEnabled)
647-
648-
ContextActionService:BindCoreAction(toggleMenuActionName, doGamepadMenuButton, false, Enum.KeyCode.ButtonStart)
649677
end
650678

651679
-- hook up gamepad stuff

RCCService2017/content/scripts/CoreScripts/HealthScript.lua renamed to RCCService2017/content/scripts/CoreScripts/CoreScripts/HealthScript.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ local characterAddedConnection = nil
3737
local greenBarImage = "rbxasset://textures/ui/Health-BKG-Center.png"
3838
local greenBarImageLeft = "rbxasset://textures/ui/Health-BKG-Left-Cap.png"
3939
local greenBarImageRight = "rbxasset://textures/ui/Health-BKG-Right-Cap.png"
40-
local hurtOverlayImage = "http://www.roblox.com/asset/?id=34854607"
40+
local hurtOverlayImage = "https://www.roblox.com/asset/?id=34854607"
4141

4242
game:GetService("ContentProvider"):Preload(greenBarImage)
4343
game:GetService("ContentProvider"):Preload(hurtOverlayImage)

0 commit comments

Comments
 (0)