QcBlockDyeing Class
A dye used on a block that takes colours (decision E-765): the block's dyeProperty (the colour of the signal indicator light) becomes the dye's colour (QcItemDefinition::dye), and the player gives one dye (not in creative mode). More...
| Header: | #include <server/blocks/QcBlockDyeing.h> |
Public Functions
| bool | dye(QcServerClient &client, QcBlockPos target, const QcItemDefinition *held) |
| bool | dyeSign(QcServerClient &client, QcBlockPos target, const QcItemDefinition *held) |
Detailed Description
On a sign with text, the dye colours the text instead (decision E-830). Made for one use, like QcOpeners.
Member Function Documentation
bool QcBlockDyeing::dye(QcServerClient &client, QcBlockPos target, const QcItemDefinition *held)
Dyes the block target that client clicked within reach with the held item. Returns false when the held item is no dye, the block takes no colour or not this one (then other uses of the item may follow). The same colour again takes no dye but still counts as used.
bool QcBlockDyeing::dyeSign(QcServerClient &client, QcBlockPos target, const QcItemDefinition *held)
Colours the text of the sign target that client clicked (decision E-830) when the held item is a dye of a sign colour, the sign has text and the player may write on it (QcServerSigns::mayWrite); returns false otherwise (then the sign opens its editor). The colour the text already has takes no dye but still counts as used.