QtCraft API C++ classes QML types Handbook

QcAnvil::Result Struct

struct QcAnvil::Result

What the anvil makes of its two slots. More...

Header: #include <common/gameplay/QcAnvil.h>

Public Functions

bool isEmpty() const
bool isTooExpensive() const

Public Variables

int levelCost
QcItemStack output
int rightUsed

Detailed Description

Member Function Documentation

bool Result::isEmpty() const

Returns whether there is nothing to do (an empty output).

bool Result::isTooExpensive() const

Returns whether it costs too much for a player outside creative mode.

Member Variable Documentation

int Result::levelCost

Levels it costs, prior-work penalty included.

QcItemStack Result::output

Empty: nothing to do (no change, or the right stack does not fit the left one).

int Result::rightUsed

How many of the right stack's items it uses up.