#include <Active.h>
|
| Active (int sub, int id, int transp=UNDEF) |
|
| Active (QDataStream &str, int sub, int id, int transp=UNDEF) |
|
int | X () const |
|
int | Y () const |
|
void | Move (dirs dir) override |
|
void | ReceiveSignal (QString) override |
| Receive text signal. More...
|
|
void | Damage (int dmg, int dmg_kind) override |
|
QString | FullName () const override=0 |
|
Active * | ActiveBlock () overridefinal |
|
Shred * | GetShred () const |
|
World * | GetWorld () const |
|
virtual void | ActFrequent () |
|
void | ActRare () |
|
virtual inner_actions | ActInner () |
|
virtual int | ShouldAct () const |
|
virtual void | UpdateLightRadius () |
|
void | SetShred (Shred *) |
|
void | Farewell () |
|
void | Unregister () |
|
| Block (int sub, int kind, int transp=UNDEF) |
|
| Block (QDataStream &, int sub, int kind, int transp=UNDEF) |
|
virtual | ~Block () |
|
Block & | operator= (Block &)=delete |
|
| Block (Block &)=delete |
|
virtual bool | Catchable () const |
|
virtual bool | Inscribe (QString str) |
| Returns true on success. More...
|
|
virtual usage_types | Use (Block *user) |
|
virtual usage_types | UseOnShredMove (Block *user) |
|
virtual push_reaction | PushResult (dirs) const |
|
virtual Block * | DropAfterDamage (bool *delete_self) |
| Should return dropped block. More...
|
|
virtual Inventory * | HasInventory () |
|
virtual Animal * | IsAnimal () |
|
virtual Falling * | ShouldFall () |
|
virtual wearable | Wearable () const |
|
virtual int | DamageKind () const |
|
virtual int | DamageLevel () const |
|
virtual int | LightRadius () const |
|
virtual int | Weight () const |
|
int | GetId () const |
| Determines kind and sub, unique for every kind-sub pair. More...
|
|
void | Restore () |
| Set maximum durability. More...
|
|
void | Break () |
| Set durability to null. More...
|
|
void | Mend (int plus) |
| Increase durability, no more than MAX_DURABILITY. More...
|
|
void | SetDir (int dir) |
|
dirs | GetDir () const |
|
int | GetDurability () const |
|
QString | GetNote () const |
|
int | Transparent () const |
|
int | Sub () const |
|
int | Kind () const |
|
bool | operator== (const Block &) const |
|
bool | operator!= (const Block &) const |
|
void | SaveToFile (QDataStream &out) |
|
void | SaveNormalToFile (QDataStream &out) const |
|
void | RestoreDurabilityAfterSave () |
| Importart! Use it if block won't be deleted after SaveToFile. More...
|
|
|
void | SendSignalAround (QString) const |
|
void | DamageAround () const |
|
void | TryDestroy (int x, int y, int z) const |
| Damages block and destroys it if it is broken. More...
|
|
bool | IsSubAround (int sub) const |
| Returns true if there is at least 1 block of substance sub around. More...
|
|
bool | Gravitate (int range, int down, int up, int calmness) |
|
virtual void | DoRareAction () |
|
virtual int | Attractive (int sub) const |
|
virtual void | SaveAttributes (QDataStream &) const |
|
| Xyz (short x, short y, short z) |
|
| Xyz () |
|
short | Z () const |
|
void | SetXyz (short x, short y, short z) |
|
| Xy (short x, short y) |
|
| Xy () |
|
short | X () const |
|
short | Y () const |
|
Definition at line 46 of file Active.h.
Active::Active |
( |
int |
sub, |
|
|
int |
id, |
|
|
int |
transp = UNDEF |
|
) |
| |
Active::Active |
( |
QDataStream & |
str, |
|
|
int |
sub, |
|
|
int |
id, |
|
|
int |
transp = UNDEF |
|
) |
| |
void Active::ActFrequent |
( |
| ) |
|
|
virtual |
Active * Active::ActiveBlock |
( |
| ) |
|
|
finaloverridevirtual |
int Active::Attractive |
( |
int |
sub | ) |
const |
|
protectedvirtual |
void Active::Damage |
( |
int |
dmg, |
|
|
int |
dmg_kind |
|
) |
| |
|
overridevirtual |
void Active::DamageAround |
( |
| ) |
const |
|
protected |
void Active::DoRareAction |
( |
| ) |
|
|
protectedvirtual |
void Active::Farewell |
( |
| ) |
|
QString Active::FullName |
( |
| ) |
const |
|
overridepure virtual |
Reimplemented from Block.
Implemented in Telegraph, Bell, Clock, Door, Rabbit, Converter, Falling, Bush, Workbench, Grass, Box, Axe, Predator, Hammer, Liquid, Shovel, Pick, Container, Dwarf, Animal, RainMachine, Weapon, Illuminator, and Filter.
Shred * Active::GetShred |
( |
| ) |
const |
World * Active::GetWorld |
( |
| ) |
const |
bool Active::Gravitate |
( |
int |
range, |
|
|
int |
down, |
|
|
int |
up, |
|
|
int |
calmness |
|
) |
| |
|
protected |
bool Active::IsSubAround |
( |
int |
sub | ) |
const |
|
protected |
Returns true if there is at least 1 block of substance sub around.
Definition at line 219 of file Active.cpp.
void Active::Move |
( |
dirs |
dir | ) |
|
|
overridevirtual |
void Active::Moved |
( |
int |
| ) |
|
|
signal |
void Active::ReceivedText |
( |
const QString |
| ) |
|
|
signal |
void Active::ReceiveSignal |
( |
QString |
| ) |
|
|
overridevirtual |
void Active::ReRegister |
( |
dirs |
dir | ) |
|
|
private |
void Active::SendSignalAround |
( |
QString |
signal | ) |
const |
|
protected |
void Active::SetShred |
( |
Shred * |
new_shred | ) |
|
int Active::ShouldAct |
( |
| ) |
const |
|
virtual |
Reimplemented in Telegraph, Clock, Door, Converter, Bush, Grass, Box, Liquid, Container, Animal, Dwarf, RainMachine, and Illuminator.
Definition at line 29 of file Active.cpp.
void Active::TryDestroy |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
z |
|
) |
| const |
|
protected |
Damages block and destroys it if it is broken.
Definition at line 131 of file Active.cpp.
void Active::Unregister |
( |
| ) |
|
void Active::UpdateLightRadius |
( |
| ) |
|
|
virtual |
Shred* Active::shred = nullptr |
|
private |
The documentation for this class was generated from the following files: