Open Dwarf-LordPangolin opened 5 years ago
Hi, question is, why one need to plug two switch together? From a pure logic stand point, this has no purpose. It seems it is more from a interactivity stand point, where you want two switch to activate a door, so you plug one switch into the other one. Which is funny because we made this change to accommodate player wanting to use the exact same door case but with push button instead of switch... Do you confirm this is your use case? Thanks
Erm. It honestly never occurred to me not to plug two switches together; this is how I've been making all my systems that need more than one input. It didn't cross my mind to use an OR gate until Talrey showed me that as an alternative. All my doors have had a switch linked to the slider, with any other switches chained together.
I think it is because you dont really need to look at the switch state, you just are more using them as toggle. switch A -> switch B -> door. If you activate A the switch will sync and then activate the door as wanted. But if you activate B with then what happens is that A and B are no longer in sync. You dont really care because you opened your door, and the next time you click on either A or B it will close it. But if you look at switch A it will say closed while the door is open.
This is a weakness of my current implementation, actually I should either prohibit you from linking switch together or I should have them sync even backward. I need more thinking on the best approach...
I think it would much more adequate in those case to do:
button A -> button B -> switch -> door. or button A ->| button B ->| AND gate -> switch -> door.
Also as a side note please also keep in mind that I will add builtin door soon ^^.
I don't think it's a "weakness of the current implementation". Ever been in a room that has two light switches for the same light? They're gonna get out of sync. People are trying to use switches as both inputs and indicators, even though the indicator lamp exists. If you want switches to work like IRL ones, use an XOR gate.
Like I said to Pangolin on the Discord earlier, people are looking for something that "demands a specific output from the next brick", rather than looking for something that "produces that result based on a specific input from the previous brick". It's sort of a backwards way of looking at it, but I don't think it's any fault of the system itself.
I can't think of any way for switches to reflect the "actual state of the next brick" without massively complicating how the logic works internally and probably breaking the handy toggle functionality of switches. We can make larger flip-flops but it's so cool to do them with a single brick.
Short Description of the issue:
The current way switches work means that whenever a switch is linked to another switch, the first one needs to be flipped multiple times to get the desired state on the other. This is a big problem, because if there are two switches controlling something, changing the state of the switch may not change the state of the thing it controls.
Steps to reproduce the issue:
Link a switch to another and flip the end switch around a few times.
Environment
Additional information:
Two switches, one linked to the other:
Flipping it the first time works well:
But the second time it is flipped, nothing happens further down the line. This makes using multiple switches to control things that have more than one switch (doors, ramps, landing gear) very difficult.