The Blueprint Designer Lab - 343N's Edit deprecated

by 343N

Enter your lab to design your blueprints. Builds off of Blu3wolf's version. Adds a toggleable 'pausing' feature for singleplayer (on by default), as well as support for using Editor Extensions items in the Lab, and a fix for a bug that stops you from breaking items in the Lab, when Space Exploration is installed. EDIT: Marking this mod as deprecated for now until I have the time to fix the bugs with it.

Content
2 years ago
1.1
619
Blueprints

g Entering lab with "pause game" on freezes factorio for 30+ seconds

2 years ago
(updated 2 years ago)

Entering lab with "pause game" setting on freezes factorio for 30+ seconds
My save file: https://we.tl/t-4xzkXNFgan

2 years ago

It's probably because there are so many entities being iterated through and paused that it takes a while. It'll be a cost-benefit analysis on whether you want to have it enabled, but the only way to make pausing work is to set every entity to inactive when the lab is entered. I'll have a look when I'm free when I am available.

2 years ago

Perhaps an additional warning dialog can be shown prior to entering the lab when there's a large amount of entities to be paused. e.g. if there's more than 10k entities, warn the user about the potential freezing of the game and offer the option to enter the lab without pausing (thus toggling the setting off).

2 years ago

That's a decent idea, although you'd have to iterate through every single entity doing that before the warning, so you may as-well just click it. I could add a warning after you click it saying "HEY, this took a long time, it's unavoidable, but you can always turn off the pausing functionality".

Your suggestions/reports are super-helpful, thank you.

2 years ago
(updated 2 years ago)

Can't you simply retrieve an entity count? and make a simple check like (pseudo code) "if entities.count > 10k then showWarning() else enterLab()" ?
Even just looping over entities and increasing a counter (without pausing them yet) to know how many entities there are shouldn't cause a huge hiccup I'd assume.

2 years ago

Nah, I've got an even better idea. Whenever we pause, we'll just figure out how many entities we can in the time of a single tick, and just slowly pause everything, so that there's no hiccups to the base game (or if there is, it doesn't freeze entirely). No entity count needed.

New response