Page 1 of 1

[0.15.33] Logic Network: Zero == NULL

Posted: Thu Aug 17, 2017 9:32 pm
by darkthemes
Zero is an important aspect in many arithmetic operations, especially in the modulo operation.

When using logic networks, emitting a 0 for any signal makes the signal disappear. This means that 0 serves the dual purpose of indicating NULL and indicating an arithmetic 0. There is no way to ascertain which signal produced a 0, which can be a loss of information and a surprisingly unintuitive behaviour. I would call this a breaking bug in any programming language.

A signal which became 0 as the result of arithmetic should be emitted. To allow the previous behaviour to be implemented, I propose the null combinator, a combinator that emits all signals from input except the ones specified. The GUI would be alike to the constant combinator, minus the slider bar at the bottom. The entity would be alike to that of the decider or arithmetic combinators with an input side and an output side.

Steps to repro:
1. Place a constant combinator
2. Configure the combinator to emit 0
3. Choose a signal to emit, such as coal
4. Mouse over the combinator
5. No signal is output

Re: [0.15.33] Logic Network: Zero == NULL

Posted: Thu Aug 17, 2017 9:45 pm
by Loewchen
This is working as intended, see: 20991.

Re: [0.15.33] Logic Network: Zero == NULL

Posted: Thu Aug 17, 2017 9:51 pm
by darkthemes
Gah! I'm probably going to write a mod to change this then >//< So many parts of this game that have weird behaviours. Thank you anyways