mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
commit
241e8acdd9
@ -10,7 +10,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
icon = PATHTOF(UI\ATRAG_Icon.paa);
|
icon = PATHTOF(UI\ATRAG_Icon.paa);
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
if (GVAR(active)) exitWith {
|
if (GVAR(active)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
false
|
false
|
||||||
@ -21,7 +21,7 @@ _conditonCode = {
|
|||||||
};
|
};
|
||||||
_toggleCode = {
|
_toggleCode = {
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
if (GVAR(active)) exitWith {
|
if (GVAR(active)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.1;
|
priority = 0.1;
|
||||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
class GVAR(toggle) {
|
class GVAR(toggle) {
|
||||||
displayName = "Toggle DAGR";
|
displayName = "Toggle DAGR";
|
||||||
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
|
||||||
@ -18,7 +18,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.2;
|
priority = 0.2;
|
||||||
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR",
|
["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
@ -19,7 +19,7 @@
|
|||||||
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
|
@ -6,7 +6,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(Menu);
|
displayName = CSTRING(Menu);
|
||||||
condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]));
|
condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]));
|
||||||
statement = "";
|
statement = "";
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 4;
|
priority = 4;
|
||||||
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
||||||
@ -17,7 +17,7 @@ class CfgVehicles {
|
|||||||
condition = QUOTE([_player] call FUNC(canDetonate));
|
condition = QUOTE([_player] call FUNC(canDetonate));
|
||||||
statement = "";
|
statement = "";
|
||||||
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
|
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
||||||
priority = 2;
|
priority = 2;
|
||||||
@ -38,7 +38,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(cellphone_displayName);
|
displayName = CSTRING(cellphone_displayName);
|
||||||
condition = "('ACE_Cellphone' in (items ace_player))";
|
condition = "('ACE_Cellphone' in (items ace_player))";
|
||||||
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
|
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
|
||||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
icon = PATHTOF(Data\UI\Cellphone_UI.paa);
|
icon = PATHTOF(Data\UI\Cellphone_UI.paa);
|
||||||
priority = 0.8;
|
priority = 0.8;
|
||||||
|
@ -6,7 +6,7 @@ class CfgVehicles {
|
|||||||
class ACE_PutInEarplugs {
|
class ACE_PutInEarplugs {
|
||||||
displayName = CSTRING(EarPlugs_On);
|
displayName = CSTRING(EarPlugs_On);
|
||||||
condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} );
|
condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} );
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2.5;
|
priority = 2.5;
|
||||||
@ -16,7 +16,7 @@ class CfgVehicles {
|
|||||||
class ACE_RemoveEarplugs {
|
class ACE_RemoveEarplugs {
|
||||||
displayName = CSTRING(EarPlugs_Off);
|
displayName = CSTRING(EarPlugs_Off);
|
||||||
condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) );
|
condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) );
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2.5;
|
priority = 2.5;
|
||||||
|
@ -31,7 +31,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
|||||||
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
|
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Statement
|
// Statement
|
||||||
[0] call FUNC(keyDown)
|
[0] call FUNC(keyDown)
|
||||||
},{[0,false] call FUNC(keyUp)},
|
},{[0,false] call FUNC(keyUp)},
|
||||||
@ -40,7 +40,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
|||||||
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
|
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Statement
|
// Statement
|
||||||
[1] call FUNC(keyDown)
|
[1] call FUNC(keyDown)
|
||||||
},{[1,false] call FUNC(keyUp)},
|
},{[1,false] call FUNC(keyUp)},
|
||||||
|
@ -122,7 +122,7 @@ _actions = if (_isMan) then {
|
|||||||
// Dummy statement so it's not collapsed when there's no available actions
|
// Dummy statement so it's not collapsed when there's no available actions
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering"]] call EFUNC(common,canInteractWith)},
|
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)},
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
"Spine3",
|
"Spine3",
|
||||||
|
@ -191,7 +191,7 @@ class CfgVehicles {
|
|||||||
class ACE_TeamManagement {
|
class ACE_TeamManagement {
|
||||||
displayName = CSTRING(TeamManagement);
|
displayName = CSTRING(TeamManagement);
|
||||||
condition = QUOTE(GVAR(EnableTeamManagement));
|
condition = QUOTE(GVAR(EnableTeamManagement));
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = "";
|
statement = "";
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 3.2;
|
priority = 3.2;
|
||||||
@ -201,7 +201,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamRed {
|
class ACE_JoinTeamRed {
|
||||||
displayName = CSTRING(JoinTeamRed);
|
displayName = CSTRING(JoinTeamRed);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.4;
|
priority = 2.4;
|
||||||
@ -211,7 +211,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamGreen {
|
class ACE_JoinTeamGreen {
|
||||||
displayName = CSTRING(JoinTeamGreen);
|
displayName = CSTRING(JoinTeamGreen);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.3;
|
priority = 2.3;
|
||||||
@ -221,7 +221,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamBlue {
|
class ACE_JoinTeamBlue {
|
||||||
displayName = CSTRING(JoinTeamBlue);
|
displayName = CSTRING(JoinTeamBlue);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.2;
|
priority = 2.2;
|
||||||
@ -231,7 +231,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamYellow {
|
class ACE_JoinTeamYellow {
|
||||||
displayName = CSTRING(JoinTeamYellow);
|
displayName = CSTRING(JoinTeamYellow);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.1;
|
priority = 2.1;
|
||||||
@ -242,7 +242,7 @@ class CfgVehicles {
|
|||||||
class ACE_LeaveTeam {
|
class ACE_LeaveTeam {
|
||||||
displayName = CSTRING(LeaveTeam);
|
displayName = CSTRING(LeaveTeam);
|
||||||
condition = QUOTE(assignedTeam _player != 'MAIN');
|
condition = QUOTE(assignedTeam _player != 'MAIN');
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.5;
|
priority = 2.5;
|
||||||
@ -252,7 +252,7 @@ class CfgVehicles {
|
|||||||
class ACE_BecomeLeader {
|
class ACE_BecomeLeader {
|
||||||
displayName = CSTRING(BecomeLeader);
|
displayName = CSTRING(BecomeLeader);
|
||||||
condition = QUOTE(_this call DFUNC(canBecomeLeader));
|
condition = QUOTE(_this call DFUNC(canBecomeLeader));
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE(_this call DFUNC(doBecomeLeader));
|
statement = QUOTE(_this call DFUNC(doBecomeLeader));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 1.0;
|
priority = 1.0;
|
||||||
@ -262,7 +262,7 @@ class CfgVehicles {
|
|||||||
class ACE_LeaveGroup {
|
class ACE_LeaveGroup {
|
||||||
displayName = CSTRING(LeaveGroup);
|
displayName = CSTRING(LeaveGroup);
|
||||||
condition = QUOTE(count (units group _player) > 1);
|
condition = QUOTE(count (units group _player) > 1);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
|
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 1.2;
|
priority = 1.2;
|
||||||
@ -379,7 +379,7 @@ class CfgVehicles {
|
|||||||
class ACE_Equipment {
|
class ACE_Equipment {
|
||||||
displayName = CSTRING(Equipment);
|
displayName = CSTRING(Equipment);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside","notOnMap"};
|
exceptions[] = {"isNotInside","notOnMap", "isNotSitting"};
|
||||||
statement = "";
|
statement = "";
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 4.5;
|
priority = 4.5;
|
||||||
|
@ -10,7 +10,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.1;
|
priority = 0.1;
|
||||||
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
||||||
exceptions[] = {"notOnMap"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
class GVAR(show) {
|
class GVAR(show) {
|
||||||
displayName = CSTRING(ShowKestrel);
|
displayName = CSTRING(ShowKestrel);
|
||||||
condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay));
|
condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay));
|
||||||
@ -18,7 +18,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.2;
|
priority = 0.2;
|
||||||
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
class GVAR(hide) {
|
class GVAR(hide) {
|
||||||
displayName = CSTRING(HideKestrel);
|
displayName = CSTRING(HideKestrel);
|
||||||
@ -27,7 +27,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.3;
|
priority = 0.3;
|
||||||
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
["ACE3 Equipment", QGVAR(KestrelDialogKey), localize LSTRING(KestrelDialogKey),
|
["ACE3 Equipment", QGVAR(KestrelDialogKey), localize LSTRING(KestrelDialogKey),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
if (GVAR(Kestrel4500)) exitWith {
|
if (GVAR(Kestrel4500)) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
false
|
false
|
||||||
@ -16,7 +16,7 @@
|
|||||||
["ACE3 Equipment", QGVAR(DisplayKestrelKey), localize LSTRING(DisplayKestrelKey),
|
["ACE3 Equipment", QGVAR(DisplayKestrelKey), localize LSTRING(DisplayKestrelKey),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[] call FUNC(displayKestrel);
|
[] call FUNC(displayKestrel);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
["ACE3 Weapons", QGVAR(switchLaserLightMode), localize LSTRING(switchLaserLight),
|
["ACE3 Weapons", QGVAR(switchLaserLightMode), localize LSTRING(switchLaserLight),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ class CfgVehicles {
|
|||||||
class ACE_RepackMagazines {
|
class ACE_RepackMagazines {
|
||||||
displayName = CSTRING(RepackMagazines);
|
displayName = CSTRING(RepackMagazines);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
insertChildren = QUOTE(_this call FUNC(getMagazineChildren));
|
insertChildren = QUOTE(_this call FUNC(getMagazineChildren));
|
||||||
priority = -2;
|
priority = -2;
|
||||||
icon = QUOTE(PATHTOF(UI\repack_ca.paa));
|
icon = QUOTE(PATHTOF(UI\repack_ca.paa));
|
||||||
|
@ -26,7 +26,7 @@ EXPLODE_2_PVT(_args,_magazineClassname,_lastAmmoCount);
|
|||||||
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
|
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");
|
||||||
|
|
||||||
//Don't show anything if player can't interact:
|
//Don't show anything if player can't interact:
|
||||||
if (!([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
|
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
|
||||||
|
|
||||||
_structuredOutputText = if (_errorCode == 0) then {
|
_structuredOutputText = if (_errorCode == 0) then {
|
||||||
format ["<t align='center'>%1</t><br/>", (localize LSTRING(RepackComplete))];
|
format ["<t align='center'>%1</t><br/>", (localize LSTRING(RepackComplete))];
|
||||||
|
@ -31,7 +31,7 @@ _fullMagazineCount = getNumber (_magazineCfg >> "count");
|
|||||||
_isBelt = (isNumber (_magazineCfg >> "ACE_isBelt")) && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1};
|
_isBelt = (isNumber (_magazineCfg >> "ACE_isBelt")) && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1};
|
||||||
|
|
||||||
//Check canInteractWith:
|
//Check canInteractWith:
|
||||||
if (!([_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {};
|
if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
|
||||||
|
|
||||||
[_player] call EFUNC(common,goKneeling);
|
[_player] call EFUNC(common,goKneeling);
|
||||||
|
|
||||||
@ -69,5 +69,5 @@ _totalTime,
|
|||||||
{_this call FUNC(magazineRepackFinish)},
|
{_this call FUNC(magazineRepackFinish)},
|
||||||
(localize LSTRING(RepackingMagazine)),
|
(localize LSTRING(RepackingMagazine)),
|
||||||
{_this call FUNC(magazineRepackProgress)},
|
{_this call FUNC(magazineRepackProgress)},
|
||||||
["isNotInside"]
|
["isNotInside", "isNotSitting"]
|
||||||
] call EFUNC(common,progressBar);
|
] call EFUNC(common,progressBar);
|
||||||
|
@ -7,7 +7,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapTools_Menu);
|
displayName = CSTRING(MapTools_Menu);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||||
statement = "";
|
statement = "";
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 100;
|
priority = 100;
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapToolsHide);
|
displayName = CSTRING(MapToolsHide);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 5;
|
priority = 5;
|
||||||
};
|
};
|
||||||
@ -23,7 +23,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapToolsShowNormal);
|
displayName = CSTRING(MapToolsShowNormal);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 4;
|
priority = 4;
|
||||||
};
|
};
|
||||||
@ -31,7 +31,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapToolsShowSmall);
|
displayName = CSTRING(MapToolsShowSmall);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 3;
|
priority = 3;
|
||||||
};
|
};
|
||||||
@ -39,7 +39,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapToolsAlignNorth);
|
displayName = CSTRING(MapToolsAlignNorth);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
};
|
};
|
||||||
@ -47,7 +47,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapToolsAlignCompass);
|
displayName = CSTRING(MapToolsAlignCompass);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 1;
|
priority = 1;
|
||||||
};
|
};
|
||||||
@ -55,7 +55,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapGpsShow);
|
displayName = CSTRING(MapGpsShow);
|
||||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0;
|
priority = 0;
|
||||||
};
|
};
|
||||||
@ -63,7 +63,7 @@ class CfgVehicles {
|
|||||||
displayName = CSTRING(MapGpsHide);
|
displayName = CSTRING(MapGpsHide);
|
||||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0;
|
priority = 0;
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
PARAMS_1(_display);
|
PARAMS_1(_display);
|
||||||
|
|
||||||
//Can't place markers when can't interact
|
//Can't place markers when can't interact
|
||||||
if (!([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {
|
if (!([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {
|
||||||
_display closeDisplay 2; //emulate "Cancel" button
|
_display closeDisplay 2; //emulate "Cancel" button
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ class Medical {
|
|||||||
displayName = CSTRING(Actions_Medical);
|
displayName = CSTRING(Actions_Medical);
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
hotkey = "M";
|
hotkey = "M";
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||||
condition = "true";
|
condition = "true";
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
@ -10,7 +10,7 @@ class Medical {
|
|||||||
class ACE_Head {
|
class ACE_Head {
|
||||||
displayName = CSTRING(Head);
|
displayName = CSTRING(Head);
|
||||||
icon = PATHTOF(UI\icons\medical_cross.paa);
|
icon = PATHTOF(UI\icons\medical_cross.paa);
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||||
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
|
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
|
||||||
condition = "true";
|
condition = "true";
|
||||||
@ -79,7 +79,7 @@ class Medical {
|
|||||||
distance = 5.0;
|
distance = 5.0;
|
||||||
condition = "true";
|
condition = "true";
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
||||||
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
|
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
@ -148,7 +148,7 @@ class Medical {
|
|||||||
class ACE_ArmLeft {
|
class ACE_ArmLeft {
|
||||||
displayName = ECSTRING(interaction,ArmLeft);
|
displayName = ECSTRING(interaction,ArmLeft);
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
||||||
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
|
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
|
||||||
condition = "true";
|
condition = "true";
|
||||||
@ -250,7 +250,7 @@ class Medical {
|
|||||||
class ACE_ArmRight {
|
class ACE_ArmRight {
|
||||||
displayName = ECSTRING(interaction,ArmRight);
|
displayName = ECSTRING(interaction,ArmRight);
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
||||||
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
|
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
|
||||||
condition = "true";
|
condition = "true";
|
||||||
@ -348,7 +348,7 @@ class Medical {
|
|||||||
class ACE_LegLeft {
|
class ACE_LegLeft {
|
||||||
displayName = ECSTRING(interaction,LegLeft);
|
displayName = ECSTRING(interaction,LegLeft);
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
||||||
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
|
modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction));
|
||||||
condition = "true";
|
condition = "true";
|
||||||
@ -435,7 +435,7 @@ class Medical {
|
|||||||
class ACE_LegRight {
|
class ACE_LegRight {
|
||||||
displayName = ECSTRING(interaction,LegRight);
|
displayName = ECSTRING(interaction,LegRight);
|
||||||
runOnHover = 1;
|
runOnHover = 1;
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
||||||
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
|
modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction));
|
||||||
condition = "true";
|
condition = "true";
|
||||||
|
@ -9,21 +9,21 @@ class CfgVehicles {
|
|||||||
condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG});
|
condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG});
|
||||||
statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay));
|
statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay));
|
||||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
class GVAR(show) {
|
class GVAR(show) {
|
||||||
//Opens the mini map
|
//Opens the mini map
|
||||||
displayName = CSTRING(show);
|
displayName = CSTRING(show);
|
||||||
condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY});
|
condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY});
|
||||||
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay));
|
||||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
class GVAR(close) {
|
class GVAR(close) {
|
||||||
displayName = CSTRING(closeUnit);
|
displayName = CSTRING(closeUnit);
|
||||||
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
|
condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED);
|
||||||
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
|
statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay));
|
||||||
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,7 @@ _conditonCode = {
|
|||||||
("ACE_microDAGR" in (items ACE_player))
|
("ACE_microDAGR" in (items ACE_player))
|
||||||
};
|
};
|
||||||
_toggleCode = {
|
_toggleCode = {
|
||||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {};
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
[] call FUNC(openDisplay); //toggle display mode
|
[] call FUNC(openDisplay); //toggle display mode
|
||||||
};
|
};
|
||||||
_closeCode = {
|
_closeCode = {
|
||||||
|
@ -26,11 +26,11 @@ case (DISPLAY_MODE_CLOSED): {_returnValue = true}; //Can always close
|
|||||||
case (DISPLAY_MODE_HIDDEN): {_returnValue = true}; //Can always hide
|
case (DISPLAY_MODE_HIDDEN): {_returnValue = true}; //Can always hide
|
||||||
|
|
||||||
case (DISPLAY_MODE_DIALOG): {
|
case (DISPLAY_MODE_DIALOG): {
|
||||||
_returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)};
|
_returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)};
|
||||||
};
|
};
|
||||||
case (DISPLAY_MODE_DISPLAY): {
|
case (DISPLAY_MODE_DISPLAY): {
|
||||||
//Can't have minimap up while zoomed in
|
//Can't have minimap up while zoomed in
|
||||||
_returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)};
|
_returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ class CfgVehicles {
|
|||||||
statement = QUOTE(_this call FUNC(rangeTableOpen));
|
statement = QUOTE(_this call FUNC(rangeTableOpen));
|
||||||
priority = 0;
|
priority = 0;
|
||||||
icon = QUOTE(PATHTOF(UI\icon_rangeTable.paa));
|
icon = QUOTE(PATHTOF(UI\icon_rangeTable.paa));
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -40,7 +40,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness),
|
["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
|||||||
["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness),
|
["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class CfgVehicles {
|
|||||||
class ACE_CheckTemperature {
|
class ACE_CheckTemperature {
|
||||||
displayName = CSTRING(CheckTemperatureShort);
|
displayName = CSTRING(CheckTemperatureShort);
|
||||||
condition = "switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (secondaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}";
|
condition = "switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (secondaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}";
|
||||||
exceptions[] = {"isNotInside"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(CheckTemperature); );
|
statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(CheckTemperature); );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 2.9;
|
priority = 2.9;
|
||||||
|
@ -7,7 +7,7 @@ if !(hasInterface) exitWith {};
|
|||||||
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo),
|
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo),
|
||||||
{
|
{
|
||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, (vehicle ACE_player), ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, (vehicle ACE_player), ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon) || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
|
if !([ACE_player] call EFUNC(common,canUseWeapon) || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class CfgVehicles {
|
|||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
priority = 0.2;
|
priority = 0.2;
|
||||||
//icon = QUOTE(PATHTOF(UI\...)); // TODO
|
//icon = QUOTE(PATHTOF(UI\...)); // TODO
|
||||||
exceptions[] = {"notOnMap", "isNotInside"};
|
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
1
addons/sitting/$PBOPREFIX$
Normal file
1
addons/sitting/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
|||||||
|
z\ace\addons\sitting
|
7
addons/sitting/ACE_Settings.hpp
Normal file
7
addons/sitting/ACE_Settings.hpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
class ACE_Settings {
|
||||||
|
class GVAR(enable) {
|
||||||
|
value = 1;
|
||||||
|
typeName = "BOOL";
|
||||||
|
displayName = CSTRING(Enable);
|
||||||
|
};
|
||||||
|
};
|
19
addons/sitting/CfgEventHandlers.hpp
Normal file
19
addons/sitting/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
class Extended_PreInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_PostInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_Killed_EventHandlers {
|
||||||
|
class CAManBase {
|
||||||
|
class ADDON {
|
||||||
|
killed = QUOTE(_this call DFUNC(handleInterrupt));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
128
addons/sitting/CfgVehicles.hpp
Normal file
128
addons/sitting/CfgVehicles.hpp
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
class CfgVehicles {
|
||||||
|
class ACE_Module;
|
||||||
|
class ACE_ModuleSitting: ACE_Module {
|
||||||
|
author = ECSTRING(common,ACETeam);
|
||||||
|
category = "ACE";
|
||||||
|
displayName = CSTRING(ModuleDisplayName);
|
||||||
|
function = QFUNC(moduleInit);
|
||||||
|
scope = 2;
|
||||||
|
isGlobal = 1;
|
||||||
|
icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa));
|
||||||
|
class Arguments {
|
||||||
|
class enable {
|
||||||
|
displayName = CSTRING(Enable);
|
||||||
|
typeName = "BOOL";
|
||||||
|
defaultValue = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class ModuleDescription {
|
||||||
|
description = CSTRING(ModuleDescription);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Man;
|
||||||
|
class CAManBase: Man {
|
||||||
|
class ACE_SelfActions {
|
||||||
|
class GVAR(Stand) {
|
||||||
|
displayName = CSTRING(Stand);
|
||||||
|
condition = QUOTE(_player call FUNC(canStand));
|
||||||
|
exceptions[] = {"isNotSitting"};
|
||||||
|
statement = QUOTE(_player call FUNC(stand));
|
||||||
|
priority = 0;
|
||||||
|
icon = PATHTOF(UI\stand_ca.paa);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MACRO_SEAT_ACTION \
|
||||||
|
class ACE_Actions { \
|
||||||
|
class ACE_MainActions { \
|
||||||
|
displayName = ECSTRING(interaction,MainAction); \
|
||||||
|
selection = ""; \
|
||||||
|
distance = 1.25; \
|
||||||
|
condition = "true"; \
|
||||||
|
class GVAR(Sit) { \
|
||||||
|
displayName = CSTRING(Sit); \
|
||||||
|
condition = QUOTE(_this call FUNC(canSit)); \
|
||||||
|
statement = QUOTE(_this call FUNC(sit)); \
|
||||||
|
showDisabled = 0; \
|
||||||
|
priority = 0; \
|
||||||
|
icon = PATHTOF(UI\sit_ca.paa); \
|
||||||
|
}; \
|
||||||
|
}; \
|
||||||
|
};
|
||||||
|
|
||||||
|
class ThingX;
|
||||||
|
// Folding Chair
|
||||||
|
class Land_CampingChair_V1_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, -0.1, -0.45};
|
||||||
|
GVAR(sitRotation) = 10;
|
||||||
|
};
|
||||||
|
// Camping Chair
|
||||||
|
class Land_CampingChair_V2_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, -0.1, -0.45};
|
||||||
|
GVAR(sitRotation) = 45;
|
||||||
|
};
|
||||||
|
// Chair (Plastic)
|
||||||
|
class Land_ChairPlastic_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 90;
|
||||||
|
GVAR(sitPosition[]) = {0, 0, -0.5};
|
||||||
|
GVAR(sitRotation) = 5;
|
||||||
|
};
|
||||||
|
// Chair (Wooden)
|
||||||
|
class Land_ChairWood_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, -0.05, 0};
|
||||||
|
GVAR(sitRotation) = 75;
|
||||||
|
};
|
||||||
|
// Office Chair
|
||||||
|
class Land_OfficeChair_01_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, 0, -0.6};
|
||||||
|
GVAR(sitRotation) = 15;
|
||||||
|
};
|
||||||
|
// Rattan Chair
|
||||||
|
class Land_RattanChair_01_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
|
||||||
|
GVAR(sitRotation) = 2;
|
||||||
|
};
|
||||||
|
// Field Toilet
|
||||||
|
class Land_FieldToilet_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, 0.75, -1.1};
|
||||||
|
GVAR(sitRotation) = 10;
|
||||||
|
};
|
||||||
|
// Toiletbox
|
||||||
|
class Land_ToiletBox_F: ThingX {
|
||||||
|
XEH_ENABLED;
|
||||||
|
MACRO_SEAT_ACTION
|
||||||
|
GVAR(canSit) = 1;
|
||||||
|
GVAR(sitDirection) = 180;
|
||||||
|
GVAR(sitPosition[]) = {0, 0.75, -1.1};
|
||||||
|
GVAR(sitRotation) = 10;
|
||||||
|
};
|
||||||
|
};
|
10
addons/sitting/README.md
Normal file
10
addons/sitting/README.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
ace_sitting
|
||||||
|
===============
|
||||||
|
|
||||||
|
The Sitting module introduces ability to sit on different chairs and toilets.
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
The people responsible for merging changes to this component or answering potential questions.
|
||||||
|
|
||||||
|
- [Jonpas] (https://github.com/jonpas)
|
BIN
addons/sitting/UI/Icon_Module_Sitting_ca.paa
Normal file
BIN
addons/sitting/UI/Icon_Module_Sitting_ca.paa
Normal file
Binary file not shown.
BIN
addons/sitting/UI/sit_ca.paa
Normal file
BIN
addons/sitting/UI/sit_ca.paa
Normal file
Binary file not shown.
BIN
addons/sitting/UI/stand_ca.paa
Normal file
BIN
addons/sitting/UI/stand_ca.paa
Normal file
Binary file not shown.
12
addons/sitting/XEH_clientInit.sqf
Normal file
12
addons/sitting/XEH_clientInit.sqf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
// Exit on Headless
|
||||||
|
if !(hasInterface) exitWith {};
|
||||||
|
|
||||||
|
// Add interaction menu exception
|
||||||
|
["isNotSitting", {!((_this select 0) getVariable [QGVAR(isSitting), false])}] call EFUNC(common,addCanInteractWithCondition);
|
||||||
|
|
||||||
|
// Handle interruptions
|
||||||
|
["medical_onUnconscious", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
||||||
|
["SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
||||||
|
["SetSurrendered", {_this call DFUNC(handleInterrupt)}] call EFUNC(common,addEventhandler);
|
13
addons/sitting/XEH_preInit.sqf
Normal file
13
addons/sitting/XEH_preInit.sqf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(canSit);
|
||||||
|
PREP(canStand);
|
||||||
|
PREP(getRandomAnimation);
|
||||||
|
PREP(handleInterrupt);
|
||||||
|
PREP(moduleInit);
|
||||||
|
PREP(sit);
|
||||||
|
PREP(stand);
|
||||||
|
|
||||||
|
ADDON = true;
|
17
addons/sitting/config.cpp
Normal file
17
addons/sitting/config.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"ace_interaction"};
|
||||||
|
author[] = {"Jonpas"};
|
||||||
|
authorUrl = "https://github.com/jonpas";
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgEventHandlers.hpp"
|
||||||
|
#include "ACE_Settings.hpp"
|
||||||
|
#include "CfgVehicles.hpp"
|
22
addons/sitting/functions/fnc_canSit.sqf
Normal file
22
addons/sitting/functions/fnc_canSit.sqf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Check if the player can sit down.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Seat <OBJECT>
|
||||||
|
* 1: Player <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Can Sit Down <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [seat, player] call ace_sitting_fnc_canSit;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_2(_seat,_player);
|
||||||
|
|
||||||
|
// Sitting enabled, is seat object and not occupied
|
||||||
|
(GVAR(enable) && {getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {isNil{_seat getVariable QGVAR(seatOccupied)}})
|
21
addons/sitting/functions/fnc_canStand.sqf
Normal file
21
addons/sitting/functions/fnc_canStand.sqf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Check if the player can stand up (is in sitting position).
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Player <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Can Stand Up <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* player call ace_sitting_fnc_canStand;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_1(_player);
|
||||||
|
|
||||||
|
// Sitting
|
||||||
|
(_player getVariable [QGVAR(isSitting),false])
|
49
addons/sitting/functions/fnc_getRandomAnimation.sqf
Normal file
49
addons/sitting/functions/fnc_getRandomAnimation.sqf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Gets a random animations from the list.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Random Animation <STRING>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* _animation = call ace_sitting_fnc_getRandomAnimation;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_animations"];
|
||||||
|
|
||||||
|
// Animations Pool
|
||||||
|
_animations = [
|
||||||
|
"HubSittingChairUA_idle1",
|
||||||
|
"HubSittingChairUA_idle2",
|
||||||
|
"HubSittingChairUA_idle3",
|
||||||
|
"HubSittingChairUA_move1",
|
||||||
|
"HubSittingChairUB_idle1",
|
||||||
|
"HubSittingChairUB_idle2",
|
||||||
|
"HubSittingChairUB_idle3",
|
||||||
|
"HubSittingChairUB_move1",
|
||||||
|
"HubSittingChairUC_idle1",
|
||||||
|
"HubSittingChairUC_idle2",
|
||||||
|
"HubSittingChairUC_idle3",
|
||||||
|
"HubSittingChairUC_move1",
|
||||||
|
"HubSittingChairA_idle1",
|
||||||
|
"HubSittingChairA_idle2",
|
||||||
|
"HubSittingChairA_idle3",
|
||||||
|
"HubSittingChairA_move1",
|
||||||
|
"HubSittingChairB_idle1",
|
||||||
|
"HubSittingChairB_idle2",
|
||||||
|
"HubSittingChairB_idle3",
|
||||||
|
"HubSittingChairB_move1",
|
||||||
|
"HubSittingChairC_idle1",
|
||||||
|
"HubSittingChairC_idle2",
|
||||||
|
"HubSittingChairC_idle3",
|
||||||
|
"HubSittingChairC_move1"
|
||||||
|
];
|
||||||
|
|
||||||
|
// Select random animation
|
||||||
|
(_animations select (floor (random (count _animations))))
|
22
addons/sitting/functions/fnc_handleInterrupt.sqf
Normal file
22
addons/sitting/functions/fnc_handleInterrupt.sqf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Handles interruptions of sitting, like killed or unconsciousness.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Player <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call ace_sitting_fnc_handleInterrupt;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_1(_player);
|
||||||
|
|
||||||
|
if (_player getVariable [QGVAR(isSitting), false]) then {
|
||||||
|
[_player] call FUNC(stand);
|
||||||
|
};
|
21
addons/sitting/functions/fnc_moduleInit.sqf
Normal file
21
addons/sitting/functions/fnc_moduleInit.sqf
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Initializes the Sitting module.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Whatever the module provides.
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if !(isServer) exitWith {};
|
||||||
|
|
||||||
|
PARAMS_3(_logic,_units,_activated);
|
||||||
|
|
||||||
|
if !(_activated) exitWith {};
|
||||||
|
|
||||||
|
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
|
diag_log text "[ACE]: Sitting Module Initialized.";
|
63
addons/sitting/functions/fnc_sit.sqf
Normal file
63
addons/sitting/functions/fnc_sit.sqf
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Sits down the player.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Seat <OBJECT>
|
||||||
|
* 1: Player <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [seat, player] call ace_sitting_fnc_sit;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_sitDirectionVisual"];
|
||||||
|
|
||||||
|
PARAMS_2(_seat,_player);
|
||||||
|
|
||||||
|
// Set global variable for standing up
|
||||||
|
GVAR(seat) = _seat;
|
||||||
|
|
||||||
|
// Overwrite weird position, because Arma decides to set it differently based on current animation/stance...
|
||||||
|
_player switchMove "amovpknlmstpsraswrfldnon";
|
||||||
|
|
||||||
|
// Read config
|
||||||
|
_configFile = configFile >> "CfgVehicles" >> typeOf _seat;
|
||||||
|
_sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection));
|
||||||
|
_sitPosition = getArray (_configFile >> QGVAR(sitPosition));
|
||||||
|
_sitRotation = if (isNumber (_configFile >> QGVAR(sitRotation))) then {getNumber (_configFile >> QGVAR(sitRotation))} else {45}; // Apply default if config entry not present
|
||||||
|
|
||||||
|
// Get random animation and perform it (before moving player to ensure correct placement)
|
||||||
|
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
|
// Set direction and position
|
||||||
|
_player setDir _sitDirection;
|
||||||
|
_player setPosASL (_seat modelToWorld _sitPosition) call EFUNC(common,positionToASL);
|
||||||
|
|
||||||
|
// Set variables
|
||||||
|
_player setVariable [QGVAR(isSitting), true];
|
||||||
|
_seat setVariable [QGVAR(seatOccupied), true, true]; // To prevent multiple people sitting on one seat
|
||||||
|
|
||||||
|
// Add rotation control PFH
|
||||||
|
_sitDirectionVisual = getDirVisual _player; // Needed for precision and issues with using above directly
|
||||||
|
[{
|
||||||
|
EXPLODE_3_PVT(_this select 0,_player,_sitDirectionVisual,_sitRotation);
|
||||||
|
|
||||||
|
// Remove PFH if not sitting any more
|
||||||
|
if !(_player getVariable [QGVAR(isSitting), false]) exitWith {
|
||||||
|
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set direction to boundary when passing it
|
||||||
|
if (getDir _player > _sitDirectionVisual + _sitRotation) exitWith {
|
||||||
|
_player setDir (_sitDirectionVisual + _sitRotation);
|
||||||
|
};
|
||||||
|
if (getDir _player < _sitDirectionVisual - _sitRotation) exitWith {
|
||||||
|
_player setDir (_sitDirectionVisual - _sitRotation);
|
||||||
|
};
|
||||||
|
}, 0, [_player, _sitDirectionVisual, _sitRotation]] call cba_fnc_addPerFrameHandler;
|
26
addons/sitting/functions/fnc_stand.sqf
Normal file
26
addons/sitting/functions/fnc_stand.sqf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Author: Jonpas
|
||||||
|
* Stands up the player.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* Player <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* player call ace_sitting_fnc_stand;
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_1(_player);
|
||||||
|
|
||||||
|
// Restore animation
|
||||||
|
[_player, "", 2] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
|
// Set variables to nil
|
||||||
|
_player setVariable [QGVAR(isSitting), nil];
|
||||||
|
GVAR(seat) setVariable [QGVAR(seatOccupied), nil, true];
|
||||||
|
GVAR(seat) = nil;
|
1
addons/sitting/functions/script_component.hpp
Normal file
1
addons/sitting/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include "\z\ace\addons\sitting\script_component.hpp"
|
12
addons/sitting/script_component.hpp
Normal file
12
addons/sitting/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define COMPONENT sitting
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_SITTING
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_SETTINGS_SITTING
|
||||||
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_SITTING
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
22
addons/sitting/stringtable.xml
Normal file
22
addons/sitting/stringtable.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project name="ACE">
|
||||||
|
<Package name="Sitting">
|
||||||
|
<Key ID="STR_ACE_Sitting_Sit">
|
||||||
|
<English>Sit Down</English>
|
||||||
|
<Polish>Usiądź</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Sitting_Stand">
|
||||||
|
<English>Stand Up</English>
|
||||||
|
<Polish>Wstań</Polish>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Sitting_Enable">
|
||||||
|
<English>Enable Sitting</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Sitting_ModuleDisplayName">
|
||||||
|
<English>Sitting</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Sitting_ModuleDescription">
|
||||||
|
<English>This module allows you to disable the ability to sit on chairs and toilets.</English>
|
||||||
|
</Key>
|
||||||
|
</Package>
|
||||||
|
</Project>
|
Binary file not shown.
BIN
extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png
Normal file
BIN
extras/assets/icons/png/Icon_Module/Icons_Module_Sitting_ca.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
Loading…
Reference in New Issue
Block a user