From 256c2b8ee043da29109e71126cd14160c6691f49 Mon Sep 17 00:00:00 2001 From: Bitl Date: Fri, 23 Sep 2022 14:42:41 -0700 Subject: [PATCH] script update --- changelog.txt | 4 ++ scripts/batch/clean_junk.bat | 1 + scripts/game/2012M/cores/BackpackBuilder.lua | 17 +++++ scripts/game/2012M/cores/BackpackResizer.lua | 67 ++++++++++++++++---- 4 files changed, 77 insertions(+), 12 deletions(-) diff --git a/changelog.txt b/changelog.txt index f0ddcc7..d5fa017 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +1.3 Snapshot v22.8300.22254.1 +Fixes: +- Fixed the Asset Fixer not processing some links correctly. +---------------------------------------------------------------------------- 1.3 Snapshot v22.8297.27455.1 Enhancements: - Added the ability to install Addon Scripts with the "Install Mod Package" feature. diff --git a/scripts/batch/clean_junk.bat b/scripts/batch/clean_junk.bat index 19e16fa..970021d 100644 --- a/scripts/batch/clean_junk.bat +++ b/scripts/batch/clean_junk.bat @@ -122,6 +122,7 @@ del /s /q Novetus\config\clients\GlobalSettings4_2007M.xml del /s /q Novetus\config\clients\GlobalSettings4_2007M-Shaders.xml del /s /q Novetus\config\clients\GlobalSettings7_2008M.xml del /s /q Novetus\config\clients\GlobalSettings_13_2012M.xml +del /s /q Novetus\config\clients\GlobalSettings_4_2009L.xml rmdir /s /q Novetus\maps\Custom rmdir /s /q Novetus\shareddata\assetcache diff --git a/scripts/game/2012M/cores/BackpackBuilder.lua b/scripts/game/2012M/cores/BackpackBuilder.lua index 1ba6880..e7efa0f 100644 --- a/scripts/game/2012M/cores/BackpackBuilder.lua +++ b/scripts/game/2012M/cores/BackpackBuilder.lua @@ -78,6 +78,23 @@ TempSlot.Parent = CurrentLoadout GearReference.RobloxLocked = true GearReference.Parent = TempSlot + local ToolTipLabel = Instance.new("TextLabel") + ToolTipLabel.Name = "ToolTipLabel" + ToolTipLabel.RobloxLocked = true + ToolTipLabel.Text = "" + ToolTipLabel.BackgroundTransparency = 0.5 + ToolTipLabel.BorderSizePixel = 0 + ToolTipLabel.Visible = false + ToolTipLabel.TextColor3 = Color3.new(1,1,1) + ToolTipLabel.BackgroundColor3 = Color3.new(0,0,0) + ToolTipLabel.TextStrokeTransparency = 0 + ToolTipLabel.Font = Enum.Font.ArialBold + ToolTipLabel.FontSize = Enum.FontSize.Size14 + --ToolTipLabel.TextWrap = true + ToolTipLabel.Size = UDim2.new(1,60,0,20) + ToolTipLabel.Position = UDim2.new(0,-30,0,-30) + ToolTipLabel.Parent = TempSlot + local Kill = Instance.new("BoolValue") Kill.Name = "Kill" Kill.RobloxLocked = true diff --git a/scripts/game/2012M/cores/BackpackResizer.lua b/scripts/game/2012M/cores/BackpackResizer.lua index 3b099a4..426fee0 100644 --- a/scripts/game/2012M/cores/BackpackResizer.lua +++ b/scripts/game/2012M/cores/BackpackResizer.lua @@ -4122,6 +4122,22 @@ function previewGear(button) end end +function findEmptySlot() + local smallestNum = nil + local loadout = currentLoadout:GetChildren() + for i = 1, #loadout do + if loadout[i]:IsA("Frame") and #loadout[i]:GetChildren() <= 0 then + local frameNum = tonumber(string.sub(loadout[i].Name,5)) + if frameNum == 0 then frameNum = 10 end + if not smallestNum or (smallestNum > frameNum) then + smallestNum = frameNum + end + end + end + if smallestNum == 10 then smallestNum = 0 end + return smallestNum +end + function checkForSwap(button,x,y) local loadoutChildren = currentLoadout:GetChildren() for i = 1, #loadoutChildren do @@ -4149,7 +4165,7 @@ function resizeGrid() if buttonClone.Image == "" then buttonClone.GearText.Text = v.Name end - --print("v =",v) + buttonClone.GearReference.Value = v buttonClone.Draggable = true buttons[v] = buttonClone @@ -4165,8 +4181,8 @@ function resizeGrid() beginPos = value end) buttonClone.DragStopped:connect(function(x,y) + buttonClone.ZIndex = 1 if beginPos ~= buttonClone.Position then - buttonClone.ZIndex = 1 if not checkForSwap(buttonClone,x,y) then buttonClone:TweenPosition(beginPos,Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true) buttonClone.Draggable = false @@ -4178,9 +4194,21 @@ function resizeGrid() end end end) - + local clickTime = tick() mouseEnterCons[buttonClone] = buttonClone.MouseEnter:connect(function() previewGear(buttonClone) end) - mouseClickCons[buttonClone] = buttonClone.MouseButton1Click:connect(function() buttonClick(buttonClone) end) + mouseClickCons[buttonClone] = buttonClone.MouseButton1Click:connect(function() + local newClickTime = tick() + if buttonClone.Active and (newClickTime - clickTime) < 0.5 then + local slot = findEmptySlot() + if slot then + buttonClone.ZIndex = 1 + swapGearSlot(slot,buttonClone) + end + else + buttonClick(buttonClone) + end + clickTime = newClickTime + end) end end end @@ -4273,12 +4301,12 @@ function spreadOutGear(loadoutChildren) end end -function openCloseBackpack() +function openCloseBackpack(close) if openCloseDebounce then return end openCloseDebounce = true - + local visible = not backpack.Visible - if visible then + if visible and not close then updateGridActive() local centerDialogSupported, msg = pcall(function() game.GuiService:AddCenterDialog(backpack, Enum.CenterDialogType.PlayerInitiatedDialog, function() @@ -4290,6 +4318,9 @@ function openCloseBackpack() end end spreadOutGear(loadoutChildren) + end, + function() + backpack.Visible = false end) end) backpackButton.Selected = true @@ -4338,7 +4369,7 @@ function loadoutCheck(child, selectState) if not child:IsA("ImageButton") then return end for k,v in pairs(backpackItems) do if buttons[v] then - if child:FindFirstChild("GearReference") then + if child:FindFirstChild("GearReference") and buttons[v]:FindFirstChild("GearReference") then if buttons[v].GearReference.Value == child.GearReference.Value then buttons[v].Active = selectState break @@ -4418,6 +4449,13 @@ end function activateBackpack() backpack.Visible = backpackOldStateVisible + loadoutChildren = currentLoadout:GetChildren() + for i = 1, #loadoutChildren do + if loadoutChildren[i]:IsA("Frame") then + loadoutChildren[i].BackgroundTransparency = 1 + end + end + backpackButtonClickCon = backpackButton.MouseButton1Click:connect(function() openCloseBackpack() end) guiServiceKeyPressCon = game:GetService("GuiService").KeyPressed:connect(function(key) if key == tilde or key == backquote then @@ -4431,6 +4469,7 @@ function deactivateBackpack() backpackOldStateVisible = backpack.Visible backpack.Visible = false + openCloseBackpack(true) end function setupCharacterConnections() @@ -4465,6 +4504,9 @@ function setupCharacterConnections() humanoidDiedCon = game.Players.LocalPlayer.Character.Humanoid.Died:connect(function() deactivateBackpack() end) activateBackpack() + + wait() + centerGear(currentLoadout:GetChildren()) end function removeCharacterConnections() @@ -4552,7 +4594,7 @@ function getGearContextMenu() gearContextMenuButton.Name = "UnequipContextMenuButton" gearContextMenuButton.Text = "" gearContextMenuButton.Style = Enum.ButtonStyle.RobloxButtonDefault - gearContextMenuButton.ZIndex = 4 + gearContextMenuButton.ZIndex = 8 gearContextMenuButton.Size = UDim2.new(1, 0, 1, -20) gearContextMenuButton.Visible = true gearContextMenuButton.Parent = gearContextMenu @@ -4585,7 +4627,7 @@ function getGearContextMenu() button.Size = UDim2.new(1, 8, 0, elementHeight) button.Position = UDim2.new(0,0,0,elementHeight * i) button.TextColor3 = Color3.new(1,1,1) - button.ZIndex = 4 + button.ZIndex = 9 button.Parent = gearContextMenuButton button.MouseButton1Click:connect(function() @@ -4628,7 +4670,7 @@ function getGearContextMenu() label.Position = UDim2.new(0.0, 0, 0, 0) label.Size = UDim2.new(0.5, 0, 1, 0) label.TextColor3 = Color3.new(1,1,1) - label.ZIndex = 4 + label.ZIndex = 9 label.Parent = frame element.Label1 = label @@ -4644,7 +4686,7 @@ function getGearContextMenu() label.Position = UDim2.new(0.5, 0, 0, 0) label.Size = UDim2.new(0.5, 0, 1, 0) label.TextColor3 = Color3.new(1,1,1) - label.ZIndex = 4 + label.ZIndex = 9 label.Parent = frame element.Label2 = label end @@ -4738,6 +4780,7 @@ for i = 1, #loadoutChildren do end end +pcall(function() closeButton.Modal = true end) closeButton.MouseButton1Click:connect(function() openCloseBackpack() end) searchButton.MouseButton1Click:connect(function() showSearchGear() end)