analog_transmission
A scriptable variable-ratio gearbox. Exposes the analog signal that selects the ratio (with override semantics that release back to redstone), plus input/output speed, stress, and orientation.
| getSignal() | Get the current analog signal driving the transmission ratio. |
|---|---|
| setSignal(signal) | Drive the transmission to a new signal and take external control. |
| releaseSignal() | Release external control and return signal driving to redstone. |
| isExternallyControlled() | Check whether the transmission is currently under script control. |
| getRotationModifier() | Get the current rotation modifier (output:input speed ratio). |
| getOutputSpeed() | Get the output shaft speed. |
| getOutputTheoreticalSpeed() | Get the output shaft's theoretical (target) speed. |
| getOutputStressImpact() | Get the output-side stress impact (post-ratio kinetic accounting). |
| isOversaturated() | Check whether the transmission is oversaturated. |
| getAxis() | Get the transmission's shaft axis name. |
| getSelfId() | Get this block's id. |
| getSourceId() | Get the id of the block immediately driving this one, or nil if this block has no source. |
| getSubnetworkAnchorId() | Get the id of this block's speed-zone anchor — the gearshift / clutch / speed controller / generator that defines the start of this speed zone. |
| getNetworkId() | Get the id of this block's kinetic network. |
| getKind() | Get this block's role on the kinetic graph: one of "generator", "split_shaft", "consumer", or "passthrough". |
| getSpeed() | Get the local rotational speed at this block. |
| hasSource() | Check whether this block is connected to a kinetic source. |
| isOverstressed() | Check whether the block's network is overstressed. |
| getStressImpact() | Get the stress impact of this block on its network — how much stress it draws while running. |
| getStressContribution() | Get this block's contribution to its network's stress capacity. |
- getSignal()Source
Get the current analog signal driving the transmission ratio.
Returns
numberThe signal, 0..15.
- setSignal(signal)Source
Drive the transmission to a new signal and take external control. Flips externallyControlled even when signal == current; calling setSignal(getSignal()) is the documented way to grab control without changing the value. releaseSignal() returns control to redstone.
Parameters
- signal
numberThe target signal, clamped to 0..15.
- signal
- releaseSignal()Source
Release external control and return signal driving to redstone.
- isExternallyControlled()Source
Check whether the transmission is currently under script control.
Returns
booleanTrue if externally controlled, false if driven by redstone.
- getRotationModifier()Source
Get the current rotation modifier (output:input speed ratio).
Returns
numberThe rotation modifier.
- getOutputSpeed()Source
Get the output shaft speed.
Returns
numberThe output speed.
- getOutputTheoreticalSpeed()Source
Get the output shaft's theoretical (target) speed.
Returns
numberThe output theoretical speed.
- getOutputStressImpact()Source
Get the output-side stress impact (post-ratio kinetic accounting).
Returns
numberThe output stress impact.
- isOversaturated()Source
Check whether the transmission is oversaturated.
Returns
booleanTrue if oversaturated.
- getAxis()Source
Get the transmission's shaft axis name.
Returns
stringThe axis as a serialized string ("x", "y", or "z").
- getSelfId()Source
Get this block's id. Other peripherals'
getSourceIdorgetSubnetworkAnchorIdreturn this same id when they refer to this block.Returns
stringThe block's id.
- getSourceId()Source
Get the id of the block immediately driving this one, or nil if this block has no source.
Returns
stringThe parent's id, or nil.
- getSubnetworkAnchorId()Source
Get the id of this block's speed-zone anchor — the gearshift / clutch / speed controller / generator that defines the start of this speed zone. Two blocks share an anchor iff they're in the same speed zone. A generator or split-shaft returns its own
getSelfId.Returns
stringThe anchor block's id, or nil.
- getNetworkId()Source
Get the id of this block's kinetic network. Same value for every block on the same network regardless of how many speed zones lie between them. Nil if this block isn't on a network.
Returns
stringThe network id, or nil.
- getKind()Source
Get this block's role on the kinetic graph: one of
"generator","split_shaft","consumer", or"passthrough".Returns
stringThe role string.
- getSpeed()Source
Get the local rotational speed at this block. Signed; same value across a speed zone, changes across a split-shaft.
Returns
numberThe local speed.
- hasSource()Source
Check whether this block is connected to a kinetic source.
Returns
booleanTrue if a source is connected.
- isOverstressed()Source
Check whether the block's network is overstressed.
Returns
booleanTrue if overstressed.
- getStressImpact()Source
Get the stress impact of this block on its network — how much stress it draws while running. Speed-dependent; zero for sources and pure conduit blocks. Matches the "Stress Impact" value shown by goggles.
Returns
numberThe stress impact.
- getStressContribution()Source
Get this block's contribution to its network's stress capacity. Non-zero for sources only. Parallel to
getStressImpact(per-block draw) and distinct fromCreate_Stressometer#getStressCapacity, which reports the network total.Returns
numberThe per-block stress contribution.