QtCraft API C++ classes QML types Handbook

QcBlockEntities::Memory Struct

struct QcBlockEntities::Memory

What circuit components remember at their position (decision E-335). More...

Public Functions

bool forgetUnfitting(QcSignalKind kind)
bool isEmpty() const

Public Variables

quint64 burntOutUntil
std::optional<quint64> extendingSince
bool powered
QList<quint64> torchOffTicks

Detailed Description

Member Function Documentation

bool Memory::forgetUnfitting(QcSignalKind kind)

Forgets what does not belong to a component of kind. Returns whether nothing is left.

bool Memory::isEmpty() const

Returns whether it remembers nothing.

Member Variable Documentation

quint64 Memory::burntOutUntil

A burnt-out torch may light again from this tick on; 0: not burnt out.

std::optional<quint64> Memory::extendingSince

A piston whose extension started at this tick: retracting before it ends lets a sticky piston drop its block (block spitting).

bool Memory::powered

An opener (the lower half of a door) that was powered when last looked at: it only switches when that changes, so players can still open and close it by hand.

QList<quint64> Memory::torchOffTicks

Ticks at which a torch went out lately (for burning out); not saved.