Skip to content

Commit

Permalink
Fix bug introduced with ace update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapawingo committed May 23, 2024
1 parent 9526abe commit c2c3d7d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
52 changes: 52 additions & 0 deletions framework/components/3den/functions/fn_checklist.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#include "script_component.hpp"
/*
* Author: Eric
* Runs checks for a minimal list of required things for Cluster Community Missions
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call cmf_3den_fnc_checklist
*
* Public: No
*/

private _allEntites = all3DENEntities;
private _allObjects = _allEntites select 0;
private _allSystems = _allEntites select 3;

/* Check if there exists playerunits */
private _playerUnits = _allObjects findIf {
private _playable = (_x get3DENAttribute "ControlMP") select 0;
private _player = (_x get3DENAttribute "ControlSP") select 0;

(_player || _playable);
} > -1;

/* Check if there exists a zeus unit */
private _zeus = _allSystems findIf {
_x isKindOf "ModuleCurator_F"
} > -1;

/* Check if there exists a respawn */
private _respawns = _allSystems findIf {
_x isKindOf "ModuleRespawnPosition_F"
} > -1;

// Check Kosher Arsenal loadout

/* Check if there exists a ammobox */
private _ammobox = _allObjects findIf {
[_x, QEFUNC(kosherArsenal,ammobox)] call cmf_3den_fnc_inInit;
} > -1;

// Check for Mission Data
private _missionData = _allObjects findIf {
(_x get3DENAttribute 'Name') isEqualTo ['cmf_3den_missionDataLogic_old'];
} > -1;

// Check for warning order
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (_object getVariable [QGVAR(ammobox_initialized), false]) exitWith { false };
/* ammobox function */
private _onOpen = {
/* Create the arsenal object and initialize ace arsenal on it */
private _arsenal = "HeliHEmpty" createVehicleLocal [0,0,0];
private _arsenal = (createGroup sideLogic) createUnit ["Logic", [0, 0, 0], [], 0, "CAN_COLLIDE"];
[_arsenal, []] call ace_arsenal_fnc_initBox;

/* Get player's role and loadout */
Expand Down
5 changes: 3 additions & 2 deletions framework/components/kosherArsenal/functions/fn_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ if (!hasInterface) exitWith {};
if (_reJip && { ESETTING(gameplay,safestart) && { missionNamespace getVariable [QEGVAR(gameplay,safestart_disable), false] } }) exitWith { };

/* Create the arsenal object and initialize ace arsenal */
private _arsenal = "HeliHEmpty" createVehicleLocal [0,0,0];
private _arsenal = (createGroup sideLogic) createUnit ["Logic", [0, 0, 0], [], 0, "CAN_COLLIDE"];
systemChat str _arsenal;
[_arsenal, []] call ace_arsenal_fnc_initBox;

/* Load the whitelist */
Expand Down Expand Up @@ -147,7 +148,7 @@ if (!hasInterface) exitWith {};
};

/* Delete arsenal object */
deleteVehicle _arsenal;
//deleteVehicle _arsenal;

/* Delete light if enabled */
if (_light) then {
Expand Down

0 comments on commit c2c3d7d

Please sign in to comment.