Merge branch 'master' into virtualExplosivesPlace

This commit is contained in:
PabstMirror 2015-08-09 13:45:51 -05:00
commit b57ca91f69
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>
zGuba
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"
alt="ACE version">
</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"
alt="ACE download">
</a>

View File

@ -17,10 +17,10 @@
*/
#include "script_component.hpp"
private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
PARAMS_3(_attachToVehicle,_unit,_args);
_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam;
private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"];
params ["_attachToVehicle","_unit","_args"];
_args params [["_itemClassname","", [""]]];
TRACE_3("params",_attachToVehicle,_unit,_itemClassname);
//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");};
@ -69,9 +69,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
[{
private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"];
PARAMS_2(_args,_pfID);
EXPLODE_6_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_actionID);
params ["_args","_idPFH"];
_args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"];
_virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]);
if (cameraView == "EXTERNAL") then {
@ -88,7 +87,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} ||
{!([_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);
[] call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);

View File

@ -17,14 +17,14 @@
*/
#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);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];
_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"
PARAMS_2(_attachToVehicle,_unit);
private ["_attachedObjects", "_inRange"];
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);
_attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []];

View File

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

View File

@ -18,7 +18,8 @@
#include "script_component.hpp"
private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"];
PARAMS_2(_target,_player);
params ["_target","_player"];
TRACE_2("params",_target,_player);
_listed = [];
_actions = [];
@ -30,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_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];
};
};
@ -43,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_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];
};
};

View File

@ -27,7 +27,8 @@
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;

View File

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

View File

@ -5,6 +5,13 @@ class ACE_Settings {
typeName = "BOOL";
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) {
displayName = CSTRING(ModuleSettings_allowSurrender_name);
description = CSTRING(ModuleSettings_allowSurrender_description);

View File

@ -189,6 +189,26 @@ class CfgVehicles {
typeName = "BOOL";
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 {
description = CSTRING(ModuleSettings_Description);

View File

@ -16,11 +16,11 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
//Check sides, Player has cableTie, target is alive and not already handcuffed
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
("ACE_CableTie" in (items _unit)) &&
{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"
PARAMS_2(_unit,_target);
params ["_unit", "_target"];
//Alive, handcuffed, not being escored, and not unconscious
(_target getVariable [QGVAR(isHandcuffed), false]) &&

View File

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

View File

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

View File

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

View File

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

View File

@ -16,12 +16,12 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_newSurrenderState);
private "_returnValue";
params ["_unit", "_newSurrenderState"];
_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])}
} else {
//is Surrendering

View File

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

View File

@ -16,10 +16,11 @@
*/
#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];
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
_unit removeItem "ACE_CableTie";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_unit);
params ["_unit"];
// 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);

View File

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

View File

@ -13,7 +13,8 @@
#include "script_component.hpp"
PARAMS_1(_logic);
params ["_logic"];
[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] 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"
PARAMS_3(_logic,_units,_activated);
private ["_bisMouseOver", "_mouseOverObject"];
params ["_logic", "_units", "_activated"];
if (!_activated) exitWith {};
if (local _logic) then {

View File

@ -16,8 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_2(_unit,_state);
params ["_unit","_state"];
if (!local _unit) exitwith {
ERROR("running setHandcuffed on remote unit");
@ -43,7 +42,7 @@ if (_state) then {
// 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 {
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);

View File

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

View File

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

View File

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

View File

@ -221,5 +221,17 @@
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German>
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
</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>
</Project>

View File

@ -118,8 +118,9 @@ if(!isServer) then {
};
["SEH", FUNC(_handleSyncedEvent)] 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);
@ -340,6 +341,14 @@ if(isMultiplayer && { ACE_time > 0 || isNull player } ) then {
GVAR(deviceKeyHandlingArray) = [];
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"),
{
[] call FUNC(deviceKeyFindValidIndex);

View File

@ -65,7 +65,8 @@ if (isNil _name) then {
localizedDescription,
possibleValues,
isForced,
defaultValue
defaultValue,
category
];*/
_settingData = [
_name,
@ -75,7 +76,8 @@ if (isNil _name) then {
getText (_optionEntry >> "description"),
getArray (_optionEntry >> "values"),
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:

View File

@ -30,14 +30,14 @@ if (_vehicle isKindOf "Ship" ) then {
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} 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);
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeof _unit]);
};
};
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;

View File

@ -598,5 +598,86 @@
<Polish>Następne urządzenie podręczne</Polish>
<Czech>Procházet ruční zařízení</Czech>
</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>
</Project>

View File

@ -123,7 +123,8 @@ class CfgVehicles {
displayName = "$STR_ACE_ROLLWIRE";
distance = 4;
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;
exceptions[] = {};
priority = 5;

View File

@ -37,7 +37,7 @@ deleteVehicle _wirecoil;
_unit setVariable [QGVAR(wireDeployed), false];
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"];
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
@ -73,7 +73,7 @@ GVAR(deployPFH) = [{
{
_wireNoGeo animate [_x, _anim];
} 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);

View File

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

View File

@ -21,11 +21,8 @@
*/
#include "script_component.hpp"
private ["_unit", "_weapon", "_projectile", "_replacementTube", "_items"];
_unit = _this select 0;
_weapon = _this select 1;
_projectile = _this select 6;
private ["_replacementTube", "_items"];
params ["_unit", "_weapon", "", "", "", "", "_projectile"];
if (!local _unit) exitWith {};
@ -43,19 +40,19 @@ _unit selectWeapon _replacementTube;
//Re-add all attachments to the used tube
{
if (_x != "") then {_unit addSecondaryWeaponItem _x};
} forEach _items;
} count _items;
// AI - Remove the ai's missle launcher tube after the missle has exploded
if !([_unit] call EFUNC(common,isPlayer)) then {
[{
EXPLODE_2_PVT(_this,_params,_pfhId);
EXPLODE_3_PVT(_params,_unit,_tube,_projectile);
params ["args","_idPFH"];
_args params ["_unit", "_tube", "_projectile"];
//don't do anything until projectile is null (exploded/max range)
if (isNull _projectile) then {
//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 (((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 setPosAsl (getPosAsl _unit);
_container addWeaponCargoGlobal [_tube, 1];
//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:
// {
// if (_x != "") then {_container addItemCargoGlobal [_x, 1];};
// } forEach _items;
_unit removeWeaponGlobal _tube;
};
}, 1, [_unit, _replacementTube, _projectile]] call CBA_fnc_addPerFrameHandler;

View File

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

View File

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

View File

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

View File

@ -109,6 +109,27 @@ class CfgVehicles {
typeName = "BOOL";
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 {
description = CSTRING(Module_Description);

View File

@ -16,4 +16,9 @@ if !(_activated) exitWith {};
[_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.";

View File

@ -126,7 +126,7 @@
<Portuguese>Ativar surdez em combate?</Portuguese>
</Key>
<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>
<Spanish>Habilita la sordera de combate</Spanish>
<German>Aktiviere Taubheit im Gefecht?</German>
@ -134,7 +134,7 @@
<Portuguese>Ativar surdez em combate?</Portuguese>
</Key>
<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>
<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>

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp";
EXPLODE_1_PVT(_this,_target);
params ["_target"];
private ["_objectType","_actionsVarName","_isMan"];
_objectType = _target;
@ -29,7 +29,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
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 = [];
{

View File

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

View File

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

View File

@ -26,56 +26,31 @@
*/
#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);
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 {
_position = if (typeName (_position) == "STRING") then {
// 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 {
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
compile format ["%1", _this select 7];
compile format ["%1", _position];
} 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,

View File

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

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_actionTreeList,_parentPath);
params ["_actionTreeList", "_parentPath"];
private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"];
@ -31,10 +31,10 @@ _parentNode = [[],_actionTreeList];
_foundParentNode = false;
_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 (count _parentPath == _level + 1) exitWith {

View File

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

View File

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

View File

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

View File

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

View File

@ -17,11 +17,11 @@
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
params ["_objectType", "_typeNum", "_fullPath"];
private ["_res","_varName","_actionTrees", "_parentNode", "_found"];
_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];
_actionTrees = missionNamespace getVariable [_varName, []];

View File

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

View File

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

View File

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

View File

@ -16,7 +16,8 @@
#include "script_component.hpp"
#define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa)
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];

View File

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

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
EXPLODE_2_PVT(_this,_sPos,_icon);
params ["_sPos", "_icon"];
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
_mixColor = {
PARAMS_3(_color1,_color2,_ratio);
params ["_color1", "_color2", "_ratio"];
private ["_return", "_mix", "_index"];
_return = "";
for "_index" from 0 to 3 do {

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
PARAMS_1(_interactionType);
params ["_interactionType"];
//Ignore if not enabled:
if (!GVAR(addBuildingActions)) exitWith {};
@ -27,8 +27,8 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
[{
private ["_nearBuidlings", "_typeOfHouse", "_houseBeingScaned", "_actionSet", "_memPoints", "_memPointsActions", "_helperPos", "_helperObject"];
PARAMS_2(_args,_pfID);
EXPLODE_4_PVT(_args,_setPosition,_addedHelpers,_housesScaned,_housesToScanForActions);
params ["_args", "_pfID"];
_args params ["_setPosition", "_addedHelpers", "_housesScaned", "_housesToScanForActions"];
if (!EGVAR(interact_menu,keyDown)) then {
{deleteVehicle _x;} forEach _addedHelpers;
@ -75,7 +75,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {};
_housesScaned pushBack _houseBeingScaned;
_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];
{

View File

@ -12,7 +12,7 @@
*/
#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"];
@ -24,7 +24,7 @@ _memPointsActions = [];
//Get the offset for a memory point:
_fnc_getMemPointOffset = {
PARAMS_1(_memoryPoint);
params ["_memoryPoint"];
_memPointIndex = _memPoints find _memoryPoint;
_actionOffset = [0,0,0];
if (_memPointIndex == -1) then {
@ -38,14 +38,14 @@ _fnc_getMemPointOffset = {
// Add UserActions for the building:
_fnc_userAction_Statement = {
PARAMS_3(_target,_player,_variable);
EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition);
params ["_target", "_player", "_variable"];
_variable params ["_actionStatement", "_actionCondition"];
this = _target getVariable [QGVAR(building), objNull];
call _actionStatement;
};
_fnc_userAction_Condition = {
PARAMS_3(_target,_player,_variable);
EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition);
params ["_target", "_player", "_variable"];
_variable params ["_actionStatement", "_actionCondition"];
this = _target getVariable [QGVAR(building), objNull];
if (isNull this) exitWith {false};
call _actionCondition;
@ -84,29 +84,29 @@ for "_index" from 0 to ((count _configPath) - 1) do {
// Add Ladder Actions for the building:
_fnc_ladder_ladderUp = {
PARAMS_3(_target,_player,_variable);
EXPLODE_1_PVT(_variable,_ladderIndex);
params ["_target", "_player", "_variable"];
_variable params ["_ladderIndex"];
_building = _target getVariable [QGVAR(building), objNull];
TRACE_3("Ladder Action - UP",_player,_building,_ladderIndex);
_player action ["LadderUp", _building, _ladderIndex, 0];
};
_fnc_ladder_ladderDown = {
PARAMS_3(_target,_player,_variable);
EXPLODE_1_PVT(_variable,_ladderIndex);
params ["_target", "_player", "_variable"];
_variable params ["_ladderIndex"];
_building = _target getVariable [QGVAR(building), objNull];
TRACE_3("Ladder Action - Down",_player,_building,_ladderIndex);
_player action ["LadderDown", _building, _ladderIndex, 1];
};
_fnc_ladder_conditional = {
PARAMS_2(_target,_player);
params ["_target", "_player"];
//(Check distance < 2) and (Don't show actions if on a ladder)
((_target distance _player) < 2) && {((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _player) >> "onLadder")) == 0)}
};
_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

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>
<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 ID="STR_ACE_Interact_Menu_Category_InteractionMenu">
<English>Interaction Menu</English>
<Polish>Menu interakcji</Polish>
</Key>
</Package>
</Project>
</Project>

View File

@ -91,7 +91,7 @@ class CfgVehicles {
class ACE_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);
showDisabled = 0;
priority = 2.6;
@ -351,7 +351,7 @@ class CfgVehicles {
hotkey = "7";
};
class ACE_Gesture_Yes {
displayName = CSTRING(Gestures_Yes);
displayName = ECSTRING(common,Yes);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
showDisabled = 1;
@ -359,7 +359,7 @@ class CfgVehicles {
hotkey = "8";
};
class ACE_Gesture_No {
displayName = CSTRING(Gestures_No);
displayName = ECSTRING(common,No);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureNo';);
showDisabled = 1;

View File

@ -385,30 +385,6 @@
<Portuguese>Olá</Portuguese>
<Italian>Ciao</Italian>
</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">
<English>Put weapon on back</English>
<German>Waffe wegstecken</German>

View File

@ -14,7 +14,13 @@
visibleMap &&
{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)} &&
{!GVAR(mapTool_isDragging)} &&
{!GVAR(mapTool_isRotating)}

View File

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

View File

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

View File

@ -92,7 +92,7 @@ class CfgVehicles {
typeName = "NUMBER";
class values {
class disable {
name = CSTRING(disabled);
name = ECSTRING(common,Disabled);
value = 0;
};
class normal {
@ -101,7 +101,7 @@ class CfgVehicles {
default = 1;
};
class full {
name = CSTRING(enabled);
name = ECSTRING(common,Enabled);
value = 2;
};
};
@ -198,8 +198,8 @@ class CfgVehicles {
description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "NUMBER";
class values {
class keep { name = CSTRING(No); value = 0; };
class remove { name = CSTRING(Yes); value = 1; default = 1; };
class keep { name = ECSTRING(common,No); value = 0; };
class remove { name = ECSTRING(common,Yes); value = 1; default = 1; };
};
};
class useCondition_PAK {
@ -220,7 +220,7 @@ class CfgVehicles {
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
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 {
@ -280,7 +280,7 @@ class CfgVehicles {
typeName = "NUMBER";
defaultValue = 0;
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 playerAndAI { name = CSTRING(playersandai); value = 2; };
};
@ -373,11 +373,11 @@ class CfgVehicles {
typeName = "NUMBER";
class values {
class none {
name = CSTRING(No);
name = ECSTRING(common,No);
value = 0;
};
class medic {
name = CSTRING(Yes);
name = ECSTRING(common,Yes);
value = 1;
default = 1;
};
@ -717,6 +717,9 @@ class CfgVehicles {
destrType = "DestructNo";
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 {
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 {
[_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 {
[_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);
[_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"
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;
_target = _this select 1;
_selectionName = _this select 2;
@ -44,6 +44,8 @@ if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
_items = getArray (_config >> "items");
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;
if (getText (_config >> "condition") != "") then {

View File

@ -16,12 +16,13 @@
#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;
_target = _this select 1;
_selectionName = _this select 2;
_className = _this select 3;
_usersOfItems = _this select 5;
_previousDamage = _this select 6;
if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
@ -76,7 +77,7 @@ _createdLitter = [];
_litterCondition = missionNamespace getvariable _litterCondition;
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 {
// 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]];
if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then {
GVAR(litterPFHRunning) = true;
[{
{
if (ACE_time - (_x select 0) >= GVAR(litterCleanUpDelay)) then {

View File

@ -16,7 +16,7 @@
#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;
_target = _this select 1;
_selectionName = _this select 2;
@ -49,6 +49,9 @@ _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
_allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false};
// Check item
_items = getArray (_config >> "items");
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");
};
_caller setvariable [QGVAR(selectedWeaponOnTreatment), currentWeapon _caller];
_caller setvariable [QGVAR(selectedWeaponOnTreatment), (weaponState _caller)];
// Cannot use secondairy weapon for animation
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, "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;

View File

@ -38,5 +38,6 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
}foreach _items;*/
[_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;

View File

@ -68,4 +68,7 @@ if (alive _target) exitwith {
// Resetting damage
_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 {
[_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;
[_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog);
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, _removeItem] call FUNC(addToTriageCard);
[_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, "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;

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