Merge branch 'master' of github.com:KoffeinFlummi/ACE3 into reliableSettings

Conflicts:
	addons/common/XEH_postInit.sqf
This commit is contained in:
esteldunedain 2015-05-15 18:18:13 -03:00
commit 0b1beed219
187 changed files with 430 additions and 323 deletions

View File

@ -36,6 +36,7 @@ Anthariel <Contact@storm-simulation.com>
BlackQwar
Brakoviejo
Brisse <brisse@outlook.com>
BullHorn <bullhorn7@gmail.com>
Clon1998 <ps.patti1998@gmail.com>
Codingboy
Crusty

View File

@ -1,12 +1,13 @@
// ACE - Common
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
// Listens for global "SettingChanged" events, to update the force status locally
["SettingChanged", {
PARAMS_2(_name,_value);
if !(count _this > 2) exitWith {};
private ["_force", "_settingData"];
_force = _this select 2;
if (_force) then {
_settingData = [_name] call FUNC(getSettingData);
@ -48,6 +49,7 @@ QGVAR(remoteFnc) addPublicVariableEventHandler {
[missionNamespace] call FUNC(executePersistent);
private ["_currentVersion", "_previousVersion"];
// check previous version number from profile
_currentVersion = getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "version");
_previousVersion = profileNamespace getVariable ["ACE_VersionNumberString", ""];
@ -125,6 +127,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
// PFH to raise varios events
[{
private ["_newCameraView", "_newInventoryDisplayIsOpen", "_newPlayerInventory", "_newPlayerTurret", "_newPlayerVehicle", "_newPlayerVisionMode", "_newPlayerWeapon", "_newZeusDisplayIsOpen"];
// "playerInventoryChanged" event
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
@ -206,6 +209,7 @@ GVAR(OldIsCamera) = false;
[{
// "activeCameraChanged" event
private ["_isCamera"];
_isCamera = {!isNull _x} count ALL_CAMERAS > 0;
if !(_isCamera isEqualTo GVAR(OldIsCamera)) then {
// Raise ACE event locally

View File

@ -1,6 +1,8 @@
// by commy2
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
ADDON = false;
// ACE Common Function
@ -170,7 +172,6 @@ PREP(sortAlphabeticallyBy);
PREP(stringCompare);
PREP(stringToColoredText);
PREP(stringRemoveWhiteSpace);
PREP(subString);
PREP(switchToGroupSide);
PREP(throttledPublicVariable);
PREP(toBin);
@ -316,6 +317,7 @@ if (hasInterface) then {
// PFH to update the ACE_player variable
[{
if !(ACE_player isEqualTo (call FUNC(player))) then {
private ["_oldPlayer"];
_oldPlayer = ACE_player;
ACE_player = call FUNC(player);

View File

@ -2,7 +2,9 @@
// internal handler for net events
#include "script_component.hpp"
private ["_eventName", "_eventArgs", "_eventNames", "_eventIndex", "_eventTargets", "_sentEvents", "_owner", "_serverFlagged"];
private ["_eventName", "_eventArgs", "_eventNames", "_eventIndex", "_eventTargets", "_sentEvents", "_owner", "_serverFlagged", "_events"];
//IGNORE_PRIVATE_WARNING("_handleNetEvent");
PARAMS_2(_eventType,_event);

View File

@ -17,6 +17,8 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleSyncedEvent");
//SEH_s
if(isServer) then {
// Find the event name, and shovel out the events to the client
@ -33,6 +35,7 @@ if(isServer) then {
["SEH_s", _client, [_eventName, _eventLog] ] call FUNC(targetEvent);
} else {
PARAMS_2(_eventName,_eventLog);
private ["_eventArgs"];
// This is the client handling the response from the server
// Start running the events
{

View File

@ -15,6 +15,7 @@
#include "script_component.hpp"
private ["_unit", "_action", "_condition", "_statement", "_name", "_actionsVar", "_actionID", "_actions", "_id", "_actionIDs"];
//IGNORE_PRIVATE_WARNING("_count", "_index", "_return", "_target");
_unit = _this select 0;
_action = _this select 1;

View File

@ -19,6 +19,7 @@
#include "script_component.hpp"
private ["_name", "_actionsVar", "_id", "_actionIDs", "_actions", "_nameVar", "_addAction", "_actionID"];
//IGNORE_PRIVATE_WARNING("_target");
PARAMS_8(_unit,_displayName,_action,_condition,_statement,_condition2,_statement2,_priority);

View File

@ -14,6 +14,8 @@
#include "script_component.hpp"
private ["_conditionName", "_conditionFunc"];
//IGNORE_PRIVATE_WARNING("_player", "_target");
_conditionName = toLower (_this select 0);
_conditionFunc = _this select 1;

View File

@ -4,14 +4,14 @@
* If has only local effects.
*
* Arguments:
* 0: _name (String)
* 1: _typeName (String)
* 2: _isClientSetable (Bool)
* 3: _localizedName (String)
* 4: _localizedDescription (String)
* 5: _possibleValues (Array)
* 6: _isForced (Bool)
* 7: _defaultValue (Any)
* 0: name <STRING>
* 1: typeName <STRING>
* 2: isClientSetable <BOOL>
* 3: localizedName <STRING>
* 4: localizedDescription <STRING>
* 5: possibleValues <ARRAY>
* 6: isForced <BOOL>
* 7: defaultValue (Any)
*
* Return Value:
* None
@ -22,6 +22,8 @@
PARAMS_8(_name,_typeName,_isClientSetable,_localizedName,_localizedDescription,_possibleValues,_isForced,_value);
private ["_settingData"];
_settingData = [_name] call FUNC(getSettingData);
// Exit if the setting already exists

View File

@ -13,6 +13,8 @@
*/
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleSyncedEvent");
PARAMS_2(_name,_handler);
private["_ttl", "_eventId", "_data"];

View File

@ -23,9 +23,7 @@ PARAMS_2(_unit,_classname);
DEFAULT_PARAM(2,_container,"");
DEFAULT_PARAM(3,_ammoCount,-1);
private "_addedToPlayer";
private "_canAdd";
private "_type";
private ["_addedToPlayer", "_canAdd", "_type", "_pos"];
_canAdd = false;
_addedToPlayer = true;

View File

@ -19,6 +19,8 @@
PARAMS_5(_params,_function,_namespace,_uid,_duration);
//IGNORE_PRIVATE_WARNING("_eventName");
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];

View File

@ -9,8 +9,6 @@
*/
#include "script_component.hpp"
private ["_return"];
PARAMS_1(_unit);
(((_unit getvariable [QGVAR(canInteract),0]) < 1) && ([_unit] call FUNC(isAwake)) && !([_unit] call FUNC(isArrested)))

View File

@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
private ["_adjustSpeed", "_vdir", "_dir", "_up", "_l", "_r", "_vup", "_vel"];
private ["_adjustSpeed", "_vdir", "_dir", "_up", "_vup", "_vel", "_vlat"];
PARAMS_3(_projectile,_adjustDir,_adjustUp);

View File

@ -14,6 +14,8 @@
_this spawn {
PARAMS_2(_target,_ignoreDead);
private["_inVehicle", "_position", "_vehiclePlayer", "_vehicleTarget"];
if (isNil "_ignoreDead") then {_ignoreDead = false};
_vehicleTarget = vehicle _target;

View File

@ -12,7 +12,7 @@
#define DEFAULT_LOGGING_LEVEL -1
#define DEFAULT_TEXT_DISPLAY -1
private ["_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message", "_from"];
private ["_level", "_prefix", "_defaultLoglevel","_defaultLogDisplayLevel", "_message"];
PARAMS_1(_msg);
_level = if (count _this > 1) then {_this select 1} else { 2 };

View File

@ -37,6 +37,7 @@ if (_state) then {
_dlg = uiNamespace getVariable QGVAR(dlgDisableMouse);
_dlg displayAddEventHandler ["KeyDown", {
private ["_key", "_dlg", "_ctrl", "_config", "_acc", "_index"];
_key = _this select 1;
if (_key == 1 && {alive player}) then {

View File

@ -2,7 +2,7 @@
* Author: Glowbal
*
* Draw progress bar and execute given function if succesful.
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
* Finish/Failure/Conditional are all passed [args, elapsedTime, totalTime, errorCode]
*
* Argument:
* 0: icon ID <STRING>
@ -61,7 +61,7 @@ _refresh = {
_allControls = [];
private ["_ctrl", "_setting"];
private ["_ctrl", "_setting", "_position"];
_setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0];
if (_setting > 0) then {
{

View File

@ -9,7 +9,7 @@
private "_fnc_logEntries";
_fnc_logEntries = {
private ["_p", "_t", "_e"];
private ["_p", "_t", "_e", "_a", "_i"];
PARAMS_2(_c,_d);

View File

@ -9,7 +9,7 @@
* Nothing
*
* Example:
* [_player] call ace_common_fnc_fixLoweredRifleAnimation
* [ACE_player] call ace_common_fnc_fixLoweredRifleAnimation
*
* Public: No
*/

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_configName", "_index"];
private ["_configName", "_index", "_config"];
_configName = "";

View File

@ -9,7 +9,7 @@
*/
#include "script_component.hpp"
private ["_distance", "_lower", "_upper", "_mid", "_intersections", "_result"];
private ["_distance", "_lower", "_upper", "_mid", "_intersections", "_result", "_dir"];
PARAMS_3(_source,_destination,_accuracy);

View File

@ -9,7 +9,7 @@
*/
#include "script_component.hpp"
private ["_distance", "_lower", "_upper", "_mid", "_intersection", "_result"];
private ["_distance", "_lower", "_upper", "_mid", "_intersection", "_result", "_dir"];
PARAMS_3(_source,_destination,_accuracy);

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
private ["_config", "_hitpoints"];
private ["_config", "_hitpoints", "_i"];
PARAMS_1(_vehicle);

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
private ["_config", "_hitpoints", "_selections"];
private ["_config", "_hitpoints", "_selections", "_i"];
PARAMS_1(_vehicle);

View File

@ -16,6 +16,8 @@
PARAMS_1(_item);
private ["_cfgType"];
_cfgType = [_item] call FUNC(getConfigType);
if (_cfgType == "") exitWith {["",""]};

View File

@ -12,6 +12,8 @@
PARAMS_2(_unit,_magazine);
private ["_return"];
_return = 0;
if (_unit isKindOf "CAManBase") then {
_return = {_x == _magazine} count magazines _unit;
@ -23,4 +25,4 @@ if (_unit isKindOf "CAManBase") then {
_return = _return + ({_x == _magazine} count getMagazineCargo _unit);
};
_return
_return

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
private ["_config", "_hitpoints", "_selections"];
private ["_config", "_hitpoints", "_selections", "_i"];
PARAMS_1(_vehicle);

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
private ["_index", "_offset", "_config2", "_foundClasses"];
private ["_index", "_offset", "_config2", "_foundClasses", "_a"];
PARAMS_2(_config,_turretIndex);

View File

@ -13,7 +13,7 @@
#include "script_component.hpp"
PARAMS_2(_vehicle,_position);
private ["_turrets", "_turret", "_config", "_turret", "_povPos", "_povDir", "_gunBeginPos", "_gunEndPos", "_pov"];
private ["_turret", "_povPos", "_povDir", "_gunBeginPos", "_gunEndPos", "_pov", "_gunBeg", "_gunEnd", "_pipDir"];
_turret = [_vehicle, _position] call CBA_fnc_getTurret;
_pov = getText (_turret >> "memoryPointGunnerOptics");

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
private ["_config", "_turrets", "_fnc_addTurret"];
private ["_config", "_turrets", "_fnc_addTurret", "_varName"];
PARAMS_1(_type);

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
private ["_config", "_cargo", "_codrivers"];
private ["_config", "_cargo", "_codrivers", "_index"];
PARAMS_1(_vehicle);

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
private ["_config", "_cargo", "_codrivers"];
private ["_config", "_cargo", "_codrivers", "_index"];
PARAMS_1(_vehicle);

View File

@ -11,6 +11,7 @@
* Nothing
*/
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleNetEvent");
PARAMS_2(_eventName,_eventArgs);

View File

@ -13,6 +13,8 @@
PARAMS_1(_unit);
//IGNORE_PRIVATE_WARNING("_exception");
try {
if (_unit == vehicle _unit) then {
switch (currentWeapon _unit) do {

View File

@ -15,6 +15,8 @@
PARAMS_2(_vector1,_vector2);
private ["_newVector", "_i"];
_newVector = [];
for "_i" from 0 to (((count _vector1) min (count _vector2)) - 1) do {

View File

@ -23,4 +23,6 @@ try {
} catch {
HANDLECATCH;
};
_val
if (isNil "_val") exitWith { nil };
_val;

View File

@ -23,4 +23,6 @@ try {
} catch {
HANDLECATCH;
};
if (isNil "_hash") exitWith { nil };
_hash;

View File

@ -10,7 +10,6 @@
#include "script_component.hpp"
private ["_return"];
PARAMS_1(_unit);
(!(_unit getvariable ["ACE_isUnconscious",false]) && alive _unit && !(_unit getvariable ["ACE_isDead",false]));

View File

@ -16,7 +16,7 @@
BOOLEAN
Example:
_isSpecialist = [player] call FUNC(isEOD);
isSpecialist = [player] call FUNC(isEOD);
*/
#include "script_component.hpp"

View File

@ -14,6 +14,8 @@
PARAMS_2(_eventName,_eventArgs);
private["_eventIndex", "_eventNames", "_events"];
_eventNames = GVAR(events) select 0;
_eventIndex = _eventNames find _eventName;
if(_eventIndex != -1) then {

View File

@ -1,6 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_configs", "_entries"];
private ["_configs", "_entries", "_name"];
_configs = "true" configClasses (configFile >> _this);

View File

@ -13,6 +13,8 @@
PARAMS_3(_logic,_units,_activated);
private ["_mode", "_checkAll", "_whitelist"];
if !(_activated) exitWith {};
_mode = parseNumber (_logic getVariable "Action");
@ -30,6 +32,7 @@ ACE_Version_Whitelist = _whitelist;
if (!isServer) then {
[_mode, _checkAll, _whitelist] spawn {
private ["_mode", "_checkAll", "_whitelist", "_missingAddon", "_missingAddonServer", "_oldVersionClient", "_oldVersionServer", "_text", "_error", "_rscLayer", "_ctrlHint"];
_mode = _this select 0;
_checkAll = _this select 1;
_whitelist = _this select 2;

View File

@ -13,6 +13,8 @@
PARAMS_3(_logic,_units,_activated);
private["_colors", "_hSCount", "_hiddenSelections", "_i", "_index", "_vehicle"];
if !(_activated) exitWith {};
{

View File

@ -10,7 +10,7 @@
#include "script_component.hpp"
private ["_unit","_moveTo","_previousGroup","_newGroup", "_currentGroup", "_switchToGroup"];
private ["_unit","_moveTo","_previousGroup","_newGroup", "_currentGroup"];
_unit = [_this, 0,ObjNull,[ObjNull]] call BIS_fnc_Param;
_moveTo = [_this, 1,false,[false]] call BIS_fnc_Param;

View File

@ -42,6 +42,7 @@ GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = _target addAction ["Decline", compile
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = _requestID;
GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [time, _target, _requestID] spawn {
private["_id", "_t", "_requestID", "_target"];
_t = (_this select 0) + 40;
_target = _this select 1;
_requestID = _this select 2;

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
private ["_name", "_actionsVar", "_actionID", "_actions", "_currentID", "_actionIDs", "_count"];
private ["_name", "_actionsVar", "_actionID", "_actions", "_currentID", "_actionIDs"];
PARAMS_3(_unit,_action,_id);

View File

@ -10,8 +10,11 @@
* Boolean of success
*/
#include "script_component.hpp"
PARAMS_1(_name);
private ["_data", "_eventId"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
diag_log text format["[ACE] Error, synced event key not found."];
false

View File

@ -10,8 +10,6 @@
#include "script_component.hpp"
private ["_oldUnit","_sets"];
PARAMS_1(_unit);
_unit setvariable ["ACE_isDead",nil,true];
@ -27,7 +25,7 @@ if (isPlayer _unit) then {
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
// clear all disable user input
{
[_X, false] call FUNC(setDisableUserInputStatus);
[_x, false] call FUNC(setDisableUserInputStatus);
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION);
};
};

View File

@ -11,7 +11,7 @@
*/
#include "script_component.hpp"
private ["_key", "_alt", "_ctrl", "_shft"];
private ["_key", "_alt", "_ctrl", "_shift"];
PARAMS_1(_keyCode);

View File

@ -11,6 +11,7 @@
* Nothing
*/
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleNetEvent");
PARAMS_2(_eventName,_eventArgs);

View File

@ -10,7 +10,7 @@
#include "script_component.hpp"
private ["_update","_global","_definedVariable","_defaultGlobal","_currentValue"];
private ["_global","_definedVariable"];
PARAMS_3(_unit,_variable,_value);

View File

@ -14,7 +14,7 @@
PARAMS_1(_optionEntry);
private ["_fnc_getValueWithType", "_value","_name", "_typeName", "_settingData"];
private ["_fnc_getValueWithType", "_value","_name", "_typeName", "_settingData", "_valueConfig", "_text"];
_fnc_getValueWithType = {
EXPLODE_2_PVT(_this,_optionEntry,_typeName);
@ -58,14 +58,14 @@ if (isNil _name) then {
// Add the setting to a list on the server
// Set the variable to not forced
/*_settingData = [
_name,
_typeName,
_isClientSettable,
_localizedName,
_localizedDescription,
_possibleValues,
_isForced,
_defaultValue
name,
typeName,
isClientSettable,
localizedName,
localizedDescription,
possibleValues,
isForced,
defaultValue
];*/
_settingData = [
_name,

View File

@ -1,26 +0,0 @@
/*
* Author: KoffeinFlummi
*
* Returns a fraction of the given string, starting at a given index, with a given length.
*
* Arguments:
* 0: Source string
* 1: Starting index of new string
* 2: Length of the new string
*
* Return Value:
* String when successfull / False when not
*/
#include "script_component.hpp"
PARAMS_3(_string,_index,_length);
_array = toArray _string;
if (_index < 0 or _length < 0 or _index + _length > (count _array) + 1) exitWith {false};
_arrayNew = [];
for "_i" from _index to (_index + _length - 1) do {
_arrayNew = _arrayNew + [(_array select _i)];
};
toString _arrayNew

View File

@ -16,7 +16,7 @@
PARAMS_2(_name,_args);
private["_ttl", "_eventData", "_internalData", "_eventLog"];
private["_ttl", "_eventData"];
if( (count _this) > 2) then {
_ttl = _this select 2;

View File

@ -7,7 +7,7 @@ if(!isServer) exitWith { false };
// @TODO: This should be iteration limited to prevent FPS lag
private["_data"];
{
private["_data", "_ttl", "_eventLog", "_newEventLog", "_name"];
private["_data", "_eventLog", "_newEventLog", "_name", "_globalEventTTL"];
_name = _x;
_data = HASH_GET(GVAR(syncedEvents),_name);

View File

@ -16,6 +16,8 @@
*/
#include "script_component.hpp"
//IGNORE_PRIVATE_WARNING("_handleNetEvent");
PARAMS_3(_eventName,_eventTargets,_eventArgs);
#ifdef DEBUG_EVENTS

View File

@ -1,7 +1,7 @@
//#define DEBUG_MODE_FULL
#include "script_component.hpp"
private["_lastTime", "_lastRealTime", "_lastVirtualTime", "_lastGameTime", "_delta"];
private["_lastRealTime", "_lastGameTime", "_delta"];
_lastRealTime = ACE_realTime;
_lastGameTime = ACE_gameTime;

View File

@ -14,7 +14,7 @@
NUMBER
Example:
_number = ["102"] call FUNC(toNumber);
number = ["102"] call FUNC(toNumber);
*/
#include "script_component.hpp"

View File

@ -1,3 +1,7 @@
#include "script_component.hpp"
private["_matrix", "_object", "_offset", "_origin", "_out", "_xVec", "_y", "_yVec", "_z", "_zVec"];
_object = _this select 0;
_origin = getPosASL _object;
_matrix = _this select 1;

View File

@ -1,3 +1,7 @@
#include "script_component.hpp"
private["_matrix", "_object", "_offset", "_origin", "_out", "_xVec", "_y", "_yVec", "_z", "_zVec"];
_object = _this select 0;
_origin = getPosASL _object;
_matrix = _this select 1;

View File

@ -10,8 +10,10 @@
#include "script_component.hpp"
private ["_return"];
PARAMS_2(_unit,_item);
private ["_return", "_vehicleUsage"];
_vehicleUsage = [_this, 2, false, [false]] call BIS_fnc_Param;
_return = false;

View File

@ -10,7 +10,7 @@
#include "script_component.hpp"
private ["_return"];
private ["_return", "_vehicleUsage"];
PARAMS_2(_unit,_magazine);
_vehicleUsage = [_this, 2, false, [false]] call BIS_fnc_Param;

View File

@ -5,7 +5,7 @@
#include "script_component.hpp"
private ["_minX","_minY","_maxX","_maxY"];
private ["_minX","_minY","_maxX","_maxY", "_bounds", "_boundsCorners", "_boundsMax", "_boundsMaxX", "_boundsMaxY", "_boundsMaxZ", "_boundsMin", "_boundsMinX", "_boundsMinY", "_boundsMinZ"];
PARAMS_3(_object,_margins,_offsets);

View File

@ -1,6 +1,8 @@
// by commy2
#include "script_component.hpp"
private["_client", "_clientVersion", "_count", "_error", "_files", "_index", "_missingAddon", "_missingAddonServer", "_missingAddons", "_missingAddonsServer", "_oldVersionClient", "_oldVersionServer", "_oldVersionsClient", "_oldVersionsServer", "_serverFiles", "_serverVersion", "_serverVersions", "_string", "_version", "_versions"];
_files = [];
{

View File

@ -1,6 +1,8 @@
// by commy2
#include "script_component.hpp"
private ["_config"];
ACE_isMapEnabled = call {_config = missionConfigFile >> "showMap"; !isNumber _config || {getNumber _config == 1}}; // default value is 1, so do isNumber check first
ACE_isCompassEnabled = call {_config = missionConfigFile >> "showCompass"; !isNumber _config || {getNumber _config == 1}};
ACE_isWatchEnabled = call {_config = missionConfigFile >> "showWatch"; !isNumber _config || {getNumber _config == 1}};

View File

@ -4,12 +4,13 @@
GVAR(ScrollWheelFrame) = diag_frameno;
GVAR(onScrollWheel) = {
_scroll = _this select 1;
private ["_scroll"];
_scroll = _this select 1;
if (GVAR(ScrollWheelFrame) == diag_frameno) exitWith {};
GVAR(ScrollWheelFrame) = diag_frameno;
if (GVAR(ScrollWheelFrame) == diag_frameno) exitWith {};
GVAR(ScrollWheelFrame) = diag_frameno;
{
[_scroll] call _x;
} count ((missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]) select 2);
{
[_scroll] call _x;
} count ((missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]) select 2);
};

View File

@ -40,6 +40,8 @@ PREP(getDetonators);
PREP(getPlacedExplosives);
PREP(getSpeedDialExplosive);
PREP(module);
PREP(onLanded);
PREP(openTimerSetUI);

View File

@ -51,7 +51,7 @@ private ["_team"];
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
// Statement
[ACE_player, cursorTarget] call FUNC(tapShoulder);
[ACE_player, cursorTarget, 0] call FUNC(tapShoulder);
true
},
{false},

View File

@ -5,6 +5,7 @@
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
* 2: Shoulder which was tapped <NUMBER>
*
* Return value:
* None
@ -16,7 +17,7 @@
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_tapper,_target,_shoulderNum);
PARAMS_3(_tapper,_target,_shoulderNum);
if (_target != ACE_player) exitWith {
addCamShake [4, 0.5, 5];

View File

@ -3065,5 +3065,29 @@
<English>[ACE] Medical Supply Crate (Advanced)</English>
<Polish>[ACE] Skrzynka z zapasami medycznymi (zaawansowana)</Polish>
</Key>
<Key ID="STR_ACE_Medical_Yes">
<English>Yes</English>
<German>Ja</German>
<Spanish>Si</Spanish>
<Polish>Tak</Polish>
<Czech>Ano</Czech>
<French>Oui</French>
<Russian>Да</Russian>
<Hungarian>Igen</Hungarian>
<Portuguese>Sim</Portuguese>
<Italian>Si</Italian>
</Key>
<Key ID="STR_ACE_Medical_No">
<English>No</English>
<German>Nein</German>
<Spanish>No</Spanish>
<Polish>Nie</Polish>
<Czech>Ne</Czech>
<French>Non</French>
<Russian>Нет</Russian>
<Hungarian>Nem</Hungarian>
<Portuguese>Não</Portuguese>
<Italian>No</Italian>
</Key>
</Package>
</Project>

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_weapon);
PARAMS_1(_weapon);
private ["_mode"];
_mode = getArray (configFile >> "CfgWeapons" >> _weapon >> "modes") select 0;

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_unit,_weapon,_muzzle);
PARAMS_3(_unit,_weapon,_muzzle);
// don't immediately switch back
if (inputAction "nextWeapon" > 0) exitWith {};
@ -10,7 +10,7 @@ private ["_safedWeapons"];
_safedWeapons = _unit getVariable [QGVAR(safedWeapons), []];
if (_weapon in _safedWeapons) exitWith {
_this call FUNC(unlockSafety);
_this call FUNC(unlockSafety);
};
_safedWeapons pushBack _weapon;
@ -18,39 +18,39 @@ _safedWeapons pushBack _weapon;
_unit setVariable [QGVAR(safedWeapons), _safedWeapons];
if (_unit getVariable [QGVAR(actionID), -1] == -1) then {
private ["_condition", "_statement", "_id"];
private ["_condition", "_statement", "_id"];
_condition = {
if (
[_this select 1] call EFUNC(common,canUseWeapon)
&& {
if (currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(safedWeapons), []])) then {
if (inputAction "nextWeapon" > 0) exitWith {
[_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call FUNC(unlockSafety);
_condition = {
if (
[_this select 1] call EFUNC(common,canUseWeapon)
&& {
if (currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(safedWeapons), []])) then {
if (inputAction "nextWeapon" > 0) exitWith {
[_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call FUNC(unlockSafety);
false
};
true
} else {false}
}
) then {
// player hud
[false] call FUNC(setSafeModeVisual);
true
} else {
// player hud
[true] call FUNC(setSafeModeVisual);
false
};
true
} else {false}
}
) then {
// player hud
[false] call FUNC(setSafeModeVisual);
true
} else {
// player hud
[true] call FUNC(setSafeModeVisual);
false
}
};
}
};
_statement = {
[_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call FUNC(unlockSafety);
};
_statement = {
[_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call FUNC(unlockSafety);
};
//_id = [_unit, format ["<t color=""#FFFF00"" >%1</t>", localize "STR_ACE_SafeMode_TakeOffSafety"], "DefaultAction", _condition, {}, {true}, _statement, 10] call EFUNC(common,addActionMenuEventHandler);
_id = [_unit, "DefaultAction", _condition, {}] call EFUNC(common,addActionEventHandler);
//_id = [_unit, format ["<t color=""#FFFF00"" >%1</t>", localize "STR_ACE_SafeMode_TakeOffSafety"], "DefaultAction", _condition, {}, {true}, _statement, 10] call EFUNC(common,addActionMenuEventHandler);
_id = [_unit, "DefaultAction", _condition, {}] call EFUNC(common,addActionEventHandler);
_unit setVariable [QGVAR(actionID), _id];
_unit setVariable [QGVAR(actionID), _id];
};
_unit selectWeapon _muzzle;//_weapon

View File

@ -1,23 +1,23 @@
// by commy2
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_weapon);
PARAMS_2(_unit,_weapon);
private ["_sound"];
_sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFiremodeSound");
if (count _sound == 0) exitWith {
playSound "ACE_Sound_Click";
playSound "ACE_Sound_Click";
};
// add file extension
if call {
{
if (toLower (_sound select 0) find _x == count toArray (_sound select 0) - count toArray _x - 1) exitWith {false};
true
} forEach [".wav", ".ogg", ".wss"];
{
if (toLower (_sound select 0) find _x == count toArray (_sound select 0) - count toArray _x - 1) exitWith {false};
true
} forEach [".wav", ".ogg", ".wss"];
} then {
_sound set [0, (_sound select 0) + ".wss"];
_sound set [0, (_sound select 0) + ".wss"];
};
// add default volume, pitch and distance

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_show);
PARAMS_1(_show);
disableSerialization;
@ -11,12 +11,12 @@ _control = (uiNamespace getVariable ["ACE_dlgSoldier", displayNull]) displayCtrl
if (isNull _control) exitWith {};
if (_show) then {
private "_config";
_config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture";
private "_config";
_config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture";
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
_control ctrlCommit 0;
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
_control ctrlCommit 0;
} else {
_control ctrlSetPosition [0, 0, 0, 0];
_control ctrlCommit 0;
_control ctrlSetPosition [0, 0, 0, 0];
_control ctrlCommit 0;
};

View File

@ -1,57 +1,57 @@
// by commy2
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_unit,_weapon,_muzzle);
PARAMS_3(_unit,_weapon,_muzzle);
private ["_safedWeapons"];
_safedWeapons = _unit getVariable [QGVAR(safedWeapons), []];
if (_weapon in _safedWeapons) then {
_safedWeapons = _safedWeapons - [_weapon];
_safedWeapons = _safedWeapons - [_weapon];
_unit setVariable [QGVAR(safedWeapons), _safedWeapons];
_unit setVariable [QGVAR(safedWeapons), _safedWeapons];
if (count _safedWeapons == 0) then {
private "_id";
_id = _unit getVariable [QGVAR(actionID), -1];
if (count _safedWeapons == 0) then {
private "_id";
_id = _unit getVariable [QGVAR(actionID), -1];
//[_unit, "DefaultAction", _id] call EFUNC(common,removeActionMenuEventHandler);
[_unit, "DefaultAction", _id] call EFUNC(common,removeActionEventHandler);
_unit setVariable [QGVAR(actionID), -1];
};
//[_unit, "DefaultAction", _id] call EFUNC(common,removeActionMenuEventHandler);
[_unit, "DefaultAction", _id] call EFUNC(common,removeActionEventHandler);
_unit setVariable [QGVAR(actionID), -1];
};
};
_unit selectWeapon _muzzle;
if (inputAction "nextWeapon" > 0) then {
// switch to the last mode to roll over to first after the default nextWeapon action
private ["_modes", "_mode", "_index"];
// switch to the last mode to roll over to first after the default nextWeapon action
private ["_modes", "_mode", "_index"];
// get weapon modes
_modes = [];
{
if (getNumber (configFile >> "CfgWeapons" >> _weapon >> _x >> "showToPlayer") == 1) then {
_modes pushBack _x;
// get weapon modes
_modes = [];
{
if (getNumber (configFile >> "CfgWeapons" >> _weapon >> _x >> "showToPlayer") == 1) then {
_modes pushBack _x;
};
if (_x == "this") then {
_modes pushBack _weapon;
};
} forEach getArray (configfile >> "CfgWeapons" >> _weapon >> "modes");
// select last mode
_mode = _modes select (count _modes - 1);
// switch to last mode
_index = 0;
while {
_index < 100 && {currentMuzzle _unit != _weapon || {currentWeaponMode _unit != _mode}}
} do {
_unit action ["SwitchWeapon", _unit, _unit, _index];
_index = _index + 1;
};
if (_x == "this") then {
_modes pushBack _weapon;
};
} forEach getArray (configfile >> "CfgWeapons" >> _weapon >> "modes");
// select last mode
_mode = _modes select (count _modes - 1);
// switch to last mode
_index = 0;
while {
_index < 100 && {currentMuzzle _unit != _weapon || {currentWeaponMode _unit != _mode}}
} do {
_unit action ["SwitchWeapon", _unit, _unit, _index];
_index = _index + 1;
};
} else {
// play fire mode selector sound
[_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound);
// play fire mode selector sound
[_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound);
};
// player hud

View File

@ -12,12 +12,9 @@
*/
#include "script_component.hpp"
private ["_magazine", "_numberofMagazines"];
if !(GVAR(DisplayText)) exitwith {};
_magazine = _this select 0;
_numberofMagazines = _this select 1;
PARAMS_2(_magazine,_numberofMagazines);
private ["_color", "_name", "_text", "_picture"];

View File

@ -1,9 +1,9 @@
// by commy2
#include "script_component.hpp"
private ["_type", "_allMags", "_allMuzzles", "_magazines"];
private ["_allMags", "_allMuzzles", "_magazines"];
_type = _this select 0; //"All", "Frag" or "NonFrag"
PARAMS_1(_type); //"All", "Frag" or "NonFrag"
_allMags = missionNamespace getVariable [format [QGVAR(%1Magazines), _type], []];
_allMuzzles = missionNamespace getVariable [format [QGVAR(%1Muzzles), _type], []];

View File

@ -1,9 +1,9 @@
// by commy2
#include "script_component.hpp"
private ["_type", "_allMags", "_allMuzzles", "_magazines"];
private ["_allMags", "_allMuzzles", "_magazines"];
_type = _this select 0; //"All", "Frag" or "NonFrag"
PARAMS_1(_type); //"All", "Frag" or "NonFrag"
_allMags = missionNamespace getVariable [format [QGVAR(%1Magazines), _type], []];
_allMuzzles = missionNamespace getVariable [format [QGVAR(%1Muzzles), _type], []];

View File

@ -1,9 +1,9 @@
// by commy2
#include "script_component.hpp"
private ["_vehicle", "_turret", "_weapons"];
private ["_turret", "_weapons"];
_vehicle = _this select 0;
PARAMS_1(_vehicle);
_turret = [_vehicle] call EFUNC(common,getTurretCommander);

View File

@ -1,10 +1,9 @@
// by commy2
#include "script_component.hpp"
private ["_unit", "_weapon", "_sound"];
private ["_sound"];
_unit = _this select 0;
_weapon = _this select 1;
PARAMS_2(_unit,_weapon);
_sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFiremodeSound");

View File

@ -11,9 +11,7 @@
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
PARAMS_1(_unit);
[_unit] call EFUNC(common,fixLoweredRifleAnimation);

View File

@ -11,10 +11,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_weapon"];
_unit = _this select 0;
_weapon = _this select 1;
PARAMS_2(_unit,_weapon);
if (_weapon == "") exitWith {};
@ -32,7 +29,6 @@ private ["_muzzles", "_modes"];
_muzzles = [_weapon] call EFUNC(common,getWeaponMuzzles);
_modes = [_weapon] call EFUNC(common,getWeaponModes);
private ["_index", "_muzzle", "_mode"];
_index = (_modes find currentWeaponMode _unit) + 1;

View File

@ -11,10 +11,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_weapon"];
_unit = _this select 0;
_weapon = _this select 1;
PARAMS_2(_unit,_weapon);
if (_weapon == "") exitWith {};
@ -40,7 +37,6 @@ if (_index > count _muzzles - 1) then {_index = 1};
_muzzle = _muzzles select _index;
_index = 0;
while {
_index < 100 && {currentMuzzle _unit != _muzzle}

View File

@ -1,11 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_unit", "_vehicle", "_index"];
_unit = _this select 0;
_vehicle = _this select 1;
_index = _this select 2;
PARAMS_3(_unit,_vehicle,_index);
private "_turret";
_turret = [_unit] call EFUNC(common,getTurretIndex);

View File

@ -12,10 +12,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_muzzle"];
_unit = _this select 0;
_muzzle = _this select 1;
PARAMS_2(_unit,_muzzle);
private ["_uniformMags", "_vestMags", "_backpackMags", "_i", "_uniformMagsToRemove", "_vestMagsToRemove", "_backpackMagsToRemove", "_firstMagazine", "_throwMuzzleNames"];

View File

@ -1,7 +1,7 @@
// by commy2
#include "script_component.hpp"
private ["_unit", "_weapon", "_magazine"];
private ["_unit","_weapon","_magazine"];
_unit = _this select 0;
_weapon = _this select 1;

View File

@ -16,12 +16,9 @@
*/
#include "script_component.hpp"
private ["_temperature", "_pressure", "_relativeHumidity"];
_temperature = _this select 0; // in C
_pressure = _this select 1; // in hPa
_relativeHumidity = _this select 2; // as ratio 0-1
PARAMS_3(_temperature,_pressure,_relativeHumidity);
_pressure = _pressure * 100;
_pressure = _pressure * 100; // hPa to Pa
if (_relativeHumidity > 0) then {
private ["_pSat", "_vaporPressure", "_partialPressure"];

View File

@ -18,7 +18,7 @@
private ["_windSpeed", "_windDir", "_height", "_newWindSpeed", "_windSource", "_roughnessLength"];
EXPLODE_4_PVT(_this,_position,_windGradientEnabled,_terrainEffectEnabled,_obstacleEffectEnabled);
PARAMS_4(_position,_windGradientEnabled,_terrainEffectEnabled,_obstacleEffectEnabled);
fnc_polar2vect = {
private ["_mag2D"];

View File

@ -66,7 +66,7 @@ class CfgVehicles {
};
class ModuleCurator_F: Module_F {
function = QUOTE(DFUNC(moduleCuratorDelay));
function = QUOTE(DFUNC(bi_moduleCurator));
};
class ModuleMine_F: ModuleEmpty_F {
function = QUOTE(DFUNC(bi_moduleMine));

View File

@ -6,7 +6,6 @@ PREP(bi_moduleCurator);
PREP(bi_moduleMine);
PREP(bi_moduleProjectile);
PREP(bi_moduleRemoteControl);
PREP(moduleCuratorDelay);
PREP(moduleZeusSettings);
ADDON = true;

View File

@ -152,15 +152,20 @@ if (_activated) then {
_x radiochanneladd [_player];
} foreach (_logic getvariable ["channels",[]]);
// Added by ACE_zeus to toggle ascension messages
if (GVAR(zeusAscension)) then {
//--- Sent notification to all assigned players
{
if (isplayer _x) then {
[["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp;
};
} foreach (curatoreditableobjects _logic);
};
// Added by ACE_zeus to delay ascension message at mission start
[{
_logic = _this select 0;
_player = _this select 1;
if (GVAR(zeusAscension)) then {
//--- Sent notification to all assigned players
{
if (isplayer _x) then {
[["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp;
};
} foreach (curatoreditableobjects _logic);
};
},[_logic,_player]] call EFUNC(common,execNextFrame);
[_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler;
@ -192,16 +197,6 @@ if (_activated) then {
};
};
// Added by ACE_zeus to toggle eagle
if (GVAR(zeusBird)) then {
//--- Create bird
_birdType = _logic getvariable ["birdType","eagle_f"];
if (_birdType != "") then {
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
_logic setvariable ["bird",_bird,true];
};
};
//--- Activated all future addons
_addons = [];
{
@ -217,18 +212,29 @@ if (_activated) then {
} foreach (synchronizedobjects _logic);
_addons call bis_fnc_activateaddons;
// Added by ACE_zeus to toggle eagle
if (GVAR(zeusBird)) then {
//--- Locality changed
_logic addeventhandler [
"local",
{
_logic = _this select 0;
_bird = _logic getvariable ["bird",objnull];
_bird setowner owner _logic;
}
];
};
// Added by ACE_zeus to delay bird code
[{
_logic = _this select 0;
if (GVAR(zeusBird)) then {
//--- Create bird
_birdType = _logic getvariable ["birdType","eagle_f"];
if (_birdType != "") then {
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
_logic setvariable ["bird",_bird,true];
};
//--- Locality changed
_logic addeventhandler [
"local",
{
_logic = _this select 0;
_bird = _logic getvariable ["bird",objnull];
_bird setowner owner _logic;
}
];
};
},[_logic]] call EFUNC(common,execNextFrame);
};
//--- Player

View File

@ -1,19 +0,0 @@
/*
* Author: SilentSpike
* Function that delays the execution of the curator module function
* Allows ascension and bird settings to be set by module beforehand
*
* Arguments:
* 0: The module logic <LOGIC>
* 1: units <ARRAY>
* 2: activated <BOOL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
[{_this spawn DFUNC(bi_moduleCurator);},_this] call EFUNC(common,execNextFrame);

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: ACE3 Config Entries
description: A list of all ACE3 config entries.
group: development
parent: wiki
order: 2

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: ACE3 Events System
description: Event handlers in ACE3 are implemented through our event system. They should be used to trigger or allow triggering of specific functionality.
group: development
parent: wiki
order: 3

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: Arma 3 Issues
description: Keeping track of Arma 3 issues that need to be fixed. If you want to support us and help raise Bohemia's awareness of those issues, please upvote them.
group: development
parent: wiki
order: 6

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: Arma 3 Scheduler And Our Practices
description:
group: development
parent: wiki
order: 8

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: Coding Guidelines
description:
group: development
parent: wiki
order: 1

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: Extension Guidelines
description:
group: development
parent: wiki
order: 9

View File

@ -1,6 +1,7 @@
---
layout: wiki
title: How to translate ACE3
description: This page describes in short how you can help translating ACE3 into your language.
group: development
parent: wiki
order: 20

Some files were not shown because too many files have changed in this diff Show More