mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into optics
This commit is contained in:
commit
1dea63067a
@ -149,11 +149,6 @@ class CfgVehicles {
|
|||||||
MACRO_LOADUNLOADCAPTIVE
|
MACRO_LOADUNLOADCAPTIVE
|
||||||
};
|
};
|
||||||
|
|
||||||
class StaticMortar;
|
|
||||||
class Mortar_01_base_F: StaticMortar {
|
|
||||||
MACRO_LOADUNLOADCAPTIVE
|
|
||||||
};
|
|
||||||
|
|
||||||
class Box_NATO_Support_F;
|
class Box_NATO_Support_F;
|
||||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||||
class TransportItems {
|
class TransportItems {
|
||||||
|
@ -27,7 +27,7 @@ if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
|||||||
|
|
||||||
_listedItemClasses = [];
|
_listedItemClasses = [];
|
||||||
|
|
||||||
_actions = [localize "STR_ACE_Captives_FriskMenuHeader", localize "STR_ACE_Captives_CancelSelection"] call ACE_Interaction_fnc_prepareSelectMenu;
|
_actions = [localize "STR_ACE_Captives_FriskMenuHeader", ""] call ACE_Interaction_fnc_prepareSelectMenu;
|
||||||
|
|
||||||
_allGear = [];
|
_allGear = [];
|
||||||
|
|
||||||
|
@ -20,11 +20,9 @@ PARAMS_2(_unit,_isUnconc);
|
|||||||
|
|
||||||
if (!local _unit) exitWith {};
|
if (!local _unit) exitWith {};
|
||||||
|
|
||||||
systemChat format ["med: %1", _this];
|
|
||||||
|
|
||||||
if (_isUnconc) then {
|
if (_isUnconc) then {
|
||||||
//Knocked out: If surrendering, stop
|
//Knocked out: If surrendering, stop
|
||||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||||
[_unit, false] call FUNC(setSurrendered);
|
[_unit, false] call FUNC(setSurrendered);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
@ -107,4 +107,21 @@ class CfgVehicles {
|
|||||||
class TransportItems {};
|
class TransportItems {};
|
||||||
class TransportBackpacks {};
|
class TransportBackpacks {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Item_Base_F;
|
||||||
|
class ACE_bananaItem: Item_Base_F {
|
||||||
|
scope = 2;
|
||||||
|
scopeCurator = 2;
|
||||||
|
displayName = "$STR_ACE_Common_bananaDisplayName";
|
||||||
|
author = "$STR_ACE_Common_ACETeam";
|
||||||
|
vehicleClass = "Items";
|
||||||
|
class TransportItems
|
||||||
|
{
|
||||||
|
class ACE_banana
|
||||||
|
{
|
||||||
|
name = "ACE_banana";
|
||||||
|
count = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -106,31 +106,60 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
|
|||||||
|
|
||||||
// PFH to raise varios events
|
// PFH to raise varios events
|
||||||
[{
|
[{
|
||||||
|
if(!isNil "ACE_player" && { !isNull ACE_player }) then {
|
||||||
|
// "playerInventoryChanged" event
|
||||||
|
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
||||||
|
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
|
||||||
|
// Raise ACE event locally
|
||||||
|
GVAR(OldPlayerInventory) = _newPlayerInventory;
|
||||||
|
["playerInventoryChanged", [ACE_player, _newPlayerInventory]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
|
|
||||||
// "playerInventoryChanged" event
|
// "playerVisionModeChanged" event
|
||||||
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
_newPlayerVisionMode = currentVisionMode ACE_player;
|
||||||
if !(_newPlayerInventory isEqualTo GVAR(OldPlayerInventory)) then {
|
if !(_newPlayerVisionMode isEqualTo GVAR(OldPlayerVisionMode)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerInventory) = _newPlayerInventory;
|
GVAR(OldPlayerVisionMode) = _newPlayerVisionMode;
|
||||||
["playerInventoryChanged", [ACE_player, _newPlayerInventory]] call FUNC(localEvent);
|
["playerVisionModeChanged", [ACE_player, _newPlayerVisionMode]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
|
|
||||||
|
// "inventoryDisplayChanged" event
|
||||||
|
_newInventoryDisplayIsOpen = !(isNull findDisplay 602);
|
||||||
|
if !(_newInventoryDisplayIsOpen isEqualTo GVAR(OldInventoryDisplayIsOpen)) then {
|
||||||
|
// Raise ACE event locally
|
||||||
|
GVAR(OldInventoryDisplayIsOpen) = _newInventoryDisplayIsOpen;
|
||||||
|
["inventoryDisplayChanged", [ACE_player, _newInventoryDisplayIsOpen]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
|
|
||||||
|
// "playerVehicleChanged" event
|
||||||
|
_newPlayerVehicle = vehicle ACE_player;
|
||||||
|
if !(_newPlayerVehicle isEqualTo GVAR(OldPlayerVehicle)) then {
|
||||||
|
// Raise ACE event locally
|
||||||
|
GVAR(OldPlayerVehicle) = _newPlayerVehicle;
|
||||||
|
["playerVehicleChanged", [ACE_player, _newPlayerVehicle]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
|
|
||||||
|
// "playerTurretChanged" event
|
||||||
|
_newPlayerTurret = [ACE_player] call FUNC(getTurretIndex);
|
||||||
|
if !(_newPlayerTurret isEqualTo GVAR(OldPlayerTurret)) then {
|
||||||
|
// Raise ACE event locally
|
||||||
|
GVAR(OldPlayerTurret) = _newPlayerTurret;
|
||||||
|
["playerTurretChanged", [ACE_player, _newPlayerTurret]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
|
|
||||||
|
// "playerWeaponChanged" event
|
||||||
|
_newPlayerWeapon = currentWeapon ACE_player;
|
||||||
|
if (_newPlayerWeapon != GVAR(OldPlayerWeapon)) then {
|
||||||
|
// Raise ACE event locally
|
||||||
|
GVAR(OldPlayerWeapon) = _newPlayerWeapon;
|
||||||
|
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerVisionModeChanged" event
|
//
|
||||||
_newPlayerVisionMode = currentVisionMode ACE_player;
|
// These events can fire on a null player object
|
||||||
if !(_newPlayerVisionMode isEqualTo GVAR(OldPlayerVisionMode)) then {
|
//
|
||||||
// Raise ACE event locally
|
|
||||||
GVAR(OldPlayerVisionMode) = _newPlayerVisionMode;
|
|
||||||
["playerVisionModeChanged", [ACE_player, _newPlayerVisionMode]] call FUNC(localEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
// "inventoryDisplayChanged" event
|
|
||||||
_newInventoryDisplayIsOpen = !(isNull findDisplay 602);
|
|
||||||
if !(_newInventoryDisplayIsOpen isEqualTo GVAR(OldInventoryDisplayIsOpen)) then {
|
|
||||||
// Raise ACE event locally
|
|
||||||
GVAR(OldInventoryDisplayIsOpen) = _newInventoryDisplayIsOpen;
|
|
||||||
["inventoryDisplayChanged", [ACE_player, _newInventoryDisplayIsOpen]] call FUNC(localEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
// "zeusDisplayChanged" event
|
// "zeusDisplayChanged" event
|
||||||
_newZeusDisplayIsOpen = !(isNull findDisplay 312);
|
_newZeusDisplayIsOpen = !(isNull findDisplay 312);
|
||||||
if !(_newZeusDisplayIsOpen isEqualTo GVAR(OldZeusDisplayIsOpen)) then {
|
if !(_newZeusDisplayIsOpen isEqualTo GVAR(OldZeusDisplayIsOpen)) then {
|
||||||
@ -138,7 +167,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
|
|||||||
GVAR(OldZeusDisplayIsOpen) = _newZeusDisplayIsOpen;
|
GVAR(OldZeusDisplayIsOpen) = _newZeusDisplayIsOpen;
|
||||||
["zeusDisplayChanged", [ACE_player, _newZeusDisplayIsOpen]] call FUNC(localEvent);
|
["zeusDisplayChanged", [ACE_player, _newZeusDisplayIsOpen]] call FUNC(localEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
// "cameraViewChanged" event
|
// "cameraViewChanged" event
|
||||||
_newCameraView = cameraView;
|
_newCameraView = cameraView;
|
||||||
if !(_newCameraView isEqualTo GVAR(OldCameraView)) then {
|
if !(_newCameraView isEqualTo GVAR(OldCameraView)) then {
|
||||||
@ -146,31 +175,7 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
|
|||||||
GVAR(OldCameraView) = _newCameraView;
|
GVAR(OldCameraView) = _newCameraView;
|
||||||
["cameraViewChanged", [ACE_player, _newCameraView]] call FUNC(localEvent);
|
["cameraViewChanged", [ACE_player, _newCameraView]] call FUNC(localEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerVehicleChanged" event
|
|
||||||
_newPlayerVehicle = vehicle ACE_player;
|
|
||||||
if !(_newPlayerVehicle isEqualTo GVAR(OldPlayerVehicle)) then {
|
|
||||||
// Raise ACE event locally
|
|
||||||
GVAR(OldPlayerVehicle) = _newPlayerVehicle;
|
|
||||||
["playerVehicleChanged", [ACE_player, _newPlayerVehicle]] call FUNC(localEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
// "playerTurretChanged" event
|
|
||||||
_newPlayerTurret = [ACE_player] call FUNC(getTurretIndex);
|
|
||||||
if !(_newPlayerTurret isEqualTo GVAR(OldPlayerTurret)) then {
|
|
||||||
// Raise ACE event locally
|
|
||||||
GVAR(OldPlayerTurret) = _newPlayerTurret;
|
|
||||||
["playerTurretChanged", [ACE_player, _newPlayerTurret]] call FUNC(localEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
// "playerWeaponChanged" event
|
|
||||||
_newPlayerWeapon = currentWeapon ACE_player;
|
|
||||||
if (_newPlayerWeapon != GVAR(OldPlayerWeapon)) then {
|
|
||||||
// Raise ACE event locally
|
|
||||||
GVAR(OldPlayerWeapon) = _newPlayerWeapon;
|
|
||||||
["playerWeaponChanged", [ACE_player, _newPlayerWeapon]] call FUNC(localEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
units[] = {"ACE_Box_Misc"};
|
units[] = {"ACE_Box_Misc", "ACE_bananaItem"};
|
||||||
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"};
|
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_main"};
|
requiredAddons[] = {"ace_main"};
|
||||||
|
@ -7,7 +7,6 @@ private ["_eventType", "_event", "_eventName", "_eventArgs", "_eventNames", "_ev
|
|||||||
_eventType = _this select 0;
|
_eventType = _this select 0;
|
||||||
_event = _this select 1;
|
_event = _this select 1;
|
||||||
|
|
||||||
|
|
||||||
if(_eventType == "ACEg") then {
|
if(_eventType == "ACEg") then {
|
||||||
_eventName = _event select 0;
|
_eventName = _event select 0;
|
||||||
_eventArgs = _event select 1;
|
_eventArgs = _event select 1;
|
||||||
@ -16,9 +15,18 @@ if(_eventType == "ACEg") then {
|
|||||||
_eventIndex = _eventNames find _eventName;
|
_eventIndex = _eventNames find _eventName;
|
||||||
if(_eventIndex != -1) then {
|
if(_eventIndex != -1) then {
|
||||||
_events = (GVAR(events) select 1) select _eventIndex;
|
_events = (GVAR(events) select 1) select _eventIndex;
|
||||||
|
|
||||||
|
#ifdef DEBUG_EVENTS
|
||||||
|
diag_log text format[ARR_2("* Net Event %1",_eventName)];
|
||||||
|
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
if(!isNil "_x") then {
|
if(!isNil "_x") then {
|
||||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
|
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||||
|
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||||
|
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
} forEach _events;
|
} forEach _events;
|
||||||
};
|
};
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
#define DEBUG_MODE_FULL
|
#define DEBUG_MODE_FULL
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
/*
|
|
||||||
diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
||||||
diag_log text format["-------------------------------------------"];
|
diag_log text format["-------------------------------------------"];
|
||||||
if(!isNil "ACE_PFH") then {
|
if(!isNil "ACE_PFH_COUNTER") then {
|
||||||
{
|
{
|
||||||
private["_pfh"];
|
private["_pfh"];
|
||||||
_pfh = _x select 0;
|
_pfh = _x select 0;
|
||||||
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
||||||
} forEach ACE_PFH;
|
} forEach ACE_PFH_COUNTER;
|
||||||
};*/
|
};
|
||||||
|
|
||||||
diag_log text format["ACE COUNTER RESULTS"];
|
diag_log text format["ACE COUNTER RESULTS"];
|
||||||
diag_log text format["-------------------------------------------"];
|
diag_log text format["-------------------------------------------"];
|
||||||
|
@ -19,9 +19,17 @@ _eventNames = GVAR(events) select 0;
|
|||||||
_eventIndex = _eventNames find _eventName;
|
_eventIndex = _eventNames find _eventName;
|
||||||
if(_eventIndex != -1) then {
|
if(_eventIndex != -1) then {
|
||||||
_events = (GVAR(events) select 1) select _eventIndex;
|
_events = (GVAR(events) select 1) select _eventIndex;
|
||||||
|
#ifdef DEBUG_EVENTS
|
||||||
|
diag_log text format[ARR_2("* Local Event: %1",_eventName)];
|
||||||
|
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
if(!isNil "_x") then {
|
if(!isNil "_x") then {
|
||||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Local Event %1 ID: %2",_eventName,_forEachIndex)]);
|
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Local Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||||
|
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||||
|
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
} forEach _events;
|
} forEach _events;
|
||||||
};
|
};
|
@ -16,6 +16,10 @@ private ["_eventName", "_eventArgs"];
|
|||||||
_eventName = _this select 0;
|
_eventName = _this select 0;
|
||||||
_eventArgs = _this select 1;
|
_eventArgs = _this select 1;
|
||||||
|
|
||||||
|
#ifdef DEBUG_EVENTS
|
||||||
|
diag_log text format[ARR_2("* Server Event: %1",_eventName)];
|
||||||
|
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||||
|
#endif
|
||||||
|
|
||||||
ACEg = [_eventName, _eventArgs];
|
ACEg = [_eventName, _eventArgs];
|
||||||
if(!isServer) then {
|
if(!isServer) then {
|
||||||
|
@ -21,6 +21,11 @@ _eventName = _this select 0;
|
|||||||
_eventTargets = _this select 1;
|
_eventTargets = _this select 1;
|
||||||
_eventArgs = _this select 2;
|
_eventArgs = _this select 2;
|
||||||
|
|
||||||
|
#ifdef DEBUG_EVENTS
|
||||||
|
diag_log text format[ARR_3("* Target Event: %1 - %2",_eventName,_eventTargets)];
|
||||||
|
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||||
|
#endif
|
||||||
|
|
||||||
ACEc = [_eventName, _eventTargets, _eventArgs];
|
ACEc = [_eventName, _eventTargets, _eventArgs];
|
||||||
if(!isServer) then {
|
if(!isServer) then {
|
||||||
publicVariableServer "ACEc";
|
publicVariableServer "ACEc";
|
||||||
|
@ -23,11 +23,6 @@ class Extended_Init_EventHandlers {
|
|||||||
init = QUOTE(_this call DFUNC(initObject));
|
init = QUOTE(_this call DFUNC(initObject));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class StaticMortar {
|
|
||||||
class ADDON {
|
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class ReammoBox_F {
|
class ReammoBox_F {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
init = QUOTE(_this call DFUNC(initObject));
|
||||||
|
@ -56,11 +56,12 @@ if (_target isKindOf "CAManBase") then {
|
|||||||
|
|
||||||
[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus);
|
[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus);
|
||||||
|
|
||||||
// prevent multiple players from accessing the same object
|
|
||||||
[_unit, _target, true] call EFUNC(common,claim);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// prevent multiple players from accessing the same object
|
||||||
|
[_unit, _target, true] call EFUNC(common,claim);
|
||||||
|
|
||||||
|
|
||||||
// prevents draging and carrying at the same time
|
// prevents draging and carrying at the same time
|
||||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ _gRedOut = MINVIRTUALG / _classCoef;
|
|||||||
|
|
||||||
// @todo: Sort the interaction with medical
|
// @todo: Sort the interaction with medical
|
||||||
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
|
if ((_average > _gBlackOut) and {isClass (configFile >> "CfgPatches" >> "ACE_Medical") and {!(ACE_player getVariable ["ACE_isUnconscious", false])}}) then {
|
||||||
[ACE_player, (10 + floor(random 5))] call EFUNC(medical,knockOut);
|
[ACE_player, true, (10 + floor(random 5))] call EFUNC(medical,setUnconscious);
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];
|
GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]];
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
//XEH_clientInit.sqf
|
//XEH_clientInit.sqf
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
// Install the render EH on the main display
|
// Install the render EH on the main display
|
||||||
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||||
|
|
||||||
@ -10,17 +12,17 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
|||||||
// Wait until the map display is detected
|
// Wait until the map display is detected
|
||||||
waitUntil {(!isNull findDisplay 12)};
|
waitUntil {(!isNull findDisplay 12)};
|
||||||
|
|
||||||
// Install the render EH on the map screen
|
// Install the render EH on the map screen
|
||||||
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", DFUNC(render)];
|
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", DFUNC(render)];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
["ACE3", QGVAR(InteractKey), "Interact Key",
|
["ACE3", QGVAR(InteractKey), (localize "STR_ACE_Interact_Menu_InteractKey"),
|
||||||
{[0] call FUNC(keyDown)},
|
{[0] call FUNC(keyDown)},
|
||||||
{[0] call FUNC(keyUp)},
|
{[0] call FUNC(keyUp)},
|
||||||
[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key
|
[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key
|
||||||
|
|
||||||
["ACE3", QGVAR(SelfInteractKey), "Self Actions Key",
|
["ACE3", QGVAR(SelfInteractKey), (localize "STR_ACE_Interact_Menu_SelfInteractKey"),
|
||||||
{[1] call FUNC(keyDown)},
|
{[1] call FUNC(keyDown)},
|
||||||
{[1] call FUNC(keyUp)},
|
{[1] call FUNC(keyUp)},
|
||||||
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
|
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
|
||||||
|
@ -83,11 +83,19 @@ private ["_baseDisplayName", "_baseIcon"];
|
|||||||
_baseDisplayName = "";
|
_baseDisplayName = "";
|
||||||
_baseIcon = "";
|
_baseIcon = "";
|
||||||
if (_objectType isKindOf "CAManBase") then {
|
if (_objectType isKindOf "CAManBase") then {
|
||||||
_baseDisplayName = "Self Actions";
|
_baseDisplayName = localize "STR_ACE_Interact_Menu_SelfActionsRoot";
|
||||||
_baseIcon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
|
_baseIcon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
|
||||||
} else {
|
} else {
|
||||||
_baseDisplayName = getText (configFile >> "CfgVehicles" >> _objectType >> "displayName");
|
_baseDisplayName = getText (configFile >> "CfgVehicles" >> _objectType >> "displayName");
|
||||||
|
//Alt would be to just use a static text, if veh names end up being too long:
|
||||||
|
// _baseDisplayName = localize "STR_ACE_Interact_Menu_VehicleActionsRoot";
|
||||||
|
|
||||||
|
//Pull the icon from the vehicle's config:
|
||||||
_baseIcon = getText (configFile >> "CfgVehicles" >> _objectType >> "Icon");
|
_baseIcon = getText (configFile >> "CfgVehicles" >> _objectType >> "Icon");
|
||||||
|
//icon could be a CfgVehicleIcons
|
||||||
|
if isText (configFile >> "CfgVehicleIcons" >> _baseIcon) then {
|
||||||
|
_baseIcon = getText (configFile >> "CfgVehicleIcons" >> _baseIcon);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a master action to base on self action
|
// Create a master action to base on self action
|
||||||
|
@ -89,7 +89,7 @@ _fnc_renderSelfActions = {
|
|||||||
{
|
{
|
||||||
_action = _x;
|
_action = _x;
|
||||||
|
|
||||||
_pos = if !(visibleMap) then {
|
_pos = if !(GVAR(useCursorMenu)) then {
|
||||||
(((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)) vectorAdd GVAR(selfMenuOffset)) call EFUNC(common,ASLToPosition)
|
(((positionCameraToWorld [0, 0, 0]) call EFUNC(common,positionToASL)) vectorAdd GVAR(selfMenuOffset)) call EFUNC(common,ASLToPosition)
|
||||||
} else {
|
} else {
|
||||||
[0.5, 0.5]
|
[0.5, 0.5]
|
||||||
|
@ -35,7 +35,7 @@ GVAR(iconCount) = GVAR(iconCount) + 1;
|
|||||||
if(_icon == "") then {
|
if(_icon == "") then {
|
||||||
_icon = DEFAULT_ICON;
|
_icon = DEFAULT_ICON;
|
||||||
};
|
};
|
||||||
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center'>%4</t>", _icon, _color, _color, _text];
|
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='1' shadowColor='#000000' shadowOffset='0.07'>%4</t>", _icon, _color, _color, _text];
|
||||||
_ctrl ctrlSetStructuredText (parseText _text);
|
_ctrl ctrlSetStructuredText (parseText _text);
|
||||||
_ctrl ctrlSetPosition [(_sPos select 0)-(0.125*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.25*SafeZoneW, 0.1*SafeZoneW];
|
_ctrl ctrlSetPosition [(_sPos select 0)-(0.125*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.25*SafeZoneW, 0.1*SafeZoneW];
|
||||||
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
|
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
|
||||||
|
@ -1,7 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Edited with tabler - 2015-04-03 -->
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="Interact_Menu">
|
<Package name="Interact_Menu">
|
||||||
<Key ID="STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction">
|
<Key ID="STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction">
|
||||||
<English>Always display cursor for self interaction</English>
|
<English>Always display cursor for self interaction</English>
|
||||||
</Key>
|
</Key>
|
||||||
</Project>
|
<Key ID="STR_ACE_Interact_Menu_InteractKey">
|
||||||
|
<English>Interact Key</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Interact_Menu_SelfInteractKey">
|
||||||
|
<English>Self Interaction Key</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Interact_Menu_SelfActionsRoot">
|
||||||
|
<English>Self Actions</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Interact_Menu_VehicleActionsRoot">
|
||||||
|
<English>Vehicle Actions</English>
|
||||||
|
</Key>
|
||||||
|
</Package>
|
||||||
|
</Project>
|
@ -525,26 +525,6 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class StaticMortar;
|
|
||||||
class Mortar_01_base_F: StaticMortar {
|
|
||||||
class ACE_Actions {
|
|
||||||
class ACE_MainActions {
|
|
||||||
displayName = "$STR_ACE_Interaction_MainAction";
|
|
||||||
selection = "gunnerview";
|
|
||||||
distance = 2;
|
|
||||||
condition = "true";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class ACE_SelfActions {
|
|
||||||
class ACE_Passengers {
|
|
||||||
displayName = "$STR_ACE_Interaction_Passengers";
|
|
||||||
condition = "true";
|
|
||||||
statement = "";
|
|
||||||
insertChildren = QUOTE(_this call FUNC(addPassengersActions));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class thingX;
|
class thingX;
|
||||||
class ReammoBox_F: thingX {
|
class ReammoBox_F: thingX {
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
STACK TRACING
|
STACK TRACING
|
||||||
**/
|
**/
|
||||||
//#define ENABLE_CALLSTACK
|
//#define ENABLE_CALLSTACK
|
||||||
|
//#define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
//#define DEBUG_EVENTS
|
||||||
|
|
||||||
#ifdef ENABLE_CALLSTACK
|
#ifdef ENABLE_CALLSTACK
|
||||||
|
|
||||||
@ -29,7 +31,7 @@ PERFORMANCE COUNTERS SECTION
|
|||||||
//#define ENABLE_PERFORMANCE_COUNTERS
|
//#define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
|
||||||
#ifdef ENABLE_PERFORMANCE_COUNTERS
|
#ifdef ENABLE_PERFORMANCE_COUNTERS
|
||||||
#define ADDPFH(function, timing, args) call { _ret = [function, timing, args, #function] call EFUNC(sys_sync,perFrame_add); if(isNil "ACE_PFH" ) then { ACE_PFH=[]; }; ACE_PFH pushBack [[_ret, __FILE__, __LINE__], [function, timing, args]]; _ret }
|
#define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret }
|
||||||
|
|
||||||
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
|
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
|
||||||
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
|
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
|
||||||
@ -37,8 +39,6 @@ PERFORMANCE COUNTERS SECTION
|
|||||||
|
|
||||||
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
|
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
|
||||||
#else
|
#else
|
||||||
#define ADDPFH(function, timing, args) [function, timing, args, #function] call EFUNC(sys_sync,perFrame_add)
|
|
||||||
|
|
||||||
#define CREATE_COUNTER(x) /* disabled */
|
#define CREATE_COUNTER(x) /* disabled */
|
||||||
#define BEGIN_COUNTER(x) /* disabled */
|
#define BEGIN_COUNTER(x) /* disabled */
|
||||||
#define END_COUNTER(x) /* disabled */
|
#define END_COUNTER(x) /* disabled */
|
||||||
|
@ -49,34 +49,34 @@ class ACE_Medical_Actions {
|
|||||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
|
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
};
|
};
|
||||||
class Carry: Bandage {
|
class Tourniquet: Bandage {
|
||||||
displayName = "";
|
displayName = "$STR_ACE_Medical_Apply_Tourniquet";
|
||||||
displayNameProgress = "";
|
displayNameProgress = "$STR_ACE_Medical_Applying_Tourniquet";
|
||||||
|
items[] = {"ACE_tourniquet"};
|
||||||
|
treatmentTime = 6;
|
||||||
|
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
|
||||||
|
condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)));
|
||||||
|
};
|
||||||
|
class BodyBag: Bandage {
|
||||||
|
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
|
||||||
|
displayNameProgress = "$STR_ACE_MEDICAL_PlacingInBodyBag";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 0;
|
treatmentTime = 2;
|
||||||
items[] = {};
|
items[] = {"ACE_bodyBag"};
|
||||||
condition = QUOTE(DFUNC(canCarry));
|
condition = "!alive (_this select 1);";
|
||||||
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, true)] call DFUNC(actionCarryUnit));
|
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
|
||||||
callbackFailure = "";
|
callbackFailure = "";
|
||||||
callbackProgress = "";
|
callbackProgress = "";
|
||||||
itemConsumed = 0;
|
|
||||||
animationPatient = "";
|
animationPatient = "";
|
||||||
animationCaller = "";
|
itemConsumed = 0;
|
||||||
animationCallerProne = "";
|
|
||||||
animationCallerSelf = "";
|
|
||||||
animationCallerSelfProne = "";
|
|
||||||
};
|
|
||||||
class Drag: Carry {
|
|
||||||
displayName = "";
|
|
||||||
displayNameProgress = "";
|
|
||||||
condition = QUOTE(DFUNC(canCarry));
|
|
||||||
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, false)] call DFUNC(actionCarryUnit));
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Advanced {
|
class Advanced {
|
||||||
class FieldDressing {
|
class FieldDressing {
|
||||||
|
displayName = "$STR_ACE_Medical_Bandage";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Bandaging";
|
||||||
// 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"};
|
||||||
// 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
|
||||||
@ -107,24 +107,34 @@ class ACE_Medical_Actions {
|
|||||||
items[] = {"ACE_quikclot"};
|
items[] = {"ACE_quikclot"};
|
||||||
};
|
};
|
||||||
class Tourniquet: fieldDressing {
|
class Tourniquet: fieldDressing {
|
||||||
|
displayName = "$STR_ACE_Medical_Apply_Tourniquet";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Applying_Tourniquet";
|
||||||
items[] = {"ACE_tourniquet"};
|
items[] = {"ACE_tourniquet"};
|
||||||
treatmentTime = 6;
|
treatmentTime = 6;
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
|
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
|
||||||
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)));
|
||||||
};
|
};
|
||||||
class Morphine: fieldDressing {
|
class Morphine: fieldDressing {
|
||||||
|
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Injecting_Morphine";
|
||||||
items[] = {"ACE_morphine"};
|
items[] = {"ACE_morphine"};
|
||||||
treatmentTime = 3;
|
treatmentTime = 3;
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
|
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
};
|
};
|
||||||
class Atropine: Morphine {
|
class Atropine: Morphine {
|
||||||
|
displayName = "$STR_ACE_Medical_Inject_Atropine";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Injecting_Atropine";
|
||||||
items[] = {"ACE_atropine"};
|
items[] = {"ACE_atropine"};
|
||||||
};
|
};
|
||||||
class Epinephrine: Morphine {
|
class Epinephrine: Morphine {
|
||||||
|
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Injecting_Epinephrine";
|
||||||
items[] = {"ACE_epinephrine"};
|
items[] = {"ACE_epinephrine"};
|
||||||
};
|
};
|
||||||
class BloodIV: fieldDressing {
|
class BloodIV: fieldDressing {
|
||||||
|
displayName = "$STR_ACE_Medical_Transfuse_Blood";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood";
|
||||||
items[] = {"ACE_bloodIV"};
|
items[] = {"ACE_bloodIV"};
|
||||||
requiredMedic = 1;
|
requiredMedic = 1;
|
||||||
treatmentTime = 7;
|
treatmentTime = 7;
|
||||||
@ -138,6 +148,8 @@ class ACE_Medical_Actions {
|
|||||||
items[] = {"ACE_bloodIV_250"};
|
items[] = {"ACE_bloodIV_250"};
|
||||||
};
|
};
|
||||||
class PlasmaIV: BloodIV {
|
class PlasmaIV: BloodIV {
|
||||||
|
displayName = "$STR_ACE_Medical_Transfuse_Plasma";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Transfusing_Plasma";
|
||||||
items[] = {"ACE_plasmaIV"};
|
items[] = {"ACE_plasmaIV"};
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
};
|
};
|
||||||
@ -148,6 +160,8 @@ class ACE_Medical_Actions {
|
|||||||
items[] = {"ACE_plasmaIV_250"};
|
items[] = {"ACE_plasmaIV_250"};
|
||||||
};
|
};
|
||||||
class SalineIV: BloodIV {
|
class SalineIV: BloodIV {
|
||||||
|
displayName = "$STR_ACE_Medical_Transfuse_Saline";
|
||||||
|
displayNameProgress = "$STR_ACE_Medical_Transfusing_Saline";
|
||||||
items[] = {"ACE_salineIV"};
|
items[] = {"ACE_salineIV"};
|
||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
};
|
};
|
||||||
@ -158,6 +172,8 @@ class ACE_Medical_Actions {
|
|||||||
items[] = {"ACE_salineIV_250"};
|
items[] = {"ACE_salineIV_250"};
|
||||||
};
|
};
|
||||||
class SurgicalKit: fieldDressing {
|
class SurgicalKit: fieldDressing {
|
||||||
|
displayName = "";
|
||||||
|
displayNameProgress = "";
|
||||||
items[] = {"ACE_surgicalKit"};
|
items[] = {"ACE_surgicalKit"};
|
||||||
treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"};
|
treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"};
|
||||||
requiredMedic = 2;
|
requiredMedic = 2;
|
||||||
@ -167,6 +183,8 @@ class ACE_Medical_Actions {
|
|||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
};
|
};
|
||||||
class PersonalAidKit: fieldDressing {
|
class PersonalAidKit: fieldDressing {
|
||||||
|
displayName = "";
|
||||||
|
displayNameProgress = "";
|
||||||
items[] = {"ACE_personalAidKit"};
|
items[] = {"ACE_personalAidKit"};
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
requiredMedic = 1;
|
requiredMedic = 1;
|
||||||
@ -176,6 +194,8 @@ class ACE_Medical_Actions {
|
|||||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||||
};
|
};
|
||||||
class CheckPulse: fieldDressing {
|
class CheckPulse: fieldDressing {
|
||||||
|
displayName = "";
|
||||||
|
displayNameProgress = "";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 2;
|
treatmentTime = 2;
|
||||||
@ -199,11 +219,13 @@ class ACE_Medical_Actions {
|
|||||||
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));
|
||||||
};
|
};
|
||||||
class CPR: fieldDressing {
|
class CPR: fieldDressing {
|
||||||
|
displayName = "CPR";
|
||||||
|
displayNameProgress = "Performing CPR";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 25;
|
treatmentTime = 25;
|
||||||
items[] = {};
|
items[] = {};
|
||||||
condition = ""; // unconscious?
|
condition = "((_this select 1) getvariable ['ACE_medical_inCardiacArrest', false])";
|
||||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
|
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
|
||||||
callbackFailure = "";
|
callbackFailure = "";
|
||||||
callbackProgress = "";
|
callbackProgress = "";
|
||||||
@ -212,9 +234,11 @@ class ACE_Medical_Actions {
|
|||||||
itemConsumed = 0;
|
itemConsumed = 0;
|
||||||
};
|
};
|
||||||
class BodyBag: fieldDressing {
|
class BodyBag: fieldDressing {
|
||||||
|
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
|
||||||
|
displayNameProgress = "$STR_ACE_MEDICAL_PlacingInBodyBag";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 7.5;
|
treatmentTime = 2;
|
||||||
items[] = {"ACE_bodyBag"};
|
items[] = {"ACE_bodyBag"};
|
||||||
condition = "!alive (_this select 1);";
|
condition = "!alive (_this select 1);";
|
||||||
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
|
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
|
||||||
@ -223,31 +247,6 @@ class ACE_Medical_Actions {
|
|||||||
animationPatient = "";
|
animationPatient = "";
|
||||||
itemConsumed = 0;
|
itemConsumed = 0;
|
||||||
};
|
};
|
||||||
class Carry: fieldDressing {
|
|
||||||
displayName = "";
|
|
||||||
displayNameProgress = "";
|
|
||||||
treatmentLocations[] = {"All"};
|
|
||||||
requiredMedic = 0;
|
|
||||||
treatmentTime = 0;
|
|
||||||
items[] = {};
|
|
||||||
condition = QUOTE(DFUNC(canCarry));
|
|
||||||
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, true)] call DFUNC(actionCarryUnit));
|
|
||||||
callbackFailure = "";
|
|
||||||
callbackProgress = "";
|
|
||||||
itemConsumed = 0;
|
|
||||||
animationPatient = "";
|
|
||||||
animationCaller = "";
|
|
||||||
animationCallerProne = "";
|
|
||||||
animationCallerSelf = "";
|
|
||||||
animationCallerSelfProne = "";
|
|
||||||
};
|
|
||||||
class Drag: Carry {
|
|
||||||
displayName = "";
|
|
||||||
displayNameProgress = "";
|
|
||||||
condition = QUOTE(DFUNC(canCarry));
|
|
||||||
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, false)] call DFUNC(actionCarryUnit));
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -443,6 +442,8 @@ class ACE_Medical_Advanced {
|
|||||||
class damageTypes {
|
class damageTypes {
|
||||||
thresholds[] = {{0.1, 1}};
|
thresholds[] = {{0.1, 1}};
|
||||||
selectionSpecific = 1;
|
selectionSpecific = 1;
|
||||||
|
lethalDamage = 0.01;
|
||||||
|
|
||||||
class bullet {
|
class bullet {
|
||||||
// above damage, amount. Put the highest threshold to the left and lower the threshold with the elements to the right of it.
|
// above damage, amount. Put the highest threshold to the left and lower the threshold with the elements to the right of it.
|
||||||
thresholds[] = {{0.1, 1}};
|
thresholds[] = {{0.1, 1}};
|
||||||
@ -465,8 +466,9 @@ class ACE_Medical_Advanced {
|
|||||||
selectionSpecific = 0;
|
selectionSpecific = 0;
|
||||||
};
|
};
|
||||||
class backblast {
|
class backblast {
|
||||||
thresholds[] = {{0.25, 5}};
|
thresholds[] = {{0, 2},{0.55, 5}, {1, 6}};
|
||||||
selectionSpecific = 0;
|
selectionSpecific = 0;
|
||||||
|
lethalDamage = 1;
|
||||||
};
|
};
|
||||||
class stab {
|
class stab {
|
||||||
thresholds[] = {{0.1, 1}};
|
thresholds[] = {{0.1, 1}};
|
||||||
|
@ -26,10 +26,6 @@ class CfgVehicles {
|
|||||||
description = "What is the medical simulation level?";
|
description = "What is the medical simulation level?";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
class values {
|
class values {
|
||||||
class disable {
|
|
||||||
name = "Disabled";
|
|
||||||
value = 0;
|
|
||||||
};
|
|
||||||
class normal {
|
class normal {
|
||||||
name = "Basic";
|
name = "Basic";
|
||||||
value = 1;
|
value = 1;
|
||||||
@ -43,11 +39,11 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
class enableFor {
|
class enableFor {
|
||||||
displayName = "Enabled for";
|
displayName = "Enabled for";
|
||||||
description = "Select what units the medical system will be enabled for";
|
description = "Select what units the medical system will be enabled for (Adv only)";
|
||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
class values {
|
class values {
|
||||||
class playableUnits {
|
class playableUnits {
|
||||||
name = "Players only";
|
name = "Players only.";
|
||||||
value = 0;
|
value = 0;
|
||||||
default = 1;
|
default = 1;
|
||||||
};
|
};
|
||||||
@ -57,21 +53,22 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class enableAirway {
|
// TODO Disabled until the features are implemented
|
||||||
|
/*class enableAirway {
|
||||||
displayName = "Enable Airway";
|
displayName = "Enable Airway";
|
||||||
description = "Enable Advanced medical Airway";
|
description = "Enable Advanced medical Airway (Adv only)";
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
defaultValue = 0;
|
defaultValue = 0;
|
||||||
};
|
};
|
||||||
class enableFractures {
|
class enableFractures {
|
||||||
displayName = "Enable Fractures";
|
displayName = "Enable Fractures";
|
||||||
description = "Enable Advanced medical Fractures";
|
description = "Enable Advanced medical Fractures (Adv only)";
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
defaultValue = 0;
|
defaultValue = 0;
|
||||||
};
|
};*/
|
||||||
class enableAdvancedWounds {
|
class enableAdvancedWounds {
|
||||||
displayName = "Enable Advanced wounds";
|
displayName = "Enable Advanced wounds";
|
||||||
description = "Allow reopening of bandaged wounds?";
|
description = "Allow reopening of bandaged wounds? (Adv only)";
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
defaultValue = 0;
|
defaultValue = 0;
|
||||||
};
|
};
|
||||||
@ -170,6 +167,12 @@ class CfgVehicles {
|
|||||||
typeName = "NUMBER";
|
typeName = "NUMBER";
|
||||||
defaultValue = 1;
|
defaultValue = 1;
|
||||||
};
|
};
|
||||||
|
class maxReviveTime {
|
||||||
|
displayName = "Max Revive time";
|
||||||
|
description = "Max amount of seconds a unit can spend in revive state";
|
||||||
|
typeName = "NUMBER";
|
||||||
|
defaultValue = 1;
|
||||||
|
};
|
||||||
class enableOverdosing {
|
class enableOverdosing {
|
||||||
displayName = "Enable Overdosing";
|
displayName = "Enable Overdosing";
|
||||||
description = "Enable overdosing of medications";
|
description = "Enable overdosing of medications";
|
||||||
@ -937,29 +940,16 @@ class CfgVehicles {
|
|||||||
enableInside = 1;
|
enableInside = 1;
|
||||||
icon = PATHTOF(UI\icons\bandage.paa);
|
icon = PATHTOF(UI\icons\bandage.paa);
|
||||||
};
|
};
|
||||||
class Carry {
|
class PlaceInBodyBag {
|
||||||
displayName = "$STR_ACE_MEDICAL_CARRY";
|
displayName = "$STR_ACE_MEDICAL_PlaceInBodyBag";
|
||||||
distance = 2.0;
|
distance = 2.0;
|
||||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(canTreatCached));
|
condition = QUOTE([ARR_4(_player, _target, 'body', 'BodyBag')] call DFUNC(canTreatCached));
|
||||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(treatment));
|
statement = QUOTE([ARR_4(_player, _target, 'body', 'BodyBag')] call DFUNC(treatment));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
hotkey = "";
|
hotkey = "";
|
||||||
enableInside = 1;
|
enableInside = 1;
|
||||||
//icon = PATHTOF(UI\icons\bandage.paa);
|
|
||||||
};
|
};
|
||||||
class Drag {
|
|
||||||
displayName = "$STR_ACE_MEDICAL_DRAG";
|
|
||||||
distance = 2.0;
|
|
||||||
condition = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(canTreatCached));
|
|
||||||
statement = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(treatment));
|
|
||||||
showDisabled = 1;
|
|
||||||
priority = 2;
|
|
||||||
hotkey = "";
|
|
||||||
enableInside = 1;
|
|
||||||
//icon = PATHTOF(UI\icons\bandage.paa);
|
|
||||||
};
|
|
||||||
|
|
||||||
class TriageCard {
|
class TriageCard {
|
||||||
displayName = "Triage Card";
|
displayName = "Triage Card";
|
||||||
distance = 2.0;
|
distance = 2.0;
|
||||||
@ -2082,18 +2072,4 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class StaticMortar;
|
|
||||||
class Mortar_01_base_F: StaticMortar {
|
|
||||||
class ACE_Actions {
|
|
||||||
class ACE_MainActions {
|
|
||||||
class ACE_UnloadPatients {
|
|
||||||
displayName = "$STR_ACE_Medical_UnloadPatient";
|
|
||||||
condition = "true";
|
|
||||||
statement = "";
|
|
||||||
insertChildren = QUOTE(_this call FUNC(addUnloadPatientActions));
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
@ -217,13 +217,18 @@ if (isNil QGVAR(level)) then {
|
|||||||
|
|
||||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
// broadcast injuries to JIP clients in a MP session
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
if (isMultiplayer) then {
|
// broadcast injuries to JIP clients in a MP session
|
||||||
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
|
if (isMultiplayer && hasInterface) then {
|
||||||
if (hasInterface) then {
|
["playerChanged", {
|
||||||
{
|
EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer);
|
||||||
[_x, player] call FUNC(requestWoundSync);
|
if (alive _newPlayer) then {
|
||||||
}foreach units group player;
|
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
|
||||||
|
{
|
||||||
|
[_x, _newPlayer] call FUNC(requestWoundSync);
|
||||||
|
}foreach units group player;
|
||||||
|
};
|
||||||
|
}] call EFUNC(common,addEventhandler);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,6 +49,8 @@ PREP(hasItems);
|
|||||||
PREP(hasMedicalEnabled);
|
PREP(hasMedicalEnabled);
|
||||||
PREP(hasTourniquetAppliedTo);
|
PREP(hasTourniquetAppliedTo);
|
||||||
PREP(init);
|
PREP(init);
|
||||||
|
PREP(isBeingCarried);
|
||||||
|
PREP(isBeingDragged);
|
||||||
PREP(isInMedicalFacility);
|
PREP(isInMedicalFacility);
|
||||||
PREP(isMedic);
|
PREP(isMedic);
|
||||||
PREP(isMedicalVehicle);
|
PREP(isMedicalVehicle);
|
||||||
|
@ -56,5 +56,5 @@ if ([_caller] call FUNC(isMedic)) then {
|
|||||||
["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
if (_logOutPut != "") then {
|
if (_logOutPut != "") then {
|
||||||
[_target,"examine", "%1 checked Blood Pressure: %2", [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
[_target,"activity", "%1 checked Blood Pressure: %2", [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||||
};
|
};
|
||||||
|
@ -49,5 +49,5 @@ if (_heartRate > 1.0) then {
|
|||||||
["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
if (_logOutPut != "") then {
|
if (_logOutPut != "") then {
|
||||||
[_unit,"examine","%1 checked Heart Rate: %2",[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
|
[_unit,"activity","%1 checked Heart Rate: %2",[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
|
||||||
};
|
};
|
||||||
|
@ -27,4 +27,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,"examine",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog);
|
[_target,"activity",_output, [[_target] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||||
|
@ -21,7 +21,9 @@ GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} els
|
|||||||
|
|
||||||
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
|
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
|
||||||
|
|
||||||
[_target, ACE_player] call FUNC(requestWoundSync);
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
|
[_target, ACE_player] call FUNC(requestWoundSync);
|
||||||
|
};
|
||||||
|
|
||||||
if (_show) then {
|
if (_show) then {
|
||||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];
|
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];
|
||||||
@ -41,6 +43,10 @@ if (_show) then {
|
|||||||
|
|
||||||
_allInjuryTexts = [];
|
_allInjuryTexts = [];
|
||||||
_genericMessages = [];
|
_genericMessages = [];
|
||||||
|
|
||||||
|
_partText = ["STR_ACE_Interaction_Head", "STR_ACE_Interaction_Torso", "STR_ACE_Interaction_ArmLeft" ,"STR_ACE_Interaction_ArmRight" ,"STR_ACE_Interaction_LegLeft", "STR_ACE_Interaction_LegRight"] select GVAR(currentSelectedSelectionN);
|
||||||
|
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
|
||||||
|
|
||||||
if (_target getvariable[QGVAR(isBleeding), false]) then {
|
if (_target getvariable[QGVAR(isBleeding), false]) then {
|
||||||
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_BLEEDING", [1, 0.1, 0.1, 1]];
|
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_BLEEDING", [1, 0.1, 0.1, 1]];
|
||||||
};
|
};
|
||||||
@ -121,7 +127,7 @@ if (_show) then {
|
|||||||
{
|
{
|
||||||
_lbCtrl lbAdd _x;
|
_lbCtrl lbAdd _x;
|
||||||
}foreach _allInjuryTexts;
|
}foreach _allInjuryTexts;
|
||||||
if (count _genericMessages == 0 && {count _allInjuryTexts == 0}) then {
|
if (count _allInjuryTexts == 0) then {
|
||||||
_lbCtrl lbAdd "No injuries on this bodypart..";
|
_lbCtrl lbAdd "No injuries on this bodypart..";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -129,26 +135,23 @@ if (_show) then {
|
|||||||
lbClear _logCtrl;
|
lbClear _logCtrl;
|
||||||
|
|
||||||
private ["_logs", "_log", "_message", "_moment", "_arguments", "_lbCtrl"];
|
private ["_logs", "_log", "_message", "_moment", "_arguments", "_lbCtrl"];
|
||||||
_logs = _target getvariable [QGVAR(allLogs), []];
|
_logs = _target getvariable [QGVAR(logFile_Activity), []];
|
||||||
{
|
{
|
||||||
_log = _target getvariable [_x, []];
|
// [_message,_moment,_type, _arguments]
|
||||||
{
|
_message = _x select 0;
|
||||||
// [_message,_moment,_type, _arguments]
|
_moment = _x select 1;
|
||||||
_message = _x select 0;
|
_arguments = _x select 3;
|
||||||
_moment = _x select 1;
|
if (isLocalized _message) then {
|
||||||
_arguments = _x select 3;
|
_message = localize _message;
|
||||||
if (isLocalized _message) then {
|
};
|
||||||
_message = localize _message;
|
|
||||||
};
|
|
||||||
|
|
||||||
{
|
{
|
||||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||||
_arguments set [_foreachIndex, localize _x];
|
_arguments set [_foreachIndex, localize _x];
|
||||||
};
|
};
|
||||||
}foreach _arguments;
|
}foreach _arguments;
|
||||||
_message = format([_message] + _arguments);
|
_message = format([_message] + _arguments);
|
||||||
_logCtrl lbAdd format["%1 %2", _moment, _message];
|
_logCtrl lbAdd format["%1 %2", _moment, _message];
|
||||||
}foreach _log;
|
|
||||||
}foreach _logs;
|
}foreach _logs;
|
||||||
|
|
||||||
_triageStatus = [_target] call FUNC(getTriageStatus);
|
_triageStatus = [_target] call FUNC(getTriageStatus);
|
||||||
|
@ -42,4 +42,4 @@ if (GVAR(level) >= 2) then {
|
|||||||
} else {
|
} else {
|
||||||
// TODO basic medical
|
// TODO basic medical
|
||||||
};
|
};
|
||||||
_totalBloodLoss * GVAR(bleedingCoefficient);
|
_totalBloodLoss * (GVAR(bleedingCoefficient) max 0);
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
private ["_typeOfProjectile","_typeOfInjury"];
|
private ["_typeOfProjectile","_typeOfInjury"];
|
||||||
_typeOfProjectile = _this select 0;
|
_typeOfProjectile = _this select 0;
|
||||||
_typeOfInjury = switch (true) do {
|
_typeOfInjury = switch (true) do {
|
||||||
case (_typeOfProjectile isKindOf "Backblast"): {"backblast"};
|
|
||||||
case (_typeOfProjectile iskindof "BulletBase"): {"Bullet"};
|
case (_typeOfProjectile iskindof "BulletBase"): {"Bullet"};
|
||||||
case (_typeOfProjectile iskindof "GrenadeCore"): {"Grenade"};
|
case (_typeOfProjectile iskindof "GrenadeCore"): {"Grenade"};
|
||||||
case (_typeOfProjectile iskindof "TimeBombCore"): {"Explosive"};
|
case (_typeOfProjectile iskindof "TimeBombCore"): {"Explosive"};
|
||||||
@ -29,7 +28,7 @@ _typeOfInjury = switch (true) do {
|
|||||||
case (_typeOfProjectile iskindof "BombCore"): {"Explosive"};
|
case (_typeOfProjectile iskindof "BombCore"): {"Explosive"};
|
||||||
case (_typeOfProjectile iskindof "Grenade"): {"Grenade"};
|
case (_typeOfProjectile iskindof "Grenade"): {"Grenade"};
|
||||||
case (_typeOfProjectile == "VehicleCrash"): {"VehicleCrash"};
|
case (_typeOfProjectile == "VehicleCrash"): {"VehicleCrash"};
|
||||||
default {"Unknown"};
|
default {_typeOfProjectile};
|
||||||
};
|
};
|
||||||
// TODO replace the capitalization on the switch results instead..
|
// TODO replace the capitalization on the switch results instead..
|
||||||
toLower _typeOfInjury;
|
toLower _typeOfInjury;
|
||||||
|
@ -26,8 +26,6 @@ _projectile = _this select 4;
|
|||||||
|
|
||||||
if !(local _unit) exitWith {nil};
|
if !(local _unit) exitWith {nil};
|
||||||
|
|
||||||
if !([_unit] call FUNC(hasMedicalEnabled)) exitwith {};
|
|
||||||
|
|
||||||
if (typeName _projectile == "OBJECT") then {
|
if (typeName _projectile == "OBJECT") then {
|
||||||
_projectile = typeOf _projectile;
|
_projectile = typeOf _projectile;
|
||||||
_this set [4, _projectile];
|
_this set [4, _projectile];
|
||||||
@ -38,22 +36,35 @@ _hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
|||||||
if !(_selection in (_hitSelections + [""])) exitWith {0};
|
if !(_selection in (_hitSelections + [""])) exitWith {0};
|
||||||
|
|
||||||
_damageReturn = _damage;
|
_damageReturn = _damage;
|
||||||
if (GVAR(level) == 1) then {
|
if (GVAR(level) < 2) then {
|
||||||
_damageReturn = (_this + [_damageReturn]) call FUNC(handleDamage_basic);
|
_damageReturn = _this call FUNC(handleDamage_basic);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (GVAR(level) >= 2) then {
|
if (GVAR(level) >= 2) then {
|
||||||
[_unit, _selection, _damage, _source, _projectile, _damageReturn] call FUNC(handleDamage_caching);
|
if !([_unit] call FUNC(hasMedicalEnabled)) exitwith {
|
||||||
|
// Because of the config changes, we cannot properly disable the medical system for a unit.
|
||||||
|
// lets use basic for the time being..
|
||||||
|
_this call FUNC(handleDamage_basic);
|
||||||
|
};
|
||||||
|
|
||||||
|
[_unit, _selection, _damage, _source, _projectile] call FUNC(handleDamage_caching);
|
||||||
|
|
||||||
if (_damageReturn > 0.9) then {
|
if (_damageReturn > 0.9) then {
|
||||||
|
|
||||||
|
_typeOfDamage = [_projectile] call FUNC(getTypeOfDamage);
|
||||||
|
_minLethalDamage = GVAR(minLethalDamages) select (GVAR(allAvailableDamageTypes) find _typeOfDamage);
|
||||||
|
|
||||||
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||||
_newDamage = _damage - (damage _unit);
|
_newDamage = _damage - (damage _unit);
|
||||||
if (_selection in _hitSelections) then {
|
if (_selection in _hitSelections) then {
|
||||||
_newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selection)));
|
_newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selection)));
|
||||||
};
|
};
|
||||||
if ([_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)) then {
|
|
||||||
|
if ((_minLethalDamage <= _newDamage) && {[_unit, [_selection] call FUNC(selectionNameToNumber), _newDamage] call FUNC(determineIfFatal)}) then {
|
||||||
if ([_unit] call FUNC(setDead)) then {
|
if ([_unit] call FUNC(setDead)) then {
|
||||||
_damageReturn = 1;
|
_damageReturn = 1;
|
||||||
|
} else {
|
||||||
|
_damageReturn = 0.89;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_damageReturn = 0.89;
|
_damageReturn = 0.89;
|
||||||
@ -62,7 +73,7 @@ if (GVAR(level) >= 2) then {
|
|||||||
};
|
};
|
||||||
[_unit] call FUNC(addToInjuredCollection);
|
[_unit] call FUNC(addToInjuredCollection);
|
||||||
|
|
||||||
if (_unit getVariable [QGVAR(preventDeath), false] && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {
|
if (_unit getVariable [QGVAR(preventDeath), GVAR(preventInstaDeath)] && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {
|
||||||
if (vehicle _unit != _unit and {damage _vehicle >= 1}) then {
|
if (vehicle _unit != _unit and {damage _vehicle >= 1}) then {
|
||||||
// @todo
|
// @todo
|
||||||
// [_unit] call FUNC(unload);
|
// [_unit] call FUNC(unload);
|
||||||
|
@ -25,7 +25,6 @@ _selectionName = _this select 1;
|
|||||||
_amountOfDamage = _this select 2;
|
_amountOfDamage = _this select 2;
|
||||||
_sourceOfDamage = _this select 3;
|
_sourceOfDamage = _this select 3;
|
||||||
_typeOfProjectile = _this select 4;
|
_typeOfProjectile = _this select 4;
|
||||||
_returnDamage = _this select 5;
|
|
||||||
|
|
||||||
// Most likely taking exessive fire damage. Lets exit.
|
// Most likely taking exessive fire damage. Lets exit.
|
||||||
if (isNull _sourceOfDamage && (_selectionName == "head" || isBurning _unit) && _typeOfProjectile == "" && vehicle _unit == _unit) exitwith {
|
if (isNull _sourceOfDamage && (_selectionName == "head" || isBurning _unit) && _typeOfProjectile == "" && vehicle _unit == _unit) exitwith {
|
||||||
@ -63,4 +62,4 @@ if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_returnDamage;
|
_amountOfDamage;
|
||||||
|
@ -24,15 +24,13 @@
|
|||||||
#define ARMDAMAGETRESHOLD2 1.7
|
#define ARMDAMAGETRESHOLD2 1.7
|
||||||
#define UNCONSCIOUSNESSTRESHOLD 0.7
|
#define UNCONSCIOUSNESSTRESHOLD 0.7
|
||||||
|
|
||||||
private ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_damageReturn"];
|
private ["_unit", "_selectionName", "_damage", "_shooter", "_projectile", "_damage"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_selection = _this select 1;
|
_selectionName = _this select 1;
|
||||||
_damage = _this select 2;
|
_damage = _this select 2;
|
||||||
_shooter = _this select 3;
|
_shooter = _this select 3;
|
||||||
_projectile = _this select 4;
|
_projectile = _this select 4;
|
||||||
_damageReturn = _this select 5;
|
|
||||||
|
|
||||||
|
|
||||||
// This is a new hit, reset variables.
|
// This is a new hit, reset variables.
|
||||||
// Note: sometimes handleDamage spans over 2 or even 3 frames.
|
// Note: sometimes handleDamage spans over 2 or even 3 frames.
|
||||||
@ -50,12 +48,12 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo), -3]) + 2) then {
|
|||||||
_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
||||||
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||||
|
|
||||||
_newDamage = _damageReturn - (damage _unit);
|
_newDamage = _damage - (damage _unit);
|
||||||
if (_selection in _hitSelections) then {
|
if (_selectionName in _hitSelections) then {
|
||||||
_newDamage = _damageReturn - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selection)));
|
_newDamage = _damage - (_unit getHitPointDamage (_hitPoints select (_hitSelections find _selectionName)));
|
||||||
};
|
};
|
||||||
|
|
||||||
_damageReturn = _damageReturn - _newDamage;
|
_damage = _damage - _newDamage;
|
||||||
|
|
||||||
|
|
||||||
// Exclude falling damage to everything other than legs and reduce it overall.
|
// Exclude falling damage to everything other than legs and reduce it overall.
|
||||||
@ -101,7 +99,7 @@ if (_selectionName != "" and !(_unit getVariable QGVAR(isFalling))) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Get rid of double structural damage (seriously arma, what the fuck?)
|
// Get rid of double structural damage (seriously arma, what the fuck?)
|
||||||
if (_selection == "") then {
|
if (_selectionName == "") then {
|
||||||
_cache_structDamage = _unit getVariable QGVAR(structDamage);
|
_cache_structDamage = _unit getVariable QGVAR(structDamage);
|
||||||
if (_newDamage > _cache_structDamage) then {
|
if (_newDamage > _cache_structDamage) then {
|
||||||
_unit setVariable [QGVAR(structDamage), _newDamage];
|
_unit setVariable [QGVAR(structDamage), _newDamage];
|
||||||
@ -128,20 +126,20 @@ if (_selection == "") then {
|
|||||||
}, [_unit], 2, 0.1] call EFUNC(common,waitAndExecute);
|
}, [_unit], 2, 0.1] call EFUNC(common,waitAndExecute);
|
||||||
|
|
||||||
|
|
||||||
if (_selection == "") then {
|
if (_selectionName == "") then {
|
||||||
_damageReturn = _damageReturn + (_unit getVariable QGVAR(structDamage));
|
_damage = _damage + (_unit getVariable QGVAR(structDamage));
|
||||||
} else {
|
} else {
|
||||||
_damageReturn = _damageReturn + _newDamage;
|
_damage = _damage + _newDamage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Leg Damage
|
// Leg Damage
|
||||||
_legdamage = (_unit getHitPointDamage "HitLeftLeg") + (_unit getHitPointDamage "HitRightLeg");
|
_legdamage = (_unit getHitPointDamage "HitLeftLeg") + (_unit getHitPointDamage "HitRightLeg");
|
||||||
if (_selectionName == "leg_l") then {
|
if (_selectionName == "leg_l") then {
|
||||||
_legdamage = _damageReturn + (_unit getHitPointDamage "HitRightLeg");
|
_legdamage = _damage + (_unit getHitPointDamage "HitRightLeg");
|
||||||
};
|
};
|
||||||
if (_selectionName == "leg_r") then {
|
if (_selectionName == "leg_r") then {
|
||||||
_legdamage = (_unit getHitPointDamage "HitLeftLeg") + _damageReturn;
|
_legdamage = (_unit getHitPointDamage "HitLeftLeg") + _damage;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_legdamage >= LEGDAMAGETRESHOLD1) then {
|
if (_legdamage >= LEGDAMAGETRESHOLD1) then {
|
||||||
@ -155,10 +153,10 @@ if (_legdamage >= LEGDAMAGETRESHOLD1) then {
|
|||||||
// Arm Damage
|
// Arm Damage
|
||||||
_armdamage = (_unit getHitPointDamage "HitLeftArm") + (_unit getHitPointDamage "HitRightArm");
|
_armdamage = (_unit getHitPointDamage "HitLeftArm") + (_unit getHitPointDamage "HitRightArm");
|
||||||
if (_selectionName == "hand_l") then {
|
if (_selectionName == "hand_l") then {
|
||||||
_armdamage = _damageReturn + (_unit getHitPointDamage "HitRightArm");
|
_armdamage = _damage + (_unit getHitPointDamage "HitRightArm");
|
||||||
};
|
};
|
||||||
if (_selectionName == "hand_r") then {
|
if (_selectionName == "hand_r") then {
|
||||||
_armdamage = (_unit getHitPointDamage "HitLeftArm") + _damageReturn;
|
_armdamage = (_unit getHitPointDamage "HitLeftArm") + _damage;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_armdamage >= ARMDAMAGETRESHOLD1) then {
|
if (_armdamage >= ARMDAMAGETRESHOLD1) then {
|
||||||
@ -170,7 +168,7 @@ if (_armdamage >= ARMDAMAGETRESHOLD1) then {
|
|||||||
|
|
||||||
|
|
||||||
// Set Pain
|
// Set Pain
|
||||||
if (_selection == "") then {
|
if (_selectionName == "") then {
|
||||||
_pain = _unit getVariable [QGVAR(pain), 0];
|
_pain = _unit getVariable [QGVAR(pain), 0];
|
||||||
_pain = _pain + _newDamage * (1 - (_unit getVariable [QGVAR(morphine), 0]));
|
_pain = _pain + _newDamage * (1 - (_unit getVariable [QGVAR(morphine), 0]));
|
||||||
_unit setVariable [QGVAR(pain), _pain min 1, true];
|
_unit setVariable [QGVAR(pain), _pain min 1, true];
|
||||||
@ -178,16 +176,16 @@ if (_selection == "") then {
|
|||||||
|
|
||||||
|
|
||||||
// Unconsciousness
|
// Unconsciousness
|
||||||
if (_selection == "" and
|
if (_selectionName == "" and
|
||||||
_damageReturn >= UNCONSCIOUSNESSTRESHOLD and
|
_damage >= UNCONSCIOUSNESSTRESHOLD and
|
||||||
_damageReturn < 1 and
|
_damage < 1 and
|
||||||
!(_unit getVariable ["ACE_isUnconscious", False]
|
!(_unit getVariable ["ACE_isUnconscious", False]
|
||||||
)) then {
|
)) then {
|
||||||
if (_unit getVariable [QGVAR(allowUnconscious), ([_unit] call EFUNC(common,isPlayer)) or random 1 > 0.3]) then {
|
if (_unit getVariable [QGVAR(allowUnconscious), ([_unit] call EFUNC(common,isPlayer)) or random 1 > 0.3]) then {
|
||||||
[_unit, true] call FUNC(setUnconscious);
|
[_unit, true] call FUNC(setUnconscious);
|
||||||
} else {
|
} else {
|
||||||
_damageReturn = 1;
|
_damage = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_damageReturn
|
_damage
|
||||||
|
@ -24,7 +24,6 @@ _selectionName = _this select 1;
|
|||||||
_damage = _this select 2;
|
_damage = _this select 2;
|
||||||
_source = _this select 3;
|
_source = _this select 3;
|
||||||
_projectile = _this select 4;
|
_projectile = _this select 4;
|
||||||
_returnDamage = _this select 5;
|
|
||||||
|
|
||||||
_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
_hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
|
||||||
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
_hitPoints = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
|
||||||
@ -128,14 +127,14 @@ if (_selectionName != "") then {
|
|||||||
_cache_projectiles pushBack _projectile;
|
_cache_projectiles pushBack _projectile;
|
||||||
_cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName));
|
_cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName));
|
||||||
_cache_damages pushBack _newDamage;
|
_cache_damages pushBack _newDamage;
|
||||||
_cache_params pushBack [_unit, _selectionName, _damage, _source, _projectile, _returnDamage];
|
_cache_params pushBack [_unit, _selectionName, _damage, _source, _projectile];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// This is an unhandled projectile
|
// This is an unhandled projectile
|
||||||
_cache_projectiles pushBack _projectile;
|
_cache_projectiles pushBack _projectile;
|
||||||
_cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName));
|
_cache_hitpoints pushBack (_hitPoints select (_hitSelections find _selectionName));
|
||||||
_cache_damages pushBack _newDamage;
|
_cache_damages pushBack _newDamage;
|
||||||
_cache_params pushBack [_unit, _selectionName, _damage, _source, _projectile, _returnDamage];
|
_cache_params pushBack [_unit, _selectionName, _damage, _source, _projectile];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -123,18 +123,20 @@ _woundsCreated = [];
|
|||||||
};
|
};
|
||||||
}foreach (_injuryTypeInfo select 0);
|
}foreach (_injuryTypeInfo select 0);
|
||||||
|
|
||||||
_unit setvariable [QGVAR(openWounds), _openWounds];
|
_unit setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC];
|
||||||
|
|
||||||
// Only update if new wounds have been created
|
// Only update if new wounds have been created
|
||||||
if (count _woundsCreated > 0) then {
|
if (count _woundsCreated > 0) then {
|
||||||
_unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true];
|
_unit setvariable [QGVAR(lastUniqueWoundID), _woundID, true];
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO Should this be done in a single broadcast?
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
// Broadcast the new injuries across the net in parts. One broadcast per injury. Prevents having to broadcast one massive array of injuries.
|
// TODO Should this be done in a single broadcast?
|
||||||
{
|
// Broadcast the new injuries across the net in parts. One broadcast per injury. Prevents having to broadcast one massive array of injuries.
|
||||||
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
{
|
||||||
}foreach _woundsCreated;
|
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
||||||
|
}foreach _woundsCreated;
|
||||||
|
};
|
||||||
|
|
||||||
_painLevel = _unit getvariable [QGVAR(pain), 0];
|
_painLevel = _unit getvariable [QGVAR(pain), 0];
|
||||||
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd];
|
_unit setvariable [QGVAR(pain), _painLevel + _painToAdd];
|
||||||
|
@ -23,8 +23,10 @@ if (GVAR(level) >= 2) then {
|
|||||||
_unit setvariable [QGVAR(bloodPressure), [0, 0]];
|
_unit setvariable [QGVAR(bloodPressure), [0, 0]];
|
||||||
_unit setvariable [QGVAR(airwayStatus), 0];
|
_unit setvariable [QGVAR(airwayStatus), 0];
|
||||||
|
|
||||||
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
{
|
_openWounds = _unit getvariable [QGVAR(openWounds), []];
|
||||||
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
{
|
||||||
}foreach _openWounds;
|
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
|
||||||
|
}foreach _openWounds;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,7 @@ _unit setVariable [QGVAR(bloodIVVolume), 0];
|
|||||||
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
||||||
|
|
||||||
// airway
|
// airway
|
||||||
_unit setvariable [QGVAR(airwayStatus), 0, true];
|
_unit setvariable [QGVAR(airwayStatus), 100, true];
|
||||||
_unit setVariable [QGVAR(airwayOccluded), false, true];
|
_unit setVariable [QGVAR(airwayOccluded), false, true];
|
||||||
_unit setvariable [QGVAR(airwayCollapsed), false, true];
|
_unit setvariable [QGVAR(airwayCollapsed), false, true];
|
||||||
|
|
||||||
|
26
addons/medical/functions/fnc_isBeingCarried.sqf
Normal file
26
addons/medical/functions/fnc_isBeingCarried.sqf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Author: PabstMirror
|
||||||
|
* Returns if a target is being carried. (from ace_dragging)
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Target Unit <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Is being carried <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [bob] call ace_medical_fnc_isBeingCarried
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_1(_target);
|
||||||
|
|
||||||
|
private "_owner";
|
||||||
|
|
||||||
|
_owner = _target getVariable [QEGVAR(common,owner), objNull];
|
||||||
|
|
||||||
|
if (isNull _owner) exitWith {false};
|
||||||
|
|
||||||
|
(_owner getVariable [QEGVAR(dragging,carriedObject), objNull]) == _target
|
26
addons/medical/functions/fnc_isBeingDragged.sqf
Normal file
26
addons/medical/functions/fnc_isBeingDragged.sqf
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Author: PabstMirror
|
||||||
|
* Returns if a target is being dragged. (from ace_dragging)
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Target Unit <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Is being dragged <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [bob] call ace_medical_fnc_isBeingDragged
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
PARAMS_1(_target);
|
||||||
|
|
||||||
|
private "_owner";
|
||||||
|
|
||||||
|
_owner = _target getVariable [QEGVAR(common,owner), objNull];
|
||||||
|
|
||||||
|
if (isNull _owner) exitWith {false};
|
||||||
|
|
||||||
|
(_owner getVariable [QEGVAR(dragging,draggedObject), objNull]) == _target
|
@ -24,8 +24,9 @@ if !(_activated) exitWith {};
|
|||||||
|
|
||||||
[_logic, QGVAR(level), "level"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(level), "level"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(enableFor), "enableFor"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enableFor), "enableFor"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(enableAirway), "enableAirway"] call EFUNC(common,readSettingFromModule);
|
// TODO disabled until implemented
|
||||||
[_logic, QGVAR(enableFractures), "enableFractures"] call EFUNC(common,readSettingFromModule);
|
// [_logic, QGVAR(enableAirway), "enableAirway"] call EFUNC(common,readSettingFromModule);
|
||||||
|
// [_logic, QGVAR(enableFractures), "enableFractures"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(enableAdvancedWounds), "enableAdvancedWounds"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enableAdvancedWounds), "enableAdvancedWounds"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(enableScreams), "enableScreams"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enableScreams), "enableScreams"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(playerDamageThreshold), "playerDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(playerDamageThreshold), "playerDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
||||||
|
@ -24,7 +24,6 @@ if !(_activated) exitWith {};
|
|||||||
|
|
||||||
[_logic, QGVAR(medicSetting), "medicSetting"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(medicSetting), "medicSetting"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(maxRevives), "maxRevives"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(maxRevives), "maxRevives"] call EFUNC(common,readSettingFromModule);
|
||||||
|
[_logic, QGVAR(maxReviveTime), "maxReviveTime"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(enableOverdosing), "enableOverdosing"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enableOverdosing), "enableOverdosing"] call EFUNC(common,readSettingFromModule);
|
||||||
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ if (!_foundEntry) then {
|
|||||||
|
|
||||||
|
|
||||||
_usedMeds = _target getvariable [_variable, 0];
|
_usedMeds = _target getvariable [_variable, 0];
|
||||||
if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1) then {
|
if (_usedMeds >= floor (_maxDosage + round(random(2))) && _maxDosage >= 1 && GVAR(enableOverdosing)) then {
|
||||||
[_target] call FUNC(setDead);
|
[_target] call FUNC(setDead);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ _hasOverDosed = 0;
|
|||||||
}foreach _allUsedMedication;
|
}foreach _allUsedMedication;
|
||||||
}foreach _incompatabileMeds;
|
}foreach _incompatabileMeds;
|
||||||
|
|
||||||
if (_hasOverDosed > 0) then {
|
if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then {
|
||||||
_medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
|
_medicationConfig = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication");
|
||||||
_onOverDose = getText (_medicationConfig >> "onOverDose");
|
_onOverDose = getText (_medicationConfig >> "onOverDose");
|
||||||
if (isClass (_medicationConfig >> _className)) then {
|
if (isClass (_medicationConfig >> _className)) then {
|
||||||
|
@ -12,25 +12,35 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_injuriesRootConfig", "_woundsConfig", "_allWoundClasses", "_amountOf", "_entry","_classType", "_selections", "_bloodLoss", "_pain","_minDamage","_causes", "_allTypes", "_damageTypesConfig", "_thresholds", "_typeThresholds", "_selectionSpecific", "_selectionSpecificType", "_classDisplayName", "_subClassDisplayName", "_maxDamage", "_subClassmaxDamage"];
|
private ["_injuriesRootConfig", "_woundsConfig", "_allWoundClasses", "_amountOf", "_entry","_classType", "_selections", "_bloodLoss", "_pain","_minDamage","_causes", "_allTypes", "_damageTypesConfig", "_thresholds", "_typeThresholds", "_selectionSpecific", "_selectionSpecificType", "_classDisplayName", "_subClassDisplayName", "_maxDamage", "_subClassmaxDamage", "_defaultMinLethalDamage", "_minLethalDamage"];
|
||||||
|
|
||||||
_injuriesRootConfig = (configFile >> "ACE_Medical_Advanced" >> "Injuries");
|
_injuriesRootConfig = (configFile >> "ACE_Medical_Advanced" >> "Injuries");
|
||||||
_allTypes = ["stab", "grenade", "bullet", "explosive", "shell", "punch", "vehiclecrash", "backblast", "falling", "bite", "ropeburn"];
|
_allTypes = ["stab", "grenade", "bullet", "explosive", "shell", "punch", "vehiclecrash", "backblast", "falling", "bite", "ropeburn"];
|
||||||
|
|
||||||
// Collect all available damage types from the config
|
|
||||||
_allFoundDamageTypes = [];
|
_allFoundDamageTypes = [];
|
||||||
_configDamageTypes = (_injuriesRootConfig >> "damageTypes");
|
_configDamageTypes = (_injuriesRootConfig >> "damageTypes");
|
||||||
|
|
||||||
|
// minimum lethal damage collection, mapped to damageTypes
|
||||||
|
_defaultMinLethalDamage = getNumber (_configDamageTypes >> "lethalDamage");
|
||||||
|
GVAR(minLethalDamages) = [];
|
||||||
|
|
||||||
|
// Collect all available damage types from the config
|
||||||
for "_i" from 0 to (count _configDamageTypes -1) /* step +1 */ do {
|
for "_i" from 0 to (count _configDamageTypes -1) /* step +1 */ do {
|
||||||
// Only get the subclasses in damageType class
|
// Only get the subclasses in damageType class
|
||||||
if (isClass(_configDamageTypes select _i)) then {
|
if (isClass(_configDamageTypes select _i)) then {
|
||||||
_allFoundDamageTypes pushback (configName (_configDamageTypes select _i));
|
_allFoundDamageTypes pushback (configName (_configDamageTypes select _i));
|
||||||
|
_minLethalDamage = if (isNumber((_configDamageTypes select _i) >> "lethalDamage")) then {
|
||||||
|
getNumber((_configDamageTypes select _i) >> "lethalDamage");
|
||||||
|
} else {
|
||||||
|
_defaultMinLethalDamage
|
||||||
|
};
|
||||||
|
|
||||||
|
GVAR(minLethalDamages) pushback _minLethalDamage;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
GVAR(allAvailableDamageTypes) = _allFoundDamageTypes;
|
GVAR(allAvailableDamageTypes) = _allFoundDamageTypes;
|
||||||
GVAR(woundClassNames) = [];
|
GVAR(woundClassNames) = [];
|
||||||
GVAR(fractureClassNames) = [];
|
GVAR(fractureClassNames) = [];
|
||||||
|
|
||||||
|
|
||||||
// Parsing the wounds
|
// Parsing the wounds
|
||||||
// function for parsing a sublcass of an injury
|
// function for parsing a sublcass of an injury
|
||||||
_parseForSubClassWounds = {
|
_parseForSubClassWounds = {
|
||||||
|
@ -13,39 +13,45 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit"];
|
private ["_unit", "_force"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_force = false;
|
_force = false;
|
||||||
if (count _this >= 2) then {
|
if (count _this >= 2) then {
|
||||||
_force = _this select 1;
|
_force = _this select 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!alive _unit) exitwith{};
|
if (!alive _unit) exitwith{true};
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitwith {
|
||||||
[[_unit, _force], QUOTE(DFUNC(setDead)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_unit, _force], QUOTE(DFUNC(setDead)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
|
false;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (GVAR(preventInstaDeath) && !_force) exitwith {
|
if ((_unit getVariable [QGVAR(preventDeath), GVAR(preventInstaDeath)]) && !_force) exitwith {
|
||||||
if (_unit getvariable [QGVAR(inReviveState), false]) exitwith {}; // already in revive state
|
if (_unit getvariable [QGVAR(inReviveState), false]) exitwith {false}; // already in revive state
|
||||||
_unit setvariable [QGVAR(inReviveState), true, true];
|
_unit setvariable [QGVAR(inReviveState), true, true];
|
||||||
[_unit] call FUNC(setUnconscious);
|
_unit setvariable [QGVAR(reviveStartTime), time];
|
||||||
|
[_unit, true] call FUNC(setUnconscious);
|
||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_args","_unit","_startTime"];
|
private ["_args","_unit","_startTime"];
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
_unit = _args select 0;
|
_unit = _args select 0;
|
||||||
_startTime = _args select 1;
|
_startTime = _unit getvariable [QGVAR(reviveStartTime), 0];
|
||||||
|
|
||||||
if (time - _startTime > GVAR(maxReviveTime)) exitwith {
|
if (time - _startTime > GVAR(maxReviveTime)) exitwith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
[_unit, true] call FUNC(setDead);
|
|
||||||
_unit setvariable [QGVAR(inReviveState), nil, true];
|
_unit setvariable [QGVAR(inReviveState), nil, true];
|
||||||
|
_unit setvariable [QGVAR(reviveStartTime), nil];
|
||||||
|
|
||||||
|
[_unit, true] call FUNC(setDead);
|
||||||
};
|
};
|
||||||
|
|
||||||
if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith {
|
if !(_unit getvariable [QGVAR(inReviveState), false]) exitwith {
|
||||||
|
_unit setvariable [QGVAR(reviveStartTime), nil];
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
}, 1, [_unit, time] ] call CBA_fnc_addPerFrameHandler;
|
}, 1, [_unit] ] call CBA_fnc_addPerFrameHandler;
|
||||||
|
false;
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit setvariable ["ACE_isDead", true, true];
|
_unit setvariable ["ACE_isDead", true, true];
|
||||||
@ -53,3 +59,4 @@ if (isPLayer _unit) then {
|
|||||||
_unit setvariable ["isDeadPlayer", true, true];
|
_unit setvariable ["isDeadPlayer", true, true];
|
||||||
};
|
};
|
||||||
_unit setdamage 1;
|
_unit setdamage 1;
|
||||||
|
true;
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The unit that will be put in an unconscious state <OBJECT>
|
* 0: The unit that will be put in an unconscious state <OBJECT>
|
||||||
|
* 1: Set unconsciouns <BOOL> <OPTIONAL>
|
||||||
|
* 2: Minimum unconscious time <NUMBER> <OPTIONAL>
|
||||||
*
|
*
|
||||||
* ReturnValue:
|
* ReturnValue:
|
||||||
* nil
|
* nil
|
||||||
@ -13,9 +15,12 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#define DEFAULT_DELAY (round(random(10)+5))
|
||||||
|
|
||||||
private ["_unit", "_set", "_animState", "_originalPos", "_captiveSwitch", "_startingTime","_minWaitingTime"];
|
private ["_unit", "_set", "_animState", "_originalPos", "_captiveSwitch", "_startingTime","_minWaitingTime"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_set = if (count _this > 1) then {_this select 1} else {true};
|
_set = if (count _this > 1) then {_this select 1} else {true};
|
||||||
|
_minWaitingTime = if (count _this > 2) then {_this select 2} else {DEFAULT_DELAY};
|
||||||
|
|
||||||
if !(_set) exitwith {
|
if !(_set) exitwith {
|
||||||
_unit setvariable ["ACE_isUnconscious", false,true];
|
_unit setvariable ["ACE_isUnconscious", false,true];
|
||||||
@ -71,7 +76,6 @@ _unit setUnitPos "DOWN";
|
|||||||
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
||||||
|
|
||||||
_startingTime = time;
|
_startingTime = time;
|
||||||
_minWaitingTime = (round(random(10)+5));
|
|
||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_unit", "_vehicleOfUnit","_minWaitingTime", "_oldAnimation", "_captiveSwitch", "_hasMovedOut"];
|
private ["_unit", "_vehicleOfUnit","_minWaitingTime", "_oldAnimation", "_captiveSwitch", "_hasMovedOut"];
|
||||||
@ -90,17 +94,17 @@ _minWaitingTime = (round(random(10)+5));
|
|||||||
|
|
||||||
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
|
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
|
||||||
if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith {
|
if !(_unit getvariable ["ACE_isUnconscious",false]) exitwith {
|
||||||
|
|
||||||
// TODO, handle this with carry instead, so we can remove the PFH here.
|
// TODO, handle this with carry instead, so we can remove the PFH here.
|
||||||
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
|
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
|
||||||
if !([_unit] call EFUNC(common,beingCarried)) then {
|
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
|
||||||
if (vehicle _unit == _unit) then {
|
if (vehicle _unit == _unit) then {
|
||||||
[_unit,"amovppnemstpsnonwnondnon", 1] call EFUNC(common,doAnimation);
|
[_unit,"amovppnemstpsnonwnondnon", 2] call EFUNC(common,doAnimation);
|
||||||
} else {
|
} else {
|
||||||
// Switch to the units original animation, assuming
|
// Switch to the units original animation, assuming
|
||||||
// TODO: what if the unit switched vehicle?
|
// TODO: what if the unit switched vehicle?
|
||||||
[_unit, _oldAnimation, 1] call EFUNC(common,doAnimation);
|
[_unit, _oldAnimation, 2] call EFUNC(common,doAnimation);
|
||||||
};
|
};
|
||||||
|
|
||||||
// EXIT PFH
|
// EXIT PFH
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
@ -117,7 +121,7 @@ _minWaitingTime = (round(random(10)+5));
|
|||||||
_unit setUnconscious false;
|
_unit setUnconscious false;
|
||||||
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
|
["medical_onUnconscious", [_unit, false]] call EFUNC(common,globalEvent);
|
||||||
// ensure this statement runs only once
|
// ensure this statement runs only once
|
||||||
_args set [6, true];
|
_args set [5, true];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_callbackSuccess", "_callbackFailure", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return"];
|
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_callbackSuccess", "_callbackFailure", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed", "_return", "_usersOfItems"];
|
||||||
_caller = _this select 0;
|
_caller = _this select 0;
|
||||||
_target = _this select 1;
|
_target = _this select 1;
|
||||||
_selectionName = _this select 2;
|
_selectionName = _this select 2;
|
||||||
@ -71,6 +71,10 @@ if ("All" in _locations) then {
|
|||||||
|
|
||||||
if !(_return) exitwith {false};
|
if !(_return) exitwith {false};
|
||||||
|
|
||||||
|
_usersOfItems = [];
|
||||||
|
if (getNumber (_config >> "itemConsumed") > 0) then {
|
||||||
|
_usersOfItems = ([_caller, _target, _items] call FUNC(useItems)) select 1;
|
||||||
|
};
|
||||||
|
|
||||||
// Parse the config for the progress callback
|
// Parse the config for the progress callback
|
||||||
_callbackProgress = getText (_config >> "callbackProgress");
|
_callbackProgress = getText (_config >> "callbackProgress");
|
||||||
@ -94,6 +98,12 @@ _callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "anim
|
|||||||
if (_caller == _target) then {
|
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");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Cannot use secondairy weapon for animation
|
||||||
|
if (currentWeapon _caller == secondaryWeapon _caller) then {
|
||||||
|
_caller selectWeapon (primaryWeapon _caller);
|
||||||
|
};
|
||||||
|
|
||||||
_wpn = ["non", "rfl", "pst"] select (["", primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller));
|
_wpn = ["non", "rfl", "pst"] select (["", primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller));
|
||||||
_callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace;
|
_callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace;
|
||||||
if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||||
@ -109,7 +119,7 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
|||||||
_treatmentTime = getNumber (_config >> "treatmentTime");
|
_treatmentTime = getNumber (_config >> "treatmentTime");
|
||||||
[
|
[
|
||||||
_treatmentTime,
|
_treatmentTime,
|
||||||
[_caller, _target, _selectionName, _className, _items],
|
[_caller, _target, _selectionName, _className, _items, _usersOfItems],
|
||||||
DFUNC(treatment_success),
|
DFUNC(treatment_success),
|
||||||
DFUNC(treatment_failure),
|
DFUNC(treatment_failure),
|
||||||
getText (_config >> "displayNameProgress"),
|
getText (_config >> "displayNameProgress"),
|
||||||
@ -134,5 +144,4 @@ if (_displayText != "") then {
|
|||||||
["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [_caller], [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
@ -25,18 +25,18 @@ _className = _this select 3;
|
|||||||
_items = _this select 4;
|
_items = _this select 4;
|
||||||
_specificSpot = if (count _this > 5) then {_this select 5} else {-1};
|
_specificSpot = if (count _this > 5) then {_this select 5} else {-1};
|
||||||
|
|
||||||
if (count _items == 0) exitwith {};
|
if !([_target] call FUNC(hasMedicalEnabled)) exitwith {
|
||||||
|
_this call FUNC(treatmentBasic_bandage);
|
||||||
if ([_caller, _target, _items] call FUNC(useItems)) then {
|
|
||||||
[[_target, _className, _selectionName, _specificSpot], QUOTE(DFUNC(treatmentAdvanced_bandageLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
|
||||||
/* {
|
|
||||||
if (_x != "") then {
|
|
||||||
[_target, _x] call FUNC(addToTriageCard);
|
|
||||||
};
|
|
||||||
}foreach _items;*/
|
|
||||||
|
|
||||||
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
|
||||||
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_bandagedPatient", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[[_target, _className, _selectionName, _specificSpot], QUOTE(DFUNC(treatmentAdvanced_bandageLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
|
/* {
|
||||||
|
if (_x != "") then {
|
||||||
|
[_target, _x] call FUNC(addToTriageCard);
|
||||||
|
};
|
||||||
|
}foreach _items;*/
|
||||||
|
|
||||||
|
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
||||||
|
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_bandagedPatient", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
@ -85,10 +85,11 @@ _impact = if ((_mostEffectiveInjury select 3) >= _effectivenessFound) then {_eff
|
|||||||
_mostEffectiveInjury set [ 3, ((_mostEffectiveInjury select 3) - _effectivenessFound) max 0];
|
_mostEffectiveInjury set [ 3, ((_mostEffectiveInjury select 3) - _effectivenessFound) max 0];
|
||||||
_openWounds set [_mostEffectiveSpot, _mostEffectiveInjury];
|
_openWounds set [_mostEffectiveSpot, _mostEffectiveInjury];
|
||||||
|
|
||||||
_target setvariable [QGVAR(openWounds), _openWounds];
|
_target setvariable [QGVAR(openWounds), _openWounds, !USE_WOUND_EVENT_SYNC];
|
||||||
|
|
||||||
["medical_propagateWound", [_unit, _mostEffectiveInjury]] call EFUNC(common,globalEvent);
|
|
||||||
|
|
||||||
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
|
["medical_propagateWound", [_unit, _mostEffectiveInjury]] call EFUNC(common,globalEvent);
|
||||||
|
};
|
||||||
// Handle the reopening of bandaged wounds
|
// Handle the reopening of bandaged wounds
|
||||||
if (_impact > 0) then {
|
if (_impact > 0) then {
|
||||||
// TODO handle reopening of bandaged wounds
|
// TODO handle reopening of bandaged wounds
|
||||||
|
@ -45,7 +45,7 @@ if (alive _unit) exitwith {
|
|||||||
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
_unit setvariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0], true];
|
||||||
|
|
||||||
// airway
|
// airway
|
||||||
_unit setvariable [QGVAR(airwayStatus), 0, true];
|
_unit setvariable [QGVAR(airwayStatus), 100, true];
|
||||||
_unit setVariable [QGVAR(airwayOccluded), false, true];
|
_unit setVariable [QGVAR(airwayOccluded), false, true];
|
||||||
_unit setvariable [QGVAR(airwayCollapsed), false, true];
|
_unit setvariable [QGVAR(airwayCollapsed), false, true];
|
||||||
|
|
||||||
|
@ -24,18 +24,15 @@ _selectionName = _this select 2;
|
|||||||
_className = _this select 3;
|
_className = _this select 3;
|
||||||
_items = _this select 4;
|
_items = _this select 4;
|
||||||
|
|
||||||
if (count _items == 0) exitwith {};
|
[[_target, _className], QUOTE(DFUNC(treatmentAdvanced_medicationLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
|
|
||||||
if ([_caller, _target, _items] call FUNC(useItems)) then {
|
{
|
||||||
[[_target, _className], QUOTE(DFUNC(treatmentAdvanced_medicationLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
if (_x != "") then {
|
||||||
{
|
[_target, _x] call FUNC(addToTriageCard);
|
||||||
if (_x != "") then {
|
};
|
||||||
[_target, _x] call FUNC(addToTriageCard);
|
}foreach _items;
|
||||||
};
|
|
||||||
}foreach _items;
|
|
||||||
|
|
||||||
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
||||||
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_usedItem", [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog);
|
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_usedItem", [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog);
|
||||||
};
|
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
@ -26,10 +26,8 @@ _items = _this select 4;
|
|||||||
|
|
||||||
if (count _items == 0) exitwith {};
|
if (count _items == 0) exitwith {};
|
||||||
|
|
||||||
if ([_caller, _target, _items] call FUNC(useItems)) then {
|
_removeItem = _items select 0;
|
||||||
_removeItem = _items select 0;
|
[[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
[[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
||||||
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
[_target, _removeItem] call FUNC(addToTriageCard);
|
||||||
[_target, _removeItem] call FUNC(addToTriageCard);
|
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||||
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
|
||||||
};
|
|
||||||
|
@ -39,12 +39,11 @@ if ((_tourniquets select _part) > 0) exitwith {
|
|||||||
false;
|
false;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ([_caller, _target, _items] call FUNC(useItems)) then {
|
_removeItem = _items select 0;
|
||||||
_removeItem = _items select 0;
|
[[_target, _removeItem], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
[[_target, _removeItem], QUOTE(DFUNC(treatmentTourniquetLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
||||||
["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent;
|
[_target, _removeItem] call FUNC(addToTriageCard);
|
||||||
[_target, _removeItem] call FUNC(addToTriageCard);
|
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||||
[_target, "activity", "STR_ACE_MEDICAL_ACTIVITY_appliedTourniquet", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
|
||||||
};
|
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
@ -17,13 +17,14 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target","_selectionName","_className","_config","_callback"];
|
private ["_caller", "_target","_selectionName","_className","_config","_callback", "_usersOfItems"];
|
||||||
|
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
_caller = _args select 0;
|
_caller = _args select 0;
|
||||||
_target = _args select 1;
|
_target = _args select 1;
|
||||||
_selectionName = _args select 2;
|
_selectionName = _args select 2;
|
||||||
_className = _args select 3;
|
_className = _args select 3;
|
||||||
|
_usersOfItems = _args select 5;
|
||||||
|
|
||||||
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
||||||
_caller removeWeapon "ACE_FakePrimaryWeapon";
|
_caller removeWeapon "ACE_FakePrimaryWeapon";
|
||||||
@ -31,7 +32,9 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
|||||||
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
||||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
||||||
|
|
||||||
// @todo remove item?
|
{
|
||||||
|
(_x select 0) addItem (_x select 1);
|
||||||
|
}foreach _usersOfItems;
|
||||||
|
|
||||||
// Record specific callback
|
// Record specific callback
|
||||||
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
||||||
@ -46,4 +49,4 @@ if (isNil _callback) then {
|
|||||||
_callback = missionNamespace getvariable _callback;
|
_callback = missionNamespace getvariable _callback;
|
||||||
};
|
};
|
||||||
|
|
||||||
_args call _callback
|
_args call _callback;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target","_selectionName","_className","_config","_callback"];
|
private ["_caller", "_target","_selectionName","_className","_config","_callback"];
|
||||||
|
|
||||||
_args = _this select 0;
|
_args = _this select 0;
|
||||||
_caller = _args select 0;
|
_caller = _args select 0;
|
||||||
_target = _args select 1;
|
_target = _args select 1;
|
||||||
@ -31,8 +30,6 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
|||||||
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
[_caller, _caller getvariable [QGVAR(treatmentPrevAnimCaller), ""], 1] call EFUNC(common,doAnimation);
|
||||||
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
_caller setvariable [QGVAR(treatmentPrevAnimCaller), nil];
|
||||||
|
|
||||||
// @todo remove item
|
|
||||||
|
|
||||||
// Record specific callback
|
// Record specific callback
|
||||||
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
_config = (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
||||||
if (GVAR(level) >= 2) then {
|
if (GVAR(level) >= 2) then {
|
||||||
@ -46,4 +43,4 @@ if (isNil _callback) then {
|
|||||||
_callback = missionNamespace getvariable _callback;
|
_callback = missionNamespace getvariable _callback;
|
||||||
};
|
};
|
||||||
|
|
||||||
_args call _callback
|
_args call _callback;
|
||||||
|
@ -26,20 +26,20 @@ if (isnil QGVAR(setting_allowSharedEquipment)) then {
|
|||||||
|
|
||||||
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith {
|
if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith {
|
||||||
[[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
true;
|
[true, _patient];
|
||||||
};
|
};
|
||||||
|
|
||||||
if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
|
if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
|
||||||
[[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
true;
|
[true, _medic];
|
||||||
};
|
};
|
||||||
|
|
||||||
_return = false;
|
_return = [false, objNull];
|
||||||
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then {
|
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then {
|
||||||
_crew = crew vehicle _medic;
|
_crew = crew vehicle _medic;
|
||||||
{
|
{
|
||||||
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
|
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
|
||||||
_return = true;
|
_return = [true, _x];
|
||||||
[[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
};
|
};
|
||||||
}foreach _crew;
|
}foreach _crew;
|
||||||
|
@ -15,21 +15,26 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_medic", "_patient", "_items"];
|
private ["_medic", "_patient", "_items", "_itemUsedInfo", "_itemsUsedBy"];
|
||||||
_medic = _this select 0;
|
_medic = _this select 0;
|
||||||
_patient = _this select 1;
|
_patient = _this select 1;
|
||||||
_items = _this select 2;
|
_items = _this select 2;
|
||||||
|
|
||||||
|
_itemsUsedBy = [];
|
||||||
{
|
{
|
||||||
// handle a one of type use item
|
// handle a one of type use item
|
||||||
if (typeName _x == "ARRAY") then {
|
if (typeName _x == "ARRAY") then {
|
||||||
{
|
{
|
||||||
if ([_medic, _patient, _x] call FUNC(useItem)) exitwith {};
|
_itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
|
||||||
|
if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||||
}foreach _x;
|
}foreach _x;
|
||||||
};
|
};
|
||||||
|
|
||||||
// handle required item
|
// handle required item
|
||||||
if (typeName _x == "STRING") then {
|
if (typeName _x == "STRING") then {
|
||||||
[_medic, _patient, _x] call FUNC(useItem);
|
_itemUsedInfo = [_medic, _patient, _x] call FUNC(useItem);
|
||||||
|
if (_itemUsedInfo select 0) exitwith { _itemsUsedBy pushback [(_itemUsedInfo select 1), _x]};
|
||||||
};
|
};
|
||||||
}foreach _items;
|
}foreach _items;
|
||||||
|
|
||||||
|
[count _items == count _itemsUsedBy, _itemsUsedBy];
|
||||||
|
@ -10,3 +10,5 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
|
#define USE_WOUND_EVENT_SYNC false
|
||||||
|
@ -30,6 +30,9 @@
|
|||||||
<Portuguese>Injetar Morfina</Portuguese>
|
<Portuguese>Injetar Morfina</Portuguese>
|
||||||
<Italian>Inietta Morfina</Italian>
|
<Italian>Inietta Morfina</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Inject_Atropine">
|
||||||
|
<English>Inject Atropine</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Medical_Transfuse_Blood">
|
<Key ID="STR_ACE_Medical_Transfuse_Blood">
|
||||||
<English>Transfuse Blood</English>
|
<English>Transfuse Blood</English>
|
||||||
<German>Bluttransfusion</German>
|
<German>Bluttransfusion</German>
|
||||||
@ -42,6 +45,15 @@
|
|||||||
<Portuguese>Transfundir Sangue</Portuguese>
|
<Portuguese>Transfundir Sangue</Portuguese>
|
||||||
<Italian>Effettua Trasfusione</Italian>
|
<Italian>Effettua Trasfusione</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Transfuse_Plasma">
|
||||||
|
<English>Transfuse Plasma</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Transfuse_Saline">
|
||||||
|
<English>Transfuse Saline</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Apply_Tourniquet">
|
||||||
|
<English>Apply Tourniquet</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Medical_Bandage">
|
<Key ID="STR_ACE_Medical_Bandage">
|
||||||
<English>Bandage</English>
|
<English>Bandage</English>
|
||||||
<German>Verbinden</German>
|
<German>Verbinden</German>
|
||||||
@ -150,6 +162,9 @@
|
|||||||
<Portuguese>Injetando Epinefrina ...</Portuguese>
|
<Portuguese>Injetando Epinefrina ...</Portuguese>
|
||||||
<Italian>Inietto l'epinefrina ...</Italian>
|
<Italian>Inietto l'epinefrina ...</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Injecting_Atropine">
|
||||||
|
<English>Injecting Atropine ...</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Medical_Transfusing_Blood">
|
<Key ID="STR_ACE_Medical_Transfusing_Blood">
|
||||||
<English>Transfusing Blood ...</English>
|
<English>Transfusing Blood ...</English>
|
||||||
<German>Bluttransfusion ...</German>
|
<German>Bluttransfusion ...</German>
|
||||||
@ -162,6 +177,12 @@
|
|||||||
<Portuguese>Transfundindo Sangue ...</Portuguese>
|
<Portuguese>Transfundindo Sangue ...</Portuguese>
|
||||||
<Italian>Effettuo la trasfusione ...</Italian>
|
<Italian>Effettuo la trasfusione ...</Italian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Transfusing_Saline">
|
||||||
|
<English>Transfusing Saline ...</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Transfusing_Plasma">
|
||||||
|
<English>Transfusing Plasma ...</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Medical_Bandaging">
|
<Key ID="STR_ACE_Medical_Bandaging">
|
||||||
<English>Bandaging ...</English>
|
<English>Bandaging ...</English>
|
||||||
<German>Verbinden ...</German>
|
<German>Verbinden ...</German>
|
||||||
@ -174,6 +195,9 @@
|
|||||||
<Portuguese>Atando ...</Portuguese>
|
<Portuguese>Atando ...</Portuguese>
|
||||||
<Russian>Перевязывание....</Russian>
|
<Russian>Перевязывание....</Russian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_Applying_Tourniquet">
|
||||||
|
<English>Applying Tourniquet ...</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_MEDICAL_ACTIONS_Medical">
|
<Key ID="STR_ACE_MEDICAL_ACTIONS_Medical">
|
||||||
<English>Medical</English>
|
<English>Medical</English>
|
||||||
<Czech>Zdravotní</Czech>
|
<Czech>Zdravotní</Czech>
|
||||||
@ -852,6 +876,12 @@
|
|||||||
<Key ID="STR_ACE_Medical_UnloadPatient">
|
<Key ID="STR_ACE_Medical_UnloadPatient">
|
||||||
<English>Unload patient</English>
|
<English>Unload patient</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MEDICAL_PlaceInBodyBag">
|
||||||
|
<English>Place body in bodybag</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_MEDICAL_PlacingInBodyBag">
|
||||||
|
<English>Placing body in bodybag</English>
|
||||||
|
</Key>
|
||||||
</Container>
|
</Container>
|
||||||
<Container name="Activities">
|
<Container name="Activities">
|
||||||
<Key ID="STR_ACE_MEDICAL_ACTIVITY_bandagedPatient">
|
<Key ID="STR_ACE_MEDICAL_ACTIVITY_bandagedPatient">
|
||||||
|
@ -78,39 +78,27 @@ class Rsctitles {
|
|||||||
colorSelectBackground[] = {0, 0, 0, 0.0};
|
colorSelectBackground[] = {0, 0, 0, 0.0};
|
||||||
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
|
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
|
||||||
};
|
};
|
||||||
class LogName {
|
|
||||||
idc = 301;
|
|
||||||
type = CT_STATIC;
|
|
||||||
x = "safezoneX + (2 * (((safezoneW / safezoneH) min 1.2) / 40))";
|
|
||||||
y = "20.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
|
|
||||||
w = "9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
|
||||||
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
|
||||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
|
||||||
style = 0x00 + 0x100; // ST_LEFT + ST_SHADOW
|
|
||||||
font = "PuristaMedium";
|
|
||||||
colorText[] = {0.95, 0.95, 0.95, 0.75};
|
|
||||||
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
|
|
||||||
text = "ACTIVITY LOG";
|
|
||||||
};
|
|
||||||
class ActivityLog: InjuryList {
|
class ActivityLog: InjuryList {
|
||||||
idc = 302;
|
idc = 302;
|
||||||
y = "21.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
|
y = "21.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
|
||||||
h = "7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = "7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||||
|
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||||
rowHeight = 0.03;
|
rowHeight = 0.03;
|
||||||
colorBackground[] = {0, 0, 0, 0.2};
|
shadow = 2;
|
||||||
|
colorBackground[] = {0, 0, 0, 0};
|
||||||
colorText[] = {1,1, 1, 1.0};
|
colorText[] = {1,1, 1, 1.0};
|
||||||
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
|
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
|
||||||
colorSelect[] = {0.95, 0.95, 0.95, 1};
|
colorSelect[] = {1,1,1,1};
|
||||||
colorSelect2[] = {0.95, 0.95, 0.95, 1};
|
colorSelect2[] = {1,1,1,1};
|
||||||
colorSelectBackground[] = {0, 0, 0, 0.0};
|
colorSelectBackground[] = {0, 0, 0, 0.0};
|
||||||
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
|
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0};
|
||||||
};
|
};
|
||||||
class TriageStatus {
|
class TriageStatus {
|
||||||
idc = 303;
|
idc = 303;
|
||||||
type = CT_STATIC;
|
type = CT_STATIC;
|
||||||
x = "safezoneX + (2 * (((safezoneW / safezoneH) min 1.2) / 40))";
|
x = "safezoneX + (2 * (((safezoneW / safezoneH) min 1.2) / 40))";
|
||||||
y = "28.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
|
y = "20.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
|
||||||
w = "9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
w = "9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||||
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = "0.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||||
|
@ -26,7 +26,6 @@ _waypoints = [] call FUNC(deviceGetWaypoints);
|
|||||||
|
|
||||||
if ((_newWpIndex < 0) || (_newWpIndex > ((count _waypoints) - 1))) exitWith {
|
if ((_newWpIndex < 0) || (_newWpIndex > ((count _waypoints) - 1))) exitWith {
|
||||||
GVAR(currentWaypoint) = -1;
|
GVAR(currentWaypoint) = -1;
|
||||||
ERROR("out of bounds wp");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GVAR(currentWaypoint) = _newWpIndex;
|
GVAR(currentWaypoint) = _newWpIndex;
|
||||||
|
@ -17,14 +17,16 @@ class CfgWeapons {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class launch_Titan_short_base: launch_Titan_base {
|
class launch_Titan_short_base: launch_Titan_base {
|
||||||
GVAR(angle) = 40;
|
// Titan is a soft-launch launcher
|
||||||
GVAR(range) = 8;
|
GVAR(angle) = 30;
|
||||||
|
GVAR(range) = 2;
|
||||||
GVAR(damage) = 0.5;
|
GVAR(damage) = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
class launch_NLAW_F: Launcher_Base_F {
|
class launch_NLAW_F: Launcher_Base_F {
|
||||||
GVAR(angle) = 40;
|
// NLAW is a soft-launch launcher
|
||||||
GVAR(range) = 5;
|
GVAR(angle) = 30;
|
||||||
|
GVAR(range) = 2;
|
||||||
GVAR(damage) = 0.6;
|
GVAR(damage) = 0.6;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,12 +53,11 @@ if (_distance < _backblastRange) then {
|
|||||||
_alpha = sqrt (1 - _distance / _backblastRange);
|
_alpha = sqrt (1 - _distance / _backblastRange);
|
||||||
_beta = sqrt 0.5;
|
_beta = sqrt 0.5;
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _backblastDamage;
|
_damage = _alpha * _beta * _backblastDamage;
|
||||||
[_damage * 100] call BIS_fnc_bloodEffect;
|
[_damage * 100] call BIS_fnc_bloodEffect;
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_firer] call EFUNC(medical,hasMedicalEnabled))}) then {
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
[_firer, "HitBody", [_firer, "body", ((_firer getHitPointDamage "HitBody") + _damage), _firer, "backblast"] call EFUNC(medical,handleDamage)] call EFUNC(medical,setHitPointDamage);
|
||||||
[_firer, "HitBody", ([_firer, "", ((_firer getHitPointDamage "HitBody") + _damage), objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
} else {
|
} else {
|
||||||
_firer setDamage (damage _firer + _damage);
|
_firer setDamage (damage _firer + _damage);
|
||||||
};
|
};
|
||||||
|
@ -15,15 +15,18 @@
|
|||||||
|
|
||||||
EXPLODE_3_PVT(_this,_posASL,_direction,_maxDistance);
|
EXPLODE_3_PVT(_this,_posASL,_direction,_maxDistance);
|
||||||
|
|
||||||
private ["_distance", "_interval", "_line", "_intersections"];
|
private ["_distance", "_interval", "_line", "_intersections", "_terrainIntersect", "_lastTerrainIntersect"];
|
||||||
|
|
||||||
_distance = _maxDistance;
|
_distance = _maxDistance;
|
||||||
_interval = _distance;
|
_interval = _distance;
|
||||||
_line = [_posASL, []];
|
_line = [_posASL, []];
|
||||||
|
_terrainIntersect = false;
|
||||||
|
_lastTerrainIntersect = false;
|
||||||
|
|
||||||
while {
|
while {
|
||||||
_interval > 0.1
|
_interval > 0.1
|
||||||
} do {
|
} do {
|
||||||
|
_lastTerrainIntersect = _terrainIntersect;
|
||||||
_interval = _interval / 2;
|
_interval = _interval / 2;
|
||||||
|
|
||||||
_line set [1, _posASL vectorAdd (_direction vectorMultiply _distance)];
|
_line set [1, _posASL vectorAdd (_direction vectorMultiply _distance)];
|
||||||
@ -32,9 +35,32 @@ while {
|
|||||||
_x isKindOf "Static" || {_x isKindOf "AllVehicles"}
|
_x isKindOf "Static" || {_x isKindOf "AllVehicles"}
|
||||||
} count (lineIntersectsWith _line);
|
} count (lineIntersectsWith _line);
|
||||||
|
|
||||||
_distance = _distance + ([1, -1] select (_intersections > 0 || {terrainIntersectASL _line})) * _interval;
|
_terrainIntersect = if (_intersections > 0) then {
|
||||||
|
false
|
||||||
|
} else {
|
||||||
|
terrainIntersectASL _line
|
||||||
|
};
|
||||||
|
|
||||||
|
_distance = _distance + ([1, -1] select (_intersections > 0 || _terrainIntersect)) * _interval;
|
||||||
|
|
||||||
if (_distance > _maxDistance) exitWith {_distance = 999};
|
if (_distance > _maxDistance) exitWith {_distance = 999};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (_distance > _maxDistance) exitWith {_distance};
|
||||||
|
|
||||||
|
// If the intersection was with the terrain, check slope
|
||||||
|
if (_terrainIntersect || _lastTerrainIntersect) exitWith {
|
||||||
|
private ["_slope","_angle"];
|
||||||
|
_slope = surfaceNormal (_posASL vectorAdd (_direction vectorMultiply _distance));
|
||||||
|
// Calculate the angle between the terrain and the back blast direction
|
||||||
|
_angle = 90 - acos (- (_slope vectorDotProduct _direction));
|
||||||
|
|
||||||
|
//systemChat format ["Angle: %1", _angle];
|
||||||
|
// Angles is below 25º, no backblast at all
|
||||||
|
if (_angle < 25) exitWith {_distance = 999};
|
||||||
|
// Angles is below 45º the distance is increased according to the difference
|
||||||
|
if (_angle < 45) exitWith {_distance = _distance * (5 - 4 * sqrt ((_angle - 25)/20))};
|
||||||
|
// Angles above 45º create full backblast
|
||||||
|
};
|
||||||
|
|
||||||
_distance
|
_distance
|
||||||
|
@ -50,18 +50,13 @@ if (!surfaceIsWater _pos) then {
|
|||||||
_alpha = sqrt (1 - _distance / _overpressureRange);
|
_alpha = sqrt (1 - _distance / _overpressureRange);
|
||||||
_beta = sqrt (1 - _angle / _overpressureAngle);
|
_beta = sqrt (1 - _angle / _overpressureAngle);
|
||||||
|
|
||||||
_damage = 2 * _alpha * _beta * _overpressureDamage;
|
_damage = _alpha * _beta * _overpressureDamage;
|
||||||
|
|
||||||
// If the target is the ACE_player
|
// If the target is the ACE_player
|
||||||
if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
if (_x == ACE_player) then {[_damage * 100] call BIS_fnc_bloodEffect};
|
||||||
|
|
||||||
// TODO: Sort this interaction with medical
|
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical") && {([_x] call EFUNC(medical,hasMedicalEnabled))}) then {
|
||||||
if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then {
|
[_x, "HitBody", [_x, "body", (_x getHitPointDamage "HitBody") + _damage, _firer, "backblast"] call EFUNC(medical,handleDamage)] call EFUNC(medical,setHitPointDamage);
|
||||||
[_x, "HitBody", ([_x, "", (_x getHitPointDamage "HitBody") + _damage, objNull, objNull] call EFUNC(medical,handleDamage))] call EFUNC(medical,setHitPointDamage);
|
|
||||||
_x spawn {
|
|
||||||
sleep 0.5;
|
|
||||||
[_this, "", 0, objNull, objNull] call EFUNC(medical,handleDamage);
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
_x setDamage (damage _x + _damage);
|
_x setDamage (damage _x + _damage);
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@ class CfgVehicles {
|
|||||||
class No { default = 1; name = "No"; value = 0; };
|
class No { default = 1; name = "No"; value = 0; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class RemoveDeadBodiesDisonncected {
|
class RemoveDeadBodiesDisconnected {
|
||||||
displayName = "Remove bodies?";
|
displayName = "Remove bodies?";
|
||||||
description = "Remove player bodies after disconnect?";
|
description = "Remove player bodies after disconnect?";
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
|
1
addons/testmissions/$PBOPREFIX$
Normal file
1
addons/testmissions/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
|||||||
|
z\ace\Addons\testmissions
|
@ -0,0 +1,17 @@
|
|||||||
|
enableDebugConsole = 2; //note security risk
|
||||||
|
|
||||||
|
// respawn = "GROUP";
|
||||||
|
respawn = "BASE";
|
||||||
|
// respawn = "BIRD";
|
||||||
|
respawnDelay = 2;
|
||||||
|
|
||||||
|
class Header {
|
||||||
|
gameType = Coop;
|
||||||
|
minPlayers = 1;
|
||||||
|
maxPlayers = 491;
|
||||||
|
};
|
||||||
|
|
||||||
|
onLoadName = "ACE3 Testing";
|
||||||
|
// onLoadMission = "";
|
||||||
|
// author = "";
|
||||||
|
// loadScreen = "";
|
@ -0,0 +1 @@
|
|||||||
|
enableSaving [false, false];
|
1248
addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm
Normal file
1248
addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm
Normal file
File diff suppressed because it is too large
Load Diff
20
addons/testmissions/config.cpp
Normal file
20
addons/testmissions/config.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"ace_common"};
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class CfgMissions {
|
||||||
|
class MPMissions {
|
||||||
|
class ACETestingMap1 {
|
||||||
|
briefingName = "ACE Testing Map 1";
|
||||||
|
directory = QUOTE(PATHTO_R(MPMissions\ACETestingMap1.Stratis));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
12
addons/testmissions/script_component.hpp
Normal file
12
addons/testmissions/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#define COMPONENT testmissions
|
||||||
|
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_TESTMISSIONS
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_TESTMISSIONS
|
||||||
|
#define DEBUG_SETTINGS DEBUG_ENABLED_TESTMISSIONS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\Addons\main\script_macros.hpp"
|
@ -4,7 +4,7 @@ class CfgVehicles {
|
|||||||
author = "$STR_ACE_Common_ACETeam";
|
author = "$STR_ACE_Common_ACETeam";
|
||||||
category = "ACE";
|
category = "ACE";
|
||||||
displayName = "Wind Deflection";
|
displayName = "Wind Deflection";
|
||||||
function = FUNC(enableModule);
|
function = FUNC(initalizeModule);
|
||||||
scope = 2;
|
scope = 2;
|
||||||
isGlobal = 1;
|
isGlobal = 1;
|
||||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
|
icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
|
||||||
|
Loading…
Reference in New Issue
Block a user