From 8d1cb0ee6eeaf1b81274baca0170957e1563f707 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Thu, 26 Nov 2026 21:52:45 +0300 Subject: [PATCH 1/4] Re-add permission check to wgm Why it was commented at all --- lua/entities/gmod_wire_gpu/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_gpu/init.lua b/lua/entities/gmod_wire_gpu/init.lua index d2d7c6b4f9..b7023ea07d 100644 --- a/lua/entities/gmod_wire_gpu/init.lua +++ b/lua/entities/gmod_wire_gpu/init.lua @@ -393,7 +393,7 @@ concommand.Add("wgm", function(player, command, args) if not GPU:IsValid() then return end -- Must be a valid GPU, and belong to the caller --- if GPU.player ~= player then return end + if GPU.player ~= player then return end -- Write on membus local Address = tonumber(args[2]) or 0 From e508f406f2e06428885994e9f8271af8ee7fd1dc Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Thu, 26 Nov 2026 21:53:33 +0300 Subject: [PATCH 2/4] Fix check --- lua/entities/gmod_wire_gpu/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/entities/gmod_wire_gpu/init.lua b/lua/entities/gmod_wire_gpu/init.lua index b7023ea07d..da7f3ab13c 100644 --- a/lua/entities/gmod_wire_gpu/init.lua +++ b/lua/entities/gmod_wire_gpu/init.lua @@ -388,12 +388,11 @@ end -------------------------------------------------------------------------------- concommand.Add("wgm", function(player, command, args) -- Find the referenced GPU - local GPU = ents.GetByIndex(args[1]) - if not GPU then return end + local GPU = Entity(args[1]) if not GPU:IsValid() then return end -- Must be a valid GPU, and belong to the caller - if GPU.player ~= player then return end + if GPU:GetPlayer() ~= player then return end -- Write on membus local Address = tonumber(args[2]) or 0 From 02cd09a260c8469fc55e11ae540848db41901ca1 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Fri, 27 Nov 2026 01:00:42 +0300 Subject: [PATCH 3/4] Fix error --- lua/entities/gmod_wire_gpu/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_gpu/init.lua b/lua/entities/gmod_wire_gpu/init.lua index da7f3ab13c..f975b1cbeb 100644 --- a/lua/entities/gmod_wire_gpu/init.lua +++ b/lua/entities/gmod_wire_gpu/init.lua @@ -399,7 +399,7 @@ concommand.Add("wgm", function(player, command, args) local Value = tonumber(args[3]) or 0 -- Perform external write - if GPU.Inputs.MemBus.Src then + if GPU.Inputs and GPU.Inputs.MemBus.Src then GPU.Inputs.MemBus.Src:WriteCell(Address-65536,Value) end end) From c8487fa71693ae2e6d2d3383c8ebf0eb9b97ccd8 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Fri, 27 Nov 2026 01:01:27 +0300 Subject: [PATCH 4/4] Add class check --- lua/entities/gmod_wire_gpu/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/entities/gmod_wire_gpu/init.lua b/lua/entities/gmod_wire_gpu/init.lua index f975b1cbeb..a79640e385 100644 --- a/lua/entities/gmod_wire_gpu/init.lua +++ b/lua/entities/gmod_wire_gpu/init.lua @@ -389,7 +389,7 @@ end concommand.Add("wgm", function(player, command, args) -- Find the referenced GPU local GPU = Entity(args[1]) - if not GPU:IsValid() then return end + if not GPU:IsValid() or GPU:GetClass() ~= "gmod_wire_gpu" then return end -- Must be a valid GPU, and belong to the caller if GPU:GetPlayer() ~= player then return end @@ -399,7 +399,7 @@ concommand.Add("wgm", function(player, command, args) local Value = tonumber(args[3]) or 0 -- Perform external write - if GPU.Inputs and GPU.Inputs.MemBus.Src then + if GPU.Inputs.MemBus.Src then GPU.Inputs.MemBus.Src:WriteCell(Address-65536,Value) end end)