Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitting #1541

Merged
merged 26 commits into from
Jun 26, 2015
Merged

Sitting #1541

Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c3c2fd0
Initial Sitting commit
jonpas Jun 7, 2015
78c9991
Added Polish stringtable
jonpas Jun 7, 2015
eb0541d
Added icons
jonpas Jun 7, 2015
4cea9bd
Added Sitting README.md
jonpas Jun 7, 2015
2104e5b
Optimized condition functions, Removed redundant toLower for animatio…
jonpas Jun 8, 2015
c6b5c70
Added Sitting Settings and Module
jonpas Jun 8, 2015
95ec2ea
Added isNotSitting exception, Renamed sitting QGVAR
jonpas Jun 8, 2015
f9d292e
Missing privates
jonpas Jun 9, 2015
951f9d3
Allow interaction menu while sitting
jonpas Jun 9, 2015
332afb2
Allow certain self-interactions while sitting
jonpas Jun 9, 2015
3e0d4d1
Fixed Rattan Chair position, doAnimation before moving player
jonpas Jun 9, 2015
36d4d01
Adjusted Chair (Plastic) sitting position
jonpas Jun 9, 2015
f1f9ee1
Added module icon, removed comment
jonpas Jun 9, 2015
3a4cd99
Changed setPos to setPosASL for reliability, Fixed module icon name
jonpas Jun 9, 2015
5bfa242
Git hates me
jonpas Jun 9, 2015
51e83ba
Handle kileld and disconnect while sitting
jonpas Jun 9, 2015
4602025
Fixed typo
jonpas Jun 11, 2015
0a71bd6
Restricted sitting rotation
jonpas Jun 11, 2015
491e2a4
Handle handcuffing
jonpas Jun 11, 2015
b974a63
Lowercased function, comment
jonpas Jun 11, 2015
29ce8f6
Merge branch 'master' into sitting
jonpas Jun 13, 2015
254b386
Allowed Kestrel4500 Inside and Sitting
jonpas Jun 13, 2015
1eeca28
Enabled DAGR, Kestrel4500, Laser switching, Mag Repack, Markers, Micr…
jonpas Jun 13, 2015
083d34b
Removed redundant GVAR
jonpas Jun 17, 2015
922e88d
Fixed handcuffing not breaking sitting animation
jonpas Jun 22, 2015
c8c1f76
Macro usage, privates fix
jonpas Jun 26, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/atragmx/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CfgVehicles {
showDisabled = 0;
priority = 2;
icon = PATHTOF(UI\ATRAG_Icon.paa);
exceptions[] = {"notOnMap", "isNotInside"};
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/atragmx/initKeybinds.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
["ACE3 Equipment", QGVAR(ATragMXDialogKey), localize LSTRING(ATragMXDialogKey),
{
// 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 {
closeDialog 0;
false
Expand All @@ -21,7 +21,7 @@ _conditonCode = {
};
_toggleCode = {
// 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 {
closeDialog 0;
};
Expand Down
4 changes: 2 additions & 2 deletions addons/dagr/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class CfgVehicles {
showDisabled = 0;
priority = 0.1;
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
class GVAR(toggle) {
displayName = "Toggle DAGR";
condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem));
statement = QUOTE(call FUNC(toggleOverlay));
showDisabled = 0;
priority = 0.2;
icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa));
exceptions[] = {"notOnMap", "isNotInside"};
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/dagr/initKeybinds.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
["ACE3 Equipment", QGVAR(MenuKey), "Configure DAGR",
{
// 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};

// Statement
Expand All @@ -19,7 +19,7 @@
["ACE3 Equipment", QGVAR(ToggleKey), "Toggle DAGR",
{
// 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};

// Statement
Expand Down
6 changes: 3 additions & 3 deletions addons/explosives/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class CfgVehicles {
displayName = CSTRING(Menu);
condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]));
statement = "";
exceptions[] = {"isNotSwimming", "isNotInside"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
showDisabled = 1;
priority = 4;
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
Expand All @@ -17,7 +17,7 @@ class CfgVehicles {
condition = QUOTE([_player] call FUNC(canDetonate));
statement = "";
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
exceptions[] = {"isNotSwimming", "isNotInside"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
showDisabled = 1;
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
priority = 2;
Expand All @@ -38,7 +38,7 @@ class CfgVehicles {
displayName = CSTRING(cellphone_displayName);
condition = "('ACE_Cellphone' in (items ace_player))";
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
exceptions[] = {"isNotSwimming", "isNotInside"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
showDisabled = 0;
icon = PATHTOF(Data\UI\Cellphone_UI.paa);
priority = 0.8;
Expand Down
4 changes: 2 additions & 2 deletions addons/hearing/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class CfgVehicles {
class ACE_PutInEarplugs {
displayName = CSTRING(EarPlugs_On);
condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} );
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
showDisabled = 0;
priority = 2.5;
Expand All @@ -16,7 +16,7 @@ class CfgVehicles {
class ACE_RemoveEarplugs {
displayName = CSTRING(EarPlugs_Off);
condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) );
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
showDisabled = 0;
priority = 2.5;
Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/XEH_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
{
// 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
[0] call FUNC(keyDown)
},{[0,false] call FUNC(keyUp)},
Expand All @@ -40,7 +40,7 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
{
// 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
[1] call FUNC(keyDown)
},{[1,false] call FUNC(keyUp)},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ _actions = if (_isMan) then {
// Dummy statement so it's not collapsed when there's no available actions
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",
Expand Down
18 changes: 9 additions & 9 deletions addons/interaction/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class CfgVehicles {
class ACE_TeamManagement {
displayName = CSTRING(TeamManagement);
condition = QUOTE(GVAR(EnableTeamManagement));
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = "";
showDisabled = 1;
priority = 3.2;
Expand All @@ -201,7 +201,7 @@ class CfgVehicles {
class ACE_JoinTeamRed {
displayName = CSTRING(JoinTeamRed);
condition = QUOTE(true);
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.4;
Expand All @@ -211,7 +211,7 @@ class CfgVehicles {
class ACE_JoinTeamGreen {
displayName = CSTRING(JoinTeamGreen);
condition = QUOTE(true);
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.3;
Expand All @@ -221,7 +221,7 @@ class CfgVehicles {
class ACE_JoinTeamBlue {
displayName = CSTRING(JoinTeamBlue);
condition = QUOTE(true);
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.2;
Expand All @@ -231,7 +231,7 @@ class CfgVehicles {
class ACE_JoinTeamYellow {
displayName = CSTRING(JoinTeamYellow);
condition = QUOTE(true);
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.1;
Expand All @@ -242,7 +242,7 @@ class CfgVehicles {
class ACE_LeaveTeam {
displayName = CSTRING(LeaveTeam);
condition = QUOTE(assignedTeam _player != 'MAIN');
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
showDisabled = 1;
priority = 2.5;
Expand All @@ -252,7 +252,7 @@ class CfgVehicles {
class ACE_BecomeLeader {
displayName = CSTRING(BecomeLeader);
condition = QUOTE(_this call DFUNC(canBecomeLeader));
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
statement = QUOTE(_this call DFUNC(doBecomeLeader));
showDisabled = 1;
priority = 1.0;
Expand All @@ -262,7 +262,7 @@ class CfgVehicles {
class ACE_LeaveGroup {
displayName = CSTRING(LeaveGroup);
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;);
showDisabled = 1;
priority = 1.2;
Expand Down Expand Up @@ -379,7 +379,7 @@ class CfgVehicles {
class ACE_Equipment {
displayName = CSTRING(Equipment);
condition = QUOTE(true);
exceptions[] = {"isNotInside","notOnMap"};
exceptions[] = {"isNotInside","notOnMap", "isNotSitting"};
statement = "";
showDisabled = 1;
priority = 4.5;
Expand Down
6 changes: 3 additions & 3 deletions addons/kestrel4500/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ class CfgVehicles {
showDisabled = 0;
priority = 0.1;
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
exceptions[] = {"notOnMap"};
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
class GVAR(show) {
displayName = CSTRING(ShowKestrel);
condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay));
statement = QUOTE(call FUNC(displayKestrel));
showDisabled = 0;
priority = 0.2;
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
exceptions[] = {"notOnMap", "isNotInside"};
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
class GVAR(hide) {
displayName = CSTRING(HideKestrel);
Expand All @@ -27,7 +27,7 @@ class CfgVehicles {
showDisabled = 0;
priority = 0.3;
icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa));
exceptions[] = {"notOnMap", "isNotInside"};
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
};
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/kestrel4500/initKeybinds.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
["ACE3 Equipment", QGVAR(KestrelDialogKey), localize LSTRING(KestrelDialogKey),
{
// 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 {
closeDialog 0;
false
Expand All @@ -16,7 +16,7 @@
["ACE3 Equipment", QGVAR(DisplayKestrelKey), localize LSTRING(DisplayKestrelKey),
{
// 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
[] call FUNC(displayKestrel);
Expand Down
2 changes: 1 addition & 1 deletion addons/laserpointer/initKeybinds.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
["ACE3 Weapons", QGVAR(switchLaserLightMode), localize LSTRING(switchLaserLight),
{
// 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
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};

Expand Down
2 changes: 1 addition & 1 deletion addons/magazinerepack/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class CfgVehicles {
class ACE_RepackMagazines {
displayName = CSTRING(RepackMagazines);
condition = QUOTE(true);
exceptions[] = {"isNotInside"};
exceptions[] = {"isNotInside", "isNotSitting"};
insertChildren = QUOTE(_this call FUNC(getMagazineChildren));
priority = -2;
icon = QUOTE(PATHTOF(UI\repack_ca.paa));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXPLODE_2_PVT(_args,_magazineClassname,_lastAmmoCount);
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count");

//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 {
format ["<t align='center'>%1</t><br/>", (localize LSTRING(RepackComplete))];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ _fullMagazineCount = getNumber (_magazineCfg >> "count");
_isBelt = (isNumber (_magazineCfg >> "ACE_isBelt")) && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1};

//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);

Expand Down Expand Up @@ -69,5 +69,5 @@ _totalTime,
{_this call FUNC(magazineRepackFinish)},
(localize LSTRING(RepackingMagazine)),
{_this call FUNC(magazineRepackProgress)},
["isNotInside"]
["isNotInside", "isNotSitting"]
] call EFUNC(common,progressBar);
Loading