-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from OverlordZorn/music-sahara-phone-music
Music - New Music and Function Rework
- Loading branch information
Showing
23 changed files
with
2,003 additions
and
376 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class Extended_PreInit_EventHandlers { | ||
class CVO_Music_CBA_Settings_XHE_PreInit { | ||
class CVO_Intel_CBA_Settings_XHE_PreInit { | ||
init = "call compile preprocessFileLineNumbers 'z\cvo\addons\intel\XEH_preInit.sqf'"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3 MB
addons/music/data/saharan_cellphones/Etran de LAir - Toubouk Ine Chihoussay.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#include "../script_component.hpp" | ||
|
||
/* | ||
* Author: Zorn | ||
* Function to Add a Playlist to the Music System. | ||
* If the Playlist already exists | ||
* | ||
* Arguments: | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* ['something', player] call cvo_fnc_sth | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params [ | ||
["_playlistName", "", [""] ], | ||
["_addEntries", [], [[]] ], | ||
["_removeEntries", [], [[]] ] | ||
]; | ||
|
||
if (_playlistName == "") exitWith {false}; | ||
|
||
// create the Hashmap if it doesnt exist | ||
private _map = missionNamespace getVariable [QGVAR(Playlist_HM), "404"]; | ||
if (_map isEqualTo "404") then {_map = createHashMap}; | ||
|
||
//generates the list of CfgMusic Entries and stores it in the HashMap | ||
private _allSongs = _map getOrDefault ["allSongs", "404"]; | ||
|
||
if (_allSongs isEqualTo "404") then { | ||
_allSongs = ("true" configClasses (configFile >> "CfgMusic") apply {configName _x}); | ||
_map set ["allSongs", _allSongs]; | ||
}; | ||
|
||
_addEntries = _addEntries select { _x in _allSongs}; | ||
_removeEntries = _removeEntries select { _x in _allSongs}; | ||
|
||
|
||
|
||
// retrieve existing hashmap if it exists already, if not, create an empty array | ||
private _playlist = _map getOrDefault [_playlistName, []]; | ||
_playlist = _playlist + _addEntries - _removeEntries; | ||
|
||
// Filter out duplicates | ||
_playlist = _playlist arrayIntersect _playlist; | ||
|
||
_map set [_playlistName, _playlist]; | ||
|
||
missionNamespace setVariable [QGVAR(Playlist_HM), _map]; | ||
|
||
[_playlistName, _playlist] |
Oops, something went wrong.