Control
sensor and control are a pair: the first reads a block’s property, the second changes it.
Almost everything can be read, and exactly five things can be changed:
| Property | What it does | For whom |
|---|---|---|
enabled |
switches a block on and off | anyone |
config |
changes the setting — an item, a unit type | those configured with content |
shoot |
shoot at a point | turrets |
shootp |
shoot at a unit with lead | turrets |
color |
the glow colour | the illuminator |
Nothing else about a block can be changed: not its stock, not its rotation, not its health. Logic can start and stop things, not build and break them.
Lessons
Section titled “Lessons”- Switching on and offThe one command that works on any block: switch it off and switch it back on
- Configuring a blockA sorter, an unloader and a factory are configured with an item — and logic can change that setting on the fly
- ShootingA turret shoots well enough on its own. Logic is for when it matters who exactly it shoots
What you need first
Section titled “What you need first”«Links and getlink» — how a processor reaches a block at all, and «Properties of buildings» — what a block can be asked.
Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.