Extended Logic Gates
by Vina
This mod is in active testing. Doc: https://steamcommunity.com/sharedfiles/filedetails/?id[/hr The parts Flip-flops — triggered on the rising edge of the clock [*JK Flip-Flop — set, reset, toggle or hold, chosen by J and K [*D Flip-Flop — the output copies D on every clock edge [*T Flip-Flop — the output flips when T is on, holds when it is off Latch [*SR Latch — asynchronous, level triggered. S turns the output on, R turns it off, neither one holds the last state. Edge detectors — emit a single one-tick pulse (1/40 s) [*Rising Edge Detector — pulses when the input turns on [*Falling Edge Detector — pulses when the input turns off [*Dual Edge Detector — pulses on both transitions, doubling the clock rate Timing [*One-Shot 0.5 s / 1 s / 2 s — a trigger turns the output on for a fixed time, then it switches off by itself [*Divider / 2, / 4, / 8 — one pulse every N clock edges. Chain them to multiply the ratio. [hr[/hr Wiring order decides the roles This is the one thing you need to know to use the mod. On any part with more than one input, the order you connect the wires is what assigns the roles. On a JK Flip-Flop: first wire becomes CLK, second becomes J, third becomes K. Connect them one at a time, in order. Always drag from the part that sends the signal to the part that receives it. A switch has no logic input, so it can never be the target of a wire. Once assigned, a role belongs to that specific wire, not to its position — it survives saving, reloading and reconnecting. Remove a wire and its slot is freed; the next wire you connect takes the first free slot. [hr[/hr What persists when you save [*Flip-flop and latch outputs keep their state. Leave a light on, reload the world, it is still on. [*Divider counts keep counting where they left off. "Three more presses to go" is real circuit state. [*One-Shot pulses do not survive. A pulse is an event, not a state — restoring it would fire phantom triggers as the world loads. [hr[/hr Behaviour choices worth knowing [*SR Latch: with S and R both on, reset wins. In a real NOR latch that combination is a forbidden state, so a deterministic rule was needed — and in control logic, "turn off" should beat "turn on". [*One-Shot: retriggerable. A new trigger during the pulse restarts the countdown, which is what you want for "stay on for 2 seconds after the last activation". [*Divider: reset is level based and has priority. While it is on, the count stays at zero. [hr[/hr Notes [*The parts light up while their output is on, like the vanilla gate. [*A one-tick pulse is too short to see on a light. That is intentional — edge detectors and dividers are meant to feed other logic, such as the clock of a flip-flop. For something visible, run the pulse into a One-Shot. [*Every part in this mod accepts and emits standard logic connections, so it mixes freely with vanilla gates, switches, buttons, sensors and timers. [*Enable the mod when you create the world. Mods cannot be added to a world that was created without them.
Comments
0 total- No comments yet. Be first.
