-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Radar - Fix speaking icon being stuck (#182)
* move tfar OnSpeak eh register to post init * up version * adapt read me
- Loading branch information
Showing
8 changed files
with
185 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
#include "script_component.hpp" | ||
|
||
if !(hasInterface) exitWith {}; | ||
|
||
private _labelAdd = localize "STR_dui_buddy_action"; | ||
private _labelRemove = localize "STR_dui_buddy_action_remove"; | ||
private _range = 10; | ||
if (isNil "ace_interact_menu_fnc_createAction") then { | ||
[[_labelAdd, { | ||
[player, cursorObject] call FUNC(pairBuddies); | ||
}, [], -5000, false, true, "", format ["cursorObject distance2d player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isNotEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction; | ||
|
||
[[_labelRemove, { | ||
[player, cursorObject, false] call FUNC(pairBuddies); | ||
}, [], -5000, false, true, "", format ["cursorObject distance2d player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction; | ||
} else { | ||
// root | ||
private _action = [QGVAR(buddy_action), _labelAdd, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; !(ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {_target in (units group _player) && {(_player getVariable [QGVAR(buddy), objNull]) isNotEqualTo _target}}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_remove), _labelRemove, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target, false] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; !(ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {_target in (units group _player) && {(_player getVariable [QGVAR(buddy), objNull]) isEqualTo _target}}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_team_remove), _labelRemove, "", { | ||
params ["", "_player"]; | ||
[_player, _player getVariable [QGVAR(buddy), objNull], false] call FUNC(pairBuddies); | ||
},{params ["", "_player"]; !ace_interaction_EnableTeamManagement && {!isNull (_player getVariable [QGVAR(buddy), objNull])}},{},[], [0,0,0]] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 1, ["ACE_SelfActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
// team management | ||
_action = [QGVAR(buddy_action_team), _labelAdd, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; (ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {(_player getVariable [QGVAR(buddy), objNull]) isNotEqualTo _target}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_team_remove), _labelRemove, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target, false] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; (ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {(_player getVariable [QGVAR(buddy), objNull]) isEqualTo _target}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_team_remove), _labelRemove, "", { | ||
params ["", "_player"]; | ||
[_player, _player getVariable [QGVAR(buddy), objNull], false] call FUNC(pairBuddies); | ||
},{params ["", "_player"]; ace_interaction_EnableTeamManagement && {!isNull (_player getVariable [QGVAR(buddy), objNull])}},{},[], [0,0,0]] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 1, ["ACE_SelfActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
}; | ||
|
||
player addEventHandler ["Respawn", { | ||
params ["_new", "_old"]; | ||
[_old, _old getVariable [QGVAR(buddy), objNull], false] call FUNC(pairBuddies); | ||
_new setVariable [QGVAR(buddy), nil, true]; | ||
}]; | ||
#include "script_component.hpp" | ||
|
||
if !(hasInterface) exitWith {}; | ||
|
||
private _labelAdd = localize "STR_dui_buddy_action"; | ||
private _labelRemove = localize "STR_dui_buddy_action_remove"; | ||
private _range = 10; | ||
if (isNil "ace_interact_menu_fnc_createAction") then { | ||
[[_labelAdd, { | ||
[player, cursorObject] call FUNC(pairBuddies); | ||
}, [], -5000, false, true, "", format ["cursorObject distance2d player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isNotEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction; | ||
|
||
[[_labelRemove, { | ||
[player, cursorObject, false] call FUNC(pairBuddies); | ||
}, [], -5000, false, true, "", format ["cursorObject distance2d player <= %1 && {cursorObject in (units group player) && {(player getVariable ['%2', objNull]) isEqualTo cursorObject}}", _range, QGVAR(buddy)]]] call CBA_fnc_addPlayerAction; | ||
} else { | ||
// root | ||
private _action = [QGVAR(buddy_action), _labelAdd, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; !(ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {_target in (units group _player) && {(_player getVariable [QGVAR(buddy), objNull]) isNotEqualTo _target}}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_remove), _labelRemove, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target, false] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; !(ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {_target in (units group _player) && {(_player getVariable [QGVAR(buddy), objNull]) isEqualTo _target}}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_team_remove), _labelRemove, "", { | ||
params ["", "_player"]; | ||
[_player, _player getVariable [QGVAR(buddy), objNull], false] call FUNC(pairBuddies); | ||
},{params ["", "_player"]; !ace_interaction_EnableTeamManagement && {!isNull (_player getVariable [QGVAR(buddy), objNull])}},{},[], [0,0,0]] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 1, ["ACE_SelfActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
// team management | ||
_action = [QGVAR(buddy_action_team), _labelAdd, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; (ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {(_player getVariable [QGVAR(buddy), objNull]) isNotEqualTo _target}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_team_remove), _labelRemove, "", { | ||
params ["_target", "_player"]; | ||
[_player, _target, false] call FUNC(pairBuddies); | ||
},{params ["_target", "_player"]; (ace_interaction_EnableTeamManagement && [_player, _target] call ace_interaction_fnc_canJoinTeam) && {(_player getVariable [QGVAR(buddy), objNull]) isEqualTo _target}},{},[], [0,0,0], _range] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 0, ["ACE_MainActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
|
||
_action = [QGVAR(buddy_action_team_remove), _labelRemove, "", { | ||
params ["", "_player"]; | ||
[_player, _player getVariable [QGVAR(buddy), objNull], false] call FUNC(pairBuddies); | ||
},{params ["", "_player"]; ace_interaction_EnableTeamManagement && {!isNull (_player getVariable [QGVAR(buddy), objNull])}},{},[], [0,0,0]] call ace_interact_menu_fnc_createAction; | ||
|
||
["CAManBase", 1, ["ACE_SelfActions", "ACE_TeamManagement"], _action, true] call ace_interact_menu_fnc_addActionToClass; | ||
}; | ||
|
||
player addEventHandler ["Respawn", { | ||
params ["_new", "_old"]; | ||
[_old, _old getVariable [QGVAR(buddy), objNull], false] call FUNC(pairBuddies); | ||
_new setVariable [QGVAR(buddy), nil, true]; | ||
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#define MAJOR 1 | ||
#define MINOR 9 | ||
#define PATCHLVL 0 | ||
#define PATCHLVL 1 | ||
#define BUILD 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#include "script_component.hpp" | ||
params ["_unit"]; | ||
|
||
private _array = (assignedItems _unit) arrayIntersect GVAR(compassWhitelist); | ||
if (_array isNotEqualTo []) exitWith { | ||
_array select 0 | ||
}; | ||
"" | ||
#include "script_component.hpp" | ||
params ["_unit"]; | ||
|
||
private _array = (assignedItems _unit) arrayIntersect GVAR(compassWhitelist); | ||
if (_array isNotEqualTo []) exitWith { | ||
_array select 0 | ||
}; | ||
"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
#include "script_component.hpp" | ||
|
||
params ["", "_fingerPosPrecise"]; | ||
private _player = call CBA_fnc_currentUnit; | ||
if !(GVAR(ace_finger) && // ace finger enabled | ||
{[_player] call EFUNC(main,canHudBeShown) && // hud can be shown | ||
{diwako_dui_enable_compass && // compass is enabled | ||
{ // hide compass when alone enabled and alone in group | ||
(!diwako_dui_compass_hide_alone_group) || {(units group _player) isNotEqualTo [_player] && {diwako_dui_compass_hide_alone_group}} | ||
}}}) exitWith {}; | ||
private _texture = GVAR(pointerPaths) getVariable GVAR(pointer_style); | ||
if (isNil "_texture") exitWith { | ||
[["DUI ACE Pointing", 2], ["No texture return for pointer style"], [GVAR(pointer_style)]] call CBA_fnc_notify; | ||
}; | ||
|
||
private _display = uiNamespace getVariable ["diwako_dui_RscCompass", displayNull]; | ||
if (isNull _display) exitWith {}; | ||
|
||
private _ctrlHeight = pixelH * GVAR(uiPixels); | ||
private _ctrlWidth = pixelW * GVAR(uiPixels); | ||
private _ctrlMiddleX = 0.5 - (pixelW * (GVAR(uiPixels) / 2)); | ||
private _compassY = safeZoneY + safeZoneH - (pixelH * (GVAR(uiPixels) + 10)); | ||
|
||
if (diwako_dui_use_layout_editor) then { | ||
_ctrlMiddleX = profileNamespace getVariable ["igui_diwako_dui_compass_x", _ctrlMiddleX]; | ||
_compassY = profileNamespace getVariable ["igui_diwako_dui_compass_y", _compassY]; | ||
_ctrlWidth = profileNamespace getVariable ["igui_diwako_dui_compass_w", _ctrlWidth]; | ||
_ctrlHeight = profileNamespace getVariable ["igui_diwako_dui_compass_h", _ctrlHeight]; | ||
}; | ||
|
||
private _pointer = _display ctrlCreate ["RscPicture", -1]; | ||
_pointer ctrlSetPosition [ | ||
_ctrlMiddleX, | ||
_compassY, | ||
_ctrlWidth, | ||
_ctrlHeight | ||
]; | ||
_pointer ctrlSetTextColor GVAR(pointer_color); | ||
_pointer ctrlSetText _texture; | ||
_pointer ctrlCommit 0; | ||
|
||
private _setting = [_pointer, _fingerPosPrecise]; | ||
GVAR(pointers) pushBack _setting; | ||
|
||
[{ | ||
ctrlDelete _this; | ||
}, _pointer, 2] call CBA_fnc_waitAndExecute; | ||
#include "script_component.hpp" | ||
|
||
params ["", "_fingerPosPrecise"]; | ||
private _player = call CBA_fnc_currentUnit; | ||
if !(GVAR(ace_finger) && // ace finger enabled | ||
{[_player] call EFUNC(main,canHudBeShown) && // hud can be shown | ||
{diwako_dui_enable_compass && // compass is enabled | ||
{ // hide compass when alone enabled and alone in group | ||
(!diwako_dui_compass_hide_alone_group) || {(units group _player) isNotEqualTo [_player] && {diwako_dui_compass_hide_alone_group}} | ||
}}}) exitWith {}; | ||
private _texture = GVAR(pointerPaths) getVariable GVAR(pointer_style); | ||
if (isNil "_texture") exitWith { | ||
[["DUI ACE Pointing", 2], ["No texture return for pointer style"], [GVAR(pointer_style)]] call CBA_fnc_notify; | ||
}; | ||
|
||
private _display = uiNamespace getVariable ["diwako_dui_RscCompass", displayNull]; | ||
if (isNull _display) exitWith {}; | ||
|
||
private _ctrlHeight = pixelH * GVAR(uiPixels); | ||
private _ctrlWidth = pixelW * GVAR(uiPixels); | ||
private _ctrlMiddleX = 0.5 - (pixelW * (GVAR(uiPixels) / 2)); | ||
private _compassY = safeZoneY + safeZoneH - (pixelH * (GVAR(uiPixels) + 10)); | ||
|
||
if (diwako_dui_use_layout_editor) then { | ||
_ctrlMiddleX = profileNamespace getVariable ["igui_diwako_dui_compass_x", _ctrlMiddleX]; | ||
_compassY = profileNamespace getVariable ["igui_diwako_dui_compass_y", _compassY]; | ||
_ctrlWidth = profileNamespace getVariable ["igui_diwako_dui_compass_w", _ctrlWidth]; | ||
_ctrlHeight = profileNamespace getVariable ["igui_diwako_dui_compass_h", _ctrlHeight]; | ||
}; | ||
|
||
private _pointer = _display ctrlCreate ["RscPicture", -1]; | ||
_pointer ctrlSetPosition [ | ||
_ctrlMiddleX, | ||
_compassY, | ||
_ctrlWidth, | ||
_ctrlHeight | ||
]; | ||
_pointer ctrlSetTextColor GVAR(pointer_color); | ||
_pointer ctrlSetText _texture; | ||
_pointer ctrlCommit 0; | ||
|
||
private _setting = [_pointer, _fingerPosPrecise]; | ||
GVAR(pointers) pushBack _setting; | ||
|
||
[{ | ||
ctrlDelete _this; | ||
}, _pointer, 2] call CBA_fnc_waitAndExecute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
#include "script_component.hpp" | ||
|
||
params ["_grp", "_player"]; | ||
|
||
private _newGrp = + _grp; | ||
private _sqlFirst = GVAR(sqlFirst); | ||
private _sql = objNull; | ||
if (_sqlFirst) then { | ||
_sql = leader _player; | ||
_newGrp = _newGrp - [_sql]; | ||
}; | ||
|
||
private _nameSpace = GVAR(sortNamespace); | ||
|
||
switch (GVAR(sortType)) do { | ||
case "name": { | ||
_newGrp = _newGrp apply { [_x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 1 }; | ||
}; | ||
case "fireteam": { | ||
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 2 }; | ||
}; | ||
case "fireteam2": { | ||
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 3 }; | ||
}; | ||
case "rank": { | ||
_newGrp = _newGrp apply { [_nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 2 }; | ||
}; | ||
case "custom": { | ||
if (!isNil QGVAR(customSort) && {GVAR(customSort) isEqualType {}}) then { | ||
private _customGrp = [_newGrp, _player] call GVAR(customSort); | ||
if (!isNil "_customGrp" && {_customGrp isEqualType [] && { !((_customGrp select 0) isEqualType []) && {(_customGrp select 0) isKindOf "CAManBase"}}}) then { | ||
_newGrp = _customGrp; | ||
} else { | ||
[["DUI Custom Sorting Code", 2], ["Return type is incorrect!"], ["CAManBase object expected as first entry of array!"]] call CBA_fnc_notify; | ||
}; | ||
}; | ||
}; | ||
default { }; | ||
}; | ||
|
||
if (_sqlFirst) then { | ||
_newGrp = [_sql] + _newGrp; | ||
}; | ||
|
||
_newGrp | ||
#include "script_component.hpp" | ||
|
||
params ["_grp", "_player"]; | ||
|
||
private _newGrp = + _grp; | ||
private _sqlFirst = GVAR(sqlFirst); | ||
private _sql = objNull; | ||
if (_sqlFirst) then { | ||
_sql = leader _player; | ||
_newGrp = _newGrp - [_sql]; | ||
}; | ||
|
||
private _nameSpace = GVAR(sortNamespace); | ||
|
||
switch (GVAR(sortType)) do { | ||
case "name": { | ||
_newGrp = _newGrp apply { [_x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 1 }; | ||
}; | ||
case "fireteam": { | ||
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 2 }; | ||
}; | ||
case "fireteam2": { | ||
_newGrp = _newGrp apply { [_nameSpace getVariable [[assignedTeam _x] param [0, "MAIN"], 9999], _nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 3 }; | ||
}; | ||
case "rank": { | ||
_newGrp = _newGrp apply { [_nameSpace getVariable [rank _x, 9999], _x getVariable [QEGVAR(main,customName), name _x], _x] }; | ||
_newGrp sort true; | ||
_newGrp = _newGrp apply { _x select 2 }; | ||
}; | ||
case "custom": { | ||
if (!isNil QGVAR(customSort) && {GVAR(customSort) isEqualType {}}) then { | ||
private _customGrp = [_newGrp, _player] call GVAR(customSort); | ||
if (!isNil "_customGrp" && {_customGrp isEqualType [] && { !((_customGrp select 0) isEqualType []) && {(_customGrp select 0) isKindOf "CAManBase"}}}) then { | ||
_newGrp = _customGrp; | ||
} else { | ||
[["DUI Custom Sorting Code", 2], ["Return type is incorrect!"], ["CAManBase object expected as first entry of array!"]] call CBA_fnc_notify; | ||
}; | ||
}; | ||
}; | ||
default { }; | ||
}; | ||
|
||
if (_sqlFirst) then { | ||
_newGrp = [_sql] + _newGrp; | ||
}; | ||
|
||
_newGrp |