Merge branch 'master' into virtualExplosivesPlace

This commit is contained in:
PabstMirror
2015-08-09 13:45:51 -05:00
258 changed files with 3486 additions and 861 deletions

View File

@ -107,3 +107,4 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Winter <simon@agius-muscat.net> Winter <simon@agius-muscat.net>
zGuba zGuba
Drill <drill87@gmail.com> Drill <drill87@gmail.com>
MikeMatrix <m.braun92@gmail.com>

View File

@ -7,7 +7,7 @@
<img src="https://img.shields.io/badge/Version-3.2.1-blue.svg" <img src="https://img.shields.io/badge/Version-3.2.1-blue.svg"
alt="ACE version"> alt="ACE version">
</a> </a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.2.0/ace3_3.2.1.zip"> <a href="https://github.com/acemod/ACE3/releases/download/v3.2.1/ace3_3.2.1.zip">
<img src="http://img.shields.io/badge/Download-56.5_MB-green.svg" <img src="http://img.shields.io/badge/Download-56.5_MB-green.svg"
alt="ACE download"> alt="ACE download">
</a> </a>

View File

@ -17,10 +17,10 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"]; private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
params ["_attachToVehicle","_unit","_args"];
PARAMS_3(_attachToVehicle,_unit,_args); _args params [["_itemClassname","", [""]]];
_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam; TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
//Sanity Check (_unit has item in inventory, not over attach limit) //Sanity Check (_unit has item in inventory, not over attach limit)
if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");}; if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");};
@ -69,9 +69,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
[{ [{
private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"]; private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
params ["_args","_idPFH"];
PARAMS_2(_args,_pfID); _args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"];
EXPLODE_6_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_actionID);
_virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]); _virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
if (cameraView == "EXTERNAL") then { if (cameraView == "EXTERNAL") then {
@ -88,7 +87,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} || {!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then { {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
[_pfID] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus); [_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
[] call EFUNC(interaction,hideMouseHint); [] call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);

View File

@ -17,14 +17,14 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_3(_attachToVehicle,_player,_args); private ["_attachLimit", "_attachedObjects","_playerPos"];
params ["_attachToVehicle","_player","_args"];
_args params [["_itemClassname","", [""]]];
TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"];
_itemName = [_args, 0, ""] call CBA_fnc_defaultParam;
_attachLimit = [6, 1] select (_player == _attachToVehicle); _attachLimit = [6, 1] select (_player == _attachToVehicle);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); _playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"));
(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemName in ((itemsWithMagazines _player) + [""])}; (canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemClassname in ((itemsWithMagazines _player) + [""])};

View File

@ -16,9 +16,9 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_attachToVehicle,_unit);
private ["_attachedObjects", "_inRange"]; private ["_attachedObjects", "_inRange"];
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];

View File

@ -16,15 +16,16 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_attachToVehicle,_unit); private ["_attachedObjects", "_attachedItems", "_itemDisplayName",
"_attachedObject", "_attachedIndex", "_itemName", "_minDistance",
private ["_attachedObjects", "_attachedItems", "_itemDisplayName"]; "_unitPos", "_objectPos"
];
params ["_attachToVehicle","_unit"],
TRACE_2("params",_attachToVehicle,_unit);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []]; _attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []];
private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"];
_attachedObject = objNull; _attachedObject = objNull;
_attachedIndex = -1; _attachedIndex = -1;
_itemName = ""; _itemName = "";

View File

@ -18,7 +18,8 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"]; private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
PARAMS_2(_target,_player); params ["_target","_player"];
TRACE_2("params",_target,_player);
_listed = []; _listed = [];
_actions = []; _actions = [];
@ -30,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then { if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName"); _displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture"); _picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target]; _actions pushBack [_action, [], _target];
}; };
}; };
@ -43,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then { if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName"); _displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture"); _picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target]; _actions pushBack [_action, [], _target];
}; };
}; };

View File

@ -27,7 +27,8 @@
private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
PARAMS_6(_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition); params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"];
TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition);
_startingOffset = _attachToVehicle worldToModel _startingPosition; _startingOffset = _attachToVehicle worldToModel _startingPosition;

View File

@ -1,9 +1,9 @@
// by commy2 // by commy2
#include "script_component.hpp" #include "script_component.hpp"
private ["_wall", "_paper"]; private "_paper";
_wall = _this select 0; params ["_wall"];
if (local _wall) then { if (local _wall) then {
_paper = "UserTexture_1x2_F" createVehicle position _wall; _paper = "UserTexture_1x2_F" createVehicle position _wall;

View File

@ -5,6 +5,13 @@ class ACE_Settings {
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(requireSurrender) {
displayName = CSTRING(ModuleSettings_requireSurrender_name);
description = CSTRING(ModuleSettings_requireSurrender_description);
typeName = "SCALAR";
values[] = {ECSTRING(common,Disabled), CSTRING(SurrenderOnly), CSTRING(SurrenderOrNoWeapon)};
value = 1;
};
class GVAR(allowSurrender) { class GVAR(allowSurrender) {
displayName = CSTRING(ModuleSettings_allowSurrender_name); displayName = CSTRING(ModuleSettings_allowSurrender_name);
description = CSTRING(ModuleSettings_allowSurrender_description); description = CSTRING(ModuleSettings_allowSurrender_description);

View File

@ -189,6 +189,26 @@ class CfgVehicles {
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 1; defaultValue = 1;
}; };
class requireSurrender {
displayName = CSTRING(ModuleSettings_allowSurrender_name);
description = CSTRING(ModuleSettings_allowSurrender_description);
typeName = "NUMBER";
class values {
class disable {
name = ECSTRING(common,No);
value = 0;
};
class Surrender {
name = CSTRING(SurrenderOnly);
value = 1;
default = 1;
};
class SurrenderOrNoWeapon {
name = CSTRING(SurrenderOrNoWeapon);
value = 2;
};
};
};
}; };
class ModuleDescription: ModuleDescription { class ModuleDescription: ModuleDescription {
description = CSTRING(ModuleSettings_Description); description = CSTRING(ModuleSettings_Description);

View File

@ -16,11 +16,11 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
//Check sides, Player has cableTie, target is alive and not already handcuffed //Check sides, Player has cableTie, target is alive and not already handcuffed
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
("ACE_CableTie" in (items _unit)) && ("ACE_CableTie" in (items _unit)) &&
{alive _target} && {alive _target} &&
{!(_target getVariable [QGVAR(isHandcuffed), false])} {!(_target getVariable [QGVAR(isHandcuffed), false])} &&
(GVAR(requireSurrender) == 0 || ((_target getVariable [QGVAR(isSurrendering), false]) || (currentWeapon _target == "" && GVAR(requireSurrender) == 2)))

View File

@ -16,8 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
//Alive, handcuffed, not being escored, and not unconscious //Alive, handcuffed, not being escored, and not unconscious
(_target getVariable [QGVAR(isHandcuffed), false]) && (_target getVariable [QGVAR(isHandcuffed), false]) &&

View File

@ -16,7 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
_target getVariable [QGVAR(isHandcuffed), false] _target getVariable [QGVAR(isHandcuffed), false]
|| {_target getVariable [QGVAR(isSurrendering), false]} || {_target getVariable [QGVAR(isSurrendering), false]}

View File

@ -18,8 +18,7 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_objects"]; private ["_objects"];
params ["_unit", "_target","_vehicle"];
PARAMS_3(_unit,_target,_vehicle);
if (isNull _target) then { if (isNull _target) then {
_objects = attachedObjects _unit; _objects = attachedObjects _unit;

View File

@ -16,7 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
//Unit is handcuffed and not currently being escorted //Unit is handcuffed and not currently being escorted
_target getVariable [QGVAR(isHandcuffed), false] && _target getVariable [QGVAR(isHandcuffed), false] &&

View File

@ -16,8 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_unit); params ["_unit", ["_target", objNull]];
DEFAULT_PARAM(1,_target,objNull);
if (isNull _target) then { if (isNull _target) then {
_target = _unit getVariable [QGVAR(escortedUnit), objNull]; _target = _unit getVariable [QGVAR(escortedUnit), objNull];

View File

@ -16,12 +16,12 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_newSurrenderState);
private "_returnValue"; private "_returnValue";
params ["_unit", "_newSurrenderState"];
_returnValue = if (_newSurrenderState) then { _returnValue = if (_newSurrenderState) then {
//no weapon equiped AND not currently surrendering and //no weapon equiped AND not currently surrendering and
GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])} GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])}
} else { } else {
//is Surrendering //is Surrendering

View File

@ -18,6 +18,6 @@
private ["_cargo"]; private ["_cargo"];
PARAMS_2(_player,_unit); params ["_player", "_unit"];
((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]} ((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}

View File

@ -16,10 +16,11 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target);
_unit removeItem "ACE_CableTie"; params ["_unit", "_target"];
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10]; playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent); ["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
_unit removeItem "ACE_CableTie";

View File

@ -17,7 +17,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_3(_unit,_target,_state); params ["_unit", "_target","_state"];
if (_state) then { if (_state) then {
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {}; if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};

View File

@ -19,6 +19,7 @@
private ["_weapon", "_listedItemClasses", "_actions", "_allGear"]; private ["_weapon", "_listedItemClasses", "_actions", "_allGear"];
PARAMS_2(_player,_unit); PARAMS_2(_player,_unit);
params ["_player", "_unit"];
_weapon = currentWeapon _player; _weapon = currentWeapon _player;
if (_weapon == primaryWeapon _player && {_weapon != ""}) then { if (_weapon == primaryWeapon _player && {_weapon != ""}) then {

View File

@ -17,9 +17,10 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_3(_unit,_target,_vehicle);
private "_objects"; private "_objects";
params ["_unit", "_target","_vehicle"];
if (isNull _target) then { if (isNull _target) then {
_objects = attachedObjects _unit; _objects = attachedObjects _unit;
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter); _objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);

View File

@ -15,6 +15,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent); ["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);

View File

@ -16,6 +16,6 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_target); params ["_unit", "_target"];
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent); ["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);

View File

@ -17,7 +17,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_3(_vehicle,_dontcare,_unit); params ["_vehicle", "_dontcare","_unit"];
if (local _unit) then { if (local _unit) then {
if (_unit getVariable [QGVAR(isEscorting), false]) then { if (_unit getVariable [QGVAR(isEscorting), false]) then {

View File

@ -17,7 +17,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_3(_vehicle,_dontcare,_unit); params ["_vehicle", "_dontcare","_unit"];
if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then { if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
private ["_cargoIndex"]; private ["_cargoIndex"];

View File

@ -15,7 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_oldUnit); params ["_oldUnit"];
if (!local _oldUnit) exitWith {}; if (!local _oldUnit) exitWith {};

View File

@ -16,7 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_2_PVT(_this,_unit,_isUnconc); params ["_unit","_isUnconc"];
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};

View File

@ -16,7 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_newUnit,_oldUnit); params ["_newUnit","_oldUnit"];
//set showHUD based on new unit status: //set showHUD based on new unit status:
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then { if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {

View File

@ -16,7 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_dead); params ["_unit","_dead"];
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};

View File

@ -15,7 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_unit); params ["_unit"];
// prevent players from throwing grenades (added to all units) // prevent players from throwing grenades (added to all units)
[_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler); [_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler);

View File

@ -17,7 +17,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_zeusIsOpen); params ["_unit","_zeusIsOpen"];
//set showHUD based on unit status: //set showHUD based on unit status:
if (!_zeusIsOpen) then { if (!_zeusIsOpen) then {

View File

@ -13,7 +13,8 @@
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_logic); params ["_logic"];
[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(requireSurrender), "requireSurrender"] call EFUNC(common,readSettingFromModule);

View File

@ -17,9 +17,10 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_3(_logic,_units,_activated);
private ["_bisMouseOver", "_mouseOverObject"]; private ["_bisMouseOver", "_mouseOverObject"];
params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {}; if (!_activated) exitWith {};
if (local _logic) then { if (local _logic) then {

View File

@ -16,8 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_state); params ["_unit","_state"];
if (!local _unit) exitwith { if (!local _unit) exitwith {
ERROR("running setHandcuffed on remote unit"); ERROR("running setHandcuffed on remote unit");
@ -43,7 +42,7 @@ if (_state) then {
// fix anim on mission start (should work on dedicated servers) // fix anim on mission start (should work on dedicated servers)
[{ [{
PARAMS_1(_unit); params ["_unit"];
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then { if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
[_unit] call EFUNC(common,fixLoweredRifleAnimation); [_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);

View File

@ -16,8 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_unit,_state); params ["_unit","_state"];
if (!local _unit) exitwith { if (!local _unit) exitwith {
ERROR("running surrender on remote unit"); ERROR("running surrender on remote unit");

View File

@ -16,10 +16,10 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_2(_target,_vehicle);
private ["_cargoIndex"]; private ["_cargoIndex"];
params ["_target","_vehicle"];
_target moveInCargo _vehicle; _target moveInCargo _vehicle;
_target assignAsCargo _vehicle; _target assignAsCargo _vehicle;
_cargoIndex = _vehicle getCargoIndex _target; _cargoIndex = _vehicle getCargoIndex _target;

View File

@ -15,8 +15,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_unit); params ["_unit"];
_unit setVariable [QGVAR(CargoIndex), -1, true]; _unit setVariable [QGVAR(CargoIndex), -1, true];
moveOut _unit; moveOut _unit;

View File

@ -221,5 +221,17 @@
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German> <German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German>
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese> <Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
</Key> </Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_name">
<English>Require surrendering</English>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_description">
<English>Require Players to surrender before they can be arrested</English>
</Key>
<Key ID="STR_ACE_Captives_SurrenderOnly">
<English>Surrendering only</English>
</Key>
<Key ID="STR_ACE_Captives_SurrenderOrNoWeapon">
<English>Surrendering or No weapon</English>
</Key>
</Package> </Package>
</Project> </Project>

View File

@ -118,8 +118,9 @@ if(!isServer) then {
}; };
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler); ["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler); ["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler; if (isServer) then {
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
};
call FUNC(checkFiles); call FUNC(checkFiles);
@ -340,6 +341,14 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
GVAR(deviceKeyHandlingArray) = []; GVAR(deviceKeyHandlingArray) = [];
GVAR(deviceKeyCurrentIndex) = -1; GVAR(deviceKeyCurrentIndex) = -1;
// Register localizations for the Keybinding categories
["ACE3 Equipment", localize LSTRING(ACEKeybindCategoryEquipment)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Common", localize LSTRING(ACEKeybindCategoryCommon)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Weapons", localize LSTRING(ACEKeybindCategoryWeapons)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Movement", localize LSTRING(ACEKeybindCategoryMovement)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Scope Adjustment", localize LSTRING(ACEKeybindCategoryScopeAdjustment)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Vehicles", localize LSTRING(ACEKeybindCategoryVehicles)] call cba_fnc_registerKeybindModPrettyName;
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"), ["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
{ {
[] call FUNC(deviceKeyFindValidIndex); [] call FUNC(deviceKeyFindValidIndex);

View File

@ -65,7 +65,8 @@ if (isNil _name) then {
localizedDescription, localizedDescription,
possibleValues, possibleValues,
isForced, isForced,
defaultValue defaultValue,
category
];*/ ];*/
_settingData = [ _settingData = [
_name, _name,
@ -75,7 +76,8 @@ if (isNil _name) then {
getText (_optionEntry >> "description"), getText (_optionEntry >> "description"),
getArray (_optionEntry >> "values"), getArray (_optionEntry >> "values"),
getNumber (_optionEntry >> "force") > 0, getNumber (_optionEntry >> "force") > 0,
_value _value,
getText (_optionEntry >> "category")
]; ];
//Strings in the values array won't be localized from the config, so just do that now: //Strings in the values array won't be localized from the config, so just do that now:

View File

@ -30,14 +30,14 @@ if (_vehicle isKindOf "Ship" ) then {
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition); _emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ]; _emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else { } else {
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false}; if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle); TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]); _emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
}; };
}; };
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle); TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid vehicle state. Either moving or Not close enough on the ground. %1", getPos _vehicle]; false }; if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]; false };
diag_log str _emptyPos; diag_log str _emptyPos;

View File

@ -598,5 +598,86 @@
<Polish>Następne urządzenie podręczne</Polish> <Polish>Następne urządzenie podręczne</Polish>
<Czech>Procházet ruční zařízení</Czech> <Czech>Procházet ruční zařízení</Czech>
</Key> </Key>
<Key ID="STR_ACE_Common_Disabled">
<English>Disabled</English>
<Czech>Zakázáno</Czech>
<French>Non</French>
<German>Deaktiviert</German>
<Italian>Disattivato</Italian>
<Polish>Wyłączone</Polish>
<Portuguese>Desativado</Portuguese>
<Russian>Откл.</Russian>
<Spanish>Desactivado</Spanish>
</Key>
<Key ID="STR_ACE_Common_Enabled">
<English>Enabled</English>
<Czech>Zapnuto</Czech>
<French>Oui</French>
<German>Aktiviert</German>
<Italian>Attivato</Italian>
<Polish>Włączone</Polish>
<Portuguese>Ativado</Portuguese>
<Russian>Вкл.</Russian>
<Spanish>Activado</Spanish>
</Key>
<Key ID="STR_ACE_Common_Yes">
<English>Yes</English>
<German>Ja</German>
<Spanish>Si</Spanish>
<Polish>Tak</Polish>
<Czech>Ano</Czech>
<French>Oui</French>
<Russian>Да</Russian>
<Hungarian>Igen</Hungarian>
<Portuguese>Sim</Portuguese>
<Italian>Si</Italian>
</Key>
<Key ID="STR_ACE_Common_No">
<English>No</English>
<German>Nein</German>
<Spanish>No</Spanish>
<Polish>Nie</Polish>
<Czech>Ne</Czech>
<French>Non</French>
<Russian>Нет</Russian>
<Hungarian>Nem</Hungarian>
<Portuguese>Não</Portuguese>
<Italian>No</Italian>
</Key>
<Key ID="STR_ACE_Common_VehiclesOnly">
<English>Vehicles only</English>
</Key>
<Key ID="STR_ACE_Common_DoNotForce">
<English>Do Not Force</English>
<Polish>Nie wymuszaj</Polish>
<Spanish>No forzar</Spanish>
<German>Nicht erzwingen</German>
<Czech>Nevynucovat</Czech>
<Portuguese>Não forçar</Portuguese>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryEquipment">
<English>ACE3 Equipment</English>
<Polish>ACE3 Wyposażenie</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryCommon">
<English>ACE3 Common</English>
<Polish>ACE3 Ogólne</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryWeapons">
<English>ACE3 Weapons</English>
<Polish>ACE3 Broń</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryMovement">
<English>ACE3 Movement</English>
<Polish>ACE3 Ruch</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryScopeAdjustment">
<English>ACE3 Scope Adjustment</English>
<Polish>ACE3 Regulacja optyki</Polish>
</Key>
<Key ID="STR_ACE_Common_ACEKeybindCategoryVehicles">
<English>ACE3 Vehicles</English>
<Polish>ACE3 Pojazdy</Polish>
</Key>
</Package> </Package>
</Project> </Project>

View File

@ -123,7 +123,8 @@ class CfgVehicles {
displayName = "$STR_ACE_ROLLWIRE"; displayName = "$STR_ACE_ROLLWIRE";
distance = 4; distance = 4;
condition = "true"; condition = "true";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy)); //wait a frame to handle "Do When releasing action menu key" option:
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
showDisabled = 0; showDisabled = 0;
exceptions[] = {}; exceptions[] = {};
priority = 5; priority = 5;

View File

@ -37,7 +37,7 @@ deleteVehicle _wirecoil;
_unit setVariable [QGVAR(wireDeployed), false]; _unit setVariable [QGVAR(wireDeployed), false];
GVAR(deployPFH) = [{ GVAR(deployPFH) = [{
EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action); EXPLODE_3_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit);
private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"]; private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"];
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL); _posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
@ -73,7 +73,7 @@ GVAR(deployPFH) = [{
{ {
_wireNoGeo animate [_x, _anim]; _wireNoGeo animate [_x, _anim];
} foreach WIRE_FAST; } foreach WIRE_FAST;
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler; }, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint); [localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);

View File

@ -5,6 +5,7 @@ if (!hasInterface) exitWith {};
["inventoryDisplayLoaded", {[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)}] call EFUNC(common,addEventHandler); ["inventoryDisplayLoaded", {[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)}] call EFUNC(common,addEventHandler);
["playerInventoryChanged", { ["playerInventoryChanged", {
[_this select 0, _this select 1 select 11] call FUNC(takeLoadedATWeapon); params ["_unit", "_items"];
[_this select 0] call FUNC(updateInventoryDisplay); [_unit, _items select 11] call FUNC(takeLoadedATWeapon);
[_unit] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);

View File

@ -21,11 +21,8 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_unit", "_weapon", "_projectile", "_replacementTube", "_items"]; private ["_replacementTube", "_items"];
params ["_unit", "_weapon", "", "", "", "", "_projectile"];
_unit = _this select 0;
_weapon = _this select 1;
_projectile = _this select 6;
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};
@ -43,19 +40,19 @@ _unit selectWeapon _replacementTube;
//Re-add all attachments to the used tube //Re-add all attachments to the used tube
{ {
if (_x != "") then {_unit addSecondaryWeaponItem _x}; if (_x != "") then {_unit addSecondaryWeaponItem _x};
} forEach _items; } count _items;
// AI - Remove the ai's missle launcher tube after the missle has exploded // AI - Remove the ai's missle launcher tube after the missle has exploded
if !([_unit] call EFUNC(common,isPlayer)) then { if !([_unit] call EFUNC(common,isPlayer)) then {
[{ [{
EXPLODE_2_PVT(_this,_params,_pfhId); params ["args","_idPFH"];
EXPLODE_3_PVT(_params,_unit,_tube,_projectile); _args params ["_unit", "_tube", "_projectile"];
//don't do anything until projectile is null (exploded/max range) //don't do anything until projectile is null (exploded/max range)
if (isNull _projectile) then { if (isNull _projectile) then {
//Remove PFEH: //Remove PFEH:
[_pfhId] call cba_fnc_removePerFrameHandler; [_idPFH] call cba_fnc_removePerFrameHandler;
//If (tube is dropped) OR (is dead) OR (is player) just exit //If (tube is dropped) OR (is dead) OR (is player) just exit
if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {}; if (((secondaryWeapon _unit) != _tube) || {!alive _unit} || {([_unit] call EFUNC(common,isPlayer))}) exitWith {};
@ -66,13 +63,13 @@ if !([_unit] call EFUNC(common,isPlayer)) then {
_container = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"]; _container = createVehicle ["GroundWeaponHolder", position _unit, [], 0, "CAN_COLLIDE"];
_container setPosAsl (getPosAsl _unit); _container setPosAsl (getPosAsl _unit);
_container addWeaponCargoGlobal [_tube, 1]; _container addWeaponCargoGlobal [_tube, 1];
//This will duplicate attachements, because we will be adding a weapon that may already have attachments on it //This will duplicate attachements, because we will be adding a weapon that may already have attachments on it
//We either need a way to add a clean weapon, or a way to add a fully configured weapon to a container: //We either need a way to add a clean weapon, or a way to add a fully configured weapon to a container:
// { // {
// if (_x != "") then {_container addItemCargoGlobal [_x, 1];}; // if (_x != "") then {_container addItemCargoGlobal [_x, 1];};
// } forEach _items; // } forEach _items;
_unit removeWeaponGlobal _tube; _unit removeWeaponGlobal _tube;
}; };
}, 1, [_unit, _replacementTube, _projectile]] call CBA_fnc_addPerFrameHandler; }, 1, [_unit, _replacementTube, _projectile]] call CBA_fnc_addPerFrameHandler;

View File

@ -17,7 +17,8 @@
private ["_unit", "_launcher", "_config"]; private ["_unit", "_launcher", "_config"];
PARAMS_1(_unit); params ["_unit"];
if (!local _unit) exitWith {}; if (!local _unit) exitWith {};
_launcher = secondaryWeapon _unit; _launcher = secondaryWeapon _unit;

View File

@ -16,9 +16,7 @@
#include "script_component.hpp" #include "script_component.hpp"
disableSerialization; disableSerialization;
params ["_player", ["_display",(findDisplay 602),[(findDisplay 602)]]]
PARAMS_1(_player);
DEFAULT_PARAM(1,_display,(findDisplay 602));
_player removeMagazines "ACE_PreloadedMissileDummy"; _player removeMagazines "ACE_PreloadedMissileDummy";
_player removeMagazines "ACE_FiredMissileDummy"; _player removeMagazines "ACE_FiredMissileDummy";

View File

@ -2,6 +2,8 @@ class ACE_Settings {
class GVAR(EnableCombatDeafness) { class GVAR(EnableCombatDeafness) {
value = 1; value = 1;
typeName = "BOOL"; typeName = "BOOL";
displayName = CSTRING(CombatDeafness_DisplayName);
description = CSTRING(CombatDeafness_Description);
}; };
class GVAR(EarplugsVolume) { class GVAR(EarplugsVolume) {
value = 0.5; value = 0.5;

View File

@ -109,6 +109,27 @@ class CfgVehicles {
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 1; defaultValue = 1;
}; };
class DisableEarRinging {
displayName = CSTRING(DisableEarRinging);
typeName = "NUMBER";
class values {
class DoNotForce {
default = 1;
name = ECSTRING(common,DoNotForce);
value = -1;
};
/* Probably don't want to allow forcing ear ringing for people who have serious problems with the effect
class NotDisabled {
name = ECSTRING(common,No);
value = 0;
};
*/
class IsDisabled {
name = ECSTRING(common,Yes);
value = 1;
};
};
};
}; };
class ModuleDescription { class ModuleDescription {
description = CSTRING(Module_Description); description = CSTRING(Module_Description);

View File

@ -16,4 +16,9 @@ if !(_activated) exitWith {};
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
// Do Not Force - read module setting only non-default is set due to using SCALAR
if ((_logic getVariable "DisableEarRinging") != -1) then {
[_logic, QGVAR(DisableEarRinging), "DisableEarRinging"] call EFUNC(common,readSettingFromModule);
};
diag_log text "[ACE]: Hearing Module Initialized."; diag_log text "[ACE]: Hearing Module Initialized.";

View File

@ -126,7 +126,7 @@
<Portuguese>Ativar surdez em combate?</Portuguese> <Portuguese>Ativar surdez em combate?</Portuguese>
</Key> </Key>
<Key ID="STR_ACE_Hearing_CombatDeafness_Description"> <Key ID="STR_ACE_Hearing_CombatDeafness_Description">
<English>Enable combat deafness?</English> <English>Reduces the hearing ability as the player takes hearing damage</English>
<Polish>Możliwość chwilowej utraty słuchu przy głośnych wystrzałach i jednoczesnym braku włożonych stoperów</Polish> <Polish>Możliwość chwilowej utraty słuchu przy głośnych wystrzałach i jednoczesnym braku włożonych stoperów</Polish>
<Spanish>Habilita la sordera de combate</Spanish> <Spanish>Habilita la sordera de combate</Spanish>
<German>Aktiviere Taubheit im Gefecht?</German> <German>Aktiviere Taubheit im Gefecht?</German>
@ -134,7 +134,7 @@
<Portuguese>Ativar surdez em combate?</Portuguese> <Portuguese>Ativar surdez em combate?</Portuguese>
</Key> </Key>
<Key ID="STR_ACE_Hearing_Module_Description"> <Key ID="STR_ACE_Hearing_Module_Description">
<English></English> <English>Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection</English>
<Polish>Głuchota bojowa pojawia się w momentach, kiedy stoimy w pobliżu broni wielkokalibrowej bez ochrony słuchu, lub np. podczas ostrzału artyleryjskiego. Moduł ten pozwala na włączenie lub wyłączenie tego efektu.</Polish> <Polish>Głuchota bojowa pojawia się w momentach, kiedy stoimy w pobliżu broni wielkokalibrowej bez ochrony słuchu, lub np. podczas ostrzału artyleryjskiego. Moduł ten pozwala na włączenie lub wyłączenie tego efektu.</Polish>
<German>Dieses Modul aktiviert/deaktiviert die Taubheit im Gefecht. Wenn aktiviert, können Spieler ohne Gehörschutz taub werden, wenn eine Waffe in ihrer Nähe abgefeuert wird oder eine Explosion stattfindet.</German> <German>Dieses Modul aktiviert/deaktiviert die Taubheit im Gefecht. Wenn aktiviert, können Spieler ohne Gehörschutz taub werden, wenn eine Waffe in ihrer Nähe abgefeuert wird oder eine Explosion stattfindet.</German>
<Czech>Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat.</Czech> <Czech>Ztráta sluchu je možná ve chvíly, kdy se v bezprostřední blízkosti střílí z velkorážní zbraně nebo při bombardování a osoba je bez ochrany sluchu (např. špunty). Tento modul umožňuje tuto věc povolit nebo zakázat.</Czech>

View File

@ -3,12 +3,14 @@ class ACE_Settings {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorSelfInteraction); displayName = CSTRING(AlwaysUseCursorSelfInteraction);
}; };
class GVAR(cursorKeepCentered) { class GVAR(cursorKeepCentered) {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(cursorKeepCentered); displayName = CSTRING(cursorKeepCentered);
description = CSTRING(cursorKeepCenteredDescription); description = CSTRING(cursorKeepCenteredDescription);
}; };
@ -16,42 +18,49 @@ class ACE_Settings {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorInteraction); displayName = CSTRING(AlwaysUseCursorInteraction);
}; };
class GVAR(UseListMenu) { class GVAR(UseListMenu) {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(UseListMenu); displayName = CSTRING(UseListMenu);
}; };
class GVAR(colorTextMax) { class GVAR(colorTextMax) {
value[] = {1, 1, 1, 1}; value[] = {1, 1, 1, 1};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorTextMax); displayName = CSTRING(ColorTextMax);
}; };
class GVAR(colorTextMin) { class GVAR(colorTextMin) {
value[] = {1, 1, 1, 0.25}; value[] = {1, 1, 1, 0.25};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorTextMin); displayName = CSTRING(ColorTextMin);
}; };
class GVAR(colorShadowMax) { class GVAR(colorShadowMax) {
value[] = {0, 0, 0, 1}; value[] = {0, 0, 0, 1};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorShadowMax); displayName = CSTRING(ColorShadowMax);
}; };
class GVAR(colorShadowMin) { class GVAR(colorShadowMin) {
value[] = {0, 0, 0, 0.25}; value[] = {0, 0, 0, 0.25};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorShadowMin); displayName = CSTRING(ColorShadowMin);
}; };
class GVAR(textSize) { class GVAR(textSize) {
value = 2; value = 2;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(textSize); displayName = CSTRING(textSize);
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
}; };
@ -59,6 +68,7 @@ class ACE_Settings {
value = 2; value = 2;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(shadowSetting); displayName = CSTRING(shadowSetting);
description = CSTRING(shadowSettingDescription); description = CSTRING(shadowSettingDescription);
values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)}; values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)};
@ -67,12 +77,14 @@ class ACE_Settings {
value = 1; value = 1;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(ActionOnKeyRelease); displayName = CSTRING(ActionOnKeyRelease);
}; };
class GVAR(menuBackground) { class GVAR(menuBackground) {
value = 0; value = 0;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(background); displayName = CSTRING(background);
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)}; values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)};
}; };
@ -80,6 +92,7 @@ class ACE_Settings {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu);
displayName = CSTRING(addBuildingActions); displayName = CSTRING(addBuildingActions);
description = CSTRING(addBuildingActionsDescription); description = CSTRING(addBuildingActionsDescription);
}; };

View File

@ -19,7 +19,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_4_PVT(_this,_objectType,_typeNum,_parentPath,_action); params ["_objectType", "_typeNum", "_parentPath", "_action"];
// Ensure the config menu was compiled first // Ensure the config menu was compiled first
if (_typeNum == 0) then { if (_typeNum == 0) then {

View File

@ -19,7 +19,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_4_PVT(_this,_object,_typeNum,_parentPath,_action); params ["_object", "_typeNum", "_parentPath", "_action"];
private ["_varName","_actionList"]; private ["_varName","_actionList"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;

View File

@ -14,8 +14,8 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_3_PVT(_this,_object,_origAction,_parentPath); params ["_object", "_origAction", "_parentPath"];
EXPLODE_2_PVT(_origAction,_origActionData,_origActionChildren); _origAction params ["_origActionData", "_origActionChildren"];
private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_action","_actionData","_x"]; private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_action","_actionData","_x"];

View File

@ -12,7 +12,7 @@
*/ */
#include "script_component.hpp"; #include "script_component.hpp";
EXPLODE_1_PVT(_this,_target); params ["_target"];
private ["_objectType","_actionsVarName","_isMan"]; private ["_objectType","_actionsVarName","_isMan"];
_objectType = _target; _objectType = _target;
@ -29,7 +29,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc"; private "_recurseFnc";
_recurseFnc = { _recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg); params ["_actionsCfg"];
_actions = []; _actions = [];
{ {

View File

@ -12,7 +12,7 @@
*/ */
#include "script_component.hpp"; #include "script_component.hpp";
EXPLODE_1_PVT(_this,_target); params ["_target"];
private ["_objectType","_actionsVarName","_isMan"]; private ["_objectType","_actionsVarName","_isMan"];
_objectType = _target; _objectType = _target;
@ -30,7 +30,7 @@ private "_recurseFnc";
_recurseFnc = { _recurseFnc = {
private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled", private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg); params ["_actionsCfg"];
_actions = []; _actions = [];
{ {

View File

@ -19,7 +19,7 @@ private "_recurseFnc";
_recurseFnc = { _recurseFnc = {
private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled", private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg); params ["_actionsCfg"];
_actions = []; _actions = [];
{ {

View File

@ -26,56 +26,31 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_5_PVT(_this,_actionName,_displayName,_icon,_statement,_condition); params [
"_actionName",
"_displayName",
"_icon",
"_statement",
"_condition",
["_insertChildren", {}],
["_customParams", []],
["_position", {[0, 0, 0]}],
["_distance", 2],
["_params", [false, false, false, false, false]],
["_modifierFunction", {}]
];
// IGNORE_PRIVATE_WARNING(_target); _position = if (typeName (_position) == "STRING") then {
private ["_insertChildren","_customParams","_position","_distance","_params", "_modifierFunction"];
_insertChildren = if (count _this > 5) then {
_this select 5
} else {
{}
};
_customParams = if (count _this > 6) then {
_this select 6
} else {
[]
};
_position = if (count _this > 7) then {
if (typeName (_this select 7) == "STRING") then {
// If the action is set to a selection, create the suitable code // If the action is set to a selection, create the suitable code
compile format ["_target selectionPosition '%1'", _this select 7]; compile format ["_target selectionPosition '%1'", _position];
} else { } else {
if (typeName (_this select 7) == "ARRAY") then { if (typeName (_position) == "ARRAY") then {
// If the action is set to a array position, create the suitable code // If the action is set to a array position, create the suitable code
compile format ["%1", _this select 7]; compile format ["%1", _position];
} else { } else {
_this select 7 _position;
}; };
} };
} else {
{[0,0,0]}
};
_distance = if (count _this > 8) then {
_this select 8
} else {
2
};
_params = if (count _this > 9) then {
_this select 9
} else {
[false,false,false,false,false]
};
_modifierFunction = if (count _this > 10) then {
_this select 10
} else {
{}
};
[ [
_actionName, _actionName,

View File

@ -1,11 +1,7 @@
// by commy2 // by commy2
#include "script_component.hpp" #include "script_component.hpp"
private ["_ctrl", "_index", "_text"]; params ["_ctrl", "_index", "_text"];
_ctrl = _this select 0;
_index = _this select 1;
_text = _this select 2;
//systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")); //systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1"));

View File

@ -17,7 +17,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_2_PVT(_this,_actionTreeList,_parentPath); params ["_actionTreeList", "_parentPath"];
private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"]; private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"];
@ -31,10 +31,10 @@ _parentNode = [[],_actionTreeList];
_foundParentNode = false; _foundParentNode = false;
_fnc_findFolder = { _fnc_findFolder = {
EXPLODE_3_PVT(_this,_parentPath,_level,_actionNode); params ["_parentPath", "_level", "_actionNode"];
{ {
EXPLODE_2_PVT(_x,_actionData,_actionChildren); _x params ["_actionData", "_actionChildren"];
if ((_actionData select 0) isEqualTo (_parentPath select _level)) exitWith { if ((_actionData select 0) isEqualTo (_parentPath select _level)) exitWith {
if (count _parentPath == _level + 1) exitWith { if (count _parentPath == _level + 1) exitWith {

View File

@ -11,7 +11,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_2_PVT(_this,_newUnit,_oldUnit); params ["_newUnit", "_oldUnit"];
// add to new unit // add to new unit
private "_ehid"; private "_ehid";

View File

@ -13,7 +13,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_2_PVT(_this,_longPath,_shortPath); params ["_longPath", "_shortPath"];
private ["_isSubPath","_i"]; private ["_isSubPath","_i"];
_isSubPath = true; _isSubPath = true;

View File

@ -12,7 +12,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_1_PVT(_this,_menuType); params ["_menuType"];
if (GVAR(openedMenuType) == _menuType) exitWith {true}; if (GVAR(openedMenuType) == _menuType) exitWith {true};

View File

@ -12,8 +12,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private "_calledByClicking"; params ["_menuType", "_calledByClicking"];
_calledByClicking = _this select 1;
// Exit if there's no menu opened // Exit if there's no menu opened
if (GVAR(openedMenuType) < 0) exitWith {true}; if (GVAR(openedMenuType) < 0) exitWith {true};

View File

@ -17,11 +17,11 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath); params ["_objectType", "_typeNum", "_fullPath"];
private ["_res","_varName","_actionTrees", "_parentNode", "_found"]; private ["_res","_varName","_actionTrees", "_parentNode", "_found"];
_res = _fullPath call FUNC(splitPath); _res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName); _res params ["_parentPath", "_actionName"];
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actionTrees = missionNamespace getVariable [_varName, []]; _actionTrees = missionNamespace getVariable [_varName, []];

View File

@ -17,11 +17,11 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath); params ["_object", "_typeNum", "_fullPath"];
private ["_res","_varName","_actionList"]; private ["_res","_varName","_actionList"];
_res = _fullPath call FUNC(splitPath); _res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName); _res params ["_parentPath", "_actionName"];
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
_actionList = _object getVariable [_varName, []]; _actionList = _object getVariable [_varName, []];

View File

@ -78,7 +78,7 @@ _fnc_renderNearbyActions = {
_fnc_renderLastFrameActions = { _fnc_renderLastFrameActions = {
{ {
EXPLODE_3_PVT(_x,_target,_action,_objectActionList); _x params ["_target", "_action", "_objectActionList"];
GVAR(objectActionList) = _objectActionList; GVAR(objectActionList) = _objectActionList;
[_target, _action] call FUNC(renderBaseMenu); [_target, _action] call FUNC(renderBaseMenu);
@ -176,6 +176,6 @@ if (count GVAR(collectedActionPoints) > 1) then {
// Render the non-ocluded points // Render the non-ocluded points
{ {
EXPLODE_3_PVT(_x,_z,_sPos,_activeActionTree); _x params ["_z", "_sPos", "_activeActionTree"];
[[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu); [[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu);
} forEach GVAR(collectedActionPoints); } forEach GVAR(collectedActionPoints);

View File

@ -18,8 +18,8 @@ BEGIN_COUNTER(fnc_renderBaseMenu)
private ["_distance","_pos","_weaponDir","_ref","_sPos","_activeActionTree", "_line"]; private ["_distance","_pos","_weaponDir","_ref","_sPos","_activeActionTree", "_line"];
EXPLODE_2_PVT(_this,_object,_baseActionNode); params ["_object", "_baseActionNode"];
EXPLODE_1_PVT(_baseActionNode,_actionData); _baseActionNode params ["_actionData"];
_distance = _actionData select 8; _distance = _actionData select 8;

View File

@ -16,7 +16,8 @@
#include "script_component.hpp" #include "script_component.hpp"
#define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa) #define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa)
private ["_ctrl", "_pos", "_displayNum"]; private ["_ctrl", "_pos", "_displayNum"];
PARAMS_4(_text,_icon,_sPos,_textSettings);
params ["_text", "_icon", "_sPos", "_textSettings"];
//systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1]; //systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1];

View File

@ -17,9 +17,9 @@
private ["_menuInSelectedPath", "_path", "_menuDepth", "_x", "_offset", "_newPos", "_forEachIndex", "_player", "_pos", "_target", "_textSettings"]; private ["_menuInSelectedPath", "_path", "_menuDepth", "_x", "_offset", "_newPos", "_forEachIndex", "_player", "_pos", "_target", "_textSettings"];
EXPLODE_4_PVT(_this,_parentPath,_action,_sPos,_angles); params ["_parentPath", "_action", "_sPos", "_angles"];
EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject); _action params ["_actionData", "_activeChildren", "_actionObject"];
EXPLODE_2_PVT(_angles,_centerAngle,_maxAngleSpan); _angles params ["_centerAngle", "_maxAngleSpan"];
_menuDepth = (count GVAR(menuDepthPath)); _menuDepth = (count GVAR(menuDepthPath));

View File

@ -13,7 +13,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
EXPLODE_2_PVT(_this,_sPos,_icon); params ["_sPos", "_icon"];
private ["_displayNum", "_ctrl", "_pos"]; private ["_displayNum", "_ctrl", "_pos"];

View File

@ -16,7 +16,7 @@ private ["_menuDepth", "_mixColor", "_pathCount", "_row", "_shadowColor", "_text
//Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text //Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text
_mixColor = { _mixColor = {
PARAMS_3(_color1,_color2,_ratio); params ["_color1", "_color2", "_ratio"];
private ["_return", "_mix", "_index"]; private ["_return", "_mix", "_index"];
_return = ""; _return = "";
for "_index" from 0 to 3 do { for "_index" from 0 to 3 do {

View File

@ -16,7 +16,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_interactionType); params ["_interactionType"];
//Ignore if not enabled: //Ignore if not enabled:
if (!GVAR(addBuildingActions)) exitWith {}; if (!GVAR(addBuildingActions)) exitWith {};
@ -27,8 +27,8 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
[{ [{
private ["_nearBuidlings", "_typeOfHouse", "_houseBeingScaned", "_actionSet", "_memPoints", "_memPointsActions", "_helperPos", "_helperObject"]; private ["_nearBuidlings", "_typeOfHouse", "_houseBeingScaned", "_actionSet", "_memPoints", "_memPointsActions", "_helperPos", "_helperObject"];
PARAMS_2(_args,_pfID); params ["_args", "_pfID"];
EXPLODE_4_PVT(_args,_setPosition,_addedHelpers,_housesScaned,_housesToScanForActions); _args params ["_setPosition", "_addedHelpers", "_housesScaned", "_housesToScanForActions"];
if (!EGVAR(interact_menu,keyDown)) then { if (!EGVAR(interact_menu,keyDown)) then {
{deleteVehicle _x;} forEach _addedHelpers; {deleteVehicle _x;} forEach _addedHelpers;
@ -75,7 +75,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
_housesScaned pushBack _houseBeingScaned; _housesScaned pushBack _houseBeingScaned;
_actionSet = [_typeOfHouse] call FUNC(userActions_getHouseActions); _actionSet = [_typeOfHouse] call FUNC(userActions_getHouseActions);
EXPLODE_2_PVT(_actionSet,_memPoints,_memPointsActions); _actionSet params ["_memPoints", "_memPointsActions"];
// systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime]; // systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime];
{ {

View File

@ -12,7 +12,7 @@
*/ */
#include "script_component.hpp" #include "script_component.hpp"
PARAMS_1(_typeOfBuilding); params ["_typeOfBuilding"];
private["_action", "_actionDisplayName", "_actionDisplayNameDefault", "_actionMaxDistance", "_actionOffset", "_actionPath", "_actionPosition", "_building", "_configPath", "_endIndex", "_iconImage", "_index", "_ladders", "_memPointIndex", "_memPoints", "_memPointsActions", "_startIndex"]; private["_action", "_actionDisplayName", "_actionDisplayNameDefault", "_actionMaxDistance", "_actionOffset", "_actionPath", "_actionPosition", "_building", "_configPath", "_endIndex", "_iconImage", "_index", "_ladders", "_memPointIndex", "_memPoints", "_memPointsActions", "_startIndex"];
@ -24,7 +24,7 @@ _memPointsActions = [];
//Get the offset for a memory point: //Get the offset for a memory point:
_fnc_getMemPointOffset = { _fnc_getMemPointOffset = {
PARAMS_1(_memoryPoint); params ["_memoryPoint"];
_memPointIndex = _memPoints find _memoryPoint; _memPointIndex = _memPoints find _memoryPoint;
_actionOffset = [0,0,0]; _actionOffset = [0,0,0];
if (_memPointIndex == -1) then { if (_memPointIndex == -1) then {
@ -38,14 +38,14 @@ _fnc_getMemPointOffset = {
// Add UserActions for the building: // Add UserActions for the building:
_fnc_userAction_Statement = { _fnc_userAction_Statement = {
PARAMS_3(_target,_player,_variable); params ["_target", "_player", "_variable"];
EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition); _variable params ["_actionStatement", "_actionCondition"];
this = _target getVariable [QGVAR(building), objNull]; this = _target getVariable [QGVAR(building), objNull];
call _actionStatement; call _actionStatement;
}; };
_fnc_userAction_Condition = { _fnc_userAction_Condition = {
PARAMS_3(_target,_player,_variable); params ["_target", "_player", "_variable"];
EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition); _variable params ["_actionStatement", "_actionCondition"];
this = _target getVariable [QGVAR(building), objNull]; this = _target getVariable [QGVAR(building), objNull];
if (isNull this) exitWith {false}; if (isNull this) exitWith {false};
call _actionCondition; call _actionCondition;
@ -84,29 +84,29 @@ for "_index" from 0 to ((count _configPath) - 1) do {
// Add Ladder Actions for the building: // Add Ladder Actions for the building:
_fnc_ladder_ladderUp = { _fnc_ladder_ladderUp = {
PARAMS_3(_target,_player,_variable); params ["_target", "_player", "_variable"];
EXPLODE_1_PVT(_variable,_ladderIndex); _variable params ["_ladderIndex"];
_building = _target getVariable [QGVAR(building), objNull]; _building = _target getVariable [QGVAR(building), objNull];
TRACE_3("Ladder Action - UP",_player,_building,_ladderIndex); TRACE_3("Ladder Action - UP",_player,_building,_ladderIndex);
_player action ["LadderUp", _building, _ladderIndex, 0]; _player action ["LadderUp", _building, _ladderIndex, 0];
}; };
_fnc_ladder_ladderDown = { _fnc_ladder_ladderDown = {
PARAMS_3(_target,_player,_variable); params ["_target", "_player", "_variable"];
EXPLODE_1_PVT(_variable,_ladderIndex); _variable params ["_ladderIndex"];
_building = _target getVariable [QGVAR(building), objNull]; _building = _target getVariable [QGVAR(building), objNull];
TRACE_3("Ladder Action - Down",_player,_building,_ladderIndex); TRACE_3("Ladder Action - Down",_player,_building,_ladderIndex);
_player action ["LadderDown", _building, _ladderIndex, 1]; _player action ["LadderDown", _building, _ladderIndex, 1];
}; };
_fnc_ladder_conditional = { _fnc_ladder_conditional = {
PARAMS_2(_target,_player); params ["_target", "_player"];
//(Check distance < 2) and (Don't show actions if on a ladder) //(Check distance < 2) and (Don't show actions if on a ladder)
((_target distance _player) < 2) && {((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _player) >> "onLadder")) == 0)} ((_target distance _player) < 2) && {((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _player) >> "onLadder")) == 0)}
}; };
_ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders"); _ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders");
{ {
EXPLODE_2_PVT(_x,_ladderBottomMemPoint,_ladderTopMemPoint); _x params ["_ladderBottomMemPoint", "_ladderTopMemPoint"];
_actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition _actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition

View File

@ -267,5 +267,9 @@
<Czech>Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) </Czech> <Czech>Přidá možnost interakce pro otevření dvěří a umistňovat žebříky na budovy. (Poznámka: Použití této možnosti snižuje výkon při otevírání pomocí interakčního menu, zejména ve velkých městech.) </Czech>
<Spanish>Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades)</Spanish> <Spanish>Añade las acciones de interacción para la apertura de puertas y montaje de escaleras en los edificios. (Nota: Hay un coste de rendimiento al abrir el menú de interacción, especialmente en las ciudades)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_Interact_Menu_Category_InteractionMenu">
<English>Interaction Menu</English>
<Polish>Menu interakcji</Polish>
</Key>
</Package> </Package>
</Project> </Project>

View File

@ -91,7 +91,7 @@ class CfgVehicles {
class ACE_JoinGroup { class ACE_JoinGroup {
displayName = CSTRING(JoinGroup); displayName = CSTRING(JoinGroup);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinGroup)); condition = QUOTE(GVAR(EnableTeamManagement) && {[ARR_2(_player,_target)] call DFUNC(canJoinGroup)});
statement = QUOTE([_player] joinSilent group _target); statement = QUOTE([_player] joinSilent group _target);
showDisabled = 0; showDisabled = 0;
priority = 2.6; priority = 2.6;
@ -351,7 +351,7 @@ class CfgVehicles {
hotkey = "7"; hotkey = "7";
}; };
class ACE_Gesture_Yes { class ACE_Gesture_Yes {
displayName = CSTRING(Gestures_Yes); displayName = ECSTRING(common,Yes);
condition = QUOTE(canStand _target); condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2);); statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
showDisabled = 1; showDisabled = 1;
@ -359,7 +359,7 @@ class CfgVehicles {
hotkey = "8"; hotkey = "8";
}; };
class ACE_Gesture_No { class ACE_Gesture_No {
displayName = CSTRING(Gestures_No); displayName = ECSTRING(common,No);
condition = QUOTE(canStand _target); condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureNo';); statement = QUOTE(_target playActionNow 'gestureNo';);
showDisabled = 1; showDisabled = 1;

View File

@ -385,30 +385,6 @@
<Portuguese>Olá</Portuguese> <Portuguese>Olá</Portuguese>
<Italian>Ciao</Italian> <Italian>Ciao</Italian>
</Key> </Key>
<Key ID="STR_ACE_Interaction_Gestures_Yes">
<English>Yes</English>
<German>Ja</German>
<Spanish>Si</Spanish>
<Polish>Tak</Polish>
<Czech>Ano</Czech>
<French>Oui</French>
<Russian>Да</Russian>
<Hungarian>Igen</Hungarian>
<Portuguese>Sim</Portuguese>
<Italian>Si</Italian>
</Key>
<Key ID="STR_ACE_Interaction_Gestures_No">
<English>No</English>
<German>Nein</German>
<Spanish>No</Spanish>
<Polish>Nie</Polish>
<Czech>Ne</Czech>
<French>Non</French>
<Russian>Нет</Russian>
<Hungarian>Nem</Hungarian>
<Portuguese>Não</Portuguese>
<Italian>No</Italian>
</Key>
<Key ID="STR_ACE_Interaction_WeaponOnBack"> <Key ID="STR_ACE_Interaction_WeaponOnBack">
<English>Put weapon on back</English> <English>Put weapon on back</English>
<German>Waffe wegstecken</German> <German>Waffe wegstecken</German>

View File

@ -14,7 +14,13 @@
visibleMap && visibleMap &&
{alive ACE_player} && {alive ACE_player} &&
{"ItemMap" in (assignedItems ACE_player)} && {
scopeName "hasMap";
{
if (_x isKindOf ["ItemMap", configFile >> "CfgWeapons"]) exitWith {true breakOut "hasMap"};
} forEach (assignedItems ACE_player);
false
} &&
{"ACE_MapTools" in (items ACE_player)} && {"ACE_MapTools" in (items ACE_player)} &&
{!GVAR(mapTool_isDragging)} && {!GVAR(mapTool_isDragging)} &&
{!GVAR(mapTool_isRotating)} {!GVAR(mapTool_isRotating)}

View File

@ -4,8 +4,9 @@ class ACE_Medical_Actions {
class Bandage { class Bandage {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
displayNameProgress = CSTRING(Bandaging); displayNameProgress = CSTRING(Bandaging);
category = "bandage";
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
allowedSelections[] = {"All"};
requiredMedic = 0; requiredMedic = 0;
treatmentTime = 5; treatmentTime = 5;
treatmentTimeSelfCoef = 1; treatmentTimeSelfCoef = 1;
@ -25,11 +26,13 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = { {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} };
}; };
class Morphine: Bandage { class Morphine: Bandage {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
displayNameProgress = CSTRING(Injecting_Morphine); displayNameProgress = CSTRING(Injecting_Morphine);
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
category = "medication";
treatmentTime = 2; treatmentTime = 2;
items[] = {"ACE_morphine"}; items[] = {"ACE_morphine"};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine)); callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
@ -39,6 +42,8 @@ class ACE_Medical_Actions {
class Epinephrine: Bandage { class Epinephrine: Bandage {
displayName = CSTRING(Inject_Epinephrine); displayName = CSTRING(Inject_Epinephrine);
displayNameProgress = CSTRING(Injecting_Epinephrine); displayNameProgress = CSTRING(Injecting_Epinephrine);
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
category = "medication";
requiredMedic = 1; requiredMedic = 1;
treatmentTime = 3; treatmentTime = 3;
items[] = {"ACE_epinephrine"}; items[] = {"ACE_epinephrine"};
@ -49,6 +54,8 @@ class ACE_Medical_Actions {
class BloodIV: Bandage { class BloodIV: Bandage {
displayName = CSTRING(Transfuse_Blood); displayName = CSTRING(Transfuse_Blood);
displayNameProgress = CSTRING(Transfusing_Blood); displayNameProgress = CSTRING(Transfusing_Blood);
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
category = "advanced";
requiredMedic = 1; requiredMedic = 1;
treatmentTime = 20; treatmentTime = 20;
items[] = {"ACE_bloodIV"}; items[] = {"ACE_bloodIV"};
@ -57,14 +64,17 @@ class ACE_Medical_Actions {
litter[] = {}; litter[] = {};
}; };
class BloodIV_500: BloodIV { class BloodIV_500: BloodIV {
category = "advanced";
items[] = {"ACE_bloodIV_500"}; items[] = {"ACE_bloodIV_500"};
}; };
class BloodIV_250: BloodIV { class BloodIV_250: BloodIV {
category = "advanced";
items[] = {"ACE_bloodIV_250"}; items[] = {"ACE_bloodIV_250"};
}; };
class BodyBag: Bandage { class BodyBag: Bandage {
displayName = CSTRING(PlaceInBodyBag); displayName = CSTRING(PlaceInBodyBag);
displayNameProgress = CSTRING(PlacingInBodyBag); displayNameProgress = CSTRING(PlacingInBodyBag);
category = "advanced";
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
requiredMedic = 0; requiredMedic = 0;
treatmentTime = 4; treatmentTime = 4;
@ -81,7 +91,9 @@ class ACE_Medical_Actions {
class Diagnose: Bandage { class Diagnose: Bandage {
displayName = CSTRING(Actions_Diagnose); displayName = CSTRING(Actions_Diagnose);
displayNameProgress = CSTRING(Actions_Diagnosing); displayNameProgress = CSTRING(Actions_Diagnosing);
category = "examine";
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
allowedSelections[] = {"head"};
requiredMedic = 0; requiredMedic = 0;
treatmentTime = 1; treatmentTime = 1;
items[] = {}; items[] = {};
@ -97,10 +109,12 @@ class ACE_Medical_Actions {
class Advanced { class Advanced {
class FieldDressing { class FieldDressing {
displayName = CSTRING(Bandage); displayName = CSTRING(Actions_FieldDressing);
displayNameProgress = CSTRING(Bandaging); displayNameProgress = CSTRING(Bandaging);
category = "bandage";
// Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All. // Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All.
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
allowedSelections[] = {"All"};
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor // What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
requiredMedic = 0; requiredMedic = 0;
// The time it takes for a treatment action to complete. Time is in seconds. // The time it takes for a treatment action to complete. Time is in seconds.
@ -121,20 +135,26 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = { {"All", "", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; litter[] = { {"All", "_previousDamage > 0", {{"ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}}, {"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}} };
}; };
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage);
items[] = {"ACE_packingBandage"}; items[] = {"ACE_packingBandage"};
litter[] = { {"All", "", {"ACE_MedicalLitter_packingBandage"}}};
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage);
items[] = {"ACE_elasticBandage"}; items[] = {"ACE_elasticBandage"};
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot);
items[] = {"ACE_quikclot"}; items[] = {"ACE_quikclot"};
litter[] = { {"All", "", {"ACE_MedicalLitter_QuickClot"}}};
}; };
class Tourniquet: fieldDressing { class Tourniquet: fieldDressing {
displayName = CSTRING(Apply_Tourniquet); displayName = CSTRING(Apply_Tourniquet);
displayNameProgress = CSTRING(Applying_Tourniquet); displayNameProgress = CSTRING(Applying_Tourniquet);
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r", "body"};
items[] = {"ACE_tourniquet"}; items[] = {"ACE_tourniquet"};
treatmentTime = 6; treatmentTime = 6;
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet)); callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
@ -144,6 +164,8 @@ class ACE_Medical_Actions {
class Morphine: fieldDressing { class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
displayNameProgress = CSTRING(Injecting_Morphine); displayNameProgress = CSTRING(Injecting_Morphine);
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
category = "medication";
items[] = {"ACE_morphine"}; items[] = {"ACE_morphine"};
treatmentTime = 3; treatmentTime = 3;
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication)); callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
@ -163,8 +185,10 @@ class ACE_Medical_Actions {
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} }; litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
}; };
class BloodIV: fieldDressing { class BloodIV: fieldDressing {
displayName = CSTRING(Transfuse_Blood); displayName = CSTRING(Actions_Blood4_1000);
displayNameProgress = CSTRING(Transfusing_Blood); displayNameProgress = CSTRING(Transfusing_Blood);
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
category = "advanced";
items[] = {"ACE_bloodIV"}; items[] = {"ACE_bloodIV"};
requiredMedic = 1; requiredMedic = 1;
treatmentTime = 7; treatmentTime = 7;
@ -173,38 +197,45 @@ class ACE_Medical_Actions {
litter[] = {}; litter[] = {};
}; };
class BloodIV_500: BloodIV { class BloodIV_500: BloodIV {
displayName = CSTRING(Actions_Blood4_500);
items[] = {"ACE_bloodIV_500"}; items[] = {"ACE_bloodIV_500"};
}; };
class BloodIV_250: BloodIV { class BloodIV_250: BloodIV {
displayName = CSTRING(Actions_Blood4_250);
items[] = {"ACE_bloodIV_250"}; items[] = {"ACE_bloodIV_250"};
}; };
class PlasmaIV: BloodIV { class PlasmaIV: BloodIV {
displayName = CSTRING(Transfuse_Plasma); displayName = CSTRING(Actions_Plasma4_1000);
displayNameProgress = CSTRING(Transfusing_Plasma); displayNameProgress = CSTRING(Transfusing_Plasma);
items[] = {"ACE_plasmaIV"}; items[] = {"ACE_plasmaIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
}; };
class PlasmaIV_500: PlasmaIV { class PlasmaIV_500: PlasmaIV {
displayName = CSTRING(Actions_Plasma4_500);
items[] = {"ACE_plasmaIV_500"}; items[] = {"ACE_plasmaIV_500"};
}; };
class PlasmaIV_250: PlasmaIV { class PlasmaIV_250: PlasmaIV {
displayName = CSTRING(Actions_Plasma4_250);
items[] = {"ACE_plasmaIV_250"}; items[] = {"ACE_plasmaIV_250"};
}; };
class SalineIV: BloodIV { class SalineIV: BloodIV {
displayName = CSTRING(Transfuse_Saline); displayName = CSTRING(Actions_Saline4_1000);
displayNameProgress = CSTRING(Transfusing_Saline); displayNameProgress = CSTRING(Transfusing_Saline);
items[] = {"ACE_salineIV"}; items[] = {"ACE_salineIV"};
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
}; };
class SalineIV_500: SalineIV { class SalineIV_500: SalineIV {
displayName = CSTRING(Actions_Saline4_500);
items[] = {"ACE_salineIV_500"}; items[] = {"ACE_salineIV_500"};
}; };
class SalineIV_250: SalineIV { class SalineIV_250: SalineIV {
displayName = CSTRING(Actions_Saline4_250);
items[] = {"ACE_salineIV_250"}; items[] = {"ACE_salineIV_250"};
}; };
class SurgicalKit: fieldDressing { class SurgicalKit: fieldDressing {
displayName = ""; displayName = CSTRING(Use_SurgicalKit);
displayNameProgress = CSTRING(TreatmentAction); displayNameProgress = CSTRING(TreatmentAction);
category = "advanced";
items[] = {"ACE_surgicalKit"}; items[] = {"ACE_surgicalKit"};
treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)}; treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)};
requiredMedic = QGVAR(medicSetting_SurgicalKit); requiredMedic = QGVAR(medicSetting_SurgicalKit);
@ -217,8 +248,9 @@ class ACE_Medical_Actions {
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"} }}; litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"} }};
}; };
class PersonalAidKit: fieldDressing { class PersonalAidKit: fieldDressing {
displayName = ""; displayName = CSTRING(Use_Aid_Kit);
displayNameProgress = CSTRING(TreatmentAction); displayNameProgress = CSTRING(TreatmentAction);
category = "advanced";
items[] = {"ACE_personalAidKit"}; items[] = {"ACE_personalAidKit"};
treatmentLocations[] = {QGVAR(useLocation_PAK)}; treatmentLocations[] = {QGVAR(useLocation_PAK)};
requiredMedic = QGVAR(medicSetting_PAK); requiredMedic = QGVAR(medicSetting_PAK);
@ -232,11 +264,16 @@ class ACE_Medical_Actions {
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
animationCallerSelf = ""; animationCallerSelf = "";
animationCallerSelfProne = ""; animationCallerSelfProne = "";
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}}, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}} }, {"All", "", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}} }; litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"}},
{"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}} },
{"All", "_previousDamage > 0", {{"ACE_MedicalLitterBase", "ACE_MedicalLitter_bandage1", "ACE_MedicalLitter_bandage2", "ACE_MedicalLitter_bandage3"}}},
{"All", "_previousDamage <= 0", {"ACE_MedicalLitter_clean"}}
};
}; };
class CheckPulse: fieldDressing { class CheckPulse: fieldDressing {
displayName = ""; displayName = CSTRING(Actions_CheckPulse);
displayNameProgress = CSTRING(Check_Pulse_Content); displayNameProgress = CSTRING(Check_Pulse_Content);
category = "examine";
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
requiredMedic = 0; requiredMedic = 0;
treatmentTime = 2; treatmentTime = 2;
@ -246,27 +283,36 @@ class ACE_Medical_Actions {
callbackProgress = ""; callbackProgress = "";
animationPatient = ""; animationPatient = "";
animationCaller = ""; // TODO animationCaller = ""; // TODO
animationCallerProne = "";
animationCallerSelfProne = "";
itemConsumed = 0; itemConsumed = 0;
litter[] = {}; litter[] = {};
}; };
class CheckBloodPressure: CheckPulse { class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure);
callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure)); callbackSuccess = QUOTE(DFUNC(actionCheckBloodPressure));
displayNameProgress = CSTRING(Check_Bloodpressure_Content); displayNameProgress = CSTRING(Check_Bloodpressure_Content);
}; };
class CheckResponse: CheckPulse { class CheckResponse: CheckPulse {
displayName = CSTRING(Check_Response);
callbackSuccess = QUOTE(DFUNC(actionCheckResponse)); callbackSuccess = QUOTE(DFUNC(actionCheckResponse));
displayNameProgress = CSTRING(Check_Response_Content); displayNameProgress = CSTRING(Check_Response_Content);
}; };
class RemoveTourniquet: CheckPulse { class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet);
items[] = {};
treatmentTime = 2.5; treatmentTime = 2.5;
callbackSuccess = QUOTE(DFUNC(actionRemoveTourniquet)); callbackSuccess = QUOTE(DFUNC(actionRemoveTourniquet));
condition = QUOTE([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)); condition = QUOTE([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo));
displayNameProgress = CSTRING(RemovingTourniquet); displayNameProgress = CSTRING(RemovingTourniquet);
litter[] = {};
}; };
class CPR: fieldDressing { class CPR: fieldDressing {
displayName = CSTRING(Actions_CPR); displayName = CSTRING(Actions_CPR);
displayNameProgress = CSTRING(Actions_PerformingCPR); displayNameProgress = CSTRING(Actions_PerformingCPR);
category = "advanced";
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
allowedSelections[] = {"body"};
requiredMedic = 0; requiredMedic = 0;
treatmentTime = 15; treatmentTime = 15;
items[] = {}; items[] = {};
@ -286,6 +332,7 @@ class ACE_Medical_Actions {
class BodyBag: fieldDressing { class BodyBag: fieldDressing {
displayName = CSTRING(PlaceInBodyBag); displayName = CSTRING(PlaceInBodyBag);
displayNameProgress = CSTRING(PlacingInBodyBag); displayNameProgress = CSTRING(PlacingInBodyBag);
category = "advanced";
treatmentLocations[] = {"All"}; treatmentLocations[] = {"All"};
requiredMedic = 0; requiredMedic = 0;
treatmentTime = 2; treatmentTime = 2;
@ -817,9 +864,9 @@ class ACE_Medical_Advanced {
// specific details for the ACE_Morphine treatment action // specific details for the ACE_Morphine treatment action
class Morphine { class Morphine {
painReduce = 15; painReduce = 15;
hrIncreaseLow[] = {-10, -30, 35}; hrIncreaseLow[] = {-10, -20, 35};
hrIncreaseNormal[] = {-10, -50, 40}; hrIncreaseNormal[] = {-10, -30, 35};
hrIncreaseHigh[] = {-10, -40, 50}; hrIncreaseHigh[] = {-10, -35, 50};
timeInSystem = 900; timeInSystem = 900;
maxDose = 4; maxDose = 4;
inCompatableMedication[] = {}; inCompatableMedication[] = {};

View File

@ -1,94 +1,116 @@
class ACE_Settings { class ACE_Settings {
class GVAR(level) { class GVAR(level) {
category = LSTRING(Category_Medical);
value = 1; value = 1;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Disabled", "Basic", "Advanced"}; values[] = {"Disabled", "Basic", "Advanced"};
}; };
class GVAR(medicSetting) { class GVAR(medicSetting) {
category = LSTRING(Category_Medical);
value = 1; value = 1;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Disabled", "Normal", "Advanced"}; values[] = {"Disabled", "Normal", "Advanced"};
}; };
class GVAR(enableFor) { class GVAR(enableFor) {
category = LSTRING(Category_Medical);
value = 0; value = 0;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Players only", "Players and AI"}; values[] = {"Players only", "Players and AI"};
}; };
class GVAR(enableOverdosing) { class GVAR(enableOverdosing) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(bleedingCoefficient) { class GVAR(bleedingCoefficient) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(painCoefficient) { class GVAR(painCoefficient) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(enableAirway) { class GVAR(enableAirway) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = false; value = false;
}; };
class GVAR(enableFractures) { class GVAR(enableFractures) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = false; value = false;
}; };
class GVAR(enableAdvancedWounds) { class GVAR(enableAdvancedWounds) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = false; value = false;
}; };
class GVAR(enableVehicleCrashes) { class GVAR(enableVehicleCrashes) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(enableScreams) { class GVAR(enableScreams) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(playerDamageThreshold) { class GVAR(playerDamageThreshold) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(AIDamageThreshold) { class GVAR(AIDamageThreshold) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(enableUnconsciousnessAI) { class GVAR(enableUnconsciousnessAI) {
category = LSTRING(Category_Medical);
value = 1; value = 1;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Disabled", "50/50", "Enabled"}; values[] = {"Disabled", "50/50", "Enabled"};
}; };
class GVAR(remoteControlledAI) { class GVAR(remoteControlledAI) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(preventInstaDeath) { class GVAR(preventInstaDeath) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(enableRevive) { class GVAR(enableRevive) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"Disabled", "Players only", "Players and AI"}; values[] = {"Disabled", "Players only", "Players and AI"};
}; };
class GVAR(maxReviveTime) { class GVAR(maxReviveTime) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 120; value = 120;
}; };
class GVAR(amountOfReviveLives) { class GVAR(amountOfReviveLives) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = -1; value = -1;
}; };
class GVAR(allowDeadBodyMovement) { class GVAR(allowDeadBodyMovement) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(allowLitterCreation) { class GVAR(allowLitterCreation) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(litterSimulationDetail) { class GVAR(litterSimulationDetail) {
category = LSTRING(Category_Medical);
displayName = CSTRING(litterSimulationDetail); displayName = CSTRING(litterSimulationDetail);
description = CSTRING(litterSimulationDetail_Desc); description = CSTRING(litterSimulationDetail_Desc);
typeName = "SCALAR"; typeName = "SCALAR";
@ -100,40 +122,48 @@ class ACE_Settings {
isClientSettable = 1; isClientSettable = 1;
}; };
class GVAR(litterCleanUpDelay) { class GVAR(litterCleanUpDelay) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
}; };
class GVAR(medicSetting_PAK) { class GVAR(medicSetting_PAK) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"}; values[] = {"Anyone", "Medics only", "Doctors only"};
}; };
class GVAR(medicSetting_SurgicalKit) { class GVAR(medicSetting_SurgicalKit) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"}; values[] = {"Anyone", "Medics only", "Doctors only"};
}; };
class GVAR(consumeItem_PAK) { class GVAR(consumeItem_PAK) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"No", "Yes"}; values[] = {"No", "Yes"};
}; };
class GVAR(consumeItem_SurgicalKit) { class GVAR(consumeItem_SurgicalKit) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"No", "Yes"}; values[] = {"No", "Yes"};
}; };
class GVAR(useLocation_PAK) { class GVAR(useLocation_PAK) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 3; value = 3;
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
}; };
class GVAR(useLocation_SurgicalKit) { class GVAR(useLocation_SurgicalKit) {
category = LSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 2; value = 2;
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
}; };
class GVAR(useCondition_PAK) { class GVAR(useCondition_PAK) {
category = LSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName); displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description); description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
typeName = "SCALAR"; typeName = "SCALAR";
@ -141,6 +171,7 @@ class ACE_Settings {
values[] = {"Anytime", "Stable"}; values[] = {"Anytime", "Stable"};
}; };
class GVAR(useCondition_SurgicalKit) { class GVAR(useCondition_SurgicalKit) {
category = LSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName); displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description); description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
typeName = "SCALAR"; typeName = "SCALAR";
@ -148,20 +179,24 @@ class ACE_Settings {
values[] = {"Anytime", "Stable"}; values[] = {"Anytime", "Stable"};
}; };
class GVAR(keepLocalSettingsSynced) { class GVAR(keepLocalSettingsSynced) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(healHitPointAfterAdvBandage) { class GVAR(healHitPointAfterAdvBandage) {
category = LSTRING(Category_Medical);
displayName = CSTRING(healHitPointAfterAdvBandage); displayName = CSTRING(healHitPointAfterAdvBandage);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(painIsOnlySuppressed) { class GVAR(painIsOnlySuppressed) {
category = LSTRING(Category_Medical);
displayName = CSTRING(painIsOnlySuppressed); displayName = CSTRING(painIsOnlySuppressed);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(painEffectType) { class GVAR(painEffectType) {
category = LSTRING(Category_Medical);
displayName = CSTRING(painEffectType); displayName = CSTRING(painEffectType);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
@ -169,15 +204,18 @@ class ACE_Settings {
isClientSettable = 1; isClientSettable = 1;
}; };
class GVAR(allowUnconsciousAnimationOnTreatment) { class GVAR(allowUnconsciousAnimationOnTreatment) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(moveUnitsFromGroupOnUnconscious) { class GVAR(moveUnitsFromGroupOnUnconscious) {
category = LSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(menuTypeStyle) { class GVAR(menuTypeStyle) {
category = LSTRING(Category_Medical);
displayName = CSTRING(menuTypeDisplay); displayName = CSTRING(menuTypeDisplay);
description = CSTRING(menuTypeDescription); description = CSTRING(menuTypeDescription);
typeName = "SCALAR"; typeName = "SCALAR";

View File

@ -92,7 +92,7 @@ class CfgVehicles {
typeName = "NUMBER"; typeName = "NUMBER";
class values { class values {
class disable { class disable {
name = CSTRING(disabled); name = ECSTRING(common,Disabled);
value = 0; value = 0;
}; };
class normal { class normal {
@ -101,7 +101,7 @@ class CfgVehicles {
default = 1; default = 1;
}; };
class full { class full {
name = CSTRING(enabled); name = ECSTRING(common,Enabled);
value = 2; value = 2;
}; };
}; };
@ -198,8 +198,8 @@ class CfgVehicles {
description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description); description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "NUMBER"; typeName = "NUMBER";
class values { class values {
class keep { name = CSTRING(No); value = 0; }; class keep { name = ECSTRING(common,No); value = 0; };
class remove { name = CSTRING(Yes); value = 1; default = 1; }; class remove { name = ECSTRING(common,Yes); value = 1; default = 1; };
}; };
}; };
class useCondition_PAK { class useCondition_PAK {
@ -220,7 +220,7 @@ class CfgVehicles {
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; }; class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; }; class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; default = 1; }; class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; default = 1; };
class disabled { name = CSTRING(AdvancedMedicalSettings_disabled); value = 4;}; class disabled { name = ECSTRING(common,Disabled); value = 4;};
}; };
}; };
class medicSetting_SurgicalKit: medicSetting_PAK { class medicSetting_SurgicalKit: medicSetting_PAK {
@ -280,7 +280,7 @@ class CfgVehicles {
typeName = "NUMBER"; typeName = "NUMBER";
defaultValue = 0; defaultValue = 0;
class values { class values {
class disable { name = CSTRING(disabled); value = 0; default = 1;}; class disable { name = ECSTRING(common,Disabled); value = 0; default = 1;};
class playerOnly { name = CSTRING(playeronly); value = 1; }; class playerOnly { name = CSTRING(playeronly); value = 1; };
class playerAndAI { name = CSTRING(playersandai); value = 2; }; class playerAndAI { name = CSTRING(playersandai); value = 2; };
}; };
@ -373,11 +373,11 @@ class CfgVehicles {
typeName = "NUMBER"; typeName = "NUMBER";
class values { class values {
class none { class none {
name = CSTRING(No); name = ECSTRING(common,No);
value = 0; value = 0;
}; };
class medic { class medic {
name = CSTRING(Yes); name = ECSTRING(common,Yes);
value = 1; value = 1;
default = 1; default = 1;
}; };
@ -717,6 +717,9 @@ class CfgVehicles {
destrType = "DestructNo"; destrType = "DestructNo";
model = QUOTE(PATHTOF(data\littergeneric.p3d)); model = QUOTE(PATHTOF(data\littergeneric.p3d));
}; };
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
model = QUOTE(PATHTOF(data\littergeneric_clean.p3d));
};
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase { class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d)); model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d));
}; };

Binary file not shown.

Binary file not shown.

View File

@ -58,4 +58,5 @@ if ([_caller] call FUNC(isMedic)) then {
if (_logOutPut != "") then { if (_logOutPut != "") then {
[_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); [_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
[_target,"quick_view", LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
}; };

View File

@ -50,4 +50,5 @@ if (_heartRate > 1.0) then {
if (_logOutPut != "") then { if (_logOutPut != "") then {
[_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); [_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
[_unit,"quick_view", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
}; };

View File

@ -28,3 +28,4 @@ if ([_target] call EFUNC(common,isAwake)) then {
["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent); ["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent);
[_target,"activity",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog); [_target,"activity",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target,"quick_view",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -16,7 +16,7 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_condition", "_patientStateCondition"]; private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_condition", "_patientStateCondition", "_allowedSelections"];
_caller = _this select 0; _caller = _this select 0;
_target = _this select 1; _target = _this select 1;
_selectionName = _this select 2; _selectionName = _this select 2;
@ -44,6 +44,8 @@ if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
_items = getArray (_config >> "items"); _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false}; if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false};
_allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false};
_return = true; _return = true;
if (getText (_config >> "condition") != "") then { if (getText (_config >> "condition") != "") then {

View File

@ -16,12 +16,13 @@
#define MIN_ENTRIES_LITTER_CONFIG 3 #define MIN_ENTRIES_LITTER_CONFIG 3
private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems"]; private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems", "_previousDamage"];
_caller = _this select 0; _caller = _this select 0;
_target = _this select 1; _target = _this select 1;
_selectionName = _this select 2; _selectionName = _this select 2;
_className = _this select 3; _className = _this select 3;
_usersOfItems = _this select 5; _usersOfItems = _this select 5;
_previousDamage = _this select 6;
if !(GVAR(allowLitterCreation)) exitwith {}; if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {}; if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
@ -76,7 +77,7 @@ _createdLitter = [];
_litterCondition = missionNamespace getvariable _litterCondition; _litterCondition = missionNamespace getvariable _litterCondition;
if (typeName _litterCondition != "CODE") then {_litterCondition = {false}}; if (typeName _litterCondition != "CODE") then {_litterCondition = {false}};
}; };
if !([_caller, _target, _selectionName, _className, _usersOfItems] call _litterCondition) exitwith {}; if !([_caller, _target, _selectionName, _className, _usersOfItems, _previousDamage] call _litterCondition) exitwith {};
if (typeName _litterOptions == "ARRAY") then { if (typeName _litterOptions == "ARRAY") then {
// Loop through through the litter options and place the litter // Loop through through the litter options and place the litter

View File

@ -31,6 +31,7 @@ if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then {
GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]]; GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]];
if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
GVAR(litterPFHRunning) = true;
[{ [{
{ {
if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then { if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then {

View File

@ -16,7 +16,7 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return", "_usersOfItems", "_consumeItems", "_condition", "_displayText", "_wpn", "_treatmentTimeConfig", "_patientStateCondition"]; private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return", "_usersOfItems", "_consumeItems", "_condition", "_displayText", "_wpn", "_treatmentTimeConfig", "_patientStateCondition", "_allowedSelections"];
_caller = _this select 0; _caller = _this select 0;
_target = _this select 1; _target = _this select 1;
_selectionName = _this select 2; _selectionName = _this select 2;
@ -49,6 +49,9 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false}; if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
_allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false};
// Check item // Check item
_items = getArray (_config >> "items"); _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false}; if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false};
@ -156,7 +159,7 @@ if (_caller == _target) then {
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE"); _callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
}; };
_caller setvariable [QGVAR(selectedWeaponOnTreatment), currentWeapon _caller]; _caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)];
// Cannot use secondairy weapon for animation // Cannot use secondairy weapon for animation
if (currentWeapon _caller == secondaryWeapon _caller) then { if (currentWeapon _caller == secondaryWeapon _caller) then {

View File

@ -31,4 +31,7 @@ if (random(1)>= 0.6) exitwith {
_target setvariable [QGVAR(bloodPressure), [50,70]]; _target setvariable [QGVAR(bloodPressure), [50,70]];
}; };
[_target, "activity", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
true; true;

View File

@ -38,5 +38,6 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
}foreach _items;*/ }foreach _items;*/
[_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_bandagedPatient), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
true; true;

View File

@ -68,4 +68,7 @@ if (alive _target) exitwith {
// Resetting damage // Resetting damage
_target setDamage 0; _target setDamage 0;
[_target, "activity", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_fullHeal), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
}; };

View File

@ -29,9 +29,10 @@ _items = _this select 4;
{ {
if (_x != "") then { if (_x != "") then {
[_target, _x] call FUNC(addToTriageCard); [_target, _x] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog);
}; };
}foreach _items; }foreach _items;
[_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog);
true; true;

View File

@ -30,3 +30,4 @@ _removeItem = _items select 0;
[[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ [[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
[_target, _removeItem] call FUNC(addToTriageCard); [_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_gaveIV), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", LSTRING(Activity_gaveIV), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_gaveIV), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message

View File

@ -44,6 +44,7 @@ _removeItem = _items select 0;
[_target, _removeItem] call FUNC(addToTriageCard); [_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
true; true;

Some files were not shown because too many files have changed in this diff Show More