Is there a way to delete all lamps from my save file?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
VonFlaffenhausen
Inserter
Inserter
Posts: 27
Joined: Tue Oct 17, 2017 12:03 pm
Contact:

Is there a way to delete all lamps from my save file?

Post by VonFlaffenhausen »

Inspired by This https://www.reddit.com/r/factorio/comme ... f_concept/ post, i ran lamps next to all my rail in my cityblock style attempt at megabase.
I am approaching 50K lamps now, but my 1Kspm base is running at 50UPS. Do lamps (in ridiculous amounts) impact UPS?
I would like to see if anything changes when I delete all lamps.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by DaveMcW »

Code: Select all

/c for _,entity in pairs(game.player.surface.find_entities_filtered{name="small-lamp"}) do entity.destroy() end

VonFlaffenhausen
Inserter
Inserter
Posts: 27
Joined: Tue Oct 17, 2017 12:03 pm
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by VonFlaffenhausen »

DaveMcW wrote:

Code: Select all

/c for _,entity in pairs(game.player.surface.find_entities_filtered{name="small-lamp"}) do entity.destroy() end
Thanks a bunch, will report back with the results tonight.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by Klonan »

VonFlaffenhausen wrote: Do lamps (in ridiculous amounts) impact UPS?
Shouldn't do, we did a big lamp optimization a while back

VonFlaffenhausen
Inserter
Inserter
Posts: 27
Joined: Tue Oct 17, 2017 12:03 pm
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by VonFlaffenhausen »

So, when i gave the command, my UPS went back to 60.
Perhaps it was the way i hooked up all the lamps to signals. I have rows of lamps connected to every rail signal. They then turn a different color when a train is on its way.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by Klonan »

VonFlaffenhausen wrote:So, when i gave the command, my UPS went back to 60.
Perhaps it was the way i hooked up all the lamps to signals. I have rows of lamps connected to every rail signal. They then turn a different color when a train is on its way.
Yes, circuit lamps are not optimized, and that sounds exactly like something that would hurt UPS

VonFlaffenhausen
Inserter
Inserter
Posts: 27
Joined: Tue Oct 17, 2017 12:03 pm
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by VonFlaffenhausen »

Thanks for clarifying.
Too bad, I kind of liked the eye candy :)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Is there a way to delete all lamps from my save file?

Post by Klonan »

VonFlaffenhausen wrote:Thanks for clarifying.
Too bad, I kind of liked the eye candy :)
There is a debug option 'show-rail-signal-states' that might make the signals clearer from the map view

Post Reply

Return to “Gameplay Help”