Extended Logic
A mod for personal use and for a small server a friend is running, because I couldn’t find several of the blocks I wanted anywhere else; this is also one of my first forays into Starbound modding. Let’s put it on the Internet and let everyone yell at me for doing things wrong!
– – –
Invisible Logic is a mod designed to extend some of the basic functionality of Starbound’s wiring system. At its core is a complete rewrite of the script vanilla Starbound uses to handle logic gates, with added support for feedback and edge detection as well as gates with theoretically infinite inputs and outputs.
SWITCHES
- Keypad Button: A small button designed to be placed among others of its kind. Emits short pulses (and techy-sounding beeping noises) when pressed, designed for keypads and other fast-response computers.
LOGIC GATES
- Falling Edge Detector: Gate with one input, one output. Emits a very short pulse whenever the input is turned off.
- Rising Edge Detector: Gate with one input, one output. Emits a very short pulse whenever the input is turned on.
- Edge Detector: Gate with one input, one output. Emits a very short pulse whenever its input state changes.
- NAND Switch: Gate with two inputs, one output. Combination of AND and NOT; output is on except when both inputs are on.
- XNOR Switch: Gate with two inputs, one output. Combination of XOR and NOT; output is on when both inputs are equal (both on or both off).
- IMPLY Switch: Gate with two inputs, one output. Output is on except when the upper input is off and the lower input is on.
- Small NOT Switch: Half-size version of the NOT switch.
- JK Flip-Flop: Gate with three inputs, one output. Functions similarly to the D Latch; however, this gate is effectively paired with a rising edge detector, and the other two inputs will only be read at the moment the clock input (top right) is turned on. Also, this gate has two data inputs instead of one, being Set and Reset. If the clock is pulsed and both S and R are off, the output will not change. If the clock is pulsed and either S or R is on, the output will be turned on or off, respectively. If the clock is pulsed and both S and R are on, the output will be toggled.
- 4-1 Multiplexer: Gate with three inputs, four outputs. Has two ‘signal’ inputs and one ‘data’ input; the signal inputs determine which of the four outputs the data input will be sent to.
- 4-1 Demultiplexer: Gate with six inputs, one output. Opposite of the multiplexer; the two signal inputs will determine which of the four data inputs will be sent to the output.
- Full Adder: Gate with three inputs, two outputs. Designed to add two binary numbers together. Inputs on the left are the digits of each number to add, and the top input/bottom output is the Carry, meant to be chained between adders. Stack several of these and link the directly adjacent Carry inputs/outputs; the inputs to the left will alternate between the binary digits of each number you want to add, and the outputs to the right will be the sum of the inputs.
- Stack Gate: Gate with three inputs, one output. Keeps an internal list of wire states, in a first-in, first-out structure (a stack). When the upper left input is turned on, the state of the lower left input will be pushed to the stack; when the upper right input is turned on, the newest saved input will be removed. The output will always reflect the state of the newest saved input, or of the lower left input if no states are saved.
- Queue Gate: Gate with three inputs, one output. Keeps an internal list of wire states, in a first-in, last-out structure (a queue). When the upper left input is turned on, the state of the lower left input will be pushed to the queue; when the upper right input is turned on, the oldest saved input will be removed. The output will always reflect the state of the oldest saved input, or of the lower left input if no states are saved.
All objects are available from the Wiring Bench to all characters.
- More advanced packaged structures similar to the multiplexer (e.g. more advanced timers and clocks, other latch/flip-flop varieties)
- A GUI-based keypad object (tentative)