78 bool Visible(
int x,
int y,
int z)
const;
109 void Examine(
int x,
int y,
int z);
114 void Throw(
int src,
int dest = 0,
int num = 1);
120 bool Obtain(
int src,
int dest = 0,
int num = 1);
122 void Craft (
int num);
123 void Build (
int num);
124 void Wield (
int num);
132 return chars[0] ==
'\0' ?
137 void Moved(
long x,
long y,
int z)
const;
140 void Notify(QString)
const;
152 void GetFocus(
int * x,
int * y,
int * z)
const;
164 void SetPlayer(
int set_x,
int set_y,
int set_z);
bool Obtain(int src, int dest=0, int num=1)
Tries to get block number num from outer inventory.
Block * ValidBlock(int num) const
Checks player/inventory/block existence, size limits.
void ShowFile(QString path)
bool Damage() const
Returns true if xyz are in world bounds.
int GetUsingInInventory() const
void BlockDestroy()
This is called when player block is destroyed.
World provides global physics and shred connection.
void MoveInsideInventory(int num_from, int num_to, int num=1)
Can also wield appropriate things.
void Updated()
This is emitted when some player property is updated.
int BreathPercent() const
This returns player breath reserve. On error returns -100.
long GetLongitude() const
Animal * NewPlayer() const
void SetCreativeMode(bool turn)
dirs GetDir() const
This returns current player direction (see enum dirs in header.h)
void SetPlayer(int set_x, int set_y, int set_z)
bool ForbiddenAdminCommands() const
Inventory * PlayerInventory() const
Returns nullptr if there is no inventory, otherwise returns inventory.
int SatiationPercent() const
Can be > 100 if player is gorged. On error returns -100.
int UsingType() const
This returns how player is using something now.
void GetString(QString &)
Player & operator=(const Player &)=delete
bool Visible(int x, int y, int z) const
This returns true if block at (x, y, z) is visible to player.
bool GetCreativeMode() const
void Moved(long x, long y, int z) const
void GetFocus(int *x, int *y, int *z) const
void StopUseAll()
Closes backpack, chests, etc.
void ProcessCommand(QString command)
void Notify(QString) const
This is emitted when a notification is needed to be displayed.
static constexpr quint64 UniqueIntFromString(const char *const chars)
const Block * GetBlock() const
Provides block ability to contain other blocks inside.
int UsingSelfType() const
This returns how player is using himself.
void Backpack()
Tries to switch usingSelfType from NO to OPEN.
void OverstepBorder(int)
This is emitted when player walks over shred border.
void UpdateXYZ()
Dir is not used, for slot signature compatibility only.
This class contains information specific to player and interface for manipulating him...
Block without special physics and attributes.
Player()
Constructor creates or loads player.
void CheckOverstep(int dir)
Checks if player walked over the shred border.
void Throw(int src, int dest=0, int num=1)
Tries to throw (drop out) block number num from inventory.
int HP() const
This returns player hitpoints, also known as durability.