Skip to content

Sensor properties

What sensor asks for, and what setprop can write back. The game does not always answer: a block type, a building, a unit and an item are handled by different code, and the table shows which (v160.4).

PropertyRead fromWritten toDescription
@totalItems
buildingunit
How many items there are inside in all. For a unit this is its one and only stack.
@firstItem
buildingunit
answered differently by 9 blocksConveyor, Titanium Conveyor, Armored Conveyor, Mechanical Drill, Pneumatic Drill, Laser Drill, Airblast Drill, Impact Drill, Eruption Drill
The first item of the contents — the type, not the amount. For a drill it is what it mines.
@totalLiquids
building
answered differently by 37 blocksGraphite Press, Multi-Press, Silicon Smelter, Silicon Crucible, Kiln, Plastanium Compressor, Phase Weaver, Surge Smelter, Cryofluid Mixer, Pyratite Mixer, Blast Mixer, Melter, Spore Press, Pulverizer, Coal Centrifuge, Silicon Arc Furnace, Electrolyzer, Atmospheric Concentrator, Oxidation Chamber, Electric Heater, Slag Heater, Phase Heater, Carbide Crucible, Slag Centrifuge, Surge Crucible, Cyanogen Synthesizer, Phase Synthesizer, Heat Reactor, Mechanical Pump, Rotary Pump, Impulse Pump, Reinforced Pump, Water Extractor, Cultivator, Oil Extractor, Vent Condenser, Heat Source
How much liquid there is inside in all. For a factory only the one it produces, for a pump only the one it pumps.
@totalPower
building
building
The charge of the buffer, and for an ordinary consumer the share of its request that is met.
@itemCapacity
block typebuildingunit typeunit
answered differently by 24 blocksCore: Shard, Core: Foundation, Core: Nucleus, Core: Bastion, Core: Citadel, Core: Acropolis, Container, Vault, Reinforced Container, Reinforced Vault, Ground Factory, Air Factory, Naval Factory, Additive Reconstructor, Multiplicative Reconstructor, Exponential Reconstructor, Tetrative Reconstructor, Tank Fabricator, Ship Fabricator, Mech Fabricator, Tank Refabricator, Ship Refabricator, Mech Refabricator, Prime Refabricator
Capacity in items.
@liquidCapacity
block typebuilding
Capacity in liquid.
@powerCapacity
block typebuilding
How much power the block requests or holds.
@powerNetStored
building
Stored in the whole power network.
@powerNetCapacity
building
The capacity of all the network’s batteries.
@powerNetIn
building
The network’s production per second.
@powerNetOut
building
The network’s consumption per second.
@ammo
building · 26
only on 26 blocksDuo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign
The ammo in a turret.
@ammoCapacity
building · 26
only on 26 blocksDuo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign
How much ammo a turret holds.
@currentAmmoType
building · 20
only on 20 blocksDuo, Scatter, Scorch, Hail, Wave, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Breach, Diffuse, Sublimate, Titan, Disperse, Scathe, Smite
Which item the turret is loaded with right now.
@memoryCapacity
building · 3
only on 3 blocksMemory Cell, Memory Bank, World Cell
The size of a memory cell.
@health
block typebuildingunit typeunitbullet
buildingunitbullet
Current health.
@maxHealth
block typebuildingunit typeunitbullet
Full health.
@heat
building · 25
only on 25 blocksAtmospheric Concentrator, Oxidation Chamber, Electric Heater, Slag Heater, Phase Heater, Heat Redirector, Small Heat Redirector, Heat Router, Carbide Crucible, Surge Crucible, Cyanogen Synthesizer, Phase Synthesizer, Heat Reactor, Force Projector, Shockwave Tower, Thorium Reactor, Impact Reactor, Flux Reactor, Neoplasia Reactor, Lancer, Arc, Meltdown, Afflict, Malign, Heat Source
Heat: for a reactor and a heater the heat itself, for a shield projector the damage taken.
@shield
unitbuilding · 1
answered differently by 1 blockForce Projector
unit
Force Projector
Shield: for a unit its own, for a force projector how much of the dome is left.
@armor
block typebuildingunit typeunit
unit
Armor: subtracted from every hit.
@efficiency
building
answered differently by 6 blocksMechanical Pump, Rotary Pump, Impulse Pump, Reinforced Pump, Water Extractor, Oil Extractor
How well the block is supplied with resources and power: 1 is fully.
@progress
building · 114
only on 114 blocksbuild1, build2, build3, build4, build5, build6, build7, build8, build9, build10, build11, build12, build13, build14, build15, build16, Graphite Press, Multi-Press, Silicon Smelter, Silicon Crucible, Kiln, Plastanium Compressor, Phase Weaver, Surge Smelter, Cryofluid Mixer, Pyratite Mixer, Blast Mixer, Melter, Separator, Disassembler, Spore Press, Pulverizer, Coal Centrifuge, Silicon Arc Furnace, Electrolyzer, Atmospheric Concentrator, Oxidation Chamber, Electric Heater, Slag Heater, Phase Heater, Carbide Crucible, Slag Centrifuge, Surge Crucible, Cyanogen Synthesizer, Phase Synthesizer, Heat Reactor, Mender, Mend Projector, Shockwave Tower, Conveyor, Titanium Conveyor, Armored Conveyor, Mass Driver, Duct, Armored Duct, Mechanical Drill, Pneumatic Drill, Laser Drill, Airblast Drill, Cultivator, Vent Condenser, Impact Drill, Eruption Drill, Duo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign, Ground Factory, Air Factory, Naval Factory, Additive Reconstructor, Multiplicative Reconstructor, Exponential Reconstructor, Tetrative Reconstructor, Tank Fabricator, Ship Fabricator, Mech Fabricator, Tank Refabricator, Ship Refabricator, Mech Refabricator, Prime Refabricator, Tank Assembler, Ship Assembler, Mech Assembler, Payload Mass Driver, Large Payload Mass Driver, Deconstructor, Large Deconstructor, Large Constructor, Heat Source, Launch Pad [lightgray](Legacy), Launch Pad
The progress of the current job, from 0 to 1.
@timescale
building
The block’s speed-up from an overdrive, normally 1.
@rotation
buildingunitbullet
answered differently by 26 blocksDuo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign
unitbullet
Rotation in degrees. For a turret, where the barrel is pointing.
@x
buildingunitbullet
unitbullet
The horizontal coordinate, in tiles.
@y
buildingunitbullet
unitbullet
The vertical coordinate, in tiles.
@velocityX
unitbullet
unitbullet
Horizontal speed, tiles per second.
@velocityY
unitbullet
unitbullet
Vertical speed, tiles per second.
@shootX
unitbulletbuilding · 26
answered differently by 26 blocksDuo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign
Where it is aiming: the horizontal coordinate.
@shootY
unitbulletbuilding · 26
answered differently by 26 blocksDuo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign
Where it is aiming: the vertical coordinate.
@cameraX
buildingunit
Where the player’s camera is, horizontally. Only for a player, otherwise 0.
@cameraY
buildingunit
Where the player’s camera is, vertically. Only for a player, otherwise 0.
@cameraWidth
buildingunit
The width of the area the player sees, in tiles.
@cameraHeight
buildingunit
The height of the area the player sees, in tiles.
@displayWidth
building · 5
only on 5 blocksLogic Display, Large Logic Display, Tiled Logic Display, Canvas, Large Canvas
The width of a display in points.
@displayHeight
building · 5
only on 5 blocksLogic Display, Large Logic Display, Tiled Logic Display, Canvas, Large Canvas
The height of a display in points.
@bufferSize
building · 6
only on 6 blocksMessage, Logic Display, Large Logic Display, Tiled Logic Display, Reinforced Message, World Message
How many draw commands the display buffer has accumulated already.
@operations
building · 3
only on 3 blocksLogic Display, Large Logic Display, Tiled Logic Display
How many instructions the processor runs per tick.
@size
block typebuildingunit typeunitbullet
Size: for a block the side in tiles, for a unit the size of its hitbox.
@solid
block typebuilding
Whether the block can be walked through: 1 means no.
@dead
buildingunitbullet
1 if the object is gone.
@range
buildingunit typeunitbullet
Range in tiles: for a turret its fire, for a unit its weapon.
@shooting
unitbuilding · 26
answered differently by 26 blocksDuo, Scatter, Scorch, Hail, Wave, Lancer, Arc, Swarmer, Salvo, Tsunami, Fuse, Ripple, Cyclone, Foreshadow, Spectre, Meltdown, Breach, Diffuse, Sublimate, Titan, Disperse, Afflict, Lustre, Scathe, Smite, Malign
1 while it is firing.
@boosting
unit
1 if the mech is flying right now.
@mineX
unit
The tile the unit is mining, horizontally. Not mining — −1.
@mineY
unit
The tile the unit is mining, vertically. Not mining — −1.
@mining
unit
1 while the unit is mining.
@buildX
unitbuilding · 1
answered differently by 1 blockBuild Tower
The tile the unit is building, horizontally. Not building — −1.
@buildY
unitbuilding · 1
answered differently by 1 blockBuild Tower
The tile the unit is building, vertically. Not building — −1.
@pingX
unit
Where the player put a ping, horizontally. No ping — null.
@pingY
unit
Where the player put a ping, vertically. No ping — null.
@pingText
unit
The label of the player’s ping.
@building
unitbuilding · 17
answered differently by 17 blocksbuild1, build2, build3, build4, build5, build6, build7, build8, build9, build10, build11, build12, build13, build14, build15, build16, Build Tower
The building the unit is putting up right now.
@breaking
unitbuilding · 17
answered differently by 17 blocksbuild1, build2, build3, build4, build5, build6, build7, build8, build9, build10, build11, build12, build13, build14, build15, build16, Build Tower
1 if the unit is not building but tearing down.
@speed
unit typeunitbullet
unitbullet
Speed, tiles per second, including boosts.
@team
buildingunitbullet
buildingunitbullet
The team number.
@type
buildingunit
What it is: a block type or a unit type. Not a string but an object — compare it with @router.
@flag
unit
unit
The unit’s flag: any number written to it through ucontrol flag.
@flying
unit typeunit
1 if the unit is in the air right now.
@controlled
buildingunit
By what kind of thing it is controlled: 0 is nobody, the other codes are below. Which processor it does not say: your own and somebody else’s share one code.
@controller
unit
The processor driving the unit. If it is not a processor driving it, it gives back the unit itself, so a player at the wheel cannot be told from the unit’s own AI.
@name
block typeunit typeunititemliquidteam
The name: for content its logic identifier, for a unit the name of the player controlling it.
@payloadCount
buildingunit
How much payload it is carrying.
@payloadType
buildingunit
unit
What exactly it is carrying: a unit type or a block.
@totalPayload
unit
The payload volume taken up, in tiles.
@payloadCapacity
unit typeunit
How much payload it holds, in tiles.
@maxUnits
building · 6
only on 6 blocksCore: Shard, Core: Foundation, Core: Nucleus, Core: Bastion, Core: Citadel, Core: Acropolis
The team’s unit limit.
@id
block typeunit typeitemliquidteam
The content’s number in the game’s list.
@selectedBlock
unit
Which block the player has selected in the build panel.
@selectedRotation
unit
Which rotation the player has selected in the build panel.
@bulletLifetime
bullet
bullet
How much flying the bullet has left, in ticks.
@bulletTime
bullet
bullet
How long the bullet has been flying, in ticks.
@enabled
building
answered differently by 3 blocksDoor, Large Door, Blast Door
Whether the block is switched on.
@shoot
Firing at a point.
@shootp
Firing at a target with lead.
@config
building
answered differently by 14 blocksGround Factory, Air Factory, Naval Factory, Additive Reconstructor, Multiplicative Reconstructor, Exponential Reconstructor, Tetrative Reconstructor, Tank Fabricator, Ship Fabricator, Mech Fabricator, Tank Refabricator, Ship Refabricator, Mech Refabricator, Prime Refabricator
The block’s setting: a sorter’s item, a liquid, a node’s link point.
@color
block typebuildingunititemliquidteambullet
answered differently by 1 blockIlluminator
Colour: for content its own, for a building and a unit the team colour. Packed into a number, taken apart with unpackcolor.

@controlled codes

  • 1@ctrlProcessor
  • 2@ctrlPlayer
  • 3@ctrlCommand

Data taken from Mindustry v160.4 by the project generators.

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.