Attention: All existing users will need to reset their password before being able to log in. Click here to reset. For more information on why, click here. (September 26) x


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Dispatch mechcomp component
#1
Rainbow 
https://github.com/goonstation/goonstation-2020/pull/62



The Dispatch Component is similar to the Signal-Check Component, but it allows filters to be set on a per-connection basis. When creating an outgoing connection from the Dispatch Component, you have the option to add a comma-delimited list of filters. The incoming signal must contain at least one of these filters or it will not be passed to the connected component. The filter list can be left blank to allow all messages to pass. There is also an exact mode toggle - when exact mode is on, the incoming signal must match a filter exactly (case insensitive). Connections with no filter will still fire for all messages in exact mode.

For example:
Say you have a dispatch component connected to an LED with the filter "1,2" and to another LED with the filter "3,4". A signal of "13" or "hello 41test" would make both LEDs activate. The signal "hi 1 2" would only activate the first LED. In exact mode, only the signals "1" or "2" would activate the first LED, and only the signals "3" and "4" would activate the second.

[Image: 87XVDwL.png]Sprites by Erinxx
I included the Button Panel sprites in the dmi because I think that should make it easier to merge? Let me know if you want me to change it
Reply
#2
Merged.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)