- Staff
- #41
anyway to stop chem table / planter pop ups?
Creates lua errors when interacting with the UIs, and very untested, but it does at least hide the chem table UI.
Diff:
@@ -1220,6 +1220,12 @@
PrintTable(found)
]]
local overrides = {
+ "chemical_table_cooking_panel",
+ "chemical_table_panel",
+ "BasicPlantPanel",
+ "PlantPanel",
+ "PlanterBoxMenu",
+ "BasicPlanterMenu",
"perp2_dialog",
"ph_tv_menu",
"perpheads_act_wheel",
@@ -1239,7 +1245,8 @@
local t = vgui.GetControlTable(s)
if not t then continue end
- cached_overrides[s] = cached_overrides[s] or { t.Paint, t.MakePopup, t.Show }
+ cached_overrides[s] = cached_overrides[s] or { t.Paint, t.MakePopup, t.Show, t.Init }
+
t["Paint"] = function(...)
if vars.disable_uis:GetBool() then return end
cached_overrides[s][1](...)
@@ -1254,6 +1261,11 @@
if vars.disable_uis:GetBool() then return end
cached_overrides[s][3](...)
end
+
+ t["Init"] = function(...)
+ if vars.disable_uis:GetBool() then return end
+ cached_overrides[s][4](...)
+ end
end
-- Calling vgui.Create makes a copy of the control table. This resets most menus.
