Skip to content

Commit

Permalink
Maybe it'll work?
Browse files Browse the repository at this point in the history
  • Loading branch information
cerebral-314 committed Aug 13, 2024
1 parent edb6e1a commit 2169e52
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions mission/config/functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ class CfgFunctions
class mod_support
{
class init_comms {};
class check_zeus_pack {};
};

class paradigm_interop
Expand Down
9 changes: 3 additions & 6 deletions mission/functions/core/init/fn_curator_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ private _myCurObject = objNull;

if(_playerIsCurator == false) exitWith {};

if (!(isClass (configFile >> "CfgPatches" >> "zen_main")) || !(isClass (configFile >> "CfgPatches" >> "cba_main"))) exitWith {
// Bro-Nation Zeus Pack is not loaded so we can't use the curator system
_imag = "<img size='3' image='custom\wheelmenu\siren.paa' align='center'/>";
_text = "<br/><t color='#ff0000' size='3' shadow='1' shadowColor='#000000' align='center'>Warning!</t><br/>You must have the Bro-Nation Zeus Pack and CBA_A3 enabled to have curation access.<br/>";
hint parseText (_imag + _text);
};
// call vn_mf_fnc_check_zeus_pack with remoteExec to check if the player has the required mods
[_player] remoteExec ["vn_mf_fnc_check_zeus_pack", _player];
if (_player getVariable ["hasZeusPack", false] == false) exitWith {};

[_player] call {
[0, {
Expand Down
17 changes: 17 additions & 0 deletions mission/functions/mod_support/fn_check_zeus_pack.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
private _result = false;

if (!(isClass (configFile >> "CfgPatches" >> "zen_main")) || !(isClass (configFile >> "CfgPatches" >> "cba_main"))) exitWith {
// Bro-Nation Zeus Pack is not loaded so we can't use the curator system
_imag = "<img size='3' image='custom\wheelmenu\siren.paa' align='center'/>";
_text = "<br/><t color='#ff0000' size='3' shadow='1' shadowColor='#000000' align='center'>Warning!</t><br/>You must have the Bro-Nation Zeus Pack and CBA_A3 enabled to have curation access.<br/>";
hint parseText (_imag + _text);

player setVariable ["hasZeusPack", false];

_result
};

player setVariable ["hasZeusPack", true];

_result = true;
_result

0 comments on commit 2169e52

Please sign in to comment.