summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/JukeboxEntity.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/JukeboxEntity.h17
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