From 7df941194a56734dd705d8cd8c4452a16fb529c3 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 26 Apr 2026 13:39:02 +0300 Subject: [PATCH 1/2] Add `AdvDupe2_InitPastingQueue` hook A simple and useful hook that is mostly designed to log dupe spawns --- lua/advdupe2/sv_clipboard.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lua/advdupe2/sv_clipboard.lua b/lua/advdupe2/sv_clipboard.lua index 3400033..235f79a 100644 --- a/lua/advdupe2/sv_clipboard.lua +++ b/lua/advdupe2/sv_clipboard.lua @@ -1672,14 +1672,9 @@ function AdvDupe2.InitPastingQueue(Player, PositionOffset, AngleOffset, OrigPos, table.insert(Queue.SortedEntities, k) end - if (Player.AdvDupe2.Name) then - print( - "[AdvDupe2NotifyPaste]\t Player: " .. Player:Nick() .. " Pasted File, " .. Player.AdvDupe2.Name .. " with, " .. - #Queue.SortedEntities .. " Entities and " .. #Player.AdvDupe2.Constraints .. " Constraints.") - else - print("[AdvDupe2NotifyPaste]\t Player: " .. Player:Nick() .. " Pasted, " .. #Queue.SortedEntities .. - " Entities and " .. #Player.AdvDupe2.Constraints .. " Constraints.") - end + local dupename = Queue.Name and " Pasted File, " .. Queue.Name.Name .. " with, " or " Pasted, " + print("[AdvDupe2NotifyPaste]\t Player: " .. Player:Nick() .. dupename .. #Queue.SortedEntities .. " Entities and " .. #Queue.ConstraintList .. " Constraints.") + hook.Run("AdvDupe_InitPastingQueue", Player, Queue) Queue.Plus = #Queue.SortedEntities Queue.Percent = 1 / (#Queue.SortedEntities + #Queue.ConstraintList) From fa0da17be15e06ae8b4a61012f903d70aa2733e7 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sun, 26 Apr 2026 13:44:40 +0300 Subject: [PATCH 2/2] Fix typo --- lua/advdupe2/sv_clipboard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/advdupe2/sv_clipboard.lua b/lua/advdupe2/sv_clipboard.lua index 235f79a..93f2b7a 100644 --- a/lua/advdupe2/sv_clipboard.lua +++ b/lua/advdupe2/sv_clipboard.lua @@ -1672,7 +1672,7 @@ function AdvDupe2.InitPastingQueue(Player, PositionOffset, AngleOffset, OrigPos, table.insert(Queue.SortedEntities, k) end - local dupename = Queue.Name and " Pasted File, " .. Queue.Name.Name .. " with, " or " Pasted, " + local dupename = Queue.Name and " Pasted File, " .. Queue.Name .. " with, " or " Pasted, " print("[AdvDupe2NotifyPaste]\t Player: " .. Player:Nick() .. dupename .. #Queue.SortedEntities .. " Entities and " .. #Queue.ConstraintList .. " Constraints.") hook.Run("AdvDupe_InitPastingQueue", Player, Queue)