WireButton
namespace Griff.Modules.Contraptions;
public sealed class WireButton : ComponentA button to press with Interact (E) with the mouse over it, or while standing on it. Its output “On” is 1 while it’s on: wire it to a lamp, a thruster, a gate.
This is a component: its saved properties are on its component page.
Properties
Section titled “Properties”public bool IsOn { get; set; }True while it’s on.
OnTint
Section titled “OnTint”public Color OnTint { get; set; }The color its sprite turns while it’s on. Transparent leaves it alone.
public string? Sound { get; set; }A sound played when it’s pressed.
Toggle
Section titled “Toggle”public bool Toggle { get; set; }Each press flips it on or off. Untick it for a button that’s only on while it’s held down.
Methods
Section titled “Methods”public void Press()Presses it as a player does: a toggle flips on or off, and one that’s only on while held is on for a moment (a pulse down its wires). A trigger, a card or a note on the beat can press it.