Switch Button updated for 2.0

by m44v

This mod adds 2 buttons that can be toggled with a mouse-click: A switch button that works like a constant combinator and a push button that outputs single-tick circuit network signals.

Utilities
a month ago
2.0
1.45K
Circuit network

i Custom length pulse

5 months ago

Could the pushbutton version have a field to set how long the pulse will be? Where clicking it again just resets the timer. (Its quite annoying having a pulse lengthener combinator in most places I use it)

5 months ago
(updated 5 months ago)

Is 4 combinators that annoying? You gotta pump those numbers up :P

I don't know, seems like a very niche use case and I don't know how to mod the UI for add such settings to the button, they are constant combinators under the hood.

4 months ago

Personally I never need to use the pushbutton by itself, almost always the thing it interacts with (eg. capture turret, inserter, belt, etc) needs a specific length t
ime

You could always add a virtual signal, that when set is the pulse duration?

a month ago

Hi!
In one of the latest versions, a parameter was added to the combinator, which allows you to specify the number of ticks after which it will turn off itself. Can you add this parameter to the mod?

https://lua-api.factorio.com/latest/prototypes/ConstantCombinatorPrototype.html#pulse_duration

a month ago

More accurately, the question would sound like this: is it possible to attach a condition to a mouse click event so that the "toggle-entity" parameter is triggered?

a month ago

What do you mean by "attach a condition"?

a month ago

Now that you can set the auto-off time of the combinator, is it possible to make a setting that will change the behavior of the mouse click on the push button?
As I understand it, this is somehow related to "toggle entity".

a month ago

The new .pulse_duration api doesn't help with this feature request, getting a pulse of an arbitrary number of ticks was never the issue.

The problem I have is making an UI for the user to set the custom duration, it can't be a mod setting and using a virtual signal is a bit of a hack.

There's also the maintainability of the mod, adding features that I don't personally use makes maintaining it more difficult..

New response