Moon Logic deprecated

by mk-fg

Adds Lua-programmable circuit network combinator. Based on Sandboxed LuaCombinator and LuaCombinator2 mods. Probably won't work in multiplayer games.

Content
2 years ago
1.0 - 1.1
4.97K
Circuit network

i [fixed] Red line and green output signal separately

4 years ago

Hello there!

If the output terminal is connected to the red wire and the green wire at the same time.

Hope to provide a method, the red line and the green output signal separately.
such as:
outred {signal-name = value,...}
outgreen {signal-name = value,...}

I don't understand English. This passage was translated using a program. I hope you can understand it.

Thank you for making the mod

4 years ago

It's technically possible, but nah, too much trouble.
Just use different signals instead of different wires there, or filter/convert output signals by e.g. arithmetic combinator.

4 years ago

It's technically possible, but nah, too much trouble.

Well, at least for now.
Kinda like the idea of having similar two variables for outputs as with inputs.

4 years ago

Hope it will come true soon
thank you!

3 years ago

I love that the input is separated and so far I've been able to do everything I've ever wished the vanilla combinators would. Makes me wish I had tried some of the other Lua combinators, but yours was the first one presented in a way that I understood what I was looking at in the mod portal enough to want to download it and try it, so thanks!

Getting back on topic, I've always been able to work around the particular limitation (and don't run into it often in the first place to be honest), but I would also love to see the ability to send to red and green signals separately if you were to ever reconsider.

3 years ago

Yeah, I like the idea, it'd be nice to have, and won't preclude using same "out" table for both signals.
Can be implemented by adding +1 invisible constant combinator to the current one, hooking them up to diff outputs, and setting red/green signals on each separately (or "out" on both). Hopefully will get to it sometime, it's not that hard and won't break any existing setups.

3 years ago
(updated 3 years ago)

Finally got around to implementing it - should be doable in 0.0.52+ via color/ signal prefixes.
For example: out['red/signal-A'], out['green/signal-A'] = 5, 11
(colors can be renamed in mod settings, but red/green will always work as a fallback regardless)

Decided to stick with using same "out" variable for all wires there so that old stuff like out = {} will still clear all outputs, same as before.
Both "signal-X" and "red/signal-X" can be set, in which case "red" version will override generic one on that wire, and the fact that these values are persistent would mean that just setting "signal-X" anytime later will have no effect on red wire until "red/signal-X" is unset, which can be a bit counter-intuitive.

Output signals are displayed with color coding if red/green values differ, which should hopefully make it pretty clear when something is overidden per-wire. Though these outputs are queried from resulting combinator settings, so should display any red=green values with non-color-coded "[out]" prefix, even if these were set separately.

3 years ago

Awesome! Look forward to trying it out!

New response