Bottleneck

by trold

A tool for locating input starved machines.

Utilities
3 years ago
0.13 - 1.1
219K

b Mod Compatability - No Support for Cloning

4 years ago
(updated 4 years ago)

https://mods.factorio.com/mod/warptorio2/discussion/5d6a3399400748000cd74ec1

https://mods.factorio.com/mod/warptorio2/faq

Warptorio then uses LuaSurface.clone_entities from the current_planet.surface to the new_planet.surface
Each new entity created this way has defines.events.on_entity_cloned raised for it.
In this event you need to simply update your internal caching and duplicate everything to the new entity so the 2 are identical, but on a different surface.
Cloning does not typically happen in normal play, but to test it without mods, you can use the Clone feature in /editor.
All players are then teleported to the new planet.

https://lua-api.factorio.com/latest/events.html#on_entity_cloned

4 years ago

+1 for this.
Hope trold still maintains this mod

4 years ago
(updated 4 years ago)

This mod appears to be dead/abandoned.

You will need to change the lua files yourself.

https://github.com/troelsbjerre/Bottleneck/blob/master/control.lua#L346

Change:

local function on_entity_cloned(event)
if event.destination.name == "bottleneck-stoplight" then
event.destination.destroy()
end
end

To:

local function on_entity_cloned(event)
if event.destination.name == "bottleneck-stoplight" then
event.destination.destroy()
else
event.entity=event.destination
built(event)
end
end

4 years ago

cool, thank you!

4 years ago

Feel free to fix, test, and make a pull request on GitHub.

New response