[0.15.33] Logic Network: Zero == NULL

Bugs that are actually features.
Post Reply
darkthemes
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jul 08, 2017 9:52 am
Contact:

[0.15.33] Logic Network: Zero == NULL

Post 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
Last edited by darkthemes on Thu Aug 17, 2017 9:50 pm, edited 1 time in total.

Loewchen
Global Moderator
Global Moderator
Posts: 8320
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

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

Post by Loewchen »

This is working as intended, see: 20991.

darkthemes
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jul 08, 2017 9:52 am
Contact:

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

Post 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

Post Reply

Return to “Not a bug”