So close - cycling security/hull cameras

#1
I had the idea of running a single railgun controller through several relays, each connected to a different camera. You could then cycle through the cameras using the railgun controller trigger, allowing a security officer to watch many places inside the ship, or engineers and mechanics to quickly use external cameras to cycle around and check for hull damage.

(with a bit more work you might also be able to have a single railgun controller that can switch between several railguns, although you obviously couldn't use the railgun trigger to cycle when it's already being used to control firing... you'd need additional buttons wired into the system to manage which railgun you're connected to).

Unfortunately, in version 0.5.4.3 it doesn't work... running the railgun controller's "position_out" to the camera's "control_in" via a relay (or even via a pole of a junction box) doesn't work, even with a single camera. Presumably the code to work out which camera/gun to zoom to on right-mouse-button-press assumes the railgun controller is directly connected to a camera or railgun, not via a junction box or relay.

So, my suggestions for how to support this use-case are:
  • Augment the railgun controller code which handles right-clicking to allow it to find any valid electrical path to a camera or railgun, not just assume it's a direct connection. If the code finds more than one camera/railgun connected, then treat it as if it found none, i.e. do nothing on right click.
  • Add a state_out pole to the relay component, to make it easier to slave a second relay to a first to give yourself additional in/out pairs, or to have Light Components light up depending on which relay is on.
  • Add the ability to connect the same wire to two poles of the same component (e.g. a relay's signal_out1 pole wired to its own toggle, so when the relay is on and receives a pulse on signal_in1, it toggles itself off). That's probably harder to implement and not strictly necessary, since we can always run the wire via some other component and back, such as a junction box or OR component.
Anyway, just some random thoughts. Thanks for developing this fun game!