Paste Signals Fixed

by huancz

Allows copying of signals from a power pole to a Constant Combinator, effectively snapshotting the values. Fixed for factorio 2.0

Utilities
11 months ago
2.0
119
Circuit network

g my hero!!! <3

11 months ago

so many minutes manually configuring constant combinators... in my past! thanks to huancz! a perfect mod for the logistics-shunning belt-loving player of factorios from home to the farthest reaches of the galaxy!

if it's possible for it to delete any empty anonymous signal groups when you paste, that would be convenient, particularly when pasting to a new constant combinator

11 months ago

Re: deleting empty groups. It's almost guaranteed to be possible, and I agree it would make sense. But that would mean more messing with lua, which makes my skin crawl. I already learned enough new reasons to hate it that will give me nightmares for a while.

(I exaggerate here of course, but this is a cosmetic feature, empty group doesn't break anything and it's just one click to delete if. It's unlikely I'll try myself in the near future. Unless someone is bothered enough by it to create PR).

22 days ago

I'll just leave this here in case you decide to implement it. Altering Line 11 of control.lua to

local control = dest.get_or_create_control_behavior()

for n = control.sections_count, 1, -1 do
    control.remove_section(n)
end

will clear existing signals from the combinator. You'll probably want to implement a per-player setting for this and wrap the loop in its own condition.

New response