QtCraft API C++ classes QML types Handbook

QcVillagerOutfits Namespace

The outfits villagers wear (decision E-411): for every look (the default one of each villager species and each style's) and every profession with layers, the look's outfit with the profession's layers laid over it (an apron over the style's shirt), registered as a creature outfit under outfitName(). More...

Header: #include <common/content/villages/QcVillagerOutfits.h>

Functions

QStringList generate(QcContentRegistry &registry)
QString outfitName(const QString &outfit, const QcVillagerProfession &profession)

Detailed Description

It runs when the content is finished (QcContentRegistry::finish), so the styles and professions of mods get theirs too, and the clients receive them with the other appearances.

Function Documentation

QStringList QcVillagerOutfits::generate(QcContentRegistry &registry)

Registers the joined outfits in registry; returns warnings about looks whose outfit, hair or hats the content lacks.

QString QcVillagerOutfits::outfitName(const QString &outfit, const QcVillagerProfession &profession)

Returns the outfit a villager of profession wears in a look whose outfit is outfit: the joined one when the profession has layers, else the look's own.