mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into fixSurrendering
This commit is contained in:
commit
233647a144
13
.editorconfig
Normal file
13
.editorconfig
Normal 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
|
||||||
|
|
@ -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;
|
|
@ -1,6 +1,10 @@
|
|||||||
|
|
||||||
#define MACRO_ATTACHTOVEHICLE \
|
#define MACRO_ATTACHTOVEHICLE \
|
||||||
class ACE_Actions { \
|
class ACE_Actions { \
|
||||||
|
class ACE_MainActions { \
|
||||||
|
selection = ""; \
|
||||||
|
distance = 5; \
|
||||||
|
condition = "true"; \
|
||||||
class GVAR(AttachVehicle) { \
|
class GVAR(AttachVehicle) { \
|
||||||
displayName = "$STR_ACE_Attach_AttachDetach"; \
|
displayName = "$STR_ACE_Attach_AttachDetach"; \
|
||||||
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
|
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
|
||||||
@ -21,6 +25,7 @@
|
|||||||
icon = PATHTOF(UI\detach_ca.paa); \
|
icon = PATHTOF(UI\detach_ca.paa); \
|
||||||
distance = 4; \
|
distance = 4; \
|
||||||
}; \
|
}; \
|
||||||
|
}; \
|
||||||
};
|
};
|
||||||
|
|
||||||
class CfgVehicles {
|
class CfgVehicles {
|
||||||
|
@ -2,6 +2,11 @@ class CfgVehicles {
|
|||||||
class Man;
|
class Man;
|
||||||
class CAManBase: Man {
|
class CAManBase: Man {
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
|
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 {
|
class ACE_ApplyHandcuffs {
|
||||||
displayName = "$STR_ACE_Captives_SetCaptive";
|
displayName = "$STR_ACE_Captives_SetCaptive";
|
||||||
distance = 4;
|
distance = 4;
|
||||||
@ -24,6 +29,8 @@ class CfgVehicles {
|
|||||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||||
hotkey = "R";
|
hotkey = "R";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
class ACE_MainActions {
|
||||||
class ACE_EscortCaptive {
|
class ACE_EscortCaptive {
|
||||||
displayName = "$STR_ACE_Captives_EscortCaptive";
|
displayName = "$STR_ACE_Captives_EscortCaptive";
|
||||||
distance = 4;
|
distance = 4;
|
||||||
@ -68,6 +75,7 @@ class CfgVehicles {
|
|||||||
hotkey = "F";
|
hotkey = "F";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
class ACE_SelfActions {
|
class ACE_SelfActions {
|
||||||
class ACE_StopEscortingSelf {
|
class ACE_StopEscortingSelf {
|
||||||
@ -100,6 +108,8 @@ class CfgVehicles {
|
|||||||
|
|
||||||
#define MACRO_LOADUNLOADCAPTIVE \
|
#define MACRO_LOADUNLOADCAPTIVE \
|
||||||
class ACE_Actions { \
|
class ACE_Actions { \
|
||||||
|
class ACE_MainActions { \
|
||||||
|
selection = ""; \
|
||||||
class ACE_LoadCaptive { \
|
class ACE_LoadCaptive { \
|
||||||
displayName = "$STR_ACE_Captives_LoadCaptive"; \
|
displayName = "$STR_ACE_Captives_LoadCaptive"; \
|
||||||
distance = 4; \
|
distance = 4; \
|
||||||
@ -119,6 +129,7 @@ class CfgVehicles {
|
|||||||
priority = 1.2; \
|
priority = 1.2; \
|
||||||
hotkey = "C"; \
|
hotkey = "C"; \
|
||||||
}; \
|
}; \
|
||||||
|
}; \
|
||||||
};
|
};
|
||||||
|
|
||||||
class LandVehicle;
|
class LandVehicle;
|
||||||
|
@ -19,22 +19,10 @@
|
|||||||
PARAMS_1(_unit);
|
PARAMS_1(_unit);
|
||||||
DEFAULT_PARAM(1,_target,objNull);
|
DEFAULT_PARAM(1,_target,objNull);
|
||||||
|
|
||||||
private ["_isAttached"];
|
|
||||||
|
|
||||||
if (isNull _target) then {
|
if (isNull _target) then {
|
||||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isNull _target) exitWith {
|
if (isNull _target) exitWith {false};
|
||||||
ERROR("Null Target (no ACE_escortedUnit)");
|
|
||||||
false
|
|
||||||
};
|
|
||||||
|
|
||||||
_isAttached = _target in (attachedObjects _unit);
|
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}
|
||||||
|
|
||||||
if (_isAttached && (!(_target getVariable [QGVAR(isHandcuffed), false]))) exitWith {
|
|
||||||
ERROR("Attached But Not Captive");
|
|
||||||
false
|
|
||||||
};
|
|
||||||
|
|
||||||
_isAttached
|
|
||||||
|
@ -38,7 +38,7 @@ class Extended_Respawn_EventHandlers {
|
|||||||
respawn = QUOTE(_this call FUNC(setName));
|
respawn = QUOTE(_this call FUNC(setName));
|
||||||
};
|
};
|
||||||
class GVAR(RESETDefaults) {
|
class GVAR(RESETDefaults) {
|
||||||
respawn = QUOTE(_this call FUNC(resetAllDefaults_F));
|
respawn = QUOTE(_this call FUNC(resetAllDefaults));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -17,14 +17,15 @@ class RscTitles {
|
|||||||
class HintBox: RscStructuredText {
|
class HintBox: RscStructuredText {
|
||||||
idc = 1;
|
idc = 1;
|
||||||
text = "";
|
text = "";
|
||||||
size = "1 / 40 / (getResolution select 5)";
|
//size = "1 / 40 / (getResolution select 5)";
|
||||||
sizeEx = 1;
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||||
colorText[] = {1, 1, 1, 1};
|
colorText[] = {1, 1, 1, 1};
|
||||||
colorBackground[] = {0, 0, 0, 0.5};
|
colorBackground[] = {0, 0, 0, 0.5};
|
||||||
x = safeZoneW + safeZoneX - 0 * safezoneW; //safeZoneW + safeZoneX - 0.2 * safezoneW;
|
x = safeZoneW + safeZoneX - 0 * safezoneW; //safeZoneW + safeZoneX - 0.2 * safezoneW;
|
||||||
y = safeZoneY + 0.2 * safezoneH;
|
y = safeZoneY + 0.2 * safezoneH;
|
||||||
w = 0.2 * safeZoneW;
|
w = 0.2 * safeZoneW;
|
||||||
h = 0.1 * SafeZoneH;
|
h = 0.1 * SafeZoneH;
|
||||||
|
font = "PuristaMedium";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -36,13 +37,12 @@ class RscTitles {
|
|||||||
fadeIn = 0.2;
|
fadeIn = 0.2;
|
||||||
fadeOut = 0.2;
|
fadeOut = 0.2;
|
||||||
name = "ACE_RscErrorHint";
|
name = "ACE_RscErrorHint";
|
||||||
|
|
||||||
class controls {
|
class controls {
|
||||||
class HintBox: RscStructuredText {
|
class HintBox: RscStructuredText {
|
||||||
idc = 1;
|
idc = 1;
|
||||||
text = "";
|
text = "";
|
||||||
size = "1 / 40 / (getResolution select 5)";
|
//size = "1 / 40 / (getResolution select 5)";
|
||||||
sizeEx = 1;
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||||
colorText[] = {1, 1, 1, 1};
|
colorText[] = {1, 1, 1, 1};
|
||||||
colorBackground[] = {0.8, 0, 0, 0.5};
|
colorBackground[] = {0.8, 0, 0, 0.5};
|
||||||
x = 0.3 * safeZoneW + safeZoneX;
|
x = 0.3 * safeZoneW + safeZoneX;
|
||||||
@ -52,6 +52,7 @@ class RscTitles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
|
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
|
||||||
idd = -1;
|
idd = -1;
|
||||||
class controls {
|
class controls {
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
class ACE_gui_RscProgress;
|
|
||||||
class ACE_gui_staticBase;
|
|
||||||
|
|
||||||
|
|
||||||
class GVAR(ProgressBar_Dialog) {
|
class GVAR(ProgressBar_Dialog) {
|
||||||
idd = -1;
|
idd = -1;
|
||||||
@ -20,7 +17,7 @@ class GVAR(ProgressBar_Dialog) {
|
|||||||
type = 0;
|
type = 0;
|
||||||
style = 0;
|
style = 0;
|
||||||
size = 1;
|
size = 1;
|
||||||
colorBackground[] = {0, 0, 0, 0.1};
|
colorBackground[] = {0, 0, 0, 0.0};
|
||||||
colorText[] = {0, 0, 0, 0};
|
colorText[] = {0, 0, 0, 0};
|
||||||
x = "safezoneX";
|
x = "safezoneX";
|
||||||
y = "safezoneY";
|
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)";
|
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)";
|
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||||
h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
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};
|
colorBar[] = {0.27,0.5,0.31,0.8};
|
||||||
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
||||||
};
|
};
|
||||||
|
@ -26,5 +26,5 @@ class RscDisplayInventory {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class RscDisplayChannel {
|
class RscDisplayChannel {
|
||||||
onLoad = QUOTE(_this call GVAR(onLoadRscDisplayChannel));
|
onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
|
||||||
};
|
};
|
||||||
|
@ -15,12 +15,17 @@ PREP(addSetting);
|
|||||||
PREP(adminKick);
|
PREP(adminKick);
|
||||||
PREP(ambientBrightness);
|
PREP(ambientBrightness);
|
||||||
PREP(applyForceWalkStatus);
|
PREP(applyForceWalkStatus);
|
||||||
|
PREP(beingCarried);
|
||||||
PREP(binarizeNumber);
|
PREP(binarizeNumber);
|
||||||
|
PREP(blurScreen);
|
||||||
PREP(callCustomEventHandlers);
|
PREP(callCustomEventHandlers);
|
||||||
PREP(callCustomEventHandlersGlobal);
|
PREP(callCustomEventHandlersGlobal);
|
||||||
PREP(canGetInPosition);
|
PREP(canGetInPosition);
|
||||||
|
PREP(canInteract);
|
||||||
PREP(canInteractWith);
|
PREP(canInteractWith);
|
||||||
PREP(canUseWeapon);
|
PREP(canUseWeapon);
|
||||||
|
PREP(carriedByObj);
|
||||||
|
PREP(carryObj);
|
||||||
PREP(changeProjectileDirection);
|
PREP(changeProjectileDirection);
|
||||||
PREP(checkPBOs);
|
PREP(checkPBOs);
|
||||||
PREP(claim);
|
PREP(claim);
|
||||||
@ -30,7 +35,12 @@ PREP(codeToString);
|
|||||||
PREP(convertKeyCode);
|
PREP(convertKeyCode);
|
||||||
PREP(createOrthonormalReference);
|
PREP(createOrthonormalReference);
|
||||||
PREP(currentChannel);
|
PREP(currentChannel);
|
||||||
|
PREP(debug);
|
||||||
|
PREP(debugModule);
|
||||||
|
PREP(defineVariable);
|
||||||
|
PREP(disableAI);
|
||||||
PREP(disableUserInput);
|
PREP(disableUserInput);
|
||||||
|
PREP(displayIcon);
|
||||||
PREP(displayText);
|
PREP(displayText);
|
||||||
PREP(displayTextPicture);
|
PREP(displayTextPicture);
|
||||||
PREP(displayTextStructured);
|
PREP(displayTextStructured);
|
||||||
@ -42,12 +52,21 @@ PREP(execRemoteFnc);
|
|||||||
PREP(executePersistent);
|
PREP(executePersistent);
|
||||||
PREP(filter);
|
PREP(filter);
|
||||||
PREP(fixLoweredRifleAnimation);
|
PREP(fixLoweredRifleAnimation);
|
||||||
|
PREP(getAllDefinedSetVariables);
|
||||||
PREP(getAllGear);
|
PREP(getAllGear);
|
||||||
PREP(getCaptivityStatus);
|
PREP(getCaptivityStatus);
|
||||||
|
PREP(getCarriedBy);
|
||||||
|
PREP(getCarriedObj);
|
||||||
PREP(getConfigCommander);
|
PREP(getConfigCommander);
|
||||||
PREP(getConfigGunner);
|
PREP(getConfigGunner);
|
||||||
|
PREP(getDeathAnim);
|
||||||
PREP(getDefaultAnim);
|
PREP(getDefaultAnim);
|
||||||
|
PREP(getDefinedVariable);
|
||||||
|
PREP(getDefinedVariableDefault);
|
||||||
|
PREP(getDefinedVariableInfo);
|
||||||
PREP(getDoorTurrets);
|
PREP(getDoorTurrets);
|
||||||
|
PREP(getFirstObjectIntersection);
|
||||||
|
PREP(getFirstTerrainIntersection);
|
||||||
PREP(getForceWalkStatus);
|
PREP(getForceWalkStatus);
|
||||||
PREP(getGunner);
|
PREP(getGunner);
|
||||||
PREP(getHitPoints);
|
PREP(getHitPoints);
|
||||||
@ -56,6 +75,7 @@ PREP(getInPosition);
|
|||||||
PREP(getMarkerType);
|
PREP(getMarkerType);
|
||||||
PREP(getName);
|
PREP(getName);
|
||||||
PREP(getNumberFromMissionSQM);
|
PREP(getNumberFromMissionSQM);
|
||||||
|
PREP(getNumberMagazinesIn);
|
||||||
PREP(getPitchBankYaw);
|
PREP(getPitchBankYaw);
|
||||||
PREP(getSettingData);
|
PREP(getSettingData);
|
||||||
PREP(getStringFromMissionSQM);
|
PREP(getStringFromMissionSQM);
|
||||||
@ -74,29 +94,43 @@ PREP(getUavControlPosition);
|
|||||||
PREP(getVehicleCargo);
|
PREP(getVehicleCargo);
|
||||||
PREP(getVehicleCodriver);
|
PREP(getVehicleCodriver);
|
||||||
PREP(getVehicleCrew);
|
PREP(getVehicleCrew);
|
||||||
|
PREP(getVersion);
|
||||||
PREP(getWeaponAzimuthAndInclination);
|
PREP(getWeaponAzimuthAndInclination);
|
||||||
PREP(getWeaponIndex);
|
PREP(getWeaponIndex);
|
||||||
PREP(getWeaponType);
|
PREP(getWeaponType);
|
||||||
PREP(getWindDirection);
|
PREP(getWindDirection);
|
||||||
PREP(goKneeling);
|
PREP(goKneeling);
|
||||||
PREP(hadamardProduct);
|
PREP(hadamardProduct);
|
||||||
|
PREP(hasItem);
|
||||||
|
PREP(hasMagazine);
|
||||||
|
PREP(inheritsFrom);
|
||||||
|
PREP(insertionSort);
|
||||||
PREP(interpolateFromArray);
|
PREP(interpolateFromArray);
|
||||||
PREP(inTransitionAnim);
|
PREP(inTransitionAnim);
|
||||||
|
PREP(inWater);
|
||||||
|
PREP(isArrested);
|
||||||
PREP(isAutoWind);
|
PREP(isAutoWind);
|
||||||
|
PREP(isAwake);
|
||||||
PREP(isEngineer);
|
PREP(isEngineer);
|
||||||
PREP(isEOD);
|
PREP(isEOD);
|
||||||
PREP(isInBuilding);
|
PREP(isInBuilding);
|
||||||
|
PREP(isModLoaded);
|
||||||
PREP(isPlayer);
|
PREP(isPlayer);
|
||||||
PREP(isTurnedOut);
|
PREP(isTurnedOut);
|
||||||
PREP(letterToCode);
|
PREP(letterToCode);
|
||||||
|
PREP(limitMovementSpeed);
|
||||||
|
PREP(loadPerson);
|
||||||
|
PREP(loadPersonLocal);
|
||||||
PREP(loadSettingsFromProfile);
|
PREP(loadSettingsFromProfile);
|
||||||
PREP(loadSettingsOnServer);
|
PREP(loadSettingsOnServer);
|
||||||
PREP(map);
|
PREP(map);
|
||||||
PREP(moduleCheckPBOs);
|
PREP(moduleCheckPBOs);
|
||||||
PREP(moduleLSDVehicles);
|
PREP(moduleLSDVehicles);
|
||||||
|
PREP(moveToTempGroup);
|
||||||
PREP(muteUnit);
|
PREP(muteUnit);
|
||||||
PREP(numberToDigits);
|
PREP(numberToDigits);
|
||||||
PREP(numberToDigitsString);
|
PREP(numberToDigitsString);
|
||||||
|
PREP(onAnswerRequest);
|
||||||
PREP(onLoadRscDisplayChannel);
|
PREP(onLoadRscDisplayChannel);
|
||||||
PREP(owned);
|
PREP(owned);
|
||||||
PREP(player);
|
PREP(player);
|
||||||
@ -104,33 +138,53 @@ PREP(playerSide);
|
|||||||
PREP(progressBar);
|
PREP(progressBar);
|
||||||
PREP(queueAnimation);
|
PREP(queueAnimation);
|
||||||
PREP(readSettingFromModule);
|
PREP(readSettingFromModule);
|
||||||
|
PREP(receiveRequest);
|
||||||
PREP(removeActionEventHandler);
|
PREP(removeActionEventHandler);
|
||||||
PREP(removeActionMenuEventHandler);
|
PREP(removeActionMenuEventHandler);
|
||||||
PREP(removeCameraEventHandler);
|
PREP(removeCameraEventHandler);
|
||||||
PREP(removeCustomEventHandler);
|
PREP(removeCustomEventHandler);
|
||||||
PREP(removeMapMarkerCreatedEventHandler);
|
PREP(removeMapMarkerCreatedEventHandler);
|
||||||
PREP(removeScrollWheelEventHandler);
|
PREP(removeScrollWheelEventHandler);
|
||||||
|
PREP(requestCallback);
|
||||||
|
PREP(resetAllDefaults);
|
||||||
PREP(restoreVariablesJIP);
|
PREP(restoreVariablesJIP);
|
||||||
PREP(revertKeyCodeLocalized);
|
PREP(revertKeyCodeLocalized);
|
||||||
PREP(sanitizeString);
|
PREP(sanitizeString);
|
||||||
|
PREP(sendRequest);
|
||||||
PREP(serverLog);
|
PREP(serverLog);
|
||||||
|
PREP(setArrestState);
|
||||||
|
PREP(setCanInteract);
|
||||||
PREP(setCaptivityStatus);
|
PREP(setCaptivityStatus);
|
||||||
|
PREP(setCarriedBy);
|
||||||
|
PREP(setDefinedVariable);
|
||||||
|
PREP(setDisableUserInputStatus);
|
||||||
PREP(setForceWalkStatus);
|
PREP(setForceWalkStatus);
|
||||||
|
PREP(setHearingCapability);
|
||||||
PREP(setName);
|
PREP(setName);
|
||||||
PREP(setParameter);
|
PREP(setParameter);
|
||||||
PREP(setPitchBankYaw);
|
PREP(setPitchBankYaw);
|
||||||
PREP(setVariableJIP);
|
PREP(setProne);
|
||||||
PREP(setVariablePublic);
|
|
||||||
PREP(setSetting);
|
PREP(setSetting);
|
||||||
PREP(setSettingFromConfig);
|
PREP(setSettingFromConfig);
|
||||||
|
PREP(setVariableJIP);
|
||||||
|
PREP(setVariablePublic);
|
||||||
|
PREP(setVolume);
|
||||||
|
PREP(sortAlphabeticallyBy);
|
||||||
|
PREP(stringCompare);
|
||||||
PREP(stringToColoredText);
|
PREP(stringToColoredText);
|
||||||
|
PREP(stringRemoveWhiteSpace);
|
||||||
PREP(subString);
|
PREP(subString);
|
||||||
|
PREP(switchToGroupSide);
|
||||||
|
PREP(throttledPublicVariable);
|
||||||
PREP(toBin);
|
PREP(toBin);
|
||||||
PREP(toBitmask);
|
PREP(toBitmask);
|
||||||
PREP(toHex);
|
PREP(toHex);
|
||||||
PREP(toNumber);
|
PREP(toNumber);
|
||||||
PREP(throttledPublicVariable);
|
PREP(uniqueElementsOnly);
|
||||||
|
PREP(unloadPerson);
|
||||||
PREP(unmuteUnit);
|
PREP(unmuteUnit);
|
||||||
|
PREP(useItem);
|
||||||
|
PREP(useMagazine);
|
||||||
PREP(waitAndExecute);
|
PREP(waitAndExecute);
|
||||||
|
|
||||||
// ACE_Debug
|
// ACE_Debug
|
||||||
@ -195,74 +249,6 @@ if (hasInterface) then {
|
|||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 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;
|
ADDON = true;
|
||||||
|
|
||||||
|
isHC = !(hasInterface || isDedicated);
|
||||||
|
@ -94,8 +94,41 @@ class ACE_Settings {
|
|||||||
isClientSetable = 1;
|
isClientSetable = 1;
|
||||||
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
|
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 <ProgressScreen.hpp>
|
||||||
#include <HintConfig.hpp>
|
#include <HintConfig.hpp>
|
||||||
#include <RscInfoType.hpp>
|
#include <RscInfoType.hpp>
|
||||||
@ -103,3 +136,23 @@ class ACE_Settings {
|
|||||||
#include <FixAnimations.hpp>
|
#include <FixAnimations.hpp>
|
||||||
#include <NoVoice.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};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -182,12 +182,12 @@ class ACE_gui_buttonBase {
|
|||||||
bottom = 0.00;
|
bottom = 0.00;
|
||||||
};
|
};
|
||||||
textureNoShortcut = "";
|
textureNoShortcut = "";
|
||||||
animTextureNormal = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa) );
|
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||||
animTextureDisabled = QUOTE( PATHTOF(data\buttonDisabled_gradient.paa));
|
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||||
animTextureOver = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
animTextureFocused = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
animTexturePressed = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
animTextureDefault = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa));
|
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
|
||||||
period = 0.5;
|
period = 0.5;
|
||||||
font = FontCSE;
|
font = FontCSE;
|
||||||
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
|
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
|
@ -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;
|
|
@ -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;
|
|
||||||
};
|
|
@ -14,4 +14,4 @@
|
|||||||
#define CHANNELS ["group", "side", "global", "command", "vehicle", "direct"]
|
#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"]
|
#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
|
||||||
|
120
addons/common/functions/fnc_displayIcon.sqf
Normal file
120
addons/common/functions/fnc_displayIcon.sqf
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
@ -18,20 +18,18 @@
|
|||||||
#define DEFAULT_DELAY 2
|
#define DEFAULT_DELAY 2
|
||||||
#define DEFAULT_PRIORITY 0
|
#define DEFAULT_PRIORITY 0
|
||||||
|
|
||||||
if (isNil QGVAR(lastHint)) then {
|
|
||||||
GVAR(lastHint) = [0, 0];
|
|
||||||
};
|
|
||||||
|
|
||||||
_this resize 4;
|
_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;
|
_text = _this select 0;
|
||||||
_sound = _this select 1;
|
_sound = _this select 1;
|
||||||
_delay = _this select 2;
|
_delay = _this select 2;
|
||||||
_priority = _this select 3;
|
_priority = _this select 3;
|
||||||
|
|
||||||
|
if (isNil QGVAR(lastHint)) then {
|
||||||
|
GVAR(lastHint) = [0, 0];
|
||||||
|
};
|
||||||
|
|
||||||
_lastHintTime = GVAR(lastHint) select 0;
|
_lastHintTime = GVAR(lastHint) select 0;
|
||||||
_lastHintPriority = GVAR(lastHint) select 1;
|
_lastHintPriority = GVAR(lastHint) select 1;
|
||||||
|
|
||||||
@ -47,7 +45,5 @@ _this spawn {
|
|||||||
GVAR(lastHint) set [0, _time];
|
GVAR(lastHint) set [0, _time];
|
||||||
GVAR(lastHint) set [1, _priority];
|
GVAR(lastHint) set [1, _priority];
|
||||||
|
|
||||||
sleep _delay;
|
[{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute);
|
||||||
if (_time == GVAR(lastHint) select 0) then {hintSilent ""};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2, Glowbal
|
||||||
*
|
*
|
||||||
* Display a structured text with image.
|
* Display a structured text with image.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Text (Anything)
|
* 0: Text <ANY>
|
||||||
* 1: Image (String)
|
* 1: Image <STRING>
|
||||||
|
* 2: Image color <ARRAY> <OPTIONAL>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_text", "_image"];
|
private ["_text", "_image", "_imageColor"];
|
||||||
|
|
||||||
_text = _this select 0;
|
_text = _this select 0;
|
||||||
_image = _this select 1;
|
_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 {
|
if (typeName _text != "TEXT") then {
|
||||||
|
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||||
|
_text = localize _text;
|
||||||
|
};
|
||||||
_text = parseText format ["<t align='center'>%1</t>", _text];
|
_text = parseText format ["<t align='center'>%1</t>", _text];
|
||||||
};
|
};
|
||||||
|
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
|
||||||
_text = composeText [
|
[_text, 2] call FUNC(displayTextStructured);
|
||||||
parseText format ["<img size='2.5' align='center' color='#ffffff' image='%1'/>", _image],
|
|
||||||
lineBreak,
|
|
||||||
_text
|
|
||||||
];
|
|
||||||
|
|
||||||
[_text] call FUNC(displayTextStructured);
|
|
||||||
|
@ -1,25 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2, Glowbal
|
||||||
*
|
*
|
||||||
* Display a structured text.
|
* Display a structured text.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Text (Anything)
|
* 0: Text <ANY>
|
||||||
* 1: Size of the textbox (Number, optional default: 1)
|
* 1: Size of the textbox <NUMBER> <OPTIONAL>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_text", "_size", "_isShown", "_ctrlHint"];
|
private ["_text", "_size", "_isShown", "_ctrlHint", "_yPos", "_xPos", "_wPos", "_hPos", "_position"];
|
||||||
|
|
||||||
_text = _this select 0;
|
_text = _this select 0;
|
||||||
_size = _this select 1;
|
_size = _this select 1;
|
||||||
|
|
||||||
if (isNil "_size") then {_size = 1};
|
if (isNil "_size") then {_size = 1.5};
|
||||||
|
|
||||||
if (typeName _text != "TEXT") then {
|
if (typeName _text != "TEXT") then {
|
||||||
|
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||||
|
_text = localize _text;
|
||||||
|
};
|
||||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -30,19 +34,25 @@ _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
|||||||
disableSerialization;
|
disableSerialization;
|
||||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
_ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
||||||
|
|
||||||
_ctrlHint ctrlSetPosition [
|
_ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||||
safeZoneW + safeZoneX - 0 * safezoneW,
|
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||||
safeZoneY + 0.2 * safezoneH,
|
/*
|
||||||
0.2 * safeZoneW,
|
// This does not function at the moment. Has been disabled until it fixed.
|
||||||
_size * 0.1 * SafeZoneH
|
_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 ctrlCommit 0;
|
||||||
|
|
||||||
_ctrlHint ctrlSetStructuredText _text;
|
_ctrlHint ctrlSetStructuredText _text;
|
||||||
_ctrlHint ctrlSetPosition [
|
_ctrlHint ctrlSetPosition _position;
|
||||||
safeZoneW + safeZoneX - 0.2 * safezoneW,
|
_ctrlHint ctrlCommit ([0.5, 0] select _isShown);
|
||||||
safeZoneY + 0.2 * safezoneH,
|
|
||||||
0.2 * safeZoneW,
|
|
||||||
_size * 0.1 * SafeZoneH
|
|
||||||
];
|
|
||||||
_ctrlHint ctrlCommit ([0.2, 0] select _isShown);
|
|
||||||
|
@ -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 {};
|
|
||||||
};
|
|
@ -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;
|
|
@ -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;
|
|
@ -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])
|
|
@ -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
|
|
@ -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];
|
|
@ -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
|
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#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"];
|
private ["_caller", "_unit","_vehicle", "_loadcar", "_loadhelicopter", "_loadtank"];
|
||||||
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
@ -34,9 +34,9 @@ if (_unit distance _loadcar <= 10) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (!isNull _vehicle) 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);
|
[_caller,objNull] call FUNC(carryObj);
|
||||||
[_unit,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
|
_vehicle
|
@ -16,13 +16,13 @@ _vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
|||||||
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
|
|
||||||
if (!alive _unit) then {
|
if (!alive _unit) then {
|
||||||
_unit = [_unit,_caller] call FUNC(makeCopyOfBody_F);
|
_unit = [_unit,_caller] call FUNC(makeCopyOfBody);
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit moveInCargo _vehicle;
|
_unit moveInCargo _vehicle;
|
||||||
_loaded = _vehicle getvariable [QGVAR(loaded_persons_F),[]];
|
_loaded = _vehicle getvariable [QGVAR(loaded_persons),[]];
|
||||||
_loaded pushback _unit;
|
_loaded pushback _unit;
|
||||||
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
|
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||||
if (!([_unit] call FUNC(isAwake))) then {
|
if (!([_unit] call FUNC(isAwake))) then {
|
||||||
_handle = [_unit,_vehicle] spawn {
|
_handle = [_unit,_vehicle] spawn {
|
||||||
private ["_unit","_vehicle"];
|
private ["_unit","_vehicle"];
|
@ -18,12 +18,12 @@ if (_moveTo) then {
|
|||||||
_previousGroup = group _unit;
|
_previousGroup = group _unit;
|
||||||
_newGroup = createGroup (side _previousGroup);
|
_newGroup = createGroup (side _previousGroup);
|
||||||
[_unit] joinSilent _newGroup;
|
[_unit] joinSilent _newGroup;
|
||||||
_unit setvariable [QGVAR(previousGroup_F),_previousGroup];
|
_unit setvariable [QGVAR(previousGroup),_previousGroup];
|
||||||
} else {
|
} else {
|
||||||
_previousGroup = _unit getvariable QGVAR(previousGroup_F);
|
_previousGroup = _unit getvariable QGVAR(previousGroup);
|
||||||
if (!isnil "_previousGroup") then {
|
if (!isnil "_previousGroup") then {
|
||||||
_currentGroup = group _unit;
|
_currentGroup = group _unit;
|
||||||
_unit setvariable [QGVAR(previousGroup_F),nil];
|
_unit setvariable [QGVAR(previousGroup),nil];
|
||||||
[_unit] joinSilent _previousGroup;
|
[_unit] joinSilent _previousGroup;
|
||||||
if (count units _currentGroup == 0) then {
|
if (count units _currentGroup == 0) then {
|
||||||
deleteGroup _currentGroup;
|
deleteGroup _currentGroup;
|
||||||
|
@ -1,24 +1,29 @@
|
|||||||
/*
|
/*
|
||||||
Name: FUNC(onLoadRscDisplayChannel)
|
* Author: Pabst Mirror, commy2
|
||||||
|
* When the RscDisplayChannel is loaded, this will constantly uiNamespace variable ace_common_currentChannel
|
||||||
Author: Pabst Mirror, commy2
|
* with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
|
||||||
|
*
|
||||||
Description:
|
* Arguments:
|
||||||
When the RscDisplayChannel is loaded, this will constantly uiNamespace variable "ACE_currentChannel"
|
* 0: The RscDisplayChannel Display <DISPLAY>
|
||||||
with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open.
|
*
|
||||||
|
* Return Value:
|
||||||
Parameters:
|
* Nothing
|
||||||
0: DISPLAY - RscDisplayChannel
|
*
|
||||||
|
* Example:
|
||||||
Returns:
|
* onLoad = QUOTE(_this call FUNC(onLoadRscDisplayChannel));
|
||||||
Nothing
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#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", {
|
["ACE_currentChannel", "onEachFrame", {
|
||||||
if (ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull]) != "") then {
|
if (isNull (uiNamespace getVariable [QGVAR(currentChannelControl), controlNull])) then {
|
||||||
uiNamespace setVariable ["ACE_currentChannel", ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull])];
|
["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;
|
}] call BIS_fnc_addStackedEventhandler;
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* Nothing
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
@ -32,6 +35,16 @@ closeDialog 0;
|
|||||||
createDialog QGVAR(ProgressBar_Dialog);
|
createDialog QGVAR(ProgressBar_Dialog);
|
||||||
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle;
|
(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 = {
|
_perFrameFunction = {
|
||||||
PARAMS_2(_parameters,_pfhID);
|
PARAMS_2(_parameters,_pfhID);
|
||||||
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
|
EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions);
|
||||||
|
@ -17,17 +17,17 @@ _unit setvariable ["ACE_isDead",nil,true];
|
|||||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||||
|
|
||||||
if (isPlayer _unit) then {
|
if (isPlayer _unit) then {
|
||||||
[true] call FUNC(setVolume_f);
|
[true] call FUNC(setVolume);
|
||||||
[false] call FUNC(disableKeyInput_f);
|
[false] call FUNC(disableKeyInput);
|
||||||
if (["ace_medical"] call FUNC(isModLoader_f)) then {
|
if (["ace_medical"] call FUNC(isModLoader)) then {
|
||||||
[false] call EFUNC(medical,effectBlackOut);
|
[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
|
// clear all disable user input
|
||||||
{
|
{
|
||||||
[_X, false] call FUNC(setDisableUserInputStatus);
|
[_X, false] call FUNC(setDisableUserInputStatus);
|
||||||
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION_F);
|
}foreach GVAR(DISABLE_USER_INPUT_COLLECTION);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -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);
|
|
||||||
};
|
|
@ -42,6 +42,6 @@ if (isPlayer _reciever) then {
|
|||||||
|
|
||||||
}foreach _content;
|
}foreach _content;
|
||||||
|
|
||||||
[_title,_content,_type] call EFUNC(gui,displayInformation);
|
[_title,_content,_type] call EFUNC(common,displayInformation);
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -41,6 +41,6 @@ if (isPlayer _reciever) then {
|
|||||||
}foreach _parameters;
|
}foreach _parameters;
|
||||||
_content = format _localizationArray;
|
_content = format _localizationArray;
|
||||||
|
|
||||||
[_title,_content,_type] call EFUNC(gui,displayMessage);
|
[_title,_content,_type] call EFUNC(common,displayMessage);
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -13,16 +13,16 @@ _id = _this select 0;
|
|||||||
_disable = _this select 1;
|
_disable = _this select 1;
|
||||||
|
|
||||||
|
|
||||||
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION_F)) then {
|
if (isnil QGVAR(DISABLE_USER_INPUT_COLLECTION)) then {
|
||||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = [];
|
GVAR(DISABLE_USER_INPUT_COLLECTION) = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_disable) then {
|
if (_disable) then {
|
||||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) pushback _id;
|
GVAR(DISABLE_USER_INPUT_COLLECTION) pushback _id;
|
||||||
[true] call FUNC(disableUserInput);
|
[true] call FUNC(disableUserInput);
|
||||||
} else {
|
} else {
|
||||||
GVAR(DISABLE_USER_INPUT_COLLECTION_F) = GVAR(DISABLE_USER_INPUT_COLLECTION_F) - [_id];
|
GVAR(DISABLE_USER_INPUT_COLLECTION) = GVAR(DISABLE_USER_INPUT_COLLECTION) - [_id];
|
||||||
if (GVAR(DISABLE_USER_INPUT_COLLECTION_F) isEqualTo []) then {
|
if (GVAR(DISABLE_USER_INPUT_COLLECTION) isEqualTo []) then {
|
||||||
[false] call FUNC(disableUserInput);
|
[false] call FUNC(disableUserInput);
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -17,7 +17,8 @@ EXPLODE_1_PVT(_this,_optionEntry);
|
|||||||
_fnc_getValueWithType = {
|
_fnc_getValueWithType = {
|
||||||
EXPLODE_2_PVT(_this,_optionEntry,_typeName);
|
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);
|
TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value);
|
||||||
if (_typeName == "BOOL") exitWith {
|
if (_typeName == "BOOL") exitWith {
|
||||||
_value > 0
|
_value > 0
|
||||||
|
@ -16,7 +16,7 @@ _switch = [_this, 1, false,[false]] call BIS_fnc_Param;
|
|||||||
_id = [_this, 2, "", [""]] call BIS_fnc_Param;
|
_id = [_this, 2, "", [""]] call BIS_fnc_Param;
|
||||||
_side = [_this, 3, side _unit,[west]] 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 {
|
if (_switch) then {
|
||||||
// go forward
|
// go forward
|
||||||
_previousGroup = group _unit;
|
_previousGroup = group _unit;
|
||||||
@ -30,7 +30,7 @@ if (_switch) then {
|
|||||||
[_unit] joinSilent _newGroup;
|
[_unit] joinSilent _newGroup;
|
||||||
|
|
||||||
_previousGroupsList pushback [_previousGroup, _originalSide, _id, true];
|
_previousGroupsList pushback [_previousGroup, _originalSide, _id, true];
|
||||||
_unit setvariable [QGVAR(previousGroupSwitchTo_F), _previousGroupsList, true];
|
_unit setvariable [QGVAR(previousGroupSwitchTo), _previousGroupsList, true];
|
||||||
} else {
|
} else {
|
||||||
// go one back
|
// go one back
|
||||||
{
|
{
|
||||||
@ -60,5 +60,5 @@ if (_switch) then {
|
|||||||
}foreach _previousGroupsList;
|
}foreach _previousGroupsList;
|
||||||
_previousGroupsList = _previousGroupsList - [objNull];
|
_previousGroupsList = _previousGroupsList - [objNull];
|
||||||
reverse _previousGroupsList; // we have to reverse again, to ensure the list is in the right order.
|
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];
|
||||||
};
|
};
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson_F))
|
#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson))
|
||||||
|
|
||||||
private ["_caller", "_unit","_vehicle", "_loaded"];
|
private ["_caller", "_unit","_vehicle", "_loaded"];
|
||||||
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||||
@ -27,11 +27,11 @@ if (!alive _unit) then {
|
|||||||
_unit action ["Eject", vehicle _unit];
|
_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];
|
_loaded = _loaded - [_unit];
|
||||||
_vehicle setvariable [QGVAR(loaded_persons_F),_loaded,true];
|
_vehicle setvariable [QGVAR(loaded_persons),_loaded,true];
|
||||||
|
|
||||||
if (!([_unit] call FUNC(isAwake))) then {
|
if (!([_unit] call FUNC(isAwake))) then {
|
||||||
_handle = [_unit,_vehicle] spawn {
|
_handle = [_unit,_vehicle] spawn {
|
@ -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>
|
<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>
|
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
|
||||||
</Key>
|
</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>
|
</Package>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -24,6 +24,12 @@ class CfgACE_Triggers {
|
|||||||
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
|
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
|
||||||
requires[] = {"ACE_DeadManSwitch"};
|
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 {
|
class PressurePlate {
|
||||||
displayName = $STR_ACE_Explosives_PressurePlate;
|
displayName = $STR_ACE_Explosives_PressurePlate;
|
||||||
picture = PATHTOF(Data\UI\PressurePlate.paa);
|
picture = PATHTOF(Data\UI\PressurePlate.paa);
|
||||||
|
@ -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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -49,6 +49,15 @@ class CfgVehicles {
|
|||||||
priority = 0.8;
|
priority = 0.8;
|
||||||
hotkey = "F";
|
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";
|
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 NATO_Box_Base;
|
||||||
class EAST_Box_Base;
|
class EAST_Box_Base;
|
||||||
class IND_Box_Base;
|
class IND_Box_Base;
|
||||||
@ -133,6 +163,7 @@ class CfgVehicles {
|
|||||||
MACRO_ADDITEM(ACE_M26_Clacker,6)
|
MACRO_ADDITEM(ACE_M26_Clacker,6)
|
||||||
MACRO_ADDITEM(ACE_DefusalKit,12)
|
MACRO_ADDITEM(ACE_DefusalKit,12)
|
||||||
MACRO_ADDITEM(ACE_Deadmanswitch,2)
|
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_M26_Clacker,2)
|
||||||
MACRO_ADDITEM(ACE_DefusalKit,2)
|
MACRO_ADDITEM(ACE_DefusalKit,2)
|
||||||
MACRO_ADDITEM(ACE_Deadmanswitch,1)
|
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_M26_Clacker,6)
|
||||||
MACRO_ADDITEM(ACE_DefusalKit,12)
|
MACRO_ADDITEM(ACE_DefusalKit,12)
|
||||||
MACRO_ADDITEM(ACE_Deadmanswitch,6)
|
MACRO_ADDITEM(ACE_Deadmanswitch,6)
|
||||||
|
MACRO_ADDITEM(ACE_Cellphone,10)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,6 +47,20 @@ class CfgWeapons {
|
|||||||
ACE_Range = 100;
|
ACE_Range = 100;
|
||||||
ACE_Detonator = 1;
|
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 {
|
class ItemInfo: ACE_ExplosiveItem {
|
||||||
mass = 2;
|
mass = 2;
|
||||||
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
|
uniformModel = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||||
|
BIN
addons/explosives/Data/Audio/Cellphone_Ring.wss
Normal file
BIN
addons/explosives/Data/Audio/Cellphone_Ring.wss
Normal file
Binary file not shown.
BIN
addons/explosives/Data/Audio/DialTone.wss
Normal file
BIN
addons/explosives/Data/Audio/DialTone.wss
Normal file
Binary file not shown.
BIN
addons/explosives/Data/UI/Cellphone_Background.paa
Normal file
BIN
addons/explosives/Data/UI/Cellphone_Background.paa
Normal file
Binary file not shown.
BIN
addons/explosives/Data/UI/Cellphone_UI.paa
Normal file
BIN
addons/explosives/Data/UI/Cellphone_UI.paa
Normal file
Binary file not shown.
@ -4,14 +4,47 @@
|
|||||||
#define GUI_GRID_H (0.04)
|
#define GUI_GRID_H (0.04)
|
||||||
|
|
||||||
#define ST_CENTER 0x02
|
#define ST_CENTER 0x02
|
||||||
|
#define X_OFFSET 0.25
|
||||||
|
|
||||||
class RscText;
|
class RscText;
|
||||||
class RscButton;
|
class RscButton;
|
||||||
|
|
||||||
#define X_OFFSET 0.25
|
|
||||||
|
|
||||||
class RscXSliderH;
|
class RscXSliderH;
|
||||||
class IGUIBack;
|
class IGUIBack;
|
||||||
|
class RscPicture;
|
||||||
|
class RscEdit;
|
||||||
|
|
||||||
|
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 {
|
class Rsc_ACE_Timer_Slider:RscXSliderH {
|
||||||
x = 0.4;
|
x = 0.4;
|
||||||
@ -21,8 +54,7 @@ class Rsc_ACE_Timer_Slider:RscXSliderH{
|
|||||||
colorBackground[] = {0,0,0,0.5};
|
colorBackground[] = {0,0,0,0.5};
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscACE_SelectTimeUI
|
class RscACE_SelectTimeUI {
|
||||||
{
|
|
||||||
idd = 8854;
|
idd = 8854;
|
||||||
movingEnable = 0;
|
movingEnable = 0;
|
||||||
class controls {
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -18,6 +18,7 @@ if !(hasInterface) exitWith {};
|
|||||||
GVAR(PlacedCount) = 0;
|
GVAR(PlacedCount) = 0;
|
||||||
GVAR(Setup) = objNull;
|
GVAR(Setup) = objNull;
|
||||||
GVAR(pfeh_running) = false;
|
GVAR(pfeh_running) = false;
|
||||||
|
GVAR(CurrentSpeedDial) = 0;
|
||||||
|
|
||||||
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler);
|
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler);
|
||||||
player addEventHandler ["Killed", {
|
player addEventHandler ["Killed", {
|
||||||
|
@ -17,11 +17,15 @@
|
|||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(addCellphoneIED);
|
||||||
PREP(addClacker);
|
PREP(addClacker);
|
||||||
|
PREP(addToSpeedDial);
|
||||||
PREP(canDefuse);
|
PREP(canDefuse);
|
||||||
PREP(canDetonate);
|
PREP(canDetonate);
|
||||||
PREP(defuseExplosive);
|
PREP(defuseExplosive);
|
||||||
PREP(detonateExplosive);
|
PREP(detonateExplosive);
|
||||||
|
PREP(dialPhone);
|
||||||
|
PREP(dialingPhone);
|
||||||
|
|
||||||
PREP(handleScrollWheel);
|
PREP(handleScrollWheel);
|
||||||
|
|
||||||
@ -30,6 +34,7 @@ PREP(hasPlacedExplosives);
|
|||||||
|
|
||||||
PREP(getDetonators);
|
PREP(getDetonators);
|
||||||
PREP(getPlacedExplosives);
|
PREP(getPlacedExplosives);
|
||||||
|
PREP(getSpeedDialExplosive);
|
||||||
|
|
||||||
PREP(openDetonateUI);
|
PREP(openDetonateUI);
|
||||||
PREP(openPlaceUI);
|
PREP(openPlaceUI);
|
||||||
@ -41,10 +46,12 @@ PREP(place_Approve);
|
|||||||
PREP(place_Cancel);
|
PREP(place_Cancel);
|
||||||
|
|
||||||
PREP(placeExplosive);
|
PREP(placeExplosive);
|
||||||
|
PREP(removeFromSpeedDial);
|
||||||
|
|
||||||
PREP(selectTrigger);
|
PREP(selectTrigger);
|
||||||
PREP(setupExplosive);
|
PREP(setupExplosive);
|
||||||
PREP(setPosition);
|
PREP(setPosition);
|
||||||
|
PREP(setSpeedDial);
|
||||||
PREP(startDefuse);
|
PREP(startDefuse);
|
||||||
PREP(startTimer);
|
PREP(startTimer);
|
||||||
PREP(triggerType);
|
PREP(triggerType);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
units[] = {};
|
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;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||||
author[] = {"Garth 'L-H' de Wet"};
|
author[] = {"Garth 'L-H' de Wet"};
|
||||||
|
51
addons/explosives/functions/fnc_addCellphoneIED.sqf
Normal file
51
addons/explosives/functions/fnc_addCellphoneIED.sqf
Normal 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);
|
37
addons/explosives/functions/fnc_addToSpeedDial.sqf
Normal file
37
addons/explosives/functions/fnc_addToSpeedDial.sqf
Normal 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];
|
42
addons/explosives/functions/fnc_dialPhone.sqf
Normal file
42
addons/explosives/functions/fnc_dialPhone.sqf
Normal 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);
|
||||||
|
};
|
||||||
|
};
|
44
addons/explosives/functions/fnc_dialingPhone.sqf
Normal file
44
addons/explosives/functions/fnc_dialingPhone.sqf
Normal 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];
|
27
addons/explosives/functions/fnc_getSpeedDialExplosive.sqf
Normal file
27
addons/explosives/functions/fnc_getSpeedDialExplosive.sqf
Normal 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
|
@ -51,7 +51,7 @@ _actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosive
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
call EFUNC(interaction,hideMenu);
|
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);
|
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,9 @@ _player = ACE_player;
|
|||||||
[_player, "DefaultAction", _player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
|
[_player, "DefaultAction", _player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||||
[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||||
call EFUNC(interaction,hideMouseHint);
|
call EFUNC(interaction,hideMouseHint);
|
||||||
if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
|
if ((_setup getVariable [QGVAR(Class), ""]) == "") exitWith {
|
||||||
|
deleteVehicle _setup;
|
||||||
|
};
|
||||||
_dir = (getDir _setup);
|
_dir = (getDir _setup);
|
||||||
if (_dir > 180) then {
|
if (_dir > 180) then {
|
||||||
_dir = _dir - 180;
|
_dir = _dir - 180;
|
||||||
@ -41,6 +43,7 @@ if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
|
|||||||
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
|
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
|
||||||
private ["_player", "_pos", "_attachTo"];
|
private ["_player", "_pos", "_attachTo"];
|
||||||
_player = ACE_player;
|
_player = ACE_player;
|
||||||
|
_player setVariable [QGVAR(PlantingExplosive), false];
|
||||||
_pos = getPosATL (_this select 0);
|
_pos = getPosATL (_this select 0);
|
||||||
(_this select 0) enableSimulationGlobal false;
|
(_this select 0) enableSimulationGlobal false;
|
||||||
if (surfaceIsWater _pos) then {
|
if (surfaceIsWater _pos) then {
|
||||||
@ -50,7 +53,6 @@ if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
|
|||||||
(_this select 0) setPosATL _pos;
|
(_this select 0) setPosATL _pos;
|
||||||
};
|
};
|
||||||
(_this select 0) setVariable [QGVAR(Handled), true];
|
(_this select 0) setVariable [QGVAR(Handled), true];
|
||||||
_player setVariable [QGVAR(PlantingExplosive), false];
|
|
||||||
_attachTo = objNull;
|
_attachTo = objNull;
|
||||||
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
|
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
|
||||||
_attachTo = (_this select 1);
|
_attachTo = (_this select 1);
|
||||||
@ -84,6 +86,7 @@ if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
|
|||||||
_setup = _this select 0;
|
_setup = _this select 0;
|
||||||
_player = ACE_player;
|
_player = ACE_player;
|
||||||
sleep 5;
|
sleep 5;
|
||||||
|
_player setVariable [QGVAR(PlantingExplosive), false];
|
||||||
if (!isNull _setup) then {
|
if (!isNull _setup) then {
|
||||||
private ["_mag", "_dir", "_delayTime"];
|
private ["_mag", "_dir", "_delayTime"];
|
||||||
_mag = _setup getVariable [QGVAR(Class), ""];
|
_mag = _setup getVariable [QGVAR(Class), ""];
|
||||||
@ -97,10 +100,6 @@ if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
|
|||||||
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
|
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
|
||||||
deleteVehicle _setup;
|
deleteVehicle _setup;
|
||||||
_player RemoveMagazine _mag;
|
_player RemoveMagazine _mag;
|
||||||
_player setVariable [QGVAR(PlantingExplosive), false];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}else{
|
|
||||||
deleteVehicle _setup;
|
|
||||||
};
|
|
||||||
|
26
addons/explosives/functions/fnc_removeFromSpeedDial.sqf
Normal file
26
addons/explosives/functions/fnc_removeFromSpeedDial.sqf
Normal 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;
|
26
addons/explosives/functions/fnc_setSpeedDial.sqf
Normal file
26
addons/explosives/functions/fnc_setSpeedDial.sqf
Normal 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];
|
@ -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))) );
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,2 +0,0 @@
|
|||||||
#include "UI\define.hpp"
|
|
||||||
#include "UI\RscTitles.hpp"
|
|
@ -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)
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
@ -1,11 +0,0 @@
|
|||||||
/**
|
|
||||||
* XEH_postInit.sqf
|
|
||||||
* @Descr: N/A
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
@ -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;
|
|
@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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 {
|
|
||||||
};
|
|
||||||
};
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
|
@ -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"];
|
|
||||||
};
|
|
@ -1,45 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_gui_displayMessage.sqf
|
|
||||||
* @Descr: N/A
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: []
|
|
||||||
* @Return:
|
|
||||||
* @PublicAPI: false
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
#define DISPLAY_LAYER 546
|
|
||||||
|
|
||||||
private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos"];
|
|
||||||
_title = [_this, 0, "",[""]] call BIS_fnc_Param;
|
|
||||||
_content = [_this, 1, "",[""]] call BIS_fnc_Param;
|
|
||||||
_type = [_this, 2, 0, [0]] call BIS_fnc_Param;
|
|
||||||
|
|
||||||
if (_title != "" && _content != "") then {
|
|
||||||
DISPLAY_LAYER cutRsc [QGVAR(RSC_DISPLAY_MESSAGE),"PLAIN"];
|
|
||||||
|
|
||||||
disableSerialization;
|
|
||||||
_display = uiNamespace getvariable QGVAR(RSC_DISPLAY_MESSAGE);
|
|
||||||
if (!isnil "_display") then {
|
|
||||||
_headerCtrl = _display displayCtrl 1;
|
|
||||||
_contentCtrl = _display displayCtrl 2;
|
|
||||||
|
|
||||||
_headerCtrl ctrlSetText _title;
|
|
||||||
_contentCtrl ctrlSetText _content;
|
|
||||||
|
|
||||||
_contentAmountOfChars = count (toArray _content);
|
|
||||||
_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];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,64 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_gui_loadingbar.sqf
|
|
||||||
* @Descr: Displays a loading bar and halts script until loading bar has finished
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [timeToWait NUMBER, condition CODE (Optional), onSuccess CODE (Optional), onFailure CODE (Optional), arguments ARRAY (Optional)]
|
|
||||||
* @Return: BOOl Returns true if loading bar has fully finished. Otherwise false
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private ["_timeToWait","_cond","_onfailure","_onSuccess","_args"];
|
|
||||||
_timeToWait = _this select 0;
|
|
||||||
_cond = [_this, 1, {true}, [{true}]] call BIS_fnc_Param;
|
|
||||||
_onSuccess = [_this, 2, {}, [{}]] call BIS_fnc_Param;
|
|
||||||
_onfailure = [_this, 3, {}, [{}]] call BIS_fnc_Param;
|
|
||||||
_args = [_this, 4, [], [[]]] call BIS_fnc_Param;
|
|
||||||
|
|
||||||
|
|
||||||
if (_timeToWait > 0) exitwith {
|
|
||||||
GVAR(LOADING_BAR_STATUS) = 0;
|
|
||||||
disableSerialization;
|
|
||||||
1534 cutRsc [QGVAR(RSC_PROGRESSBAR_LOADING),"plain"];
|
|
||||||
[{
|
|
||||||
private ["_args","_timeToWait","_start","_cond","_onSuccess","_onfailure","_params"];
|
|
||||||
_args = _this select 0;
|
|
||||||
|
|
||||||
_start = _args select 0;
|
|
||||||
_timeToWait = _args select 1;
|
|
||||||
_cond = _args select 2;
|
|
||||||
_onSuccess = _args select 3;
|
|
||||||
_onfailure = _args select 4;
|
|
||||||
_params = _args select 5;
|
|
||||||
|
|
||||||
if !(_params call _cond) exitwith {
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
|
||||||
1534 cutText ["","plain"];
|
|
||||||
_params call _onfailure;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (GVAR(LOADING_BAR_STATUS) >= 1) exitwith {
|
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
|
||||||
1534 cutText ["","plain"];
|
|
||||||
_params call _onSuccess;
|
|
||||||
};
|
|
||||||
private "_dialog";
|
|
||||||
disableSerialization;
|
|
||||||
_dialog = uiNamespace getvariable QGVAR(RSC_PROGRESSBAR_LOADING);
|
|
||||||
|
|
||||||
GVAR(LOADING_BAR_STATUS) = (diag_tickTime - _start) / _timeToWait;
|
|
||||||
(_dialog displayCtrl 6) progressSetPosition GVAR(LOADING_BAR_STATUS);
|
|
||||||
|
|
||||||
}, 0, [diag_tickTime, _timeToWait, _cond, _onSuccess, _onfailure, _args]] call CBA_fnc_addPerFrameHandler;
|
|
||||||
true;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_args call _cond) exitwith {
|
|
||||||
_args call _onSuccess;
|
|
||||||
true;
|
|
||||||
};
|
|
||||||
|
|
||||||
_args call _onfailure;
|
|
||||||
false;
|
|
@ -1,26 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_sendHintTo.sqf
|
|
||||||
* @Descr: Sends a hint to player unit across network
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [reciever OBJECT, message STRING]
|
|
||||||
* @Return: void
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private ["_reciever","_message"];
|
|
||||||
_reciever = _this select 0;
|
|
||||||
_message = _this select 1;
|
|
||||||
|
|
||||||
if (isPlayer _reciever) then {
|
|
||||||
if (!local _reciever) then {
|
|
||||||
[_this, QUOTE(FUNC(sendHintTo)), _reciever, false] call EFUNC(common,execRemoteFnc);
|
|
||||||
} else {
|
|
||||||
if (isLocalized _message) then {
|
|
||||||
_message = localize _message;
|
|
||||||
};
|
|
||||||
hintsilent format ["%1",_message];
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,31 +0,0 @@
|
|||||||
/**
|
|
||||||
* fn_sendMessageTo.sqf
|
|
||||||
* @Descr: Sends a chat message to player unit across the network
|
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
|
||||||
* @Arguments: [reciever OBJECT, message STRING]
|
|
||||||
* @Return: void
|
|
||||||
* @PublicAPI: true
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
private ["_reciever","_message"];
|
|
||||||
_reciever = _this select 0;
|
|
||||||
_message = _this select 1;
|
|
||||||
|
|
||||||
|
|
||||||
if (isPlayer _reciever) then {
|
|
||||||
if (!local _reciever) then {
|
|
||||||
[_this, QUOTE(FUNC(sendMessageTo)), _reciever, false] call EFUNC(common,execRemoteFnc);
|
|
||||||
} else {
|
|
||||||
if (isnil QGVAR(LOGIC_OBJECT)) exitwith {
|
|
||||||
// need to create an object instead
|
|
||||||
};
|
|
||||||
|
|
||||||
if (isLocalized _message) then {
|
|
||||||
_message = localize _message;
|
|
||||||
};
|
|
||||||
GVAR(LOGIC_OBJECT) globalChat format ["%1",_message];
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,12 +0,0 @@
|
|||||||
#define COMPONENT GUI
|
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_GUI
|
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_SETTINGS_GUI
|
|
||||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_GUI
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
|
@ -1,12 +0,0 @@
|
|||||||
#define COMPONENT GUI
|
|
||||||
#include "\z\ace\addons\main\script_mod.hpp"
|
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED_GUI
|
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG_SETTINGS_GUI
|
|
||||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_GUI
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
|
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Project name="ACE3">
|
|
||||||
<Package name="ACE_gui">
|
|
||||||
<Container ID="GUI">
|
|
||||||
</Container>
|
|
||||||
</Package>
|
|
||||||
</Project>
|
|
@ -13,7 +13,7 @@ class Extended_PostInit_EventHandlers {
|
|||||||
class Extended_InitPost_EventHandlers {
|
class Extended_InitPost_EventHandlers {
|
||||||
class All {
|
class All {
|
||||||
class GVAR(compileMenu) {
|
class GVAR(compileMenu) {
|
||||||
init = QUOTE(_this call FUNC(compileMenu));
|
init = QUOTE(_this call FUNC(compileMenu);_this call FUNC(compileMenuSelfAction));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
@ -15,13 +15,27 @@ _fnc = {
|
|||||||
["ACE3",
|
["ACE3",
|
||||||
"Interact Key",
|
"Interact Key",
|
||||||
{_this call FUNC(keyDown)},
|
{_this call FUNC(keyDown)},
|
||||||
[15, [false, false, false]],
|
[219, [false, false, false]],
|
||||||
false,
|
false,
|
||||||
"keydown"] call cba_fnc_registerKeybind;
|
"keydown"] call cba_fnc_registerKeybind;
|
||||||
|
|
||||||
["ACE3",
|
["ACE3",
|
||||||
"Interact Key",
|
"Interact Key",
|
||||||
{_this call FUNC(keyUp)},
|
{_this call FUNC(keyUp)},
|
||||||
[15, [false, false, false]],
|
[219, [false, false, false]],
|
||||||
|
false,
|
||||||
|
"keyUp"] call cba_fnc_registerKeybind;
|
||||||
|
|
||||||
|
["ACE3",
|
||||||
|
"Self Actions Key",
|
||||||
|
{_this call FUNC(keyDownSelfAction)},
|
||||||
|
[219, [false, true, false]],
|
||||||
|
false,
|
||||||
|
"keydown"] call cba_fnc_registerKeybind;
|
||||||
|
|
||||||
|
["ACE3",
|
||||||
|
"Self Actions Key",
|
||||||
|
{_this call FUNC(keyUpSelfAction)},
|
||||||
|
[219, [false, true, false]],
|
||||||
false,
|
false,
|
||||||
"keyUp"] call cba_fnc_registerKeybind;
|
"keyUp"] call cba_fnc_registerKeybind;
|
@ -2,22 +2,25 @@
|
|||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
PREP(setToRender);
|
PREP(addAction);
|
||||||
|
PREP(compileMenu);
|
||||||
|
PREP(compileMenuSelfAction);
|
||||||
|
PREP(keyDown);
|
||||||
|
PREP(keyDownSelfAction);
|
||||||
|
PREP(keyUp);
|
||||||
|
PREP(keyUpSelfAction);
|
||||||
|
PREP(probe);
|
||||||
|
PREP(removeAction);
|
||||||
PREP(render);
|
PREP(render);
|
||||||
PREP(renderIcon);
|
PREP(renderIcon);
|
||||||
PREP(renderMenu);
|
PREP(renderMenu);
|
||||||
PREP(probe);
|
|
||||||
PREP(rotateVectLineGetMap);
|
|
||||||
PREP(rotateVectLine);
|
PREP(rotateVectLine);
|
||||||
PREP(keyDown);
|
PREP(rotateVectLineGetMap);
|
||||||
PREP(keyUp);
|
|
||||||
PREP(compileMenu);
|
|
||||||
PREP(addAction);
|
|
||||||
PREP(removeAction);
|
|
||||||
|
|
||||||
GVAR(toRender) = [];
|
GVAR(toRender) = [];
|
||||||
|
|
||||||
GVAR(keyDown) = false;
|
GVAR(keyDown) = false;
|
||||||
|
GVAR(keyDownSelfAction) = false;
|
||||||
GVAR(keyDownTime) = 0;
|
GVAR(keyDownTime) = 0;
|
||||||
|
|
||||||
GVAR(lastTime) = diag_tickTime;
|
GVAR(lastTime) = diag_tickTime;
|
||||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
|||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common"};
|
requiredAddons[] = {"ace_common"};
|
||||||
author[] = {""};
|
author[] = {"NouberNou", "CAA-Picard"};
|
||||||
authorUrl = "";
|
authorUrl = "";
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
|
@ -1,31 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2 and NouberNou
|
||||||
*
|
* Add an ACE action to an object or inside a parent action. Note: This function is NOT global.
|
||||||
* Add an ACE action to an object. Note: This function is NOT global.
|
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* 0: Object the action should be assigned to (Object)
|
* 0: Object the action should be assigned to or parent action <OBJECT> or <ARRAY>
|
||||||
* 1: Name of the action shown in the menu (String)
|
* 1: Name of the action shown in the menu <STRING>
|
||||||
* 2: Icon (String)
|
* 2: Icon <STRING>
|
||||||
* 3: Position (Position or Selection Name)
|
* 3: Position (Position or Selection Name) <POSITION> or <STRING>
|
||||||
* 4: Statement (Code)
|
* 4: Statement <CODE>
|
||||||
* 5: Condition (Code)
|
* 5: Condition <CODE>
|
||||||
* 6: Distance (Number)
|
* 6: Distance <NUMBER>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* The entry array, which can be used to remove the entry, or add children entries.
|
* The entry array, which can be used to remove the entry, or add children entries <ARRAY>.
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_object", "_displayName", "_icon", "_position", "_statement", "_condition", "_distance", "_actions", "_entry"];
|
EXPLODE_7_PVT(_this,_object,_displayName,_icon,_position,_statement,_condition,_distance);
|
||||||
_object = _this select 0;
|
|
||||||
_displayName = _this select 1;
|
|
||||||
_icon = _this select 2;
|
|
||||||
_position = _this select 3;
|
|
||||||
_statement = _this select 4;
|
|
||||||
_condition = _this select 5;
|
|
||||||
_distance = _this select 6;
|
|
||||||
|
|
||||||
|
|
||||||
|
private ["_actions","_entry"];
|
||||||
_actions = [];
|
_actions = [];
|
||||||
if(IS_OBJECT(_object)) then {
|
if(IS_OBJECT(_object)) then {
|
||||||
_actions = _object getVariable [QUOTE(GVAR(actionData)), []];
|
_actions = _object getVariable [QUOTE(GVAR(actionData)), []];
|
||||||
|
@ -1,23 +1,18 @@
|
|||||||
//fnc_compileMenu.sqf
|
|
||||||
#include "script_component.hpp";
|
|
||||||
// diag_log text format["COMPILE ACTIONS: %1", _this];
|
|
||||||
|
|
||||||
_object = _this select 0;
|
|
||||||
_objectType = typeOf _object;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
displayName = "$STR_ACE_Interaction_TeamManagement";
|
* Author: NouberNou
|
||||||
distance = 4;
|
* Compile the action menu from config for a given object.
|
||||||
condition = QUOTE(alive _target && {!isPlayer _target} && {_target in units group _player} && {GVAR(EnableTeamManagement)});
|
*
|
||||||
statement = "";
|
* Argument:
|
||||||
showDisabled = 0;
|
* 0: Object <OBJECT>
|
||||||
priority = 3.2;
|
*
|
||||||
icon = PATHTOF(UI\team\team_management_ca.paa);
|
* Return value:
|
||||||
subMenu[] = {"ACE_TeamManagement", 0};
|
* None
|
||||||
hotkey = "M";
|
*
|
||||||
enableInside = 1;
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
#include "script_component.hpp";
|
||||||
|
|
||||||
|
EXPLODE_1_PVT(_this,_object);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
[
|
[
|
||||||
@ -33,11 +28,13 @@ enableInside = 1;
|
|||||||
]
|
]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
private ["_objectType","_recurseFnc","_actions"];
|
||||||
|
_objectType = typeOf _object;
|
||||||
_actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions";
|
_actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions";
|
||||||
|
|
||||||
|
|
||||||
_recurseFnc = {
|
_recurseFnc = {
|
||||||
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_condition", "_showDisabled",
|
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
|
||||||
"_enableInside", "_children", "_entry", "_actionsCfg"];
|
"_enableInside", "_children", "_entry", "_actionsCfg"];
|
||||||
_actions = [];
|
_actions = [];
|
||||||
_actionsCfg = _this select 0;
|
_actionsCfg = _this select 0;
|
||||||
@ -48,7 +45,10 @@ _recurseFnc = {
|
|||||||
_distance = getNumber (_entryCfg >> "distance");
|
_distance = getNumber (_entryCfg >> "distance");
|
||||||
_icon = getText (_entryCfg >> "icon");
|
_icon = getText (_entryCfg >> "icon");
|
||||||
_statement = compile (getText (_entryCfg >> "statement"));
|
_statement = compile (getText (_entryCfg >> "statement"));
|
||||||
|
_selection = getText (_entryCfg >> "selection");
|
||||||
|
if (_selection == "") then {
|
||||||
|
_selection = [0,0,0];
|
||||||
|
};
|
||||||
_condition = getText (_entryCfg >> "condition");
|
_condition = getText (_entryCfg >> "condition");
|
||||||
if (_condition == "") then {_condition = "true"};
|
if (_condition == "") then {_condition = "true"};
|
||||||
|
|
||||||
@ -59,18 +59,11 @@ _recurseFnc = {
|
|||||||
_enableInside = getNumber (_entryCfg >> "enableInside");
|
_enableInside = getNumber (_entryCfg >> "enableInside");
|
||||||
|
|
||||||
_condition = compile _condition;
|
_condition = compile _condition;
|
||||||
// diag_log text format["_condition: %1", _condition];
|
_children = [_entryCfg] call _recurseFnc;
|
||||||
_children = [];
|
|
||||||
if(isArray (_entryCfg >> "subMenu")) then {
|
|
||||||
_subMenuDef = getArray (_entryCfg >> "subMenu");
|
|
||||||
_childMenuName = _subMenuDef select 0;
|
|
||||||
_childMenuCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions" >> _childMenuName;
|
|
||||||
_children = [_childMenuCfg] call _recurseFnc;
|
|
||||||
};
|
|
||||||
_entry = [
|
_entry = [
|
||||||
_displayName,
|
_displayName,
|
||||||
_icon,
|
_icon,
|
||||||
[0,0,0],
|
_selection,
|
||||||
_statement,
|
_statement,
|
||||||
_condition,
|
_condition,
|
||||||
_distance,
|
_distance,
|
||||||
@ -86,17 +79,4 @@ _recurseFnc = {
|
|||||||
|
|
||||||
_actions = [_actionsCfg] call _recurseFnc;
|
_actions = [_actionsCfg] call _recurseFnc;
|
||||||
|
|
||||||
_actions = [[
|
|
||||||
"TEST!",
|
|
||||||
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
|
|
||||||
"Spine3",
|
|
||||||
{ true },
|
|
||||||
{ true },
|
|
||||||
5,
|
|
||||||
_actions,
|
|
||||||
GVAR(uidCounter)
|
|
||||||
]
|
|
||||||
];
|
|
||||||
GVAR(uidCounter) = GVAR(uidCounter) + 1;
|
|
||||||
|
|
||||||
_object setVariable [QUOTE(GVAR(actionData)), _actions];
|
_object setVariable [QUOTE(GVAR(actionData)), _actions];
|
92
addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf
Normal file
92
addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* Author: NouberNou and CAA-Picard
|
||||||
|
* Compile the self action menu from config for a given object.
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: Object <OBJECT>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp";
|
||||||
|
|
||||||
|
EXPLODE_1_PVT(_this,_object);
|
||||||
|
|
||||||
|
/*
|
||||||
|
[
|
||||||
|
[
|
||||||
|
"Launch",
|
||||||
|
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
|
||||||
|
[0,0,0],
|
||||||
|
{ (_this select 0) setVelocity [0,0,10]; },
|
||||||
|
{ true },
|
||||||
|
1,
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
*/
|
||||||
|
|
||||||
|
private ["_objectType","_recurseFnc","_actions"];
|
||||||
|
_objectType = typeOf _object;
|
||||||
|
_actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_SelfActions";
|
||||||
|
|
||||||
|
|
||||||
|
_recurseFnc = {
|
||||||
|
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_condition", "_showDisabled",
|
||||||
|
"_enableInside", "_children", "_entry", "_actionsCfg"];
|
||||||
|
_actions = [];
|
||||||
|
_actionsCfg = _this select 0;
|
||||||
|
for "_i" from 0 to (count _actionsCfg)-1 do {
|
||||||
|
_entryCfg = _actionsCfg select _i;
|
||||||
|
if(isClass _entryCfg) then {
|
||||||
|
_displayName = getText (_entryCfg >> "displayName");
|
||||||
|
_icon = getText (_entryCfg >> "icon");
|
||||||
|
_statement = compile (getText (_entryCfg >> "statement"));
|
||||||
|
|
||||||
|
_condition = getText (_entryCfg >> "condition");
|
||||||
|
if (_condition == "") then {_condition = "true"};
|
||||||
|
|
||||||
|
// Add canInteract (including exceptions) and canInteractWith to condition
|
||||||
|
_condition = _condition + format [QUOTE( && {%1 call EGVAR(common,canInteract)} && {[ARR_2(ACE_player, _target)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
|
||||||
|
|
||||||
|
_showDisabled = getNumber (_entryCfg >> "showDisabled");
|
||||||
|
_enableInside = getNumber (_entryCfg >> "enableInside");
|
||||||
|
|
||||||
|
_condition = compile _condition;
|
||||||
|
_children = [_entryCfg] call _recurseFnc;
|
||||||
|
_entry = [
|
||||||
|
_displayName,
|
||||||
|
_icon,
|
||||||
|
[0,0,0],
|
||||||
|
_statement,
|
||||||
|
_condition,
|
||||||
|
10, //distace
|
||||||
|
_children,
|
||||||
|
GVAR(uidCounter)
|
||||||
|
];
|
||||||
|
GVAR(uidCounter) = GVAR(uidCounter) + 1;
|
||||||
|
_actions pushBack _entry;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_actions
|
||||||
|
};
|
||||||
|
|
||||||
|
_actions = [_actionsCfg] call _recurseFnc;
|
||||||
|
|
||||||
|
// Create a master action to base on self action
|
||||||
|
_actions = [[
|
||||||
|
"Self Actions",
|
||||||
|
"\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa",
|
||||||
|
"Spine3",
|
||||||
|
{ true },
|
||||||
|
{ true },
|
||||||
|
10,
|
||||||
|
_actions,
|
||||||
|
GVAR(uidCounter)
|
||||||
|
]
|
||||||
|
];
|
||||||
|
GVAR(uidCounter) = GVAR(uidCounter) + 1;
|
||||||
|
|
||||||
|
_object setVariable [QUOTE(GVAR(selfActionData)), _actions];
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user