2019-02-24 19:36:50 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
/*
|
|
|
|
* Author: Dystopian
|
|
|
|
* Check whether local player is currently allowed to create a Zeus Module
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Allowed to create module <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call ace_zeus_fnc_canCreateModule
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2020-10-25 19:01:59 +00:00
|
|
|
// Don't allow if we already are a zeus, intentionally using player instead of ace_player
|
|
|
|
if (!isNull getAssignedCuratorLogic player) exitWith { false };
|
|
|
|
|
2019-02-24 20:03:54 +00:00
|
|
|
(isNil QGVAR(zeus)) && {
|
2019-02-24 19:36:50 +00:00
|
|
|
switch (GVAR(canCreateZeus)) do {
|
|
|
|
case CAN_CREATE_ADMIN: {isServer || {IS_ADMIN_LOGGED}};
|
|
|
|
case CAN_CREATE_CONSOLE: {call BIS_fnc_isDebugConsoleAllowed};
|
|
|
|
case CAN_CREATE_ALL: {true};
|
|
|
|
default {false};
|
|
|
|
}
|
|
|
|
}
|