46 int x =
X(), y =
Y(), z =
Z();
54 case DOWN: ++z;
break;
55 case NORTH: ++y;
break;
56 case SOUTH: --y;
break;
57 case EAST: --x;
break;
58 case WEST: ++x;
break;
66 if ( not world->
Build(material, x, y, z,
74 const int id = material->
GetId();
79 if ( block_i &&
id==block_i->
GetId() ) {
101 if ( attached_inv ==
nullptr )
return;
104 if ( vessel ==
nullptr )
return;
107 if ( vessel_inv ==
nullptr )
return;
110 if ( liquid ==
nullptr )
return;
139 const int builder_slot)
152 const int src,
const int dest,
const int n)
191 attachedBlock(attached),
bool Move(int x, int y, int z, dirs dir)
Check and move.
static dirs TurnRight(dirs dir)
bool Drop(Block *from, int x_to, int y_to, int z_to, int src, int dest, int num)
Returns true on success.
void MoveInside(int num_from, int num_to, int num)
World provides global physics and shred connection.
void Move(dirs dir) override
static dirs Anti(dirs dir)
virtual push_reaction PushResult(dirs) const
virtual Inventory * HasInventory()
Block * ShowBlock(int slot) const
void SetSetFire(int x, int y, int z)
void SetXyz(short x, short y, short z)
int DamageKind() const override
void Jump(int x, int y, int z, dirs dir)
void SetDamage(int x, int y, int z)
Block * GetBlock(int x, int y, int z) const
virtual int DamageLevel() const
Provides declaration for class Inventory for freg.
void SetThrow(int x, int y, int z, int src_slot, int dest_slot, int unum)
void SetBuild(int x, int y, int z, int builder_slot)
Attached block should have inventory.
static Block * NewBlock(int kind, int sub)
Use this to receive a pointer to new not-normal block.
void DestroyAndReplace(int x, int y, int z)
Does not check target block durability.
int GetId() const
Determines kind and sub, unique for every kind-sub pair.
void SetGhostMove(int dir)
void Pull(int num)
Removes block from inventory. Does not delete block.
Provides block ability to contain other blocks inside.
bool Build(Block *thing, int x, int y, int z, int dir=UP, Block *who=nullptr, bool anyway=false)
Returns true on successfull build, otherwise false.
int Damage(int x, int y, int z, int level, int dmg_kind)
Returns damaged block result durability.
Animal *const attachedBlock
DeferredAction(Animal *attached)
Block without special physics and attributes.
void SetPour(int x, int y, int z, int slot)