Merge branch 'master' into fixSurrendering

This commit is contained in:
PabstMirror 2015-02-24 11:37:28 -06:00
commit 233647a144
207 changed files with 2716 additions and 2325 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

View File

@ -1,98 +0,0 @@
/**
* fn_moduleAmbianceSoundLoop.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_logic", "_units", "_activated","_ambianceSounds", "_soundFiles", "_minimalDistance","_maximalDistance", "_minimalDistance", "_maxDelayBetweenSounds", "_allUnits", "_newPos", "_targetUnit", "_soundToPlay", "_soundPath", "_unparsedSounds", "_list", "_splittedList", "_nilCheckPassedList"];
_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
_units = [_this,1,[],[[]]] call BIS_fnc_param;
_activated = [_this,2,true,[true]] call BIS_fnc_param;
if (_activated && isServer) then {
_ambianceSounds = [];
_unparsedSounds = _logic getvariable ["soundFiles", ""];
_minimalDistance = (_logic getvariable ["minimalDistance", 400]) max 1;
_maximalDistance = (_logic getvariable ["maximalDistance", 10]) max _minimalDistance;
_minDelayBetweensounds = (_logic getvariable ["minimalDelay", 10]) max 1;
_maxDelayBetweenSounds = (_logic getvariable ["maximalDelay", 170]) max _minDelayBetweensounds;
_volume = (_logic getvariable ["soundVolume", 30]) max 1;
_followPlayers = _logic getvariable ["followPlayers", false];
_splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
_nilCheckPassedList = "";
{
_x = [_x] call cse_fnc_string_removeWhiteSpace;
_splittedList set [_foreachIndex, _x];
}foreach _splittedList;
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
{
if (isclass (missionConfigFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushback (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
} else {
if (isclass (configFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushback ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
};
};
}foreach _splittedList;
if (count _ambianceSounds == 0) exitwith {
[format["No Ambiance sounds available"]] call cse_fnc_debug;
};
{
if !([".", _x, true] call BIS_fnc_inString) then {
[format["Ambiance soundfile does not contain a file extension %1", _x]] call cse_fnc_debug;
_ambianceSounds set [_foreachIndex, _x + ".wss"];
};
}foreach _ambianceSounds;
[format["Ambiance sounds %1", _ambianceSounds]] call cse_fnc_debug;
while {alive _logic} do {
_allUnits = switch (true) do {
case isMultiplayer: {playableUnits};
case isDedicated: {[_logic]};
default {[player]};
};
if (count _allUnits > 0) then {
_targetUnit = _allUnits select (round(random((count _allUnits)-1)));
_newPos = (getPos _targetUnit);
if (!_followPlayers) then {
_newPos = getPos _logic;
};
if (random(1) >= 0.5) then {
if (random(1) >= 0.5) then {
_newPos set [0, (_newPos select 0) + (_minimalDistance + random(_maximalDistance))];
} else {
_newPos set [0, (_newPos select 0) - (_minimalDistance + random(_maximalDistance))];
};
} else {
if (random(1) >= 0.5) then {
_newPos set [1, (_newPos select 1) + (_minimalDistance + random(_maximalDistance))];
} else {
_newPos set [1, (_newPos select 1) - (_minimalDistance + random(_maximalDistance))];
};
};
if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
_soundToPlay = _ambianceSounds select (round(random((count _ambianceSounds)-1)));
playSound3D [_soundToPlay, _targetUnit, false, _newPos, _volume, 1, 1000];
[format["Played a sound %1", _soundToPlay]] call cse_fnc_debug;
sleep (_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds;
};
};
};
};
true;

View File

@ -1,25 +1,30 @@
#define MACRO_ATTACHTOVEHICLE \
class ACE_Actions { \
class GVAR(AttachVehicle) { \
displayName = "$STR_ACE_Attach_AttachDetach"; \
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\attach_ca.paa); \
distance = 4; \
}; \
class GVAR(DetachVehicle) { \
displayName = "$STR_ACE_Attach_Detach"; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\detach_ca.paa); \
distance = 4; \
class ACE_MainActions { \
selection = ""; \
distance = 5; \
condition = "true"; \
class GVAR(AttachVehicle) { \
displayName = "$STR_ACE_Attach_AttachDetach"; \
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\attach_ca.paa); \
distance = 4; \
}; \
class GVAR(DetachVehicle) { \
displayName = "$STR_ACE_Attach_Detach"; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\detach_ca.paa); \
distance = 4; \
}; \
}; \
};

View File

@ -2,70 +2,78 @@ class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_Actions {
class ACE_ApplyHandcuffs {
displayName = "$STR_ACE_Captives_SetCaptive";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
exceptions[] = {};
showDisabled = 0;
priority = 2.4;
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
hotkey = "C";
class ACE_RightHandActions {
selection = "righthand";
displayName = "Right hand";
distance = 5;
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs)) || ([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs)));
class ACE_ApplyHandcuffs {
displayName = "$STR_ACE_Captives_SetCaptive";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
exceptions[] = {};
showDisabled = 0;
priority = 2.4;
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
hotkey = "C";
};
class ACE_RemoveHandcuffs {
displayName = "$STR_ACE_Captives_ReleaseCaptive";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
exceptions[] = {};
showDisabled = 0;
priority = 2.4;
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
hotkey = "R";
};
};
class ACE_RemoveHandcuffs {
displayName = "$STR_ACE_Captives_ReleaseCaptive";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
exceptions[] = {};
showDisabled = 0;
priority = 2.4;
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
hotkey = "R";
};
class ACE_EscortCaptive {
displayName = "$STR_ACE_Captives_EscortCaptive";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
exceptions[] = {};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
hotkey = "E";
};
class ACE_StopEscorting {
displayName = "$STR_ACE_Captives_StopEscorting";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
hotkey = "E";
};
class ACE_LoadCaptive {
displayName = "$STR_ACE_Captives_LoadCaptive";
distance = 4;
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.2;
hotkey = "L";
};
class ACE_FriskPerson {
displayName = "$STR_ACE_Captives_FriskPerson";
distance = 2;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
showDisabled = 0;
//icon = ""; //@todo
priority = 3;
hotkey = "F";
class ACE_MainActions {
class ACE_EscortCaptive {
displayName = "$STR_ACE_Captives_EscortCaptive";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
exceptions[] = {};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
hotkey = "E";
};
class ACE_StopEscorting {
displayName = "$STR_ACE_Captives_StopEscorting";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
hotkey = "E";
};
class ACE_LoadCaptive {
displayName = "$STR_ACE_Captives_LoadCaptive";
distance = 4;
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.2;
hotkey = "L";
};
class ACE_FriskPerson {
displayName = "$STR_ACE_Captives_FriskPerson";
distance = 2;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canFriskPerson));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doFriskPerson));
showDisabled = 0;
//icon = ""; //@todo
priority = 3;
hotkey = "F";
};
};
};
@ -100,24 +108,27 @@ class CfgVehicles {
#define MACRO_LOADUNLOADCAPTIVE \
class ACE_Actions { \
class ACE_LoadCaptive { \
displayName = "$STR_ACE_Captives_LoadCaptive"; \
distance = 4; \
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
exceptions[] = {QGVAR(isNotEscorting)}; \
showDisabled = 0; \
priority = 1.2; \
hotkey = "L"; \
}; \
class ACE_UnloadCaptive { \
displayName = "$STR_ACE_Captives_UnloadCaptive"; \
distance = 4; \
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
showDisabled = 0; \
priority = 1.2; \
hotkey = "C"; \
class ACE_MainActions { \
selection = ""; \
class ACE_LoadCaptive { \
displayName = "$STR_ACE_Captives_LoadCaptive"; \
distance = 4; \
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
exceptions[] = {QGVAR(isNotEscorting)}; \
showDisabled = 0; \
priority = 1.2; \
hotkey = "L"; \
}; \
class ACE_UnloadCaptive { \
displayName = "$STR_ACE_Captives_UnloadCaptive"; \
distance = 4; \
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); \
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); \
showDisabled = 0; \
priority = 1.2; \
hotkey = "C"; \
}; \
}; \
};

View File

@ -19,22 +19,10 @@
PARAMS_1(_unit);
DEFAULT_PARAM(1,_target,objNull);
private ["_isAttached"];
if (isNull _target) then {
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
};
if (isNull _target) exitWith {
ERROR("Null Target (no ACE_escortedUnit)");
false
};
if (isNull _target) exitWith {false};
_isAttached = _target in (attachedObjects _unit);
if (_isAttached && (!(_target getVariable [QGVAR(isHandcuffed), false]))) exitWith {
ERROR("Attached But Not Captive");
false
};
_isAttached
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}

View File

@ -38,7 +38,7 @@ class Extended_Respawn_EventHandlers {
respawn = QUOTE(_this call FUNC(setName));
};
class GVAR(RESETDefaults) {
respawn = QUOTE(_this call FUNC(resetAllDefaults_F));
respawn = QUOTE(_this call FUNC(resetAllDefaults));
};
};
};

View File

@ -17,14 +17,15 @@ class RscTitles {
class HintBox: RscStructuredText {
idc = 1;
text = "";
size = "1 / 40 / (getResolution select 5)";
sizeEx = 1;
//size = "1 / 40 / (getResolution select 5)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0.5};
x = safeZoneW + safeZoneX - 0 * safezoneW; //safeZoneW + safeZoneX - 0.2 * safezoneW;
y = safeZoneY + 0.2 * safezoneH;
w = 0.2 * safeZoneW;
h = 0.1 * SafeZoneH;
font = "PuristaMedium";
};
};
};
@ -36,13 +37,12 @@ class RscTitles {
fadeIn = 0.2;
fadeOut = 0.2;
name = "ACE_RscErrorHint";
class controls {
class HintBox: RscStructuredText {
idc = 1;
text = "";
size = "1 / 40 / (getResolution select 5)";
sizeEx = 1;
//size = "1 / 40 / (getResolution select 5)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0.8, 0, 0, 0.5};
x = 0.3 * safeZoneW + safeZoneX;
@ -52,6 +52,7 @@ class RscTitles {
};
};
};
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
idd = -1;
class controls {

View File

@ -1,6 +1,3 @@
class ACE_gui_RscProgress;
class ACE_gui_staticBase;
class GVAR(ProgressBar_Dialog) {
idd = -1;
@ -20,7 +17,7 @@ class GVAR(ProgressBar_Dialog) {
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0.1};
colorBackground[] = {0, 0, 0, 0.0};
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
@ -34,7 +31,7 @@ class GVAR(ProgressBar_Dialog) {
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {0,0,0,0.025};
colorFrame[] = {0,0,0,0.0};
colorBar[] = {0.27,0.5,0.31,0.8};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};

View File

@ -26,5 +26,5 @@ class RscDisplayInventory {
};
class RscDisplayChannel {
onLoad = QUOTE(_this call GVAR(onLoadRscDisplayChannel));
onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
};

View File

@ -15,12 +15,17 @@ PREP(addSetting);
PREP(adminKick);
PREP(ambientBrightness);
PREP(applyForceWalkStatus);
PREP(beingCarried);
PREP(binarizeNumber);
PREP(blurScreen);
PREP(callCustomEventHandlers);
PREP(callCustomEventHandlersGlobal);
PREP(canGetInPosition);
PREP(canInteract);
PREP(canInteractWith);
PREP(canUseWeapon);
PREP(carriedByObj);
PREP(carryObj);
PREP(changeProjectileDirection);
PREP(checkPBOs);
PREP(claim);
@ -30,7 +35,12 @@ PREP(codeToString);
PREP(convertKeyCode);
PREP(createOrthonormalReference);
PREP(currentChannel);
PREP(debug);
PREP(debugModule);
PREP(defineVariable);
PREP(disableAI);
PREP(disableUserInput);
PREP(displayIcon);
PREP(displayText);
PREP(displayTextPicture);
PREP(displayTextStructured);
@ -42,12 +52,21 @@ PREP(execRemoteFnc);
PREP(executePersistent);
PREP(filter);
PREP(fixLoweredRifleAnimation);
PREP(getAllDefinedSetVariables);
PREP(getAllGear);
PREP(getCaptivityStatus);
PREP(getCarriedBy);
PREP(getCarriedObj);
PREP(getConfigCommander);
PREP(getConfigGunner);
PREP(getDeathAnim);
PREP(getDefaultAnim);
PREP(getDefinedVariable);
PREP(getDefinedVariableDefault);
PREP(getDefinedVariableInfo);
PREP(getDoorTurrets);
PREP(getFirstObjectIntersection);
PREP(getFirstTerrainIntersection);
PREP(getForceWalkStatus);
PREP(getGunner);
PREP(getHitPoints);
@ -56,6 +75,7 @@ PREP(getInPosition);
PREP(getMarkerType);
PREP(getName);
PREP(getNumberFromMissionSQM);
PREP(getNumberMagazinesIn);
PREP(getPitchBankYaw);
PREP(getSettingData);
PREP(getStringFromMissionSQM);
@ -74,29 +94,43 @@ PREP(getUavControlPosition);
PREP(getVehicleCargo);
PREP(getVehicleCodriver);
PREP(getVehicleCrew);
PREP(getVersion);
PREP(getWeaponAzimuthAndInclination);
PREP(getWeaponIndex);
PREP(getWeaponType);
PREP(getWindDirection);
PREP(goKneeling);
PREP(hadamardProduct);
PREP(hasItem);
PREP(hasMagazine);
PREP(inheritsFrom);
PREP(insertionSort);
PREP(interpolateFromArray);
PREP(inTransitionAnim);
PREP(inWater);
PREP(isArrested);
PREP(isAutoWind);
PREP(isAwake);
PREP(isEngineer);
PREP(isEOD);
PREP(isInBuilding);
PREP(isModLoaded);
PREP(isPlayer);
PREP(isTurnedOut);
PREP(letterToCode);
PREP(limitMovementSpeed);
PREP(loadPerson);
PREP(loadPersonLocal);
PREP(loadSettingsFromProfile);
PREP(loadSettingsOnServer);
PREP(map);
PREP(moduleCheckPBOs);
PREP(moduleLSDVehicles);
PREP(moveToTempGroup);
PREP(muteUnit);
PREP(numberToDigits);
PREP(numberToDigitsString);
PREP(onAnswerRequest);
PREP(onLoadRscDisplayChannel);
PREP(owned);
PREP(player);
@ -104,33 +138,53 @@ PREP(playerSide);
PREP(progressBar);
PREP(queueAnimation);
PREP(readSettingFromModule);
PREP(receiveRequest);
PREP(removeActionEventHandler);
PREP(removeActionMenuEventHandler);
PREP(removeCameraEventHandler);
PREP(removeCustomEventHandler);
PREP(removeMapMarkerCreatedEventHandler);
PREP(removeScrollWheelEventHandler);
PREP(requestCallback);
PREP(resetAllDefaults);
PREP(restoreVariablesJIP);
PREP(revertKeyCodeLocalized);
PREP(sanitizeString);
PREP(sendRequest);
PREP(serverLog);
PREP(setArrestState);
PREP(setCanInteract);
PREP(setCaptivityStatus);
PREP(setCarriedBy);
PREP(setDefinedVariable);
PREP(setDisableUserInputStatus);
PREP(setForceWalkStatus);
PREP(setHearingCapability);
PREP(setName);
PREP(setParameter);
PREP(setPitchBankYaw);
PREP(setVariableJIP);
PREP(setVariablePublic);
PREP(setProne);
PREP(setSetting);
PREP(setSettingFromConfig);
PREP(setVariableJIP);
PREP(setVariablePublic);
PREP(setVolume);
PREP(sortAlphabeticallyBy);
PREP(stringCompare);
PREP(stringToColoredText);
PREP(stringRemoveWhiteSpace);
PREP(subString);
PREP(switchToGroupSide);
PREP(throttledPublicVariable);
PREP(toBin);
PREP(toBitmask);
PREP(toHex);
PREP(toNumber);
PREP(throttledPublicVariable);
PREP(uniqueElementsOnly);
PREP(unloadPerson);
PREP(unmuteUnit);
PREP(useItem);
PREP(useMagazine);
PREP(waitAndExecute);
// ACE_Debug
@ -195,74 +249,6 @@ if (hasInterface) then {
}, 0, []] call cba_fnc_addPerFrameHandler;
};
PREP(stringCompare);
PREP(string_removeWhiteSpace);
PREP(isHC);
PREP(sendRequest_f);
PREP(requestCallback);
PREP(receiveRequest);
PREP(onAnswerRequest);
PREP(debug);
PREP(debugModule);
PREP(defineVariable);
PREP(setDefinedVariable);
PREP(getDefinedVariable);
PREP(getAllDefinedSetVariables);
PREP(getDefinedVariableInfo);
PREP(getDefinedVariableDefault);
PREP(getDeathAnim);
PREP(insertionSort);
PREP(uniqueElementsOnly);
PREP(sortAlphabeticallyBy);
PREP(hasMagazine);
PREP(useMagazine);
PREP(findMagazine);
PREP(hasItem);
PREP(useItem);
PREP(findItem);
PREP(getNumberMagazinesIn);
PREP(setCanInteract);
PREP(getCanInteract);
PREP(canInteract);
PREP(resetAllDefaults_f);
PREP(broadcastSound3D_f);
PREP(isAwake);
PREP(setProne);
PREP(setDisableUserInputStatus);
PREP(dropWeapon_f);
PREP(inWater_f);
PREP(setVolume_f);
PREP(closeAllDialogs_f);
PREP(disableAI_f);
PREP(switchToGroupSide_f);
PREP(getFirstObjectIntersection);
PREP(getFirstTerrainIntersection);
PREP(setHearingCapability);
PREP(revealObject_f);
PREP(getWeaponItems_f);
PREP(isModLoaded_f);
PREP(inheritsFrom);
PREP(getVersion);
PREP(carryObj);
PREP(carriedByObj);
PREP(getCarriedObj);
PREP(getCarriedBy);
PREP(beingCarried);
PREP(setCarriedBy);
PREP(moveToTempGroup);
PREP(limitMovementSpeed);
PREP(setArrestState);
PREP(isArrested);
PREP(loadPerson_F);
PREP(loadPersonLocal_F);
PREP(unloadPerson_F);
ADDON = true;
isHC = !(hasInterface || isDedicated);

View File

@ -94,8 +94,41 @@ class ACE_Settings {
isClientSetable = 1;
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
};
class GVAR(settingFeedbackIcons) {
value = 1;
typeName = "SCALAR";
force = 0;
isClientSetable = 1;
displayName = "$STR_ACE_Common_SettingFeedbackIconsName";
description = "$STR_ACE_Common_SettingFeedbackIconsDesc";
values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"};
};
class GVAR(SettingProgressBarLocation) {
value = 0;
typeName = "SCALAR";
force = 0;
isClientSetable = 1;
displayName = "$STR_ACE_Common_SettingProgressbarLocationName";
description = "$STR_ACE_Common_SettingProgressbarLocationDesc";
values[] = {"Top", "Bottom"};
};
class GVAR(displayTextColor) {
value[] = {0,0,0,0.1};
typeName = "COLOR";
isClientSetable = 1;
displayName = "$STR_ACE_Common_SettingDisplayTextColorName";
description = "$STR_ACE_Common_SettingDisplayTextColorDesc";
};
class GVAR(displayTextFontColor) {
value[] = {1,1,1,1};
typeName = "COLOR";
isClientSetable = 1;
displayName = "$STR_ACE_Common_SettingDisplayTextFontColorName";
description = "$STR_ACE_Common_SettingDisplayTextFontColorDesc";
};
};
#include "define.hpp"
#include <ProgressScreen.hpp>
#include <HintConfig.hpp>
#include <RscInfoType.hpp>
@ -103,3 +136,23 @@ class ACE_Settings {
#include <FixAnimations.hpp>
#include <NoVoice.hpp>
class CfgUIGrids {
class IGUI {
class Presets {
class Arma3 {
class Variables {
grid_ACE_displayText[] = {{((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)),safeZoneY + 0.175 * safezoneH, (10 *(((safezoneW / safezoneH) min 1.2) / 40)), (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"};
};
};
};
class Variables {
class grid_ACE_displayText {
displayName = "ACE Hint";
description = "Textual in game feedback to the player.";
preview = "\a3\Ui_f\data\GUI\Cfg\UIGrids\grid_hint_ca.paa";
saveToProfile[] = {0,1};
};
};
};
};

View File

@ -182,12 +182,12 @@ class ACE_gui_buttonBase {
bottom = 0.00;
};
textureNoShortcut = "";
animTextureNormal = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa) );
animTextureDisabled = QUOTE( PATHTOF(data\buttonDisabled_gradient.paa));
animTextureOver = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
animTextureFocused = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
animTexturePressed = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
animTextureDefault = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
period = 0.5;
font = FontCSE;
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};

View File

@ -39,4 +39,4 @@ if (_show) then {
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = nil;
};
};
};
};

View File

@ -1,16 +0,0 @@
/**
* fn_broadcastSound3D_f.sqf
* @Descr: Plays a sound in 3D
* @Author: Glowbal
*
* @Arguments: [unit OBJECT, sound STRING]
* @Return: void
* @PublicAPI: true
*/
#include "script_component.hpp"
if (isDedicated) exitwith{};
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_sound = [_this, 1, "",[""]] call BIS_fnc_Param;
_unit say3D _sound;

View File

@ -1,14 +0,0 @@
/**
* fn_closeAllDialogs_f.sqf
* @Descr: Close all dialogs
* @Author: Glowbal
*
* @Arguments: []
* @Return: void
* @PublicAPI: true
*/
#include "script_component.hpp"
while {dialog} do {
closeDialog 0;
};

View File

@ -14,4 +14,4 @@
#define CHANNELS ["group", "side", "global", "command", "vehicle", "direct"]
#define CHANNELS_LOCALIZED [localize "str_channel_group", localize "str_channel_side", localize "str_channel_global", localize "str_channel_command", localize "str_channel_vehicle", localize "str_channel_direct"]
CHANNELS select (CHANNELS_LOCALIZED find (uiNamespace getVariable ["ACE_currentChannel", ""])) max 0
CHANNELS select (CHANNELS_LOCALIZED find (uiNamespace getVariable [QGVAR(currentChannel), ""])) max 0

View File

@ -0,0 +1,120 @@
/*
* Author: Glowbal
*
* Draw progress bar and execute given function if succesful.
* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode]
*
* Argument:
* 0: icon ID <STRING>
* 1: show <BOOL>
* 2: Icon Path <STRING>
* 3: Icon color <ARRAY>
* 4: timeAlive. -1 = forever <NUMBER> <OPTIONAL>
*
* Return value:
* Nothing
*
* Example:
* ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon;
*/
#include "script_component.hpp"
// positions for the icon UI
#define RIGHT_SIDE (safezoneW + safezoneX)
#define LEFT_SIDE safezoneX
#define TOP_SIDE safeZoneY
#define BOTTOM_SIDE (safeZoneH + safezoneY)
#define ICON_WIDTH (2 * (((safezoneW / safezoneH) min 1.2) / 40))
#define X_POS_ICONS (RIGHT_SIDE - (1.5 * ICON_WIDTH))
#define Y_POS_ICONS (TOP_SIDE + (2.5 * ICON_WIDTH))
#define DIFFERENCE_ICONS (1.1 * ICON_WIDTH)
#define X_POS_ICONS_SECOND (RIGHT_SIDE - (4.4 * ICON_WIDTH))
#define Y_POS_ICONS_SECOND (TOP_SIDE + (1.1 * ICON_WIDTH))
// setting values
#define TOP_RIGHT_DOWN 1
#define TOP_RIGHT_LEFT 2
#define TOP_LEFT_DOWN 3
#define TOP_LEFT_RIGHT 4
// other constants
#define DEFAULT_TIME 6
private ["_iconId", "_show", "_icon", "_allControls", "_refresh", "_timeAlive", "_list", "_color"];
_iconId = _this select 0;
_show = _this select 1;
_icon = _this select 2;
_color = _this select 3;
_timeAlive = if (count _this > 4) then {_this select 4} else {DEFAULT_TIME};
disableSerialization;
_list = missionNamespace getvariable [QGVAR(displayIconList),[]];
_refresh = {
private ["_allControls"];
// Refreshing of all icons..
_allControls = missionNamespace getvariable [QGVAR(displayIconListControls), []];
{
ctrlDelete _x;
}foreach _allControls;
_allControls = [];
private ["_ctrl", "_setting"];
_setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0];
if (_setting > 0) then {
{
// +19000 because we want to make certain we are using free IDCs..
_ctrl = ((findDisplay 46) ctrlCreate ["RscPicture", _foreachIndex + 19000]);
_position = switch (_setting) do {
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
};
_ctrl ctrlSetPosition _position;
_ctrl ctrlsetText (_x select 1);
_ctrl ctrlSetTextColor (_x select 2);
_ctrl ctrlCommit 0;
_allControls pushback _ctrl;
}foreach (missionNamespace getvariable [QGVAR(displayIconList),[]]);
};
missionNamespace setvariable [QGVAR(displayIconListControls), _allControls];
};
if (_show) then {
if ({(_x select 0 == _iconId)} count _list == 0) then {
_list pushback [_iconId, _icon, _color, time];
} else {
{
if (_x select 0 == _iconId) exitwith {
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
};
}foreach _list;
};
missionNamespace setvariable [QGVAR(displayIconList), _list];
call _refresh;
if (_timeAlive >= 0) then {
[{
[_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon);
}, [_iconId], _timeAlive, _timeAlive] call EFUNC(common,waitAndExecute);
};
} else {
if ({(_x select 0 == _iconId)} count _list == 1) then {
private "_newList";
_newList = [];
{
if (_x select 0 != _iconId) then {
_newList pushback _x;
};
}foreach _list;
missionNamespace setvariable [QGVAR(displayIconList), _newList];
call _refresh;
};
};

View File

@ -18,36 +18,32 @@
#define DEFAULT_DELAY 2
#define DEFAULT_PRIORITY 0
if (isNil QGVAR(lastHint)) then {
GVAR(lastHint) = [0, 0];
};
_this resize 4;
_this spawn {
private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"];
private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"];
_text = _this select 0;
_sound = _this select 1;
_delay = _this select 2;
_priority = _this select 3;
_text = _this select 0;
_sound = _this select 1;
_delay = _this select 2;
_priority = _this select 3;
if (isNil QGVAR(lastHint)) then {
GVAR(lastHint) = [0, 0];
};
_lastHintTime = GVAR(lastHint) select 0;
_lastHintPriority = GVAR(lastHint) select 1;
_lastHintTime = GVAR(lastHint) select 0;
_lastHintPriority = GVAR(lastHint) select 1;
if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text};
if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text};
if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND};
if (isNil "_delay") then {_delay = DEFAULT_DELAY};
if (isNil "_priority") then {_priority = DEFAULT_PRIORITY};
_time = time;
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
_time = time;
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
hintSilent _text;
if (_sound) then {playSound "ACE_Sound_Click"};
GVAR(lastHint) set [0, _time];
GVAR(lastHint) set [1, _priority];
sleep _delay;
if (_time == GVAR(lastHint) select 0) then {hintSilent ""};
};
[{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute);
};

View File

@ -1,30 +1,30 @@
/*
* Author: commy2
* Author: commy2, Glowbal
*
* Display a structured text with image.
*
* Argument:
* 0: Text (Anything)
* 1: Image (String)
* 0: Text <ANY>
* 1: Image <STRING>
* 2: Image color <ARRAY> <OPTIONAL>
*
* Return value:
* Nothing
*/
#include "script_component.hpp"
private ["_text", "_image"];
private ["_text", "_image", "_imageColor"];
_text = _this select 0;
_image = _this select 1;
_imageColor = if (count _this > 2) then {_this select 2} else {[1,1,1]};
_imageColor resize 3;
if (typeName _text != "TEXT") then {
_text = parseText format ["<t align='center'>%1</t>", _text];
if (typeName _text == "STRING" && {isLocalized _text}) then {
_text = localize _text;
};
_text = parseText format ["<t align='center'>%1</t>", _text];
};
_text = composeText [
parseText format ["<img size='2.5' align='center' color='#ffffff' image='%1'/>", _image],
lineBreak,
_text
];
[_text] call FUNC(displayTextStructured);
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
[_text, 2] call FUNC(displayTextStructured);

View File

@ -1,26 +1,30 @@
/*
* Author: commy2
* Author: commy2, Glowbal
*
* Display a structured text.
*
* Argument:
* 0: Text (Anything)
* 1: Size of the textbox (Number, optional default: 1)
* 0: Text <ANY>
* 1: Size of the textbox <NUMBER> <OPTIONAL>
*
* Return value:
* Nothing
*/
#include "script_component.hpp"
private ["_text", "_size", "_isShown", "_ctrlHint"];
private ["_text", "_size", "_isShown", "_ctrlHint", "_yPos", "_xPos", "_wPos", "_hPos", "_position"];
_text = _this select 0;
_size = _this select 1;
if (isNil "_size") then {_size = 1};
if (isNil "_size") then {_size = 1.5};
if (typeName _text != "TEXT") then {
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
if (typeName _text == "STRING" && {isLocalized _text}) then {
_text = localize _text;
};
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
};
_isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
@ -30,19 +34,25 @@ _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
disableSerialization;
_ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
_ctrlHint ctrlSetPosition [
safeZoneW + safeZoneX - 0 * safezoneW,
safeZoneY + 0.2 * safezoneH,
0.2 * safeZoneW,
_size * 0.1 * SafeZoneH
];
_ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
/*
// This does not function at the moment. Has been disabled until it fixed.
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
*/
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
_yPos = safeZoneY + 0.175 * safezoneH;
_wPos = (10 *(((safezoneW / safezoneH) min 1.2) / 40));
_hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
_position = [_xPos, _yPos, _wPos, _size * _hPos];
_ctrlHint ctrlSetPosition _position;
_ctrlHint ctrlCommit 0;
_ctrlHint ctrlSetStructuredText _text;
_ctrlHint ctrlSetPosition [
safeZoneW + safeZoneX - 0.2 * safezoneW,
safeZoneY + 0.2 * safezoneH,
0.2 * safeZoneW,
_size * 0.1 * SafeZoneH
];
_ctrlHint ctrlCommit ([0.2, 0] select _isShown);
_ctrlHint ctrlSetPosition _position;
_ctrlHint ctrlCommit ([0.5, 0] select _isShown);

View File

@ -1,39 +0,0 @@
/**
* fn_dropWeapon_f.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private ["_unit","_currentWeapon","_currentAnimation", "_WeaponHolder"];
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_currentWeapon = currentWeapon _unit;
_currentAnimation = animationState _unit;
_WeaponHolder = "GroundWeaponHolder" createVehicle position _unit;
_unit removeWeapon _currentWeapon;
_weaponHolder addWeaponCargoGlobal [_currentWeapon, 1];
//_unit action [ "DropWeapon", _WeaponHolder, _currentWeapon ];
_WeaponHolder setPos (getPos _unit);
//_unit switchMove _currentAnimation;
_primairyWeapon = primaryWeapon _unit;
_secondairyWeapon = secondaryWeapon _unit;
_handGunWeapon = handgunWeapon _unit;
switch (_currentWeapon) do {
case _primairyWeapon: {
};
case _secondairyWeapon: {
};
case _handGunWeapon: {
};
default {};
};

View File

@ -14,17 +14,17 @@
// ACRE
if (isClass (configFile >> "CfgPatches" >> "acre_main")) then {
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
};
// TFAR
if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then {
call TFAR_fnc_onSwTangentReleased;
call TFAR_fnc_onAdditionalSwTangentReleased;
call TFAR_fnc_onLRTangentReleased;
call TFAR_fnc_onAdditionalLRTangentReleased;
call TFAR_fnc_onDDTangentReleased;
call TFAR_fnc_onSwTangentReleased;
call TFAR_fnc_onAdditionalSwTangentReleased;
call TFAR_fnc_onLRTangentReleased;
call TFAR_fnc_onAdditionalLRTangentReleased;
call TFAR_fnc_onDDTangentReleased;
};

View File

@ -1,8 +1,8 @@
// by commy2
/*
usage:
usage:
(configFile >> "CfgAmmo") call FUNC(exportConfig);
(configFile >> "CfgAmmo") call FUNC(exportConfig);
*/
#include "script_component.hpp"

View File

@ -1,25 +0,0 @@
/**
* fn_findItem.sqf
* @Descr:
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit","_magazine","_return"];
_unit = _this select 0;
_item = _this select 1;
if (_item in (uniformItems _unit)) exitwith {1};
if (_item in (vestItems _unit)) exitwith {2};
if (_item in (backpackItems _unit)) exitwith {3};
if (_item in (assignedItems _unit)) exitwith {4};
if (_item in (primaryWeaponItems _unit)) exitwith {5};
if (_item in (secondaryWeaponItems _unit)) exitwith {6};
if (_item in (handgunItems _unit)) exitwith {7};
if (_item in (items _unit)) exitwith {8}; // in case it is in items but cannot be found in any other container (should never reach this)
// If we cannot find the item, return 0.
0;

View File

@ -1,21 +0,0 @@
/**
* fn_findMagazine.sqf
* @Descr: Find where the current magazines are. Order: uniform, vest, backpack, any.
* @Author: Glowbal
*
* @Arguments: [unit OBJECT, magazine STRING (Classname of magazine)]
* @Return: NUMBER 0 = none, 1 = in uniform, 2 = in vest, 3 = in backpack, 4 = found outside container
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit","_magazine"];
_unit = _this select 0;
_magazine = _this select 1;
if (_magazine in (getMagazineCargo uniformContainer _unit)) exitwith {1};
if (_magazine in (getMagazineCargo vestContainer _unit)) exitwith {2};
if (_magazine in (getMagazineCargo backpackContainer _unit)) exitwith {3};
if (_magazine in (magazines _unit)) exitwith {4}; // in case it cannot be found in any other container. Most likely loaded in a weapon.
// If we cannot find the item, return 0.
0;

View File

@ -1,12 +0,0 @@
/**
* fn_getCanInteract.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
((_this select 0) getvariable [QGVAR(canInteract),0])

View File

@ -1,45 +0,0 @@
/**
* fn_getCustomResults_f.sqf
* @Descr: Executes custom results eventhandlers, collects their output and returns this.
* @Author: Glowbal
*
* @Arguments: [arguments ANY, handle STRING]
* @Return: ARRAY Collection of all return values of all executed CustomResult handlers
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_arguments","_handle","_ehCfg","_eventHandlerCollection","_eventHandlerName","_cfg","_code","_classType", "_return"];
_arguments = _this select 0;
_handle = _this select 1;
_eventHandlerName = ("ace_f_custom_results_eventhandler_" + _handle);
_eventHandlerCollection = missionNamespace getvariable _eventHandlerName;
if (isnil "_eventHandlerCollection") then {
_eventHandlerCollection = [];
// TODO Get a replacement for this
_cfg = (ConfigFile >> "Advanced_Combat_Environment" >> "CustomResults" >> _handle);
if (isClass _cfg) then {
_numberOfEH = count _cfg;
for [{_EHiterator=0}, {(_EHiterator< _numberOfEH)}, {_EHiterator=_EHiterator+1}] do {
_ehCfg = _cfg select _EHiterator;
if (isClass _ehCfg) then {
_classType = (ConfigName _ehCfg);
_code = (compile getText(_ehCfg >> "onCall"));
_eventHandlerCollection pushback [_classType, _code];
true;
};
};
};
missionNamespace setvariable [_eventHandlerName, _eventHandlerCollection];
};
_return = [];
{
_return pushback (_arguments call (_x select 1));
false;
}count _eventHandlerCollection;
_return

View File

@ -20,9 +20,9 @@ private "_gunner";
_gunner = objNull;
{
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
_gunner = _vehicle turretUnit _x;
};
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
_gunner = _vehicle turretUnit _x;
};
} forEach allTurrets _vehicle;
_gunner

View File

@ -23,33 +23,33 @@ _hitpoints = [];
private "_hitpointClasses";
_hitpointClasses = [_config >> "HitPoints"];
{
private "_class";
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
private "_class";
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
if (isClass _class) then {
_hitpointClasses pushBack _class;
};
if (isClass _class) then {
_hitpointClasses pushBack _class;
};
} forEach allTurrets _vehicle;
// iterate through all classes with hitpoints and their parents
{
private "_class";
_class = _x;
private "_class";
_class = _x;
while {isClass _class} do {
while {isClass _class} do {
for "_i" from 0 to (count _class - 1) do {
private "_entry";
_entry = configName (_class select _i);
for "_i" from 0 to (count _class - 1) do {
private "_entry";
_entry = configName (_class select _i);
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
_hitpoints pushBack _entry;
};
};
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
_hitpoints pushBack _entry;
};
};
_class = inheritsFrom _class;
};
_class = inheritsFrom _class;
};
} forEach _hitpointClasses;

View File

@ -24,36 +24,36 @@ _selections = [];
private "_hitpointClasses";
_hitpointClasses = [_config >> "HitPoints"];
{
private "_class";
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
private "_class";
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
if (isClass _class) then {
_hitpointClasses pushBack _class;
};
if (isClass _class) then {
_hitpointClasses pushBack _class;
};
} forEach allTurrets _vehicle;
// iterate through all classes with hitpoints and their parents
{
private "_class";
_class = _x;
private "_class";
_class = _x;
while {isClass _class} do {
while {isClass _class} do {
for "_i" from 0 to (count _class - 1) do {
private ["_entry", "_selection"];
for "_i" from 0 to (count _class - 1) do {
private ["_entry", "_selection"];
_entry = configName (_class select _i);
_selection = getText (_class select _i >> "name");
_entry = configName (_class select _i);
_selection = getText (_class select _i >> "name");
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack _entry;
_selections pushBack _selection;
};
};
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack _entry;
_selections pushBack _selection;
};
};
_class = inheritsFrom _class;
};
_class = inheritsFrom _class;
};
} forEach _hitpointClasses;

View File

@ -1,14 +0,0 @@
/**
* fn_getWeaponItems_f.sqf
* @Descr: Get the weapon items from the unit.
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
[primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit];

View File

@ -9,18 +9,18 @@ _key = _this select 1;
ERRORDATA(2);
_val = nil;
try {
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index != -1) then {
_val = (_hash select 1) select _index;
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
_val = nil;
};
};
} else {
ERROR("Input hash is not valid");
};
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index != -1) then {
_val = (_hash select 1) select _index;
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
_val = nil;
};
};
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};
_val

View File

@ -9,15 +9,15 @@ _key = _this select 1;
ERRORDATA(2);
_val = false;
try {
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index != -1) then {
_val = true;
};
} else {
ERROR("Input hash is not valid");
};
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index != -1) then {
_val = true;
};
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};
_val

View File

@ -7,12 +7,12 @@ _hashList = _this select 0;
ERRORDATA(1);
_hashKeys = [];
try {
if(VALIDHASH(_hashList)) then {
_hashKeys = (_hashList select 0);
} else {
ERROR("Input hashlist is not valid");
};
if(VALIDHASH(_hashList)) then {
_hashKeys = (_hashList select 0);
} else {
ERROR("Input hashlist is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};
[_hashKeys, []];

View File

@ -7,11 +7,11 @@ _hashList = _this select 0;
_value = _this select 1;
ERRORDATA(2);
try {
if(VALIDHASH(_hashList)) then {
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
} else {
ERROR("Input hashlist in push not valid");
};
if(VALIDHASH(_hashList)) then {
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
} else {
ERROR("Input hashlist in push not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};

View File

@ -8,20 +8,20 @@ _index = _this select 1;
ERRORDATA(2);
_hash = nil;
try {
if(VALIDHASH(_hashList)) then {
_keys = _hashList select 0;
_hashes = _hashList select 1;
if(_index < (count _hashes)) then {
_values = _hashes select _index;
if(VALIDHASH(_hashList)) then {
_keys = _hashList select 0;
_hashes = _hashList select 1;
if(_index < (count _hashes)) then {
_values = _hashes select _index;
_hash = [_keys, _values, 1];
} else {
ERROR("Index of hashlist is out of range");
};
} else {
ERROR("Input hashlist is not valid");
};
_hash = [_keys, _values, 1];
} else {
ERROR("Index of hashlist is out of range");
};
} else {
ERROR("Input hashlist is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};
_hash;

View File

@ -8,17 +8,17 @@ _index = _this select 1;
_value = _this select 2;
ERRORDATA(3);
try {
if(VALIDHASH(_hashList)) then {
if(VALIDHASH(_value)) then {
_vals = _value select 1;
(_hashList select 1) set[_index, _vals];
} else {
ERROR("Set hash in hashlist is not valid");
};
} else {
ERROR("Input hashlist is not valid");
};
if(VALIDHASH(_hashList)) then {
if(VALIDHASH(_value)) then {
_vals = _value select 1;
(_hashList select 1) set[_index, _vals];
} else {
ERROR("Set hash in hashlist is not valid");
};
} else {
ERROR("Input hashlist is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};

View File

@ -8,23 +8,23 @@ _key = _this select 1;
ERRORDATA(2);
_val = nil;
try {
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index != -1) then {
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
// is this hash is not part of a hash list?
// if it is we need to leave the keys intact.
if((count _hash) == 2) then {
// if this is a standalone hash then we can clean it up
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
};
};
} else {
ERROR("Input hash is not valid");
};
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index != -1) then {
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
// is this hash is not part of a hash list?
// if it is we need to leave the keys intact.
if((count _hash) == 2) then {
// if this is a standalone hash then we can clean it up
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
};
};
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};
true

View File

@ -9,19 +9,19 @@ _key = _this select 1;
_val = _this select 2;
ERRORDATA(3);
try {
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index == -1) then {
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
if(_index == -1) then {
_index = (count (_hash select 0));
};
(_hash select 0) set[_index, _key];
};
(_hash select 1) set[_index, _val];
} else {
ERROR("Input hash is not valid");
};
if(VALIDHASH(_hash)) then {
_index = (_hash select 0) find _key;
if(_index == -1) then {
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
if(_index == -1) then {
_index = (count (_hash select 0));
};
(_hash select 0) set[_index, _key];
};
(_hash select 1) set[_index, _val];
} else {
ERROR("Input hash is not valid");
};
} catch {
HANDLECATCH;
HANDLECATCH;
};

View File

@ -1,24 +0,0 @@
/**
* fn_isHC.sqf
* @Descr: Check if current locality is a headless client
* @Author: Glowbal
*
* @Arguments: []
* @Return: BOOL True if locality is headless client OR is not in multiplayer
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_return"];
if (!isMultiplayer) then {
_return = true;
} else {
if (isServer && !isDedicated) then {
_return = true;
} else {
_return = !(hasInterface || isDedicated);
};
};
_return

View File

@ -10,7 +10,7 @@
#include "script_component.hpp"
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson_F))
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
@ -34,9 +34,9 @@ if (_unit distance _loadcar <= 10) then {
};
};
if (!isNull _vehicle) then {
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide_f);
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
[_caller,objNull] call FUNC(carryObj);
[_unit,objNull] call FUNC(carryObj);
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal_F)), _unit, false] call EFUNC(common,execRemoteFnc);
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
};
_vehicle

View File

@ -16,13 +16,13 @@ _vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
if (!alive _unit) then {
_unit = [_unit,_caller] call FUNC(makeCopyOfBody_F);
_unit = [_unit,_caller] call FUNC(makeCopyOfBody);
};
_unit moveInCargo _vehicle;
_loaded = _vehicle getvariable [QGVAR(loaded_persons_F),[]];
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded pushback _unit;
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
if (!([_unit] call FUNC(isAwake))) then {
_handle = [_unit,_vehicle] spawn {
private ["_unit","_vehicle"];

View File

@ -18,12 +18,12 @@ if (_moveTo) then {
_previousGroup = group _unit;
_newGroup = createGroup (side _previousGroup);
[_unit] joinSilent _newGroup;
_unit setvariable [QGVAR(previousGroup_F),_previousGroup];
_unit setvariable [QGVAR(previousGroup),_previousGroup];
} else {
_previousGroup = _unit getvariable QGVAR(previousGroup_F);
_previousGroup = _unit getvariable QGVAR(previousGroup);
if (!isnil "_previousGroup") then {
_currentGroup = group _unit;
_unit setvariable [QGVAR(previousGroup_F),nil];
_unit setvariable [QGVAR(previousGroup),nil];
[_unit] joinSilent _previousGroup;
if (count units _currentGroup == 0) then {
deleteGroup _currentGroup;

View File

@ -1,24 +1,29 @@
/*
Name: FUNC(onLoadRscDisplayChannel)
Author: Pabst Mirror, commy2
Description:
When the RscDisplayChannel is loaded, this will constantly uiNamespace variable "ACE_currentChannel"
with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
Parameters:
0: DISPLAY - RscDisplayChannel
Returns:
Nothing
*/
* Author: Pabst Mirror, commy2
* When the RscDisplayChannel is loaded, this will constantly uiNamespace variable ace_common_currentChannel
* with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
*
* Arguments:
* 0: The RscDisplayChannel Display <DISPLAY>
*
* Return Value:
* Nothing
*
* Example:
* onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
*
* Public: No
*/
#include "script_component.hpp"
uiNamespace setVariable ["ACE_ctrlChannel", (_this select 0) displayCtrl 101];
uiNamespace setVariable [QGVAR(currentChannelControl), ((_this select 0) displayCtrl 101)];
["ACE_currentChannel", "onEachFrame", {
if (ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull]) != "") then {
uiNamespace setVariable ["ACE_currentChannel", ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull])];
};
if (isNull (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull])) then {
["ACE_currentChannel", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
} else {
private "_localizedChannelText";
_localizedChannelText = ctrlText (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull]);
uiNamespace setVariable [QGVAR(currentChannel), _localizedChannelText];
};
}] call BIS_fnc_addStackedEventhandler;

View File

@ -15,6 +15,9 @@
*
* Return value:
* Nothing
*
* Example:
* [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar
*/
#include "script_component.hpp"
@ -32,14 +35,24 @@ closeDialog 0;
createDialog QGVAR(ProgressBar_Dialog);
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle;
if (GVAR(SettingProgressBarLocation) == 1) then {
private "_ctrlPos";
_ctrlPos = [1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2), 29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2), 38 * (((safezoneW / safezoneH) min 1.2) / 40), 0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)];
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
};
_perFrameFunction = {
PARAMS_2(_parameters,_pfhID);
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
private ["_elapsedTime", "_errorCode"];
_elapsedTime = time - _startTime;
_errorCode = -1;
if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
_errorCode = 1;
} else {

View File

@ -4,7 +4,7 @@
terminate (missionNamespace getVariable [QGVAR(waitForAnimationHandle), scriptNull]);
GVAR(waitForAnimationHandle) = _this spawn {
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
_this call FUNC(doAnimation);
_this call FUNC(doAnimation);
};

View File

@ -17,17 +17,17 @@ _unit setvariable ["ACE_isDead",nil,true];
_unit setvariable ["ACE_isUnconscious", nil, true];
if (isPlayer _unit) then {
[true] call FUNC(setVolume_f);
[false] call FUNC(disableKeyInput_f);
if (["ace_medical"] call FUNC(isModLoader_f)) then {
[true] call FUNC(setVolume);
[false] call FUNC(disableKeyInput);
if (["ace_medical"] call FUNC(isModLoader)) then {
[false] call EFUNC(medical,effectBlackOut);
};
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
if !(isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
// clear all disable user input
{
[_X, false] call FUNC(setDisableUserInputStatus);
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION_F);
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION);
};
};

View File

@ -1,15 +0,0 @@
/**
* fnc_revealObject_f.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
if (hasInterface) then {
player reveal (_this select 0);
};

View File

@ -42,6 +42,6 @@ if (isPlayer _reciever) then {
}foreach _content;
[_title,_content,_type] call EFUNC(gui,displayInformation);
[_title,_content,_type] call EFUNC(common,displayInformation);
};
};

View File

@ -41,6 +41,6 @@ if (isPlayer _reciever) then {
}foreach _parameters;
_content = format _localizationArray;
[_title,_content,_type] call EFUNC(gui,displayMessage);
[_title,_content,_type] call EFUNC(common,displayMessage);
};
};

View File

@ -13,16 +13,16 @@ _id = _this select 0;
_disable = _this select 1;
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = [];
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
GVAR(DISABLE_USER_INPUT_COLLECTION) = [];
};
if (_disable) then {
GVAR(DISABLE_USER_INPUT_COLLECTION_F) pushback _id;
GVAR(DISABLE_USER_INPUT_COLLECTION) pushback _id;
[true] call FUNC(disableUserInput);
} else {
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = GVAR(DISABLE_USER_INPUT_COLLECTION_F) - [_id];
if (GVAR(DISABLE_USER_INPUT_COLLECTION_F) isEqualTo []) then {
GVAR(DISABLE_USER_INPUT_COLLECTION) = GVAR(DISABLE_USER_INPUT_COLLECTION) - [_id];
if (GVAR(DISABLE_USER_INPUT_COLLECTION) isEqualTo []) then {
[false] call FUNC(disableUserInput);
};
};

View File

@ -17,7 +17,8 @@ EXPLODE_1_PVT(_this,_optionEntry);
_fnc_getValueWithType = {
EXPLODE_2_PVT(_this,_optionEntry,_typeName);
_value = getNumber (_optionEntry >> "value");
_valueConfig = (_optionEntry >> "value");
_value = if (isNumber (_optionEntry >> "value")) then {getNumber (_optionEntry >> "value")} else {0};
TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value);
if (_typeName == "BOOL") exitWith {
_value > 0

View File

@ -16,7 +16,7 @@ _switch = [_this, 1, false,[false]] call BIS_fnc_Param;
_id = [_this, 2, "", [""]] call BIS_fnc_Param;
_side = [_this, 3, side _unit,[west]] call BIS_fnc_Param;
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo_F),[]];
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo),[]];
if (_switch) then {
// go forward
_previousGroup = group _unit;
@ -30,7 +30,7 @@ if (_switch) then {
[_unit] joinSilent _newGroup;
_previousGroupsList pushback [_previousGroup, _originalSide, _id, true];
_unit setvariable [QGVAR(previousGroupSwitchTo_F), _previousGroupsList, true];
_unit setvariable [QGVAR(previousGroupSwitchTo), _previousGroupsList, true];
} else {
// go one back
{
@ -60,5 +60,5 @@ if (_switch) then {
}foreach _previousGroupsList;
_previousGroupsList = _previousGroupsList - [objNull];
reverse _previousGroupsList; // we have to reverse again, to ensure the list is in the right order.
_unit setvariable [QGVAR(previousGroupSwitchTo_F), _previousGroupsList, true];
_unit setvariable [QGVAR(previousGroupSwitchTo), _previousGroupsList, true];
};

View File

@ -10,7 +10,7 @@
#include "script_component.hpp"
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson_F))
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
private ["_caller", "_unit","_vehicle", "_loaded"];
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
@ -27,11 +27,11 @@ if (!alive _unit) then {
_unit action ["Eject", vehicle _unit];
};
[_unit, false, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide_f);
[_unit, false, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
_loaded = _vehicle getvariable [QGVAR(loaded_persons_F),[]];
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
_loaded = _loaded - [_unit];
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
if (!([_unit] call FUNC(isAwake))) then {
_handle = [_unit,_vehicle] spawn {

View File

@ -315,6 +315,30 @@
<Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsName">
<English>Feedback icons</English>
</Key>
<Key ID="STR_ACE_Common_SettingFeedbackIconsDesc">
<English>Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed.</English>
</Key>
<Key ID="STR_ACE_Common_SettingProgressbarLocationName">
<English>Progress bar location</English>
</Key>
<Key ID="STR_ACE_Common_SettingProgressbarLocationDesc">
<English>Set the desired location of the progress bar on your screen.</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextColorName">
<English>Hint Background color</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextColorDesc">
<English>The color of the background from the ACE hints.</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextFontColorName">
<English>Hint text font color</English>
</Key>
<Key ID="STR_ACE_Common_SettingDisplayTextFontColorDesc">
<English>The color of the text font from the ACE hints. This color is the default color for all text displayed through the ACE Hint system, if the hint text has no other color specified.</English>
</Key>
</Package>
</Project>

View File

@ -24,6 +24,12 @@ class CfgACE_Triggers {
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
requires[] = {"ACE_DeadManSwitch"};
};
class Cellphone:Command {
displayName = $STR_ACE_Explosives_cellphone_displayName;
picture = PATHTOF(Data\UI\Cellphone_UI.paa);
onPlace = QUOTE(_this call FUNC(addCellphoneIED);false);
requires[] = {"ACE_Cellphone"};
};
class PressurePlate {
displayName = $STR_ACE_Explosives_PressurePlate;
picture = PATHTOF(Data\UI\PressurePlate.paa);

View File

@ -95,4 +95,33 @@ class CfgMagazines {
};
};
};
class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanBig";
class ACE_Triggers {
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"};
class Command {
FuseTime = 0.5;
};
class DeadmanSwitch:Command{};
class Cellphone:Command{};
};
};
class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag{
ACE_SetupObject = "ACE_Explosives_Place_IEDLandBig";
};
class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDUrbanSmall";
class ACE_Triggers {
SupportedTriggers[] = {"Command","DeadmanSwitch", "Cellphone"};
class Command {
FuseTime = 0.5;
};
class DeadmanSwitch:Command{};
class Cellphone:Command{};
};
};
class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag {
ACE_SetupObject = "ACE_Explosives_Place_IEDLandSmall";
};
};

View File

@ -49,6 +49,15 @@ class CfgVehicles {
priority = 0.8;
hotkey = "F";
};
class ACE_Cellphone {
displayName = $STR_ACE_Explosives_cellphone_displayName;
condition = "('ACE_Cellphone' in (items ace_player))";
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 0;
icon = PATHTOF(Data\UI\Cellphone_UI.paa);
priority = 0.8;
};
};
};
};
@ -105,6 +114,27 @@ class CfgVehicles {
model = "\A3\Weapons_F\Explosives\mine_SLAM_directional";
};
// IEDs
class ACE_Explosives_Place_IEDUrbanBig:ACE_Explosives_Place {
displayName = "IED Urban Big";
model = "\A3\Weapons_F\Explosives\IED_urban_big";
};
class ACE_Explosives_Place_IEDLandBig:ACE_Explosives_Place {
displayName = "IED Land Big";
model = "\A3\Weapons_F\Explosives\IED_land_big";
};
class ACE_Explosives_Place_IEDUrbanSmall:ACE_Explosives_Place {
displayName = "IED Urban Small";
model = "\A3\Weapons_F\Explosives\IED_urban_small";
};
class ACE_Explosives_Place_IEDLandSmall:ACE_Explosives_Place {
displayName = "IED Land Small";
model = "\A3\Weapons_F\Explosives\IED_land_small";
};
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
@ -133,6 +163,7 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_M26_Clacker,6)
MACRO_ADDITEM(ACE_DefusalKit,12)
MACRO_ADDITEM(ACE_Deadmanswitch,2)
MACRO_ADDITEM(ACE_Cellphone,3)
};
};
@ -142,6 +173,7 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_M26_Clacker,2)
MACRO_ADDITEM(ACE_DefusalKit,2)
MACRO_ADDITEM(ACE_Deadmanswitch,1)
MACRO_ADDITEM(ACE_Cellphone,2)
};
};
@ -151,6 +183,7 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_M26_Clacker,6)
MACRO_ADDITEM(ACE_DefusalKit,12)
MACRO_ADDITEM(ACE_Deadmanswitch,6)
MACRO_ADDITEM(ACE_Cellphone,10)
};
};

View File

@ -47,6 +47,20 @@ class CfgWeapons {
ACE_Range = 100;
ACE_Detonator = 1;
class ItemInfo: ACE_ExplosiveItem {
mass = 2;
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
};
};
class ACE_Cellphone: ACE_ItemCore {
scope = 2;
displayName = $STR_ACE_Explosives_cellphone_displayName;
descriptionShort = $STR_ACE_Explosives_cellphone_description;
picture = PATHTOF(Data\UI\Cellphone_UI.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 15000;
ACE_Detonator = 1;
class ItemInfo: ACE_ExplosiveItem {
mass = 2;
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,16 +4,49 @@
#define GUI_GRID_H (0.04)
#define ST_CENTER 0x02
#define X_OFFSET 0.25
class RscText;
class RscButton;
#define X_OFFSET 0.25
class RscXSliderH;
class IGUIBack;
class RscPicture;
class RscEdit;
class Rsc_ACE_Timer_Slider:RscXSliderH{
class Rsc_ACE_CallScreen_Edit:RscEdit {
canModify = 1;
colorBackground[] = {0,0,0,1};
colorText[] = {0,0,0,1};
colorDisabled[] = {1,1,1,0.25};
colorSelection[] = {
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",
1
};
text = "";
style = "0x00 + 0x40 + 0x200";
shadow = 1;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) * 1)";
x = 0.288594 * safezoneW + safezoneX;
w = 0.0825 * safezoneW;
h = 0.044 * safezoneH;
};
class Rsc_ACE_HiddenButton:RscButton {
colorText[] = {0, 0, 0, 0};
colorDisabled[] = {0, 0, 0, 0};
colorBackground[] = {0, 0, 0, 0};
colorBackgroundDisabled[] = {0, 0, 0, 0};
colorBackgroundActive[] = {0, 0, 0, 0};
colorFocused[] = {0, 0, 0, 0};
colorShadow[] = {0, 0, 0, 0};
colorBorder[] = {0, 0, 0, 0};
w = 0.095589;
h = 0.039216;
shadow = 0;
};
class Rsc_ACE_Timer_Slider:RscXSliderH {
x = 0.4;
y = 0.2;
w = 0.3;
@ -21,8 +54,7 @@ class Rsc_ACE_Timer_Slider:RscXSliderH{
colorBackground[] = {0,0,0,0.5};
};
class RscACE_SelectTimeUI
{
class RscACE_SelectTimeUI {
idd = 8854;
movingEnable = 0;
class controls {
@ -72,3 +104,185 @@ class RscACE_SelectTimeUI
};
};
};
class Rsc_ACE_NumKeyButton: Rsc_ACE_HiddenButton{};
class Rsc_ACE_PhoneInterface {
idd = 8855;
movingEnable = 1;
onLoad = QUOTE(GVAR(IED_CurrentSpeedDial) = -1);
class controls {
class RscPicture_1200: RscPicture {
idc = 1200;
text = PATHTOF(Data\UI\Cellphone_Background.paa);
x = 0.231875 * safezoneW + safezoneX;
y = 0.104 * safezoneH + safezoneY;
w = 0.195937 * safezoneW;
h = 0.704 * safezoneH;
};
class numkey_1: Rsc_ACE_NumKeyButton {
idc = 1600;
x = 0.278281 * safezoneW + safezoneX;
y = 0.533 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "1";
action = "ctrlSetText [1400,((ctrlText 1400) + '1')];";
};
class numkey_2: Rsc_ACE_NumKeyButton {
idc = 1601;
x = 0.314375 * safezoneW + safezoneX;
y = 0.533 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "2";
action = "ctrlSetText [1400,((ctrlText 1400) + '2')];";
};
class numkey_3: Rsc_ACE_NumKeyButton {
idc = 1602;
x = 0.350469 * safezoneW + safezoneX;
y = 0.533 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "3";
action = "ctrlSetText [1400,((ctrlText 1400) + '3')];";
};
class numkey_4: Rsc_ACE_NumKeyButton {
idc = 1603;
x = 0.278281 * safezoneW + safezoneX;
y = 0.577 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "4";
action = "ctrlSetText [1400,((ctrlText 1400) + '4')];";
};
class numkey_5: Rsc_ACE_NumKeyButton {
idc = 1604;
x = 0.314375 * safezoneW + safezoneX;
y = 0.577 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "5";
action = "ctrlSetText [1400,((ctrlText 1400) + '5')];";
};
class numkey_6: Rsc_ACE_NumKeyButton {
idc = 1605;
x = 0.350469 * safezoneW + safezoneX;
y = 0.577 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "6";
action = "ctrlSetText [1400,((ctrlText 1400) + '6')];";
};
class numkey_7: Rsc_ACE_NumKeyButton {
idc = 1606;
x = 0.278281 * safezoneW + safezoneX;
y = 0.621 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "7";
action = "ctrlSetText [1400,((ctrlText 1400) + '7')];";
};
class numkey_8: Rsc_ACE_NumKeyButton {
idc = 1607;
x = 0.314375 * safezoneW + safezoneX;
y = 0.621 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "8";
action = "ctrlSetText [1400,((ctrlText 1400) + '8')];";
};
class numkey_9: Rsc_ACE_NumKeyButton {
idc = 1608;
x = 0.350469 * safezoneW + safezoneX;
y = 0.621 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "9";
action = "ctrlSetText [1400,((ctrlText 1400) + '9')];";
};
class numkey_0: Rsc_ACE_NumKeyButton {
idc = 1609;
x = 0.314375 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "0";
action = "ctrlSetText [1400,((ctrlText 1400) + '0')];";
};
class speedDialAdd: Rsc_ACE_NumKeyButton {
idc = 1610;
x = 0.278281 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "$STR_ACE_Explosives_Phone_AddToSpeedDial";
action = QUOTE([ARR_2(ctrlText 1401,ctrlText 1400)] call FUNC(addToSpeedDial););
};
class clear: Rsc_ACE_HiddenButton {
idc = 1610;
x = 0.278281 * safezoneW + safezoneX;
y = 0.445 * safezoneH + safezoneY;
w = 0.020625 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "$STR_ACE_Explosives_Clear";
action = QUOTE(ctrlSetText [ARR_2(1400,'')];[ctrlText 1401] call FUNC(removeFromSpeedDial);ctrlSetText [ARR_2(1401,'')];);
};
class dial: Rsc_ACE_HiddenButton {
idc = 1611;
x = 0.309219 * safezoneW + safezoneX;
y = 0.445 * safezoneH + safezoneY;
w = 0.04125 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "$STR_ACE_Explosives_Phone_Dial";
action = QUOTE([ARR_2(ace_player,ctrlText 1400)] call FUNC(dialPhone););
};
class up: Rsc_ACE_HiddenButton {
idc = 1612;
x = 0.360781 * safezoneW + safezoneX;
y = 0.445 * safezoneH + safezoneY;
w = 0.020625 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "$STR_ACE_Explosives_Phone_Up";
action = QUOTE([true] call FUNC(setSpeedDial));
};
class down: Rsc_ACE_HiddenButton {
idc = 1613;
x = 0.345312 * safezoneW + safezoneX;
y = 0.485 * safezoneH + safezoneY;
w = 0.020625 * safezoneW;
h = 0.033 * safezoneH;
tooltip = "$STR_ACE_Explosives_Phone_Down";
action = QUOTE([false] call FUNC(setSpeedDial));
};
class speedDial_Text: RscText {
idc = 1405;
y = 0.302 * safezoneH + safezoneY;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)";
x = 0.288594 * safezoneW + safezoneX;
w = 0.0825 * safezoneW;
h = 0.044 * safezoneH;
text = "Name";
};
class speedDial_edit: Rsc_ACE_CallScreen_Edit {
idc = 1401;
y = 0.302 * safezoneH + safezoneY;
x = 0.318 * safezoneW + safezoneX;
w = 0.1;
};
class numberEdit_Text: RscText {
idc = 1406;
y = 0.348 * safezoneH + safezoneY;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 22) * 1)";
x = 0.288594 * safezoneW + safezoneX;
w = 0.0825 * safezoneW;
h = 0.044 * safezoneH;
text = "#";
};
class number_edit: Rsc_ACE_CallScreen_Edit {
canModify = 0;
idc = 1400;
y = 0.348 * safezoneH + safezoneY;
x = 0.3 * safezoneW + safezoneX;
};
};
};

View File

@ -18,6 +18,7 @@ if !(hasInterface) exitWith {};
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;
GVAR(pfeh_running) = false;
GVAR(CurrentSpeedDial) = 0;
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler);
player addEventHandler ["Killed", {

View File

@ -17,11 +17,15 @@
ADDON = false;
PREP(addCellphoneIED);
PREP(addClacker);
PREP(addToSpeedDial);
PREP(canDefuse);
PREP(canDetonate);
PREP(defuseExplosive);
PREP(detonateExplosive);
PREP(dialPhone);
PREP(dialingPhone);
PREP(handleScrollWheel);
@ -30,6 +34,7 @@ PREP(hasPlacedExplosives);
PREP(getDetonators);
PREP(getPlacedExplosives);
PREP(getSpeedDialExplosive);
PREP(openDetonateUI);
PREP(openPlaceUI);
@ -41,10 +46,12 @@ PREP(place_Approve);
PREP(place_Cancel);
PREP(placeExplosive);
PREP(removeFromSpeedDial);
PREP(selectTrigger);
PREP(setupExplosive);
PREP(setPosition);
PREP(setSpeedDial);
PREP(startDefuse);
PREP(startTimer);
PREP(triggerType);

View File

@ -3,7 +3,7 @@
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch"};
weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common", "ace_interaction"};
author[] = {"Garth 'L-H' de Wet"};

View File

@ -0,0 +1,51 @@
/*
* Author: Garth 'L-H' de Wet
* Adds an IED to the cellphone list
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Explosive <OBJECT>
* 2: Magazine classname <STRING>
* 3: Extra variables <ARRAY>
*
* Return Value:
* None
*
* Example:
* Handled by PlaceExplosive.
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_4_PVT(_this,_unit,_explosive,_magazineClass,_extra);
// Config is the last item in the list of passed in items.
_config = (_this select 3) select (count (_this select 3) - 1);
_requiredItems = getArray(_config >> "requires");
_hasRequired = true;
_detonators = [_unit] call FUNC(getDetonators);
{
if !(_x in _detonators) exitWith{
_hasRequired = false;
};
} count _requiredItems;
private ["_code", "_count", "_codeSet"];
_codeSet = false;
while {!_codeSet} do {
_code = str(round (random 9999));
_count = 4 - count (toArray _code);
while {_count > 0} do {
_code = "0" + _code;
_count = _count - 1;
};
_codeSet = (count ([_code] call FUNC(getSpeedDialExplosive))) == 0;
};
if (isNil QGVAR(CellphoneIEDs)) then {
GVAR(CellphoneIEDs) = [];
};
_count = GVAR(CellphoneIEDs) pushBack [_explosive,_code,GetNumber(ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> "Cellphone" >> "FuseTime")];
_count = _count + 1;
publicVariable QGVAR(CellphoneIEDs);
_unit sideChat format ["IED %1 code: %2", _count,_code];
if !(_hasRequired) exitWith {};
[format ["IED %1", _count],_code] call FUNC(addToSpeedDial);

View File

@ -0,0 +1,37 @@
/*
* Author: Garth 'L-H' de Wet
* Sets the speed dial for the UI.
*
* Arguments:
* 0: Name of speed dial <STRING>
* 1: Code to add to speed dial <STRING>
*
* Return Value:
* None
*
* Example:
* ["My Speed Dial","2131"] call ACE_explosives_fnc_addToSpeedDial;
*
* Public: Yes
*/
#include "script_component.hpp"
private ["_speedDial", "_found"];
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
_found = false;
EXPLODE_2_PVT(_this,_name,_code);
if ((_code) == "") ExitWith {
[_name] call FUNC(removeFromSpeedDial);
};
{
if ((_x select 0) == _name) exitWith {
_speedDial set [_foreachindex, _this];
_found = true;
};
} foreach _speedDial;
if (!_found) then {
_speedDial pushBack _this;
};
ace_player setVariable [QGVAR(SpeedDial), _speedDial];

View File

@ -0,0 +1,42 @@
/*
* Author: Garth 'L-H' de Wet
* Dials the number passed and detonates the explosive.
*
* Arguments:
* 0: Unit to do dialing <OBJECT>
* 1: Code to dial <STRING>
*
* Return Value:
* None
*
* Example:
* [ace_player,"2131"] call ACE_explosives_fnc_dialPhone;
*
* Public: Yes
*/
#include "script_component.hpp"
private ["_arr", "_ran", "_i","_speedDial"];
EXPLODE_2_PVT(_this,_unit,_code);
if (_unit getVariable [QGVAR(Dialing),false]) exitWith {};
if !(alive _unit) exitWith {};
_unit setVariable [QGVAR(Dialing), true, true];
_ran = (ceil(random 8)) + 1;
_arr = [];
for [{_i=0}, {_i<_ran}, {_i=_i+1}] do {
_arr = _arr + ['.','..','...',''];
};
if (_unit == ace_player) then {
ctrlSetText [1400,"Calling"];
[FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
} else {
private ["_explosive"];
_explosive = [_code] call FUNC(getSpeedDialExplosive);
if ((count _explosive) > 0) then {
[{
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75];
(_this select 0) setVariable [QGVAR(Dialing), false, true];
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4), 0] call EFUNC(common,waitAndExecute);
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer);
};
};

View File

@ -0,0 +1,44 @@
/*
* Author: Garth 'L-H' de Wet
* Performs the dial tones and detonation of explosive.
*
* Arguments:
* 0: Unit to do dialing <OBJECT>
* 1: Index <NUMBER>
* 2: Dialing points <ARRAY>
* 3: IED code <STRING>
*
* Return Value:
* None
*
* Example:
* [FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_4_PVT(_this select 0,_unit,_i,_arr,_code);
if ((_i mod 4) == 0) then {
playSound3D [QUOTE(PATHTO_R(Data\Audio\DialTone.wss)), objNull, false, (_unit ModelToWorld [0,0.2,2]), 15,1,2.5];
};
ctrlSetText [1400,format["Calling%1",_arr select (_i - 4)]];
private "_explosive";
_explosive = [_code] call FUNC(getSpeedDialExplosive);
if (_i >= (count _arr + 2)) then {
[_this select 1] call CALLSTACK(cba_fnc_removePerFrameHandler);
if ((count _explosive) > 0) then {
[_unit, -1, [_explosive select 0, _explosive select 2]] call FUNC(detonateExplosive);
};
_unit setVariable [QGVAR(Dialing), false, true];
if (_unit == ace_player) then {
ctrlSetText [1400,"Call Ended!"];
};
};
if (_i == (count _arr)) then {
if ((count _explosive) > 0) then {
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_explosive select 0),3.16228,1,75];
};
};
(_this select 0) set [1, _i + 1];

View File

@ -0,0 +1,27 @@
/*
* Author: Garth 'L-H' de Wet
* Gets the explosive from the speed dial entry.
*
* Arguments:
* 0: Speed dial entry <STRING>
*
* Return Value:
* Associated explosive (or ObjNull) <OBJECT>
*
* Example:
* ["2113"] call ace_explosives_fnc_getSpeedDialExplosive;
*
* Public: Yes
*/
#include "script_component.hpp"
EXPLODE_1_PVT(_this,_code);
private ["_explosive"];
if (isNil QGVAR(CellphoneIEDs)) exitWith {[]};
_explosive = [];
{
if ((_x select 1) == _code) exitWith {
_explosive = _x;
};
false
} count GVAR(CellphoneIEDs);
_explosive

View File

@ -51,7 +51,7 @@ _actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosive
},
{
call EFUNC(interaction,hideMenu);
if !(profileNamespace getVariable [EGVAR(interaction,AutoCloseMenu), false]) then {
if !(profileNamespace getVariable [QUOTE(EGVAR(interaction,AutoCloseMenu)), false]) then {
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
};
}

View File

@ -28,79 +28,78 @@ _player = ACE_player;
[_player, "DefaultAction", _player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
call EFUNC(interaction,hideMouseHint);
if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
_dir = (getDir _setup);
if (_dir > 180) then {
_dir = _dir - 180;
} else {
_dir = 180 + _dir;
};
_setup setVariable [QGVAR(Direction), _dir];
_player setVariable [QGVAR(PlantingExplosive), true];
_setup addEventHandler ["EpeContactStart", {
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
private ["_player", "_pos", "_attachTo"];
if ((_setup getVariable [QGVAR(Class), ""]) == "") exitWith {
deleteVehicle _setup;
};
_dir = (getDir _setup);
if (_dir > 180) then {
_dir = _dir - 180;
} else {
_dir = 180 + _dir;
};
_setup setVariable [QGVAR(Direction), _dir];
_player setVariable [QGVAR(PlantingExplosive), true];
_setup addEventHandler ["EpeContactStart", {
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
private ["_player", "_pos", "_attachTo"];
_player = ACE_player;
_player setVariable [QGVAR(PlantingExplosive), false];
_pos = getPosATL (_this select 0);
(_this select 0) enableSimulationGlobal false;
if (surfaceIsWater _pos) then {
_pos = getPosASL (_this select 0);
(_this select 0) setPosASL _pos;
}else{
(_this select 0) setPosATL _pos;
};
(_this select 0) setVariable [QGVAR(Handled), true];
_attachTo = objNull;
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
_attachTo = (_this select 1);
};
[(_this select 0),_attachTo, _pos] spawn { // TODO: Change to scheduled delay execution
private ["_mag", "_setup", "_dir", "_player"];
_setup = _this select 0;
_player = ACE_player;
_pos = getPosATL (_this select 0);
(_this select 0) enableSimulationGlobal false;
if (surfaceIsWater _pos) then {
_pos = getPosASL (_this select 0);
(_this select 0) setPosASL _pos;
}else{
(_this select 0) setPosATL _pos;
};
(_this select 0) setVariable [QGVAR(Handled), true];
_player setVariable [QGVAR(PlantingExplosive), false];
_attachTo = objNull;
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
_attachTo = (_this select 1);
};
[(_this select 0),_attachTo, _pos] spawn { // TODO: Change to scheduled delay execution
private ["_mag", "_setup", "_dir", "_player"];
_setup = _this select 0;
_player = ACE_player;
_mag = _setup getVariable [QGVAR(Class), ""];
_dir = _setup getVariable [QGVAR(Direction), 0];
_mag = _setup getVariable [QGVAR(Class), ""];
_dir = _setup getVariable [QGVAR(Direction), 0];
sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime");
_explosive = [_player, _this select 2, _dir, _mag, _setup getVariable QGVAR(Trigger),
[_setup getVariable QGVAR(Timer)], isNull (_this select 1)] call FUNC(placeExplosive);
deleteVehicle _setup;
if (!isNull(_explosive)) then {
_player RemoveMagazine _mag;
if (!isNull (_this select 1)) then {
_explosive attachTo [(_this select 1)];
_dir = _dir - (getDir (_this select 1));
[[_explosive, _dir, 0], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc);
};
sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime");
_explosive = [_player, _this select 2, _dir, _mag, _setup getVariable QGVAR(Trigger),
[_setup getVariable QGVAR(Timer)], isNull (_this select 1)] call FUNC(placeExplosive);
deleteVehicle _setup;
if (!isNull(_explosive)) then {
_player RemoveMagazine _mag;
if (!isNull (_this select 1)) then {
_explosive attachTo [(_this select 1)];
_dir = _dir - (getDir (_this select 1));
[[_explosive, _dir, 0], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc);
};
};
};
}];
_setup enableSimulationGlobal true;
_player playActionNow "MedicOther";
[_setup] spawn { // TODO: Change to scheduled delay execution
private ["_setup", "_player"];
_setup = _this select 0;
_player = ACE_player;
sleep 5;
};
}];
_setup enableSimulationGlobal true;
_player playActionNow "MedicOther";
[_setup] spawn { // TODO: Change to scheduled delay execution
private ["_setup", "_player"];
_setup = _this select 0;
_player = ACE_player;
sleep 5;
_player setVariable [QGVAR(PlantingExplosive), false];
if (!isNull _setup) then {
private ["_mag", "_dir", "_delayTime"];
_mag = _setup getVariable [QGVAR(Class), ""];
_dir = _setup getVariable [QGVAR(Direction), 0];
_delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime")) - 5;
if (_delayTime > 0) then {
sleep _delayTime;
};
if (!isNull _setup) then {
private ["_mag", "_dir", "_delayTime"];
_mag = _setup getVariable [QGVAR(Class), ""];
_dir = _setup getVariable [QGVAR(Direction), 0];
_delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime")) - 5;
if (_delayTime > 0) then {
sleep _delayTime;
};
if (!isNull _setup) then {
[_player, GetPosATL _setup, _dir, _mag, _setup getVariable QGVAR(Trigger),
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
deleteVehicle _setup;
_player RemoveMagazine _mag;
_player setVariable [QGVAR(PlantingExplosive), false];
};
[_player, GetPosATL _setup, _dir, _mag, _setup getVariable QGVAR(Trigger),
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
deleteVehicle _setup;
_player RemoveMagazine _mag;
};
};
}else{
deleteVehicle _setup;
};

View File

@ -0,0 +1,26 @@
/*
* Author: Garth 'L-H' de Wet
* Removes the specified speed dial from unit's speed dial.
*
* Arguments:
* 0: Speed dial name <STRING>
*
* Return Value:
* None
*
* Example:
* ["IED 1"] call ACE_explosives_fnc_removeFromSpeedDial;
*
* Public: Yes
*/
#include "script_component.hpp"
private "_speedDial";
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
if (count _speedDial == 0) exitWith {};
{
if ((_x select 0) == (_this select 0)) exitWith {
_speedDial set [_foreachIndex, "x"];
_speedDial = _speedDial - ["x"];
ace_player setVariable [QGVAR(SpeedDial),_speedDial];
};
} foreach _speedDial;

View File

@ -0,0 +1,26 @@
/*
* Author: Garth 'L-H' de Wet
* Sets the speed dial for the UI.
*
* Arguments:
* 0: Whether to increase or decrease speed dial index <BOOL>
*
* Return Value:
* None
*
* Example:
* [true] call ACE_explosives_fnc_setSpeedDial; // increase
* [false] call ACE_explosives_fnc_setSpeedDial; // decrease
*
* Public: No
*/
#include "script_component.hpp"
private ["_speedDial", "_amount"];
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
if (count _speedDial == 0) exitWith {};
_amount = if((_this select 0))then{1}else{-1};
GVAR(CurrentSpeedDial) = (GVAR(CurrentSpeedDial) + _amount + count _speedDial) mod (count _speedDial);
ctrlSetText [1400,(_speedDial select GVAR(CurrentSpeedDial)) select 1];
ctrlSetText [1401,(_speedDial select GVAR(CurrentSpeedDial)) select 0];

View File

@ -1,11 +0,0 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(XEH_preInit.sqf))) );
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(XEH_postInit.sqf))) );
};
};

View File

@ -1,2 +0,0 @@
#include "UI\define.hpp"
#include "UI\RscTitles.hpp"

View File

@ -1,11 +0,0 @@
ace_gui
=======
to be scrapped.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Glowbal](https://github.com/Glowbal)

View File

@ -1,179 +0,0 @@
#define RIGHT_SIDE (safezoneW + safezoneX)
#define LEFT_SIDE safezoneX
#define TOP_SIDE safeZoneY
#define BOTTOM_SIDE (safeZoneH + safezoneY)
#define ICON_WIDTH (1.75 * (((safezoneW / safezoneH) min 1.2) / 40))
#define X_POS_ICONS RIGHT_SIDE - (1.1 * ICON_WIDTH)
#define Y_POS_ICONS TOP_SIDE + (2.2 * ICON_WIDTH)
#define DIFFERENCE_ICONS (1.1 * ICON_WIDTH)
class RscTitles {
class GVAR(iconsDisplay) {
duration = 1e+011;
idd = 1111;
movingenable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(iconsDisplay)), _this select 0)]);
class controlsBackground {
class icon_1: ACE_gui_backgroundBase {
text = "";
colorText[] = {0.0,1.0,0.0,0.4};
idc = 10501;
x = X_POS_ICONS;
y = Y_POS_ICONS + (0 * DIFFERENCE_ICONS);
w = ICON_WIDTH;
h = ICON_WIDTH;
};
class icon_2: icon_1 {
idc = 10502;
y = Y_POS_ICONS + (1 * DIFFERENCE_ICONS);
};
class icon_3: icon_1 {
idc = 10503;
y = Y_POS_ICONS + (2 * DIFFERENCE_ICONS);
};
class icon_4: icon_1 {
idc = 10504;
y = Y_POS_ICONS + (3 * DIFFERENCE_ICONS);
};
class icon_5: icon_1 {
idc = 10505;
y = Y_POS_ICONS + (4 * DIFFERENCE_ICONS);
};
class icon_6: icon_1 {
idc = 10506;
y = Y_POS_ICONS + (5 * DIFFERENCE_ICONS);
};
};
};
class GVAR(RSC_PROGRESSBAR_LOADING) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RSC_PROGRESSBAR_LOADING)), _this select 0)]);
fadein = 0;
fadeout = 0;
duration = 10e10;
class Controls {
class background: ACE_gui_backgroundBase {
idc = -1;
colorBackground[] = {0,0,0,1};
colorText[] = {1, 1, 1, 1};
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "#(argb,8,8,3)color(0,0,0,0.4)";
};
class Progress: ACE_gui_RscProgress {
idc = 6;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {0,0,0,0};
colorBar[] = {0.27,0.5,0.31,0.6};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
};
};
class GVAR(RSC_DISPLAY_MESSAGE) {
duration = 7;
idd = 86411;
movingenable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RSC_DISPLAY_MESSAGE)), _this select 0)]);
fadein = 0;
class controlsBackground {
class header: ACE_gui_staticBase {
idc = 1;
type = CT_STATIC;
x = "safezoneX + (safezoneW / 10)";
y = "safezoneY + (30 * (safeZoneH / 40))";
w = "(safeZoneW / 10)";
h = "(safeZoneH / 40)";
style = ST_LEFT;
font = FontCSE;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.85, 0.85, 0.85, 1.0};
colorBackground[] = {0, 0, 0, 0.9};
text = "";
};
class text: header {
idc = 2;
y = "safezoneY + (31 * (safeZoneH / 40))";
w = "(safeZoneW / 10) * 1.3";
colorText[] = {0.0, 0.0, 0.0, 1.0};
colorBackground[] = {1, 1, 1, 0.9};
text = "";
};
};
};
class GVAR(RSC_DISPLAY_INFORMATION) {
duration = 15;
idd = 86412;
movingenable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RSC_DISPLAY_INFORMATION)), _this select 0)]);
fadein = 0;
class controlsBackground {
class header: ACE_gui_staticBase {
idc = 1;
type = CT_STATIC;
x = "safezoneX + (safezoneW / 10)";
y = "safezoneY + (6 * (safeZoneH / 40))";
w = "(safeZoneW / 10)";
h = "(safeZoneH / 40)";
style = ST_LEFT;
font = FontCSE;
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.85, 0.85, 0.85, 1.0};
colorBackground[] = {0, 0, 0, 0.9};
text = "";
};
class text: header {
idc = 2;
y = "safezoneY + (7.1 * (safeZoneH / 40))";
w = "(safeZoneW / 10) * 1.3";
colorText[] = {0.0, 0.0, 0.0, 1.0};
colorBackground[] = {1, 1, 1, 0.9};
text = "";
};
class text2: text {
idc = 3;
y = "safezoneY + (8.2 * (safeZoneH / 40))";
};
class text3: text {
idc = 4;
y = "safezoneY + (9.3 * (safeZoneH / 40))";
};
class text4: text {
idc = 5;
y = "safezoneY + (10.4 * (safeZoneH / 40))";
};
class text5: text {
idc = 6;
y = "safezoneY + (11.5 * (safeZoneH / 40))";
};
class icon: ACE_gui_backgroundBase {
type = CT_STATIC;
idc = 10;
style = ST_PICTURE;
colorBackground[] = {0,0,0,1};
colorText[] = {1, 1, 1, 1};
font = FontCSE;
text = "";
sizeEx = 0.032;
x = "safezoneX + (safezoneW / 10)";
y = "safezoneY + (4 * (safeZoneH / 40))";
w = "(safeZoneH / 40)*2";
h = "(safeZoneH / 40)*2";
};
};
};
};

View File

@ -1,11 +0,0 @@
/**
* XEH_postInit.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"

View File

@ -1,25 +0,0 @@
/**
* XEH_preInit.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
ADDON = false;
PREP(loadingBar);
PREP(displayInformation);
PREP(displayMessage);
PREP(blurScreen);
PREP(displayIcon);
PREP(sendHintTo);
PREP(sendMessageTo);
PREP(sendDisplayInformationTo);
PREP(sendDisplayMessageTo);
ADDON = true;

View File

@ -1,27 +0,0 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_main"};
version = VERSION;
author[] = {$STR_ACE_Common_ACETeam};
authorUrl = "http://csemod.com"; // TODO website link?
};
};
class CfgAddons {
class PreloadAddons {
class ADDON {
list[] = {QUOTE(ADDON)};
};
};
};
#include "CfgEventHandlers.hpp"
// TODO Port over the UI defines
#include "GUI.hpp"
#include "empty.hpp"

Binary file not shown.

Binary file not shown.

View File

@ -1,21 +0,0 @@
#include "\z\ace\addons\gui\UI\define.hpp"
class ACE_common_empty_screen {
idd = 679123;
onLoad = "uiNamespace setVariable [""ACE_common_empty_screen"", _this select 0]";
onUnload = "if (missionNamespace getvariable [""ACE_common_DISABLE_USER_INPUT_SCREEN"", false)]) then { createDialog ""ACE_common_empty_screen""; }";
class controlsBackground {
class background : ACE_gui_backgroundBase {
idc = 1;
x = safezoneX;
y = safezoneY;
w = safezoneW;
h = safezoneH;
text = "";
moving = 0;
};
};
class controls {
};
};

View File

@ -1,79 +0,0 @@
/**
* fn_gui_displayIcon.sqf
* @Descr:
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: true
*
* @Example ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1]] call ace_gui_fnc_displayIcon;
*/
#include "script_component.hpp"
#define MAX_N_ICONS 6
private ["_iconId", "_show", "_icon", "_spot", "_idc", "_display","_next_IDC", "_nextText"];
_iconId = _this select 0;
_show = _this select 1;
_icon = _this select 2;
_color = _this select 3;
disableSerialization;
_list = missionNamespace getvariable [QGVAR(displayIconList),[]];
_display = uiNamespace getvariable QGVAR(iconsDisplay);
if (isNil "_display") then {
// Display the icons
11401 cutRsc [QGVAR(iconsDisplay),"PLAIN"];
_display = uiNamespace getvariable QGVAR(iconsDisplay);
};
if (_show) then {
if ({(_x select 0 == _iconId)} count _list == 0) then {
_list pushback [_iconId, _icon, _color];
} else {
{
if (_x select 0 == _iconId) exitwith {
_list set [_foreachIndex, [_iconId, _icon, _color]];
};
}foreach _list;
};
missionNamespace setvariable [QGVAR(displayIconList), _list];
{
if (_x select 0 == _iconId) exitwith {
_idc = 10501 + _foreachIndex;
_ctrl = _display displayCtrl _idc;
_ctrl ctrlsetText _icon;
_ctrl ctrlSetTextColor _color;
};
}foreach _list;
} else {
if ({(_x select 0 == _iconId)} count _list == 1) then {
_newList = [];
{
if (_x select 0 != _iconId) then {
_newList pushback _x;
};
}foreach _list;
missionNamespace setvariable [QGVAR(displayIconList), _newList];
for "_i" from 0 to (MAX_N_ICONS - 1) /* step +1 */ do {
_idc = 10501 + _i;
_ctrl = _display displayCtrl _idc;
_ctrl ctrlsetText "";
_ctrl ctrlSetTextColor [1,1,1,1];
};
{
_idc = 10501 + _foreachIndex;
_ctrl = _display displayCtrl _idc;
_ctrl ctrlsetText (_x select 1);
_ctrl ctrlSetTextColor (_x select 2);
}foreach _newList;
};
};

View File

@ -1,67 +0,0 @@
/**
* fn_gui_displayInformation.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
#define DISPLAY_LAYER 32547
private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos","_icon","_iconCtrl"];
_title = [_this, 0, "",[""]] call BIS_fnc_Param;
_content = [_this, 1, [""],[[""]]] call BIS_fnc_Param;
_type = [_this, 2, 0, [0]] call BIS_fnc_Param;
_icon = [_this, 3, "",[""]] call BIS_fnc_Param;
if (_title != "") then {
DISPLAY_LAYER cutRsc [QGVAR(RSC_DISPLAY_INFORMATION),"PLAIN"];
disableSerialization;
_display = uiNamespace getvariable QGVAR(RSC_DISPLAY_INFORMATION);
if (!isnil "_display") then {
_headerCtrl = _display displayCtrl 1;
_headerCtrl ctrlSetText _title;
_iconCtrl = _display displayCtrl 10;
_iconCtrl ctrlSetText _icon;
_idc = 2;
{
_text = _x;
if (_text != "") then {
_contentCtrl = _display displayCtrl _idc;
_contentCtrl ctrlSetText _text;
_contentAmountOfChars = count (toArray _text);
_pos = ctrlPosition _contentCtrl;
_pos set [2, _contentAmountOfChars * ((((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)/ 3.3) max (safeZoneW / 11)];
_contentCtrl ctrlSetPosition _pos;
_contentCtrl ctrlCommit 0;
if (_type >0) then {
if (_type == 1) then {
_contentCtrl ctrlSetBackgroundColor [0.7,0.2,0.2,0.8];
_contentCtrl ctrlSetTextColor [1,1,1,0.9];
};
};
_idc = _idc + 1;
};
}foreach _content;
while {(_idc < 7)} do {
_contentCtrl = _display displayCtrl _idc;
_contentCtrl ctrlSetPosition [0,0,0,0];
_contentCtrl ctrlCommit 0;
_idc = _idc + 1;
};
};
} else {
DISPLAY_LAYER cutText ["","PLAIN"];
};

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