QtCraft API C++ classes QML types Handbook

QcMachineDefinition Struct

Block capability of a machine (furnace, smoker, blast furnace): an input, a fuel and an output slot that work through the smelting recipes of category while fuel burns; kinds narrows them to recipes of those kinds (decision E-770). More...

Header: #include <common/content/recipes/QcMachineDefinition.h>

Public Functions

bool accepts(const QString &kind) const
bool isMachine() const

Public Variables

QString category
QStringList kinds
QString sound
double speed

Detailed Description

Member Function Documentation

bool QcMachineDefinition::accepts(const QString &kind) const

Returns whether a recipe of kind (empty: no kind) works in this machine.

bool QcMachineDefinition::isMachine() const

Returns whether the block is a machine (category is set).

Member Variable Documentation

QString QcMachineDefinition::category

Recipe category this machine processes; empty for blocks that are not machines.

QStringList QcMachineDefinition::kinds

Recipe kinds this machine takes (QcSmeltingRecipe::kind); empty: every recipe of its category.

QString QcMachineDefinition::sound

Sound heard now and then while fuel burns; empty for a silent machine.

double QcMachineDefinition::speed

Work done per second of burning, relative to a recipe's seconds; fuel burns at the same rate.