QcLiquidParser Namespace
Parses the "flow" object of a liquid block: how far and how fast it spreads, whether it makes new sources, its bucket, bottle and sound, and its reactions with other liquids. More...
| Header: | #include <common/content/blockbehaviour/QcLiquidParser.h> |
Functions
| void | checkStates(const QcBlockDefinition &block, QcJsonFieldReader &flowReader) |
| QcLiquidDefinition | parseFlow(const QJsonObject &flowJson, QcJsonFieldReader &flowReader, const QString &packNamespace) |
Detailed Description
Function Documentation
void QcLiquidParser::checkStates(const QcBlockDefinition &block, QcJsonFieldReader &flowReader)
Checks the states of a flowing liquid: the flow keeps its state in level ("0" source, then one value per block of distance, in order) and optionally falling (false, true); block (with its flow) must have them. Problems go to flowReader.
QcLiquidDefinition QcLiquidParser::parseFlow(const QJsonObject &flowJson, QcJsonFieldReader &flowReader, const QString &packNamespace)
Returns the liquid of the "flow" object flowJson, names qualified in packNamespace; problems go to flowReader.