From 07ed8872bd3d12cb27fb056b9f4c42dd317d102b Mon Sep 17 00:00:00 2001 From: StrawWagen <64710817+StrawWagen@users.noreply.github.com> Date: Sun, 15 Feb 2026 00:14:45 -0700 Subject: [PATCH 1/3] Disable fusion admin room + new helper --- lua/map_scripts/maps/gm_darkfusion.lua | 24 ++++++++++++++++ .../maps/gm_vacant_industry_revamped.lua | 19 ++----------- lua/map_scripts/utils.lua | 28 +++++++++++++++++++ 3 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 lua/map_scripts/maps/gm_darkfusion.lua diff --git a/lua/map_scripts/maps/gm_darkfusion.lua b/lua/map_scripts/maps/gm_darkfusion.lua new file mode 100644 index 0000000..50918a1 --- /dev/null +++ b/lua/map_scripts/maps/gm_darkfusion.lua @@ -0,0 +1,24 @@ +local entIDs = { + 6609, -- sound precaching button + 6084, -- cheese dark fusion fuel cells + 6281, -- cheese stasis charges + 4145, -- 1 reactor tps + 4557, -- 2 reactor tps + 5630, -- cleanup debris now + 4050, -- superfast debris cleanup + 5207, -- disable debris cleanup + 5501, -- DISABLE light flickering + 1899, -- Enable infinite fall in core chamber + 4174, -- Disable core disintegration hitbox NOW + 6025, -- actually kill players upon Destruction + 4593, -- DISABLE logic clock + 5203, -- spawn stasis cells RIGHT NOW RIGHT HERE + 6130, -- do something weird with the sound + 4288, -- color correction, clear + 5192, -- color correction, Pre Explosion + 5192, -- color correction, Dark Energy Limbo +} + +hook.Add( "CFC_MapScripts_PostMapEntsSpawn", "CFC_MapScripts_darkfusion_removeadminbuttons", function() + MapScripts.Utils.RemoveButtonsByID( entIDs ) +end ) \ No newline at end of file diff --git a/lua/map_scripts/maps/gm_vacant_industry_revamped.lua b/lua/map_scripts/maps/gm_vacant_industry_revamped.lua index 6f6aced..b08336f 100644 --- a/lua/map_scripts/maps/gm_vacant_industry_revamped.lua +++ b/lua/map_scripts/maps/gm_vacant_industry_revamped.lua @@ -1,4 +1,4 @@ -local entIds = { +local entIDs = { 2725, -- color correction 2716, -- high quality snowfall 2729, -- toggle skybox @@ -10,21 +10,6 @@ local entIds = { 2718, -- fast } -local buttonClass = "func_button" - hook.Add( "CFC_MapScripts_PostMapEntsSpawn", "CFC_MapScripts_vacant_removeadminbuttons", function() - local removedEnts = 0 - for _, entId in ipairs( entIds ) do - local ent = ents.GetMapCreatedEntity( entId ) - if not IsValid( ent ) then - ErrorNoHaltWithStack( "Admin button removal: Couldn't find map ent " .. entId ) - continue - end - if ent:GetClass() ~= buttonClass then - ErrorNoHaltWithStack( "Admin button removal: Map entity " .. entId .. " is not a button!" ) - continue - end - removedEnts = removedEnts + 1 - SafeRemoveEntity( ent ) - end + MapScripts.Utils.RemoveButtonsByID( entIDs ) end ) diff --git a/lua/map_scripts/utils.lua b/lua/map_scripts/utils.lua index 8aaef60..b2451bb 100644 --- a/lua/map_scripts/utils.lua +++ b/lua/map_scripts/utils.lua @@ -27,3 +27,31 @@ function Utils.DisableShadowControl() shadowControl:Fire( "SetShadowsDisabled", 1 ) end end + +local buttonClasses = { + ["func_button"] = true, + ["func_rot_button"] = true, +} + +--- Removes func_button entities by their entity IDs +--- @param ids table List of entity IDs to remove +--- @return number Number of entities successfully removed +function Utils.RemoveButtonsByID( ids ) + local removedEnts = 0 + + for _, entID in ipairs( ids ) do + local ent = ents.GetMapCreatedEntity( entID ) + if not IsValid( ent ) then + ErrorNoHaltWithStack( "Admin button removal: Couldn't find map ent " .. entID ) + continue + end + if not buttonClasses[ent:GetClass()] then + ErrorNoHaltWithStack( "Admin button removal: Map entity " .. entID .. " is not a button!" ) + continue + end + removedEnts = removedEnts + 1 + SafeRemoveEntity( ent ) + end + + return removedEnts +end \ No newline at end of file From 9e527997a299221ea30a68e78182118e334444b6 Mon Sep 17 00:00:00 2001 From: StrawWagen <64710817+StrawWagen@users.noreply.github.com> Date: Sun, 15 Feb 2026 00:20:44 -0700 Subject: [PATCH 2/3] Missed buttons! --- lua/map_scripts/maps/gm_darkfusion.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/map_scripts/maps/gm_darkfusion.lua b/lua/map_scripts/maps/gm_darkfusion.lua index 50918a1..eea24f9 100644 --- a/lua/map_scripts/maps/gm_darkfusion.lua +++ b/lua/map_scripts/maps/gm_darkfusion.lua @@ -1,6 +1,6 @@ local entIDs = { 6609, -- sound precaching button - 6084, -- cheese dark fusion fuel cells + 6084, -- cheese dark fusion fuel cells 6281, -- cheese stasis charges 4145, -- 1 reactor tps 4557, -- 2 reactor tps @@ -14,9 +14,12 @@ local entIDs = { 4593, -- DISABLE logic clock 5203, -- spawn stasis cells RIGHT NOW RIGHT HERE 6130, -- do something weird with the sound + 4985, -- FORCE STASIS FAILURE (toggle) + 5460, -- force toggle particle enrichment + 4061, -- force toggle ALL lights in case of messed up flickering 4288, -- color correction, clear 5192, -- color correction, Pre Explosion - 5192, -- color correction, Dark Energy Limbo + 5959, -- color correction, Dark Energy Limbo } hook.Add( "CFC_MapScripts_PostMapEntsSpawn", "CFC_MapScripts_darkfusion_removeadminbuttons", function() From 17f005c6892a0f9b8ee87578d130f4632298fdbc Mon Sep 17 00:00:00 2001 From: StrawWagen <64710817+StrawWagen@users.noreply.github.com> Date: Sun, 15 Feb 2026 00:22:55 -0700 Subject: [PATCH 3/3] More missed buttons --- lua/map_scripts/maps/gm_darkfusion.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/map_scripts/maps/gm_darkfusion.lua b/lua/map_scripts/maps/gm_darkfusion.lua index eea24f9..650504d 100644 --- a/lua/map_scripts/maps/gm_darkfusion.lua +++ b/lua/map_scripts/maps/gm_darkfusion.lua @@ -1,7 +1,10 @@ local entIDs = { 6609, -- sound precaching button 6084, -- cheese dark fusion fuel cells + 4005, -- ditto 6281, -- cheese stasis charges + 4909, -- ditto + 4454, -- ditto 4145, -- 1 reactor tps 4557, -- 2 reactor tps 5630, -- cleanup debris now