Switch Button by GalactusX31 updated for 1.0


This mod adds on/off switch button for sending a single circuit network signal. Mod settings allow to either toggle On/Off state by left-click and access inventory via hotkey, or to work like a regular constant combinator.

Content
3 years ago
1.0 - 1.1
8.44K
Circuit network

i Add configuration to invert switch.

7 months ago

Let me give an example: right now I have constant combinators in my factory that disable the production line when turned on. They contain signal-red=1. If I were to replace those with switches, it would visually show "ON" when the production is offline and show "OFF" when the production is online. I could of course use a decider combinator configured as "signal-check <= 0 then 1 as signal-red", but I think there is an opportunity for neater solutions.

A simple way to implement would be to add a configuration button inside the switch that inverts the visual when checked (i.e., shows OFF when on and shows ON when off).

mk-fg β˜†
7 months ago

You can probably also put red=-1 into switch and hook up red=1 combinator anywhere in the circuit network.
Then, when switch it ON, it'd add its -1 into the network, resulting in red=1-1=0 there, which should get the desired result too.

New response