Editing Map Lighting with Lua?

Is it possible to edit map lighting using Lua coding? The thing we’re looking for is to basically kill all lights to make the map pitch black, requiring the players to rely on their flashlights. I’m not looking for anyone to make it, just can’t find documentation of whether or not this is possible. And all my attempts failed. So far I’ve tried using ent:Fire(“kill”), or just “ent:Remove()”, and “env_light:SetKeyValue(“Brightness”, 1 1 1 1)”. The only thing that has so far worked is “env_light:Fire(“Fade to patter”, “a”, 0)”, but that doesn’t result in a completely black map, in fact it is very bright, just with a night-ish blue glow. Does anyone know of any way to kill all lights and turn down the light_environment to near pitch black?
(Obviously “ent” and “env_light” have been found and named first using ents.FindByClass(" [light types] ") )

Did Robot answer your question Zet0r?

Partially yes. It does make the map dark, but reflective brushes still reflect the original brightness and the original skybox (changed with console command). And in quite a few maps, a lot of the lights aren’t removed/made dark. In the house map I tested in, everything outside was dark, but inside was still fully bright except the roof above the lamps. Maybe its impossible to remove everything or am I missing something here?

Set the first argument of the function to something other 0 ( loop through 0 to i don’t know, 128? )

The reflectiveness is unfortunately unfixable as far as I know.

I don’t think it’ll fix reflections as these use cubemaps that are generated via ‘buildcubemaps’ command and packed into map.
It could be fixed by rerunning the command, which requires server rejoining tho.