Adventure-Terraria-Server-Project / AdvancedCircuits-Plugin

Advanced Circuits Plugin for Terraria Server API and TShock.
GNU General Public License v3.0
8 stars 8 forks source link

Wireless Transmission #33

Closed Ijwu closed 11 years ago

Ijwu commented 11 years ago

How about a few tiles that transmit the signals they receive to receiver tiles? They could work as pairs, perhaps connected via command, so that they don't get mixed up. Their pair could probably be saved in the world metadata..

The sender and receiver tiles should be port defining components, the sender tile could have specific tiles on its input ports, such as the tiles the logic gates use (or any tiles at all). These input ports would be 'channels' for the wireless transmission. The receiver tile would allocate the signals it receives from each channel and output signals to the tiles that match the channels in its own ports.

Example, because I suck at describing things: Key: W = Wireless Sender, R = Wireless Receiver, (1-4) = Any Tile that are different from all others.

  2
1 W 4
  3

  2
1 R 4
  3

So let's say I send a 1 signal into the 1 port in the sender. The receiver would receive the signal and output a 1 on its own 1 port.

So on, if I sent a 0 signal on the sender's 4 port, the receiver would get that and output 0 on its own 4 port.

If the sender has a channel (input tile) that the receiver does not have, then that port will be inactive, or just send 0 always.

Edit: Wrestled with the formatting a bit, but managed to get the examples to be readable.

CoderCow commented 11 years ago

Nice idea, sender and receiver could be the same block / sprite, Input Ports would already clearify whether the component sends or receives on a Port. I would generally not allow signal transmission between two wireless components that had been placed by two different players. Modifiers could be used to declare different channels, resulting in 5 channels for each player in the configured transmission range.

The wireless component should also require a place permission, and maybe also a usage permission as this would be a nice way to allow "higher ranked" players execute a circuit that "lower ranked" players can't.

Not sure if this will make it into 1.1 though.