1
0
Fork 0
cuberite-2a/src/BlockEntities/SignEntity.h

53 lines
1.1 KiB
C
Raw Permalink Normal View History

// SignEntity.h
// Declares the cSignEntity class representing a single sign in the world
#pragma once
#include "BlockEntity.h"
// tolua_begin
2014-07-17 20:50:58 +00:00
class cSignEntity :
public cBlockEntity
{
// tolua_end
2016-02-05 21:45:45 +00:00
2020-04-13 16:38:06 +00:00
using Super = cBlockEntity;
public: // tolua_export
2016-02-05 21:45:45 +00:00
2015-07-31 14:49:10 +00:00
/** Creates a new empty sign entity at the specified block coords and block type (wall or standing). a_World may be nullptr */
cSignEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World);
// tolua_begin
2016-02-05 21:45:45 +00:00
2015-07-31 14:49:10 +00:00
/** Sets all the sign's lines */
void SetLines(const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
2016-02-05 21:45:45 +00:00
2015-07-31 14:49:10 +00:00
/** Sets individual line (zero-based index) */
void SetLine(int a_Index, const AString & a_Line);
2015-07-31 14:49:10 +00:00
/** Retrieves individual line (zero-based index) */
AString GetLine(int a_Index) const;
2016-02-05 21:45:45 +00:00
// tolua_end
2016-02-05 21:45:45 +00:00
2017-06-15 13:32:33 +00:00
// cBlockEntity overrides:
virtual void CopyFrom(const cBlockEntity & a_Src) override;
virtual bool UsedBy(cPlayer * a_Player) override;
virtual void SendTo(cClientHandle & a_Client) override;
private:
AString m_Line[4];
} ; // tolua_export