diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-09 13:53:50 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-09 13:53:50 +0100 |
commit | c2978a34576192d79c1fdc4664eafe316be49e51 (patch) | |
tree | 48db5c74ed757bfdf178a70e77eddff693c76a35 /src/BlockEntities/JukeboxEntity.h | |
parent | Hexified colours (diff) | |
parent | Updated Core (diff) | |
download | cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.tar cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.tar.gz cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.tar.bz2 cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.tar.lz cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.tar.xz cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.tar.zst cuberite-c2978a34576192d79c1fdc4664eafe316be49e51.zip |
Diffstat (limited to 'src/BlockEntities/JukeboxEntity.h')
-rw-r--r-- | src/BlockEntities/JukeboxEntity.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/BlockEntities/JukeboxEntity.h b/src/BlockEntities/JukeboxEntity.h index 734d7bb66..3d1d604f7 100644 --- a/src/BlockEntities/JukeboxEntity.h +++ b/src/BlockEntities/JukeboxEntity.h @@ -37,10 +37,21 @@ public: int GetRecord(void); void SetRecord(int a_Record); - void PlayRecord(void); - /// Ejects the currently held record as a pickup. Does nothing when no record inserted. - void EjectRecord(void); + /** Plays the specified Record. Return false if a_Record isn't a playable Record (E_ITEM_XXX_DISC). + If there is a record already playing, ejects it first. */ + bool PlayRecord(int a_Record); + + /** Ejects the currently held record as a pickup. Return false when no record had been inserted. */ + bool EjectRecord(void); + + /** Is in the Jukebox a Record? */ + bool IsPlayingRecord(void); + + static bool IsRecordItem(int a_Item) + { + return ((a_Item >= E_ITEM_FIRST_DISC) && (a_Item <= E_ITEM_LAST_DISC)); + } // tolua_end |