mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
More Privates
This commit is contained in:
parent
9c054b7f35
commit
00f26144ec
@ -13,6 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_interval", "_player", "_newVel", "_accel", "_currentGForce", "_average", "_sum", "_classCoef", "_suitCoef", "_gBlackOut", "_gRedOut", "_g", "_gBO", "_coef", "_strength"];
|
||||||
|
|
||||||
EXPLODE_2_PVT(_this,_params,_pfhId);
|
EXPLODE_2_PVT(_this,_params,_pfhId);
|
||||||
|
|
||||||
_interval = time - GVAR(lastUpdateTime);
|
_interval = time - GVAR(lastUpdateTime);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount"];
|
private ["_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light", "_losCount", "_dirToUnitVector", "_eyeDir", "_eyePos"];
|
||||||
|
|
||||||
PARAMS_1(_grenade);
|
PARAMS_1(_grenade);
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ PARAMS_1(_projectile);
|
|||||||
if (alive _projectile) then {
|
if (alive _projectile) then {
|
||||||
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
|
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
|
||||||
|
|
||||||
|
private "_affected";
|
||||||
_affected = _projectile nearEntities ["CAManBase", 50];
|
_affected = _projectile nearEntities ["CAManBase", 50];
|
||||||
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
|
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
@ -12,6 +12,8 @@ PREP(sendMarkersJIP);
|
|||||||
PREP(setMarkerJIP);
|
PREP(setMarkerJIP);
|
||||||
PREP(setMarkerNetwork);
|
PREP(setMarkerNetwork);
|
||||||
|
|
||||||
|
private ["_config", "_marker", "_a", "_scope", "_icon", "_rgba", "_name"];
|
||||||
|
|
||||||
// init marker types
|
// init marker types
|
||||||
if (isNil QGVAR(MarkersCache)) then {
|
if (isNil QGVAR(MarkersCache)) then {
|
||||||
_config = configfile >> "CfgMarkers";
|
_config = configfile >> "CfgMarkers";
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#define BORDER 0.005
|
#define BORDER 0.005
|
||||||
|
|
||||||
[{
|
[{
|
||||||
|
private ["_display", "_text", "_picture", "_channel", "_buttonOK", "_buttonCancel", "_description", "_title", "_descriptionChannel", "_sizeX", "_sizeY", "_aceShapeLB", "_aceColorLB", "_aceAngleSlider", "_aceAngleSliderText", "_mapIDD", "_pos", "_posX", "_posY", "_posW", "_posH", "_offsetButtons", "_buttonOk", "_curSelShape", "_curSelColor", "_curSelAngle"];
|
||||||
|
|
||||||
disableserialization;
|
disableserialization;
|
||||||
PARAMS_1(_display);
|
PARAMS_1(_display);
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ GVAR(rangeFinderPositionASL) = [];
|
|||||||
|
|
||||||
GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset");
|
GVAR(mapAltitude) = getNumber (configFile >> "CfgWorlds" >> worldName >> "elevationOffset");
|
||||||
|
|
||||||
|
private ["_worldMapLong", "_worldMapLat", "_zone", "_band", "_squareID"];
|
||||||
|
|
||||||
//Calculate the map's MGRS:
|
//Calculate the map's MGRS:
|
||||||
_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude");
|
_worldMapLong = getNumber (configFile >> "CfgWorlds" >> worldName >> "longitude");
|
||||||
_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude");
|
_worldMapLat = getNumber (configFile >> "CfgWorlds" >> worldName >> "latitude");
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
PARAMS_2(_waypointName,_waypointPosASL);
|
PARAMS_2(_waypointName,_waypointPosASL);
|
||||||
|
|
||||||
|
private "_waypoints";
|
||||||
|
|
||||||
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
||||||
_waypoints pushBack [_waypointName, _waypointPosASL];
|
_waypoints pushBack [_waypointName, _waypointPosASL];
|
||||||
ace_player setVariable [QGVAR(waypoints), _waypoints];
|
ace_player setVariable [QGVAR(waypoints), _waypoints];
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
PARAMS_1(_wpIndex);
|
PARAMS_1(_wpIndex);
|
||||||
|
|
||||||
|
private "_waypoints";
|
||||||
|
|
||||||
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
_waypoints = ace_player getVariable [QGVAR(waypoints), []];
|
||||||
|
|
||||||
if ((_wpIndex < 0) || (_wpIndex > ((count _waypoints) - 1))) exitWith {ERROR("out of bounds wp");};
|
if ((_wpIndex < 0) || (_wpIndex > ((count _waypoints) - 1))) exitWith {ERROR("out of bounds wp");};
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
|
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
|
||||||
|
|
||||||
|
private ["_worldPos"];
|
||||||
|
|
||||||
//Only handle LMB
|
//Only handle LMB
|
||||||
if (_mouseButton != 0) exitWith {};
|
if (_mouseButton != 0) exitWith {};
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
PARAMS_1(_theMap);
|
PARAMS_1(_theMap);
|
||||||
|
|
||||||
_theMap = _this select 0;
|
private ["_mapSize", "_waypoints", "_size", "_targetPos", "_relBearing", "_wpName", "_wpPos", "_alpha"];
|
||||||
|
|
||||||
_mapSize = (ctrlPosition _theMap) select 3;
|
_mapSize = (ctrlPosition _theMap) select 3;
|
||||||
|
|
||||||
_waypoints = [] call FUNC(deviceGetWaypoints);
|
_waypoints = [] call FUNC(deviceGetWaypoints);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_display", "_theMap", "_mapSize", "_centerPos"];
|
private ["_display", "_theMap", "_mapSize", "_centerPos", "_mapCtrlPos"];
|
||||||
|
|
||||||
PARAMS_1(_newMode);
|
PARAMS_1(_newMode);
|
||||||
|
|
||||||
@ -39,13 +39,13 @@ if (GVAR(currentApplicationPage) == 2) then {
|
|||||||
|
|
||||||
//Hit button again, toggle map modes:
|
//Hit button again, toggle map modes:
|
||||||
if (_newMode == 2) then {
|
if (_newMode == 2) then {
|
||||||
if (GVAR(mapShowTexture)) then {
|
if (GVAR(mapShowTexture)) then {
|
||||||
GVAR(mapShowTexture) = false;
|
GVAR(mapShowTexture) = false;
|
||||||
} else {
|
} else {
|
||||||
if (GVAR(MapDataAvailable) == MAP_DETAIL_SAT) then {
|
if (GVAR(MapDataAvailable) == MAP_DETAIL_SAT) then {
|
||||||
GVAR(mapShowTexture) = true;
|
GVAR(mapShowTexture) = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
* The return value <BOOL>
|
* The return value <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* _bool = [player] call ace_movement_fnc_canClimb
|
* [player] call ace_movement_fnc_canClimb
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_pos", "_dir"];
|
private ["_pos", "_dir"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_pos = getPosASL _unit;
|
_pos = getPosASL _unit;
|
||||||
_dir = getDir _unit;
|
_dir = getDir _unit;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* The return value <NUMBER>
|
* The return value <NUMBER>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* _bool = [player] call ace_movement_fnc_getWeight
|
* [player] call ace_movement_fnc_getWeight
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
"\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \
|
"\A3\Ui_f\data\GUI\Cfg\Ranks\colonel_gs.paa" \
|
||||||
]
|
]
|
||||||
|
|
||||||
private ["_height", "_position", "_color", "_name", "_rank", "_size"];
|
private ["_height", "_position", "_color", "_name", "_rank", "_size", "_icon"];
|
||||||
|
|
||||||
PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType);
|
PARAMS_5(_player,_target,_alpha,_heightOffset,_iconType);
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ if (isClass (configFile >> "cfgPatches" >> "acre_api")) then {
|
|||||||
//Note: class RscDisplayVoiceChat {idd = 55} - only present when talking
|
//Note: class RscDisplayVoiceChat {idd = 55} - only present when talking
|
||||||
|
|
||||||
[{
|
[{
|
||||||
|
private ["_oldSetting", "_newSetting"];
|
||||||
_oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false];
|
_oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false];
|
||||||
_newSetting = (!(isNull findDisplay 55));
|
_newSetting = (!(isNull findDisplay 55));
|
||||||
if (!(_oldSetting isEqualTo _newSetting)) then {
|
if (!(_oldSetting isEqualTo _newSetting)) then {
|
||||||
|
@ -14,9 +14,7 @@
|
|||||||
|
|
||||||
if !(isServer) exitWith {};
|
if !(isServer) exitWith {};
|
||||||
|
|
||||||
_logic = _this select 0;
|
PARAMS_3(_logic,_units,_activated);
|
||||||
_units = _this select 1;
|
|
||||||
_activated = _this select 2;
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
_player = ACE_player;
|
private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_pos2", "_vecy", "_relPos", "_projDist", "_pos", "_target"];
|
||||||
|
|
||||||
//don't show nametags in spectator
|
//don't show nametags in spectator
|
||||||
if (!alive _player) exitWith {};
|
if (!alive ACE_player) exitWith {};
|
||||||
|
|
||||||
_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
|
_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
|
||||||
2 + (GVAR(ShowNamesTime) - time); //after release 1 second of full opacity, 1 second of fading to 0
|
2 + (GVAR(ShowNamesTime) - time); //after release 1 second of full opacity, 1 second of fading to 0
|
||||||
@ -24,14 +24,14 @@ if (GVAR(showCursorTagForVehicles) && {_onKeyPressAlphaMax > 0}) then {
|
|||||||
if ((!(_target isKindOf "CAManBase")) && {!(_target in allUnitsUAV)}) then {
|
if ((!(_target isKindOf "CAManBase")) && {!(_target in allUnitsUAV)}) then {
|
||||||
_target = effectiveCommander _target;
|
_target = effectiveCommander _target;
|
||||||
if ((!isNull _target) &&
|
if ((!isNull _target) &&
|
||||||
{(side (group _target)) == (side (group _player))} &&
|
{(side (group _target)) == (side (group ACE_player))} &&
|
||||||
{_target != _player} &&
|
{_target != ACE_player} &&
|
||||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||||
_distance = _player distance _target;
|
_distance = ACE_player distance _target;
|
||||||
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
||||||
_alpha = _alpha min _onKeyPressAlphaMax;
|
_alpha = _alpha min _onKeyPressAlphaMax;
|
||||||
[_player, _target, _alpha, _distance * 0.026, _defaultIcon] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _defaultIcon] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -41,11 +41,11 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then {
|
|||||||
_target = cursorTarget;
|
_target = cursorTarget;
|
||||||
if ((!isNull _target) &&
|
if ((!isNull _target) &&
|
||||||
{_target isKindOf "CAManBase"} &&
|
{_target isKindOf "CAManBase"} &&
|
||||||
{(side (group _target)) == (side (group _player))} &&
|
{(side (group _target)) == (side (group ACE_player))} &&
|
||||||
{_target != _player} &&
|
{_target != ACE_player} &&
|
||||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||||
_distance = _player distance _target;
|
_distance = ACE_player distance _target;
|
||||||
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
_alpha = ((1 - 0.2 * (_distance - GVAR(PlayerNamesViewDistance))) min 1) * GVAR(PlayerNamesMaxAlpha);
|
||||||
_alpha = _alpha min _onKeyPressAlphaMax;
|
_alpha = _alpha min _onKeyPressAlphaMax;
|
||||||
_icon = ICON_NONE;
|
_icon = ICON_NONE;
|
||||||
@ -55,7 +55,7 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then {
|
|||||||
_icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target} && {GVAR(showSoundWaves) > 0}) then {ICON_NAME_SPEAK} else {_defaultIcon};
|
_icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target} && {GVAR(showSoundWaves) > 0}) then {ICON_NAME_SPEAK} else {_defaultIcon};
|
||||||
};
|
};
|
||||||
|
|
||||||
[_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -84,12 +84,12 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho
|
|||||||
};
|
};
|
||||||
|
|
||||||
if ((_icon != ICON_NONE) &&
|
if ((_icon != ICON_NONE) &&
|
||||||
{(side (group _target)) == (side (group _player))} &&
|
{(side (group _target)) == (side (group ACE_player))} &&
|
||||||
{_target != _player} &&
|
{_target != ACE_player} &&
|
||||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||||
|
|
||||||
if (lineIntersects [_pos, (visiblePositionASL _target) vectorAdd [0,0,1], vehicle _player, _target]) exitWith {}; // Check if there is line of sight
|
if (lineIntersects [_pos, (visiblePositionASL _target) vectorAdd [0,0,1], vehicle ACE_player, _target]) exitWith {}; // Check if there is line of sight
|
||||||
_relPos = (visiblePositionASL _target) vectorDiff _pos;
|
_relPos = (visiblePositionASL _target) vectorDiff _pos;
|
||||||
_distance = vectorMagnitude _relPos;
|
_distance = vectorMagnitude _relPos;
|
||||||
_projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
|
_projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
|
||||||
@ -102,7 +102,7 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho
|
|||||||
_alpha = _alpha min _onKeyPressAlphaMax;
|
_alpha = _alpha min _onKeyPressAlphaMax;
|
||||||
};
|
};
|
||||||
|
|
||||||
[_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
[ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
||||||
};
|
};
|
||||||
} forEach _targets;
|
} forEach _targets;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode _player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
||||||
@ -56,7 +56,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode _player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config"];
|
private ["_currentVehicle", "_grainSetting", "_blurSetting", "_radBlurSetting", "_config", "_hmd", "_cameraView", "_turret"];
|
||||||
|
|
||||||
_currentVehicle = vehicle ACE_player;
|
_currentVehicle = vehicle ACE_player;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ _fnc_isUsingHMD = {
|
|||||||
!("NVG" in getArray (_config >> "ViewOptics" >> "visionMode"));
|
!("NVG" in getArray (_config >> "ViewOptics" >> "visionMode"));
|
||||||
};
|
};
|
||||||
|
|
||||||
private ["_result", "_turretConfig", "_turretConfigOpticsIn"];
|
private ["_result", "_turretConfig", "_turretConfigOpticsIn", "_index"];
|
||||||
_result = true;
|
_result = true;
|
||||||
_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath);
|
_turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath);
|
||||||
_turretConfigOpticsIn = _turretConfig >> "OpticsIn";
|
_turretConfigOpticsIn = _turretConfig >> "OpticsIn";
|
||||||
|
@ -2,15 +2,13 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_setupPlayer = {
|
[{
|
||||||
if (!isNull ACE_player) then {
|
if (!isNull ACE_player) then {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
|
|
||||||
[ACE_player, "isPlayer"] call EFUNC(common,muteUnit);
|
[ACE_player, "isPlayer"] call EFUNC(common,muteUnit);
|
||||||
};
|
};
|
||||||
};
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
[_setupPlayer, 0, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
@ -17,12 +17,10 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_sides"];
|
PARAMS_2(_unit,_sides);
|
||||||
_unit = _this select 0;
|
|
||||||
_sides = _this select 1;
|
|
||||||
|
|
||||||
["theMapClick", "onMapSingleClick", {
|
["theMapClick", "onMapSingleClick", {
|
||||||
|
// IGNORE_PRIVATE_WARNING(_pos,_shift,_alt)
|
||||||
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
|
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
|
||||||
[_this, _pos, _shift, _alt] call FUNC(handleMapClick);
|
[_this, _pos, _shift, _alt] call FUNC(handleMapClick);
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_unit, _sides] call FUNC(handleMapClick)
|
* [unit, _sides] call FUNC(handleMapClick)
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_player, _sides] call FUNC(initPlayer)
|
* [player, [west]] call FUNC(initPlayer)
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
private ["_playerUnit", "_sides"];
|
private ["_playerUnit", "_sides"];
|
||||||
|
|
||||||
_playerUnit = _this select 0;
|
PARAMS_2(_playerUnit,_sides);
|
||||||
_sides = _this select 1;
|
|
||||||
|
|
||||||
if (vehicle _playerUnit == _playerUnit) then {
|
if (vehicle _playerUnit == _playerUnit) then {
|
||||||
|
|
||||||
|
@ -10,14 +10,15 @@
|
|||||||
* Player units <ARRAY<OBJECT>>
|
* Player units <ARRAY<OBJECT>>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_pos, 100] call FUNC(nearestPlayers)
|
* [[300,300,0], 100] call FUNC(nearestPlayers)
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_position", "_radius", "_nearestPlayers"];
|
private ["_nearestPlayers"];
|
||||||
|
|
||||||
|
PARAMS_2(_position,_radius);
|
||||||
|
|
||||||
_position = _this select 0;
|
_position = _this select 0;
|
||||||
_radius = _this select 1;
|
_radius = _this select 1;
|
||||||
@ -25,9 +26,9 @@ _radius = _this select 1;
|
|||||||
_nearestPlayers = [];
|
_nearestPlayers = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
if ([_x] call EFUNC(common,isPlayer) && {alive _x}) then {
|
if ([_x] call EFUNC(common,isPlayer) && {alive _x}) then {
|
||||||
_nearestPlayers pushBack _x;
|
_nearestPlayers pushBack _x;
|
||||||
};
|
};
|
||||||
} forEach (nearestObjects [_position, ["Man"], _radius]);
|
} forEach (nearestObjects [_position, ["Man"], _radius]);
|
||||||
|
|
||||||
_nearestPlayers
|
_nearestPlayers
|
||||||
|
@ -10,26 +10,20 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [_origPlayer, _respPlayer] call FUNC(switchBack)
|
* [_originalPlayerUnit, _currentUnit] call FUNC(switchBack)
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_origPlayerUnit"];
|
PARMAS_1(_originalPlayerUnit);
|
||||||
|
|
||||||
_origPlayerUnit = _this select 0;
|
[_originalPlayerUnit] joinSilent GVAR(OriginalGroup);
|
||||||
[_origPlayerUnit] joinSilent GVAR(OriginalGroup);
|
|
||||||
|
|
||||||
DFUNC(pfhSwitchBack) = {
|
DFUNC(pfhSwitchBack) = {
|
||||||
|
PARAMS_2(_args,_pfID);
|
||||||
private ["_args", "_originalPlayerUnit", "_currentUnit"];
|
EXPLODE_2_PVT(_args,_originalPlayerUnit,_currentUnit);
|
||||||
|
|
||||||
_args = _this select 0;
|
|
||||||
|
|
||||||
_originalPlayerUnit = _args select 0;
|
|
||||||
_currentUnit = _args select 1;
|
|
||||||
|
|
||||||
if (local _originalPlayerUnit) exitWith {
|
if (local _originalPlayerUnit) exitWith {
|
||||||
selectPlayer _originalPlayerUnit;
|
selectPlayer _originalPlayerUnit;
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_allNearestPlayers", "_oldUnit", "_leave"];
|
private ["_nearestEnemyPlayers", "_allNearestPlayers", "_oldUnit", "_leave"];
|
||||||
|
|
||||||
_unit = _this select 1;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
// don't switch to original player units
|
// don't switch to original player units
|
||||||
if (!([_unit] call FUNC(isValidAi))) exitWith {};
|
if (!([_unit] call FUNC(isValidAi))) exitWith {};
|
||||||
|
@ -37,6 +37,7 @@ if (!isServer) exitWith {};
|
|||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
|
private "_unit";
|
||||||
_unit = _x;
|
_unit = _x;
|
||||||
if (_unit isKindOf "CAManBase") then {
|
if (_unit isKindOf "CAManBase") then {
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ PARAMS_2(_unit,_container);
|
|||||||
//Only check for player:
|
//Only check for player:
|
||||||
if (_unit != ace_player) exitWith {false};
|
if (_unit != ace_player) exitWith {false};
|
||||||
|
|
||||||
|
private "_handeled";
|
||||||
_handeled = false;
|
_handeled = false;
|
||||||
|
|
||||||
if (GVAR(LockVehicleInventory) && //if setting not enabled
|
if (GVAR(LockVehicleInventory) && //if setting not enabled
|
||||||
|
@ -26,6 +26,7 @@ GVAR(CurrentGrenadeMuzzleOther) = "";
|
|||||||
|
|
||||||
// Collect frag and other muzzles separately
|
// Collect frag and other muzzles separately
|
||||||
with uiNamespace do {
|
with uiNamespace do {
|
||||||
|
private ["_magazines", "_magazine", "_ammo", "_explosive"];
|
||||||
if (isNil QGVAR(FragMuzzles)) then {
|
if (isNil QGVAR(FragMuzzles)) then {
|
||||||
GVAR(FragMuzzles) = [];
|
GVAR(FragMuzzles) = [];
|
||||||
GVAR(NonFragMuzzles) = [];
|
GVAR(NonFragMuzzles) = [];
|
||||||
|
@ -12,18 +12,13 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_muzzle"];
|
PARAMS_2(_unit,_muzzle);
|
||||||
|
|
||||||
_unit = _this select 0;
|
private ["_uniformMags", "_vestMags", "_backpackMags", "_numberOfMagazines", "_magazineClasses", "_firstMagazine"];
|
||||||
_muzzle = _this select 1;
|
|
||||||
|
|
||||||
private ["_uniformMags", "_vestMags", "_backPackMags"];
|
|
||||||
|
|
||||||
_uniformMags = getMagazineCargo uniformContainer _unit;
|
_uniformMags = getMagazineCargo uniformContainer _unit;
|
||||||
_vestMags = getMagazineCargo vestContainer _unit;
|
_vestMags = getMagazineCargo vestContainer _unit;
|
||||||
_backPackMags = getMagazineCargo backpackContainer _unit;
|
_backpackMags = getMagazineCargo backpackContainer _unit;
|
||||||
|
|
||||||
private ["_numberOfMagazines", "_magazineClasses", "_firstMagazine"];
|
|
||||||
|
|
||||||
_numberOfMagazines = 0;
|
_numberOfMagazines = 0;
|
||||||
_magazineClasses = getArray (configFile >> "CfgWeapons" >> "Throw" >> _muzzle >> "magazines");
|
_magazineClasses = getArray (configFile >> "CfgWeapons" >> "Throw" >> _muzzle >> "magazines");
|
||||||
|
@ -21,10 +21,10 @@ _numberofMagazines = _this select 1;
|
|||||||
|
|
||||||
private ["_color", "_name", "_text", "_picture"];
|
private ["_color", "_name", "_text", "_picture"];
|
||||||
|
|
||||||
_color = [[1,0,0], [1,1,1]] select (_numberOfMagazines > 0);
|
_color = [[1,0,0], [1,1,1]] select (_numberofMagazines > 0);
|
||||||
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
||||||
|
|
||||||
_text = [format["%1 x%2", _name, _numberOfMagazines], _color] call EFUNC(common,stringToColoredText);
|
_text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText);
|
||||||
_picture = getText (configFile >> "CfgMagazines" >> _magazine >> "picture");
|
_picture = getText (configFile >> "CfgMagazines" >> _magazine >> "picture");
|
||||||
|
|
||||||
[_text, _picture] call EFUNC(common,displayTextPicture);
|
[_text, _picture] call EFUNC(common,displayTextPicture);
|
||||||
|
@ -11,41 +11,41 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_nextMuzzle"];
|
private ["_text", "_nextMuzzle"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_nextMuzzle = ["All"] call FUNC(findNextGrenadeMuzzle);
|
_nextMuzzle = ["All"] call FUNC(findNextGrenadeMuzzle);
|
||||||
|
|
||||||
if (_nextMuzzle != "") then {
|
if (_nextMuzzle != "") then {
|
||||||
|
|
||||||
|
|
||||||
private ["_magazines", "_magazine", "_count", "_return"];
|
private ["_magazines", "_magazine", "_count", "_return"];
|
||||||
_magazines = GVAR(AllMagazines) select (GVAR(AllMuzzles) find _nextMuzzle);
|
_magazines = GVAR(AllMagazines) select (GVAR(AllMuzzles) find _nextMuzzle);
|
||||||
reverse _magazines;
|
reverse _magazines;
|
||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
||||||
|
|
||||||
// There is a muzzle with magazines --> cycle to it
|
// There is a muzzle with magazines --> cycle to it
|
||||||
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
||||||
|
|
||||||
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// There is a no muzzle with magazines --> select nothing
|
// There is a no muzzle with magazines --> select nothing
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = ""; GVAR(CurrentGrenadeMuzzleOther) = "";
|
GVAR(CurrentGrenadeMuzzleFrag) = ""; GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||||
|
|
||||||
if (GVAR(DisplayText)) then {
|
if (GVAR(DisplayText)) then {
|
||||||
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_nextMuzzle in GVAR(FragMuzzles)) then {
|
if (_nextMuzzle in GVAR(FragMuzzles)) then {
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
||||||
} else {
|
} else {
|
||||||
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
||||||
};
|
};
|
||||||
|
@ -11,34 +11,34 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_nextMuzzle"];
|
private ["_text", "_nextMuzzle"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_nextMuzzle = ["Frag"] call FUNC(findNextGrenadeMuzzle);
|
_nextMuzzle = ["Frag"] call FUNC(findNextGrenadeMuzzle);
|
||||||
|
|
||||||
if (_nextMuzzle != "") then {
|
if (_nextMuzzle != "") then {
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleFrag) = _nextMuzzle;
|
||||||
|
|
||||||
private ["_magazines", "_magazine", "_count", "_return"];
|
private ["_magazines", "_magazine", "_count", "_return"];
|
||||||
_magazines = GVAR(FragMagazines) select (GVAR(FragMuzzles) find _nextMuzzle);
|
_magazines = GVAR(FragMagazines) select (GVAR(FragMuzzles) find _nextMuzzle);
|
||||||
reverse _magazines;
|
reverse _magazines;
|
||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
||||||
|
|
||||||
// There is a muzzle with magazines --> cycle to it
|
// There is a muzzle with magazines --> cycle to it
|
||||||
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
||||||
|
|
||||||
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// There is a no muzzle with magazines --> select nothing
|
// There is a no muzzle with magazines --> select nothing
|
||||||
GVAR(CurrentGrenadeMuzzleFrag) = "";
|
GVAR(CurrentGrenadeMuzzleFrag) = "";
|
||||||
if (GVAR(DisplayText)) then {
|
if (GVAR(DisplayText)) then {
|
||||||
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
||||||
|
@ -11,34 +11,34 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_nextMuzzle"];
|
private ["_nextMuzzle", "_text"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_nextMuzzle = ["NonFrag"] call FUNC(findNextGrenadeMuzzle);
|
_nextMuzzle = ["NonFrag"] call FUNC(findNextGrenadeMuzzle);
|
||||||
|
|
||||||
if (_nextMuzzle != "") then {
|
if (_nextMuzzle != "") then {
|
||||||
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
GVAR(CurrentGrenadeMuzzleOther) = _nextMuzzle;
|
||||||
|
|
||||||
private ["_magazines", "_magazine", "_count", "_return"];
|
private ["_magazines", "_magazine", "_count", "_return"];
|
||||||
_magazines = GVAR(NonFragMagazines) select (GVAR(NonFragMuzzles) find _nextMuzzle);
|
_magazines = GVAR(NonFragMagazines) select (GVAR(NonFragMuzzles) find _nextMuzzle);
|
||||||
reverse _magazines;
|
reverse _magazines;
|
||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
_count = {_return = _x in _magazines; if (_return) then {_magazine = _x}; _return} count magazines _unit;
|
||||||
|
|
||||||
// There is a muzzle with magazines --> cycle to it
|
// There is a muzzle with magazines --> cycle to it
|
||||||
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
[_unit, _nextMuzzle] call FUNC(setNextGrenadeMuzzle);
|
||||||
|
|
||||||
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
[_magazine, _count] call FUNC(displayGrenadeTypeAndNumber);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// There is a no muzzle with magazines --> select nothing
|
// There is a no muzzle with magazines --> select nothing
|
||||||
GVAR(CurrentGrenadeMuzzleOther) = "";
|
GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||||
if (GVAR(DisplayText)) then {
|
if (GVAR(DisplayText)) then {
|
||||||
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
||||||
|
@ -17,19 +17,15 @@ private ["_unit", "_muzzle"];
|
|||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_muzzle = _this select 1;
|
_muzzle = _this select 1;
|
||||||
|
|
||||||
private ["_uniformMags", "_vestMags", "_backPackMags"];
|
private ["_uniformMags", "_vestMags", "_backpackMags", "_i", "_uniformMagsToRemove", "_vestMagsToRemove", "_backpackMagsToRemove", "_firstMagazine", "_throwMuzzleNames"];
|
||||||
|
|
||||||
_uniformMags = getMagazineCargo uniformContainer _unit;
|
_uniformMags = getMagazineCargo uniformContainer _unit;
|
||||||
_vestMags = getMagazineCargo vestContainer _unit;
|
_vestMags = getMagazineCargo vestContainer _unit;
|
||||||
_backPackMags = getMagazineCargo backpackContainer _unit;
|
_backpackMags = getMagazineCargo backpackContainer _unit;
|
||||||
|
|
||||||
private ["_uniformMagsToRemove", "_vestMagsToRemove", "_backPackMagsToRemove"];
|
|
||||||
|
|
||||||
_uniformMagsToRemove = [];
|
_uniformMagsToRemove = [];
|
||||||
_vestMagsToRemove = [];
|
_vestMagsToRemove = [];
|
||||||
_backPackMagsToRemove = [];
|
_backpackMagsToRemove = [];
|
||||||
|
|
||||||
private ["_firstMagazine", "_throwMuzzleNames"];
|
|
||||||
|
|
||||||
_firstMagazine = "";
|
_firstMagazine = "";
|
||||||
_throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
_throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles");
|
||||||
@ -99,7 +95,7 @@ _throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles"
|
|||||||
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
||||||
_unit removeItem (_x select 0);
|
_unit removeItem (_x select 0);
|
||||||
};
|
};
|
||||||
} forEach _backPackMagsToRemove;
|
} forEach _backpackMagsToRemove;
|
||||||
|
|
||||||
// Readd magazines
|
// Readd magazines
|
||||||
{
|
{
|
||||||
@ -118,4 +114,4 @@ _throwMuzzleNames = getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles"
|
|||||||
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
for [{_i = 0}, {_i < (_x select 1)}, {_i = _i + 1}] do {
|
||||||
_unit addItemToBackpack (_x select 0);
|
_unit addItemToBackpack (_x select 0);
|
||||||
};
|
};
|
||||||
} forEach _backPackMagsToRemove;
|
} forEach _backpackMagsToRemove;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
@ -21,7 +21,7 @@ def get_private_declare(content):
|
|||||||
priv_split = sorted(set(priv_split))
|
priv_split = sorted(set(priv_split))
|
||||||
priv_declared += priv_split;
|
priv_declared += priv_split;
|
||||||
|
|
||||||
srch = re.compile('PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*')
|
srch = re.compile('PARAMS_[0-9].*|EXPLODE_[0-9]_PVT.*|DEFAULT_PARAM.*|KEY_PARAM.*|IGNORE_PRIVATE_WARNING.*')
|
||||||
priv_srch_declared = srch.findall(content)
|
priv_srch_declared = srch.findall(content)
|
||||||
priv_srch_declared = sorted(set(priv_srch_declared))
|
priv_srch_declared = sorted(set(priv_srch_declared))
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ def get_private_declare(content):
|
|||||||
return priv_declared
|
return priv_declared
|
||||||
|
|
||||||
def check_privates(filepath):
|
def check_privates(filepath):
|
||||||
|
bad_count_file = 0
|
||||||
def pushClosing(t):
|
def pushClosing(t):
|
||||||
closingStack.append(closing.expr)
|
closingStack.append(closing.expr)
|
||||||
closing << Literal( closingFor[t[0]] )
|
closing << Literal( closingFor[t[0]] )
|
||||||
@ -81,6 +81,9 @@ def check_privates(filepath):
|
|||||||
print (filepath)
|
print (filepath)
|
||||||
for bad_priv in missing:
|
for bad_priv in missing:
|
||||||
print ('\t' + bad_priv)
|
print ('\t' + bad_priv)
|
||||||
|
bad_count_file = bad_count_file + 1
|
||||||
|
|
||||||
|
return bad_count_file
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
@ -89,6 +92,7 @@ def main():
|
|||||||
print("#########################")
|
print("#########################")
|
||||||
|
|
||||||
sqf_list = []
|
sqf_list = []
|
||||||
|
bad_count = 0
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
|
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default=".")
|
||||||
@ -99,7 +103,10 @@ def main():
|
|||||||
sqf_list.append(os.path.join(root, filename))
|
sqf_list.append(os.path.join(root, filename))
|
||||||
|
|
||||||
for filename in sqf_list:
|
for filename in sqf_list:
|
||||||
check_privates(filename)
|
bad_count = bad_count + check_privates(filename)
|
||||||
|
|
||||||
|
|
||||||
|
print ("Bad Count {0}".format(bad_count))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user