QcNoteInstruments Struct
The instruments of a note block (decision E-767): the sound it plays for the block below it, by that block's name, else by its sound material, else fallback. More...
| Header: | #include <common/content/blockbehaviour/QcSignalDefinition.h> |
Public Functions
| QString | of(const QString &block, const QString &soundMaterial) const |
Public Variables
Related Non-Members
| enum class | QcComparatorReading { None, Contents, Property, Carts, Bites } |
| enum class | QcPistonMobility { Default, Push, Immovable, Breaks } |
| enum class | QcSignalKind { None, Dust, Lever, Button, Plate, …, Viewers } |
| const int | qcSignalKindCount |
Detailed Description
Names and sounds are qualified.
Member Function Documentation
QString QcNoteInstruments::of(const QString &block, const QString &soundMaterial) const
Returns the sound for the block block below with the sound material soundMaterial.
Member Variable Documentation
QHash<QString, QString> QcNoteInstruments::byBlock
Sound by name of the block below ("blocks", at most QcSignalDefinition::maxInstruments).
QHash<QString, QString> QcNoteInstruments::bySound
Sound by sound material of the block below ("sounds", at most QcSignalDefinition::maxInstruments).
QString QcNoteInstruments::fallback
Sound for any other block below ("default").
Related Non-Members
enum class QcComparatorReading
What a Signal Comparator reads from a block behind it (decision E-343).
| Constant | Value | Description |
|---|---|---|
QcNoteInstruments::QcComparatorReading::None | 0 | Nothing to read (no \c {"comparator"}); the comparator takes the block's power. |
QcNoteInstruments::QcComparatorReading::Contents | 1 | Fullness of the block's container or machine slots (the reference formula). |
QcNoteInstruments::QcComparatorReading::Property | 2 | The index of the value of a state property, scaled to 0..15. |
QcNoteInstruments::QcComparatorReading::Carts | 3 | The fullness of a container minecart on the block (a detector rail, decision E-385); without one the comparator takes the block's power as usual. |
QcNoteInstruments::QcComparatorReading::Bites | 4 | Twice the bites left of a block eaten bite by bite (cake: 14 whole, 2 for the last bite; decision E-773). |
enum class QcPistonMobility
How a block reacts to being pushed by a piston.
| Constant | Value | Description |
|---|---|---|
QcNoteInstruments::QcPistonMobility::Default | 0 | Derived from the block: unbreakable blocks stay, blocks that need support, washable ones, liquids and replaceable ones break, the rest moves. |
QcNoteInstruments::QcPistonMobility::Push | 1 | Always moves (\c {"movable": "push"}). |
QcNoteInstruments::QcPistonMobility::Immovable | 2 | Bedrock, obsidian, an extended piston: the piston cannot extend. |
QcNoteInstruments::QcPistonMobility::Breaks | 3 | Breaks with its drops instead of moving. |
enum class QcSignalKind
What a block does in Signal Dust circuits (decision E-333).
The kind selects the behaviour the server implements; the numbers tune it per block, so packs and mods add their own sources (levers, buttons, plates), conductors and consumers ("slots": lamps, openers, pistons) in data.
| Constant | Value | Description |
|---|---|---|
QcNoteInstruments::QcSignalKind::None | 0 | Not part of circuits. |
QcNoteInstruments::QcSignalKind::Dust | 1 | The wire: carries strength 15 minus one per block, connects to neighbouring dust and components, climbs and descends blocks. |
QcNoteInstruments::QcSignalKind::Lever | 2 | Sources a player switches: a lever stays, a button springs back after pulseTicks. |
QcNoteInstruments::QcSignalKind::Button | 3 | A source that springs back after \c {pulseTicks}. |
QcNoteInstruments::QcSignalKind::Plate | 4 | Pressed while something stands on it (detectsItems: any entity, else players and creatures). |
QcNoteInstruments::QcSignalKind::Torch | 5 | An inverter on a block: lit unless its block is powered; burns out on too fast clocks. |
QcNoteInstruments::QcSignalKind::Repeater | 6 | A diode with 1 to 4 steps of delay from back to front; side inputs of powered repeaters lock it. |
QcNoteInstruments::QcSignalKind::Lamp | 7 | Slots: a lamp lights while powered; an opener (door, trapdoor, gate) opens on rising and closes on falling power; a piston pushes up to pushLimit blocks and pulls one back when sticky. |
QcNoteInstruments::QcSignalKind::Opener | 8 | A door, trapdoor or gate that opens on rising and closes on falling power. |
QcNoteInstruments::QcSignalKind::Piston | 9 | Pushes up to \c {pushLimit} blocks while powered; pulls one back when sticky. |
QcNoteInstruments::QcSignalKind::PistonHead | 10 | The head of an extended piston; it belongs to the piston behind it. |
QcNoteInstruments::QcSignalKind::Comparator | 11 | Stage 29.2 (decision E-342 ff.). A diode that reads the block behind it (container fullness, readable blocks) and compares or subtracts its side inputs. |
QcNoteInstruments::QcSignalKind::Observer | 12 | Sends a pulse out of its back when the block state in front of it changes. |
QcNoteInstruments::QcSignalKind::Hopper | 13 | Moves items between containers; any power locks it. |
QcNoteInstruments::QcSignalKind::Dispenser | 14 | On rising power ejects one item after a short delay: uses it (usesItems, dispenser) or throws it (dropper); both put it into a container in front. |
QcNoteInstruments::QcSignalKind::Rail | 15 | Stage 32.2 (decision E-384). A rail slot (powered and activator rails): powered while it gets power or while a rail of the same block at most railReach rails along its line gets power. |
QcNoteInstruments::QcSignalKind::Igniter | 16 | Stage 51.2 (decision E-601). A slot that primes the explosive it is (QcBlastDefinition) as soon as it gets power. |
QcNoteInstruments::QcSignalKind::Constant | 17 | A source that is always on (a block of Signal Dust, decision E-752): it gives power to the dust and components on all six sides, but never powers or conducts through the blocks next to it. |
QcNoteInstruments::QcSignalKind::Note | 18 | A slot that plays a note when its power rises (decision E-767); using it raises the pitch by a semitone. Its instrument comes from the block below (QcNoteInstruments). |
QcNoteInstruments::QcSignalKind::Target | 19 | A source with the strength of its state power, set by a projectile hitting it (the closer to the centre of the face, the stronger) and released after a short time (decision E-768). Like constant it powers dust and components on all sides, but no block. |
QcNoteInstruments::QcSignalKind::Hook | 20 | Stage 62.3 (decision E-782). A tripwire hook on the side of a block: a source like a button while powered (strongly into the block it hangs on). It is attached while a hook facing it waits at most wireReach cells of tripwire away; then both are powered while something touches the wire between them. |
QcNoteInstruments::QcSignalKind::Tripwire | 21 | The wire between two hooks: powered while an entity touches it (released when nothing has for pulseTicks), attached while it belongs to a line of two hooks, disarmed once shears cut it (it then breaks without setting the hooks off). |
QcNoteInstruments::QcSignalKind::Viewers | 22 | A source with the strength of its state power, the number of players looking into the container (the trapped chest, decision E-783): it powers dust and components on all sides and the block below it strongly. |
const int qcSignalKindCount
Number of values of QcSignalKind.