mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Private Variables
This commit is contained in:
parent
409851dd8c
commit
e56838be36
@ -37,7 +37,7 @@ player addEventHandler ["Killed", {
|
||||
} count _deadman;
|
||||
}];
|
||||
player addEventHandler ["Take", {
|
||||
private ["_item", "_getter", "_giver", "_config"];
|
||||
private ["_item", "_getter", "_giver", "_config", "_detonators"];
|
||||
_item = _this select 2;
|
||||
_getter = _this select 0;
|
||||
_giver = _this select 1;
|
||||
|
@ -17,7 +17,11 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_4_PVT(_this,_unit,_explosive,_magazineClass,_extra);
|
||||
|
||||
private["_config", "_detonators", "_hasRequired", "_requiredItems", "_code", "_count", "_codeSet"];
|
||||
|
||||
// Config is the last item in the list of passed in items.
|
||||
_config = (_this select 3) select (count (_this select 3) - 1);
|
||||
|
||||
@ -29,7 +33,7 @@ _detonators = [_unit] call FUNC(getDetonators);
|
||||
_hasRequired = false;
|
||||
};
|
||||
} count _requiredItems;
|
||||
private ["_code", "_count", "_codeSet"];
|
||||
|
||||
_codeSet = false;
|
||||
while {!_codeSet} do {
|
||||
_code = str(round (random 9999));
|
||||
|
@ -17,7 +17,7 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_clacker", "_config", "_requiredItems", "_hasRequired"];
|
||||
private ["_clacker", "_config", "_requiredItems", "_hasRequired", "_detonators"];
|
||||
EXPLODE_3_PVT(_this,_unit,_explosive,_magazineClass);
|
||||
// Config is the last item in the list of passed in items.
|
||||
_config = (_this select 3) select (count (_this select 3) - 1);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_result", "_item", "_children"];
|
||||
private ["_result", "_item", "_children", "_range", "_required"];
|
||||
|
||||
EXPLODE_2_PVT(_this,_unit,_detonator);
|
||||
_range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range");
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_mags", "_item", "_index", "_children"];
|
||||
private ["_mags", "_item", "_index", "_children", "_itemCount", "_list"];
|
||||
|
||||
EXPLODE_1_PVT(_this,_unit);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_items", "_unit", "_children", "_config"];
|
||||
private ["_unit", "_children", "_config", "_detonators"];
|
||||
_unit = _this select 0;
|
||||
_detonators = [_unit] call FUNC(getDetonators);
|
||||
_children = [];
|
||||
|
@ -15,8 +15,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_hasRequiredItems","_triggerTypes", "_children",
|
||||
"_detonators", "_required", "_magTriggers"];
|
||||
private ["_hasRequiredItems","_triggerTypes", "_children", "_detonators", "_required", "_magTriggers"];
|
||||
EXPLODE_2_PVT(_this,_magazine,_explosive);
|
||||
_detonators = [ACE_player] call FUNC(getDetonators);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_specialist"];
|
||||
private ["_isSpecialist"];
|
||||
EXPLODE_2_PVT(_this,_unit,_target);
|
||||
if (isNull(_target getVariable [QGVAR(Explosive),objNull])) exitWith {
|
||||
deleteVehicle _target;
|
||||
|
@ -19,7 +19,7 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_result", "_ignoreRange", "_helper"];
|
||||
private ["_result", "_ignoreRange", "_helper", "_pos"];
|
||||
EXPLODE_3_PVT(_this,_unit,_range,_item);
|
||||
_ignoreRange = (_range == -1);
|
||||
_result = true;
|
||||
@ -46,10 +46,11 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhe
|
||||
};
|
||||
};
|
||||
[{
|
||||
_explosive = _this;
|
||||
if (!isNull _explosive) then {
|
||||
_explosive setDamage 1;
|
||||
};
|
||||
private ["_explosive"];
|
||||
_explosive = _this;
|
||||
if (!isNull _explosive) then {
|
||||
_explosive setDamage 1;
|
||||
};
|
||||
}, _item select 0, _item select 1, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
_result
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_arr", "_ran", "_i","_speedDial"];
|
||||
private ["_arr", "_ran", "_i"];
|
||||
EXPLODE_2_PVT(_this,_unit,_code);
|
||||
if (_unit getVariable [QGVAR(Dialing),false]) exitWith {};
|
||||
if !(alive _unit) exitWith {};
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
// IGNORE_PRIVATE_WARNING(_detonators);
|
||||
|
||||
private ["_unit", "_items", "_result", "_config"];
|
||||
_unit = _this select 0;
|
||||
_items = (items _unit);
|
||||
|
@ -16,6 +16,8 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
// IGNORE_PRIVATE_WARNING(_allExplosives,_deadmanExplosives);
|
||||
|
||||
private ["_unit", "_clackerList", "_adjustedList", "_list", "_filter"];
|
||||
_unit = _this select 0;
|
||||
_filter = nil;
|
||||
|
@ -14,6 +14,8 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
// IGNORE_PRIVATE_WARNING(_hasExplosives);
|
||||
|
||||
private ["_unit", "_result", "_magazines"];
|
||||
_result = false;
|
||||
_unit = _this select 0;
|
||||
|
@ -14,4 +14,6 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
// IGNORE_PRIVATE_WARNING(_hasPlacedExplosives);
|
||||
|
||||
(count (_this call FUNC(getPlacedExplosives)) > 0)
|
||||
|
@ -15,6 +15,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if !(isServer) exitWith {};
|
||||
|
||||
private["_activated", "_logic"];
|
||||
|
||||
_logic = _this select 0;
|
||||
_activated = _this select 2;
|
||||
|
||||
|
@ -19,7 +19,7 @@ if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
private ["_mag", "_setup", "_player"];
|
||||
private ["_setup", "_player", "_dir"];
|
||||
_setup = GVAR(Setup);
|
||||
GVAR(Setup) = objNull;
|
||||
[GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus);
|
||||
|
@ -28,7 +28,7 @@ GVAR(Setup) setVariable [QGVAR(class), _class, true];
|
||||
GVAR(TweakedAngle) = 180;
|
||||
|
||||
[QGVAR(Placement),"OnEachFrame", {
|
||||
private "_player";
|
||||
private ["_player", "_pos"];
|
||||
_player = ACE_player;
|
||||
if (GVAR(placer) != _player) exitWith {
|
||||
call FUNC(place_Cancel);
|
||||
|
@ -16,11 +16,14 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
EXPLODE_2_PVT(_this,_unit,_target);
|
||||
|
||||
private["_actionToPlay"];
|
||||
|
||||
_target = attachedTo (_target);
|
||||
|
||||
_fnc_DefuseTime = {
|
||||
EXPLODE_2_PVT(_this,_specialist,_target);
|
||||
|
||||
private ["_defuseTime"];
|
||||
_defuseTime = 5;
|
||||
if (isNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime")) then {
|
||||
_defuseTime = getNumber(ConfigFile >> "CfgAmmo" >> typeOf (_target) >> "ACE_DefuseTime");
|
||||
|
Loading…
Reference in New Issue
Block a user