mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Changed: Scripted calls to putInEarPlugs/joinTeam won't show hint (#7400)
* Added ability to suppress hint message * Adjustments based on request
This commit is contained in:
parent
36a6c9c2b3
commit
028a0cb3f0
@ -7,7 +7,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(EarPlugs_On);
|
displayName = CSTRING(EarPlugs_On);
|
||||||
condition = QUOTE(GVAR(EnableCombatDeafness) && {!([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player}});
|
condition = QUOTE(GVAR(EnableCombatDeafness) && {!([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player}});
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
statement = QUOTE( [_player, true] call FUNC(putInEarPlugs) );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
icon = QPATHTOF(UI\ACE_earplugs_x_ca.paa);
|
icon = QPATHTOF(UI\ACE_earplugs_x_ca.paa);
|
||||||
};
|
};
|
||||||
@ -15,7 +15,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(EarPlugs_Off);
|
displayName = CSTRING(EarPlugs_Off);
|
||||||
condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)});
|
condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)});
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
statement = QUOTE( [_player, true] call FUNC(removeEarPlugs) );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
icon = QPATHTOF(UI\ACE_earplugs_x_ca.paa);
|
icon = QPATHTOF(UI\ACE_earplugs_x_ca.paa);
|
||||||
};
|
};
|
||||||
|
@ -5,17 +5,18 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit (player) <OBJECT>
|
* 0: Unit (player) <OBJECT>
|
||||||
|
* 1: Display hint <BOOL> (default: false)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [ace_player] call ace_hearing_fnc_putInEarplugs
|
* [ace_player, false] call ace_hearing_fnc_putInEarplugs
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_player"];
|
params ["_player", ["_displayHint", false, [false]]];
|
||||||
|
|
||||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||||
|
|
||||||
@ -24,7 +25,9 @@ _player removeItem "ACE_EarPlugs";
|
|||||||
|
|
||||||
_player setVariable ["ACE_hasEarPlugsIn", true, true];
|
_player setVariable ["ACE_hasEarPlugsIn", true, true];
|
||||||
|
|
||||||
[localize LSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured);
|
if (_displayHint) then {
|
||||||
|
[localize LSTRING(EarPlugs_Are_On)] call EFUNC(common,displayTextStructured);
|
||||||
|
};
|
||||||
|
|
||||||
//Force an immediate fast volume update:
|
//Force an immediate fast volume update:
|
||||||
[[true]] call FUNC(updateVolume);
|
[[true]] call FUNC(updateVolume);
|
||||||
|
@ -5,17 +5,18 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit (player) <OBJECT>
|
* 0: Unit (player) <OBJECT>
|
||||||
|
* 1: Display hint <BOOL> (default false)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [ace_player] call ace_hearing_fnc_removeEarplugs
|
* [ace_player, false] call ace_hearing_fnc_removeEarplugs
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_player"];
|
params ["_player", ["_displayHint", false, [false]]];
|
||||||
|
|
||||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||||
|
|
||||||
@ -28,7 +29,9 @@ _player addItem "ACE_EarPlugs";
|
|||||||
|
|
||||||
_player setVariable ["ACE_hasEarPlugsIn", false, true];
|
_player setVariable ["ACE_hasEarPlugsIn", false, true];
|
||||||
|
|
||||||
[localize LSTRING(EarPlugs_Are_Off)] call EFUNC(common,displayTextStructured);
|
if (_displayHint) then {
|
||||||
|
[localize LSTRING(EarPlugs_Are_Off)] call EFUNC(common,displayTextStructured);
|
||||||
|
};
|
||||||
|
|
||||||
//Force an immediate fast volume update:
|
//Force an immediate fast volume update:
|
||||||
[[true]] call FUNC(updateVolume);
|
[[true]] call FUNC(updateVolume);
|
||||||
|
@ -79,7 +79,7 @@ class CfgVehicles {
|
|||||||
class ACE_AssignTeamRed {
|
class ACE_AssignTeamRed {
|
||||||
displayName = CSTRING(AssignTeamRed);
|
displayName = CSTRING(AssignTeamRed);
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
||||||
statement = QUOTE([ARR_2(_target,'RED')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_target,'RED',true)] call DFUNC(joinTeam));
|
||||||
exceptions[] = {"isNotSwimming"};
|
exceptions[] = {"isNotSwimming"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_red_ca.paa);
|
icon = QPATHTOF(UI\team\team_red_ca.paa);
|
||||||
@ -87,7 +87,7 @@ class CfgVehicles {
|
|||||||
class ACE_AssignTeamGreen {
|
class ACE_AssignTeamGreen {
|
||||||
displayName = CSTRING(AssignTeamGreen);
|
displayName = CSTRING(AssignTeamGreen);
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
||||||
statement = QUOTE([ARR_2(_target,'GREEN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_target,'GREEN',true)] call DFUNC(joinTeam));
|
||||||
exceptions[] = {"isNotSwimming"};
|
exceptions[] = {"isNotSwimming"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_green_ca.paa);
|
icon = QPATHTOF(UI\team\team_green_ca.paa);
|
||||||
@ -95,7 +95,7 @@ class CfgVehicles {
|
|||||||
class ACE_AssignTeamBlue {
|
class ACE_AssignTeamBlue {
|
||||||
displayName = CSTRING(AssignTeamBlue);
|
displayName = CSTRING(AssignTeamBlue);
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
||||||
statement = QUOTE([ARR_2(_target,'BLUE')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_target,'BLUE',true)] call DFUNC(joinTeam));
|
||||||
exceptions[] = {"isNotSwimming"};
|
exceptions[] = {"isNotSwimming"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_blue_ca.paa);
|
icon = QPATHTOF(UI\team\team_blue_ca.paa);
|
||||||
@ -103,7 +103,7 @@ class CfgVehicles {
|
|||||||
class ACE_AssignTeamYellow {
|
class ACE_AssignTeamYellow {
|
||||||
displayName = CSTRING(AssignTeamYellow);
|
displayName = CSTRING(AssignTeamYellow);
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
|
||||||
statement = QUOTE([ARR_2(_target,'YELLOW')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_target,'YELLOW',true)] call DFUNC(joinTeam));
|
||||||
exceptions[] = {"isNotSwimming"};
|
exceptions[] = {"isNotSwimming"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_yellow_ca.paa);
|
icon = QPATHTOF(UI\team\team_yellow_ca.paa);
|
||||||
@ -111,7 +111,7 @@ class CfgVehicles {
|
|||||||
class ACE_UnassignTeam {
|
class ACE_UnassignTeam {
|
||||||
displayName = CSTRING(LeaveTeam);
|
displayName = CSTRING(LeaveTeam);
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {assignedTeam _target != 'MAIN'});
|
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {assignedTeam _target != 'MAIN'});
|
||||||
statement = QUOTE([ARR_2(_target,'MAIN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_target,'MAIN',true)] call DFUNC(joinTeam));
|
||||||
exceptions[] = {"isNotSwimming"};
|
exceptions[] = {"isNotSwimming"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_white_ca.paa);
|
icon = QPATHTOF(UI\team\team_white_ca.paa);
|
||||||
@ -251,7 +251,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(JoinTeamRed);
|
displayName = CSTRING(JoinTeamRed);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
||||||
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_player,'RED',true)] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_red_ca.paa);
|
icon = QPATHTOF(UI\team\team_red_ca.paa);
|
||||||
};
|
};
|
||||||
@ -259,7 +259,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(JoinTeamGreen);
|
displayName = CSTRING(JoinTeamGreen);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
||||||
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_player,'GREEN',true)] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_green_ca.paa);
|
icon = QPATHTOF(UI\team\team_green_ca.paa);
|
||||||
};
|
};
|
||||||
@ -267,7 +267,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(JoinTeamBlue);
|
displayName = CSTRING(JoinTeamBlue);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
||||||
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_player,'BLUE',true)] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_blue_ca.paa);
|
icon = QPATHTOF(UI\team\team_blue_ca.paa);
|
||||||
};
|
};
|
||||||
@ -275,7 +275,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(JoinTeamYellow);
|
displayName = CSTRING(JoinTeamYellow);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
||||||
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_player,'YELLOW',true)] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_yellow_ca.paa);
|
icon = QPATHTOF(UI\team\team_yellow_ca.paa);
|
||||||
};
|
};
|
||||||
@ -283,7 +283,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(LeaveTeam);
|
displayName = CSTRING(LeaveTeam);
|
||||||
condition = QUOTE(assignedTeam _player != 'MAIN');
|
condition = QUOTE(assignedTeam _player != 'MAIN');
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"};
|
||||||
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_3(_player,'MAIN',true)] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = QPATHTOF(UI\team\team_white_ca.paa);
|
icon = QPATHTOF(UI\team\team_white_ca.paa);
|
||||||
};
|
};
|
||||||
|
@ -6,17 +6,18 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Team <STRING>
|
* 1: Team <STRING>
|
||||||
|
* 2: Display hint <BOOL> (default: false)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [player, "YELLOW"] call ace_interaction_fnc_joinTeam
|
* [player, "YELLOW", false] call ace_interaction_fnc_joinTeam
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_unit", "_team"];
|
params ["_unit", "_team", ["_displayHint", false, [false]]];
|
||||||
|
|
||||||
["CBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
["CBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ if (_unit == ACE_player) then {
|
|||||||
_team = localize format [LSTRING(Team%1), _team];
|
_team = localize format [LSTRING(Team%1), _team];
|
||||||
_message = format [localize LSTRING(JoinedTeam), _team];
|
_message = format [localize LSTRING(JoinedTeam), _team];
|
||||||
};
|
};
|
||||||
|
if (_displayHint) then {
|
||||||
[_message] call EFUNC(common,displayTextStructured);
|
[_message] call EFUNC(common,displayTextStructured);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user