QtCraft API C++ classes QML types Handbook

QcCampfireDefinition Struct

A campfire (decision E-772). More...

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

Public Functions

bool cooks() const
bool isCampfire() const

Public Variables

QString category
QString extinguishesInto
QStringList kinds
QString lightsInto
double seconds
int slotCount

Static Public Members

const double maxSeconds
const int maxSlots

Detailed Description

A lit one (slotCount above 0) takes up to slotCount items with the use button that the smelting recipes of category and kinds turn into their results in seconds each (the recipe's own time does not count); the results drop beside it. extinguishesInto is the block it becomes when put out (a shovel, a water bucket), lightsInto the block an unlit one becomes when lit (flint and steel). Only slotCount reaches the client.

Member Function Documentation

bool QcCampfireDefinition::cooks() const

Returns whether it cooks (slotCount above 0, a lit campfire).

bool QcCampfireDefinition::isCampfire() const

Returns whether the block is a campfire at all, lit (it cooks) or unlit (it can be lit).

Member Variable Documentation

QString QcCampfireDefinition::category

Smelting recipe category it cooks ("category", default "smelting").

QString QcCampfireDefinition::extinguishesInto

Qualified block it becomes when put out ("extinguishesInto"); empty for none.

QStringList QcCampfireDefinition::kinds

Recipe kinds it takes ("kinds", 1 to 16); empty: every kind.

QString QcCampfireDefinition::lightsInto

Qualified block an unlit one becomes when lit ("lightsInto"); empty for none.

const double QcCampfireDefinition::maxSeconds

Upper limit of seconds.

const int QcCampfireDefinition::maxSlots

Upper limit of slotCount.

double QcCampfireDefinition::seconds

Seconds each item takes ("seconds", QcSmeltingRecipe::minSeconds to maxSeconds).

int QcCampfireDefinition::slotCount

Items it cooks at once ("slots", 0 to maxSlots); 0 for an unlit campfire.