mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3 into clearCacheOnEvents
This commit is contained in:
commit
323aa156d1
26
README.md
26
README.md
@ -1,19 +1,19 @@
|
||||
<p align="center">
|
||||
<img src="https://github.com/KoffeinFlummi/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" height="80" />
|
||||
<img src="https://github.com/KoffeinFlummi/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" height="80" />
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/releases">
|
||||
<img src="http://img.shields.io/badge/release-3.0-green.svg?style=flat" alt="ACE version">
|
||||
</a>
|
||||
<a href="#">
|
||||
<img src="http://img.shields.io/badge/download-22_MB-blue.svg?style=flat" alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/issues">
|
||||
<img src="http://img.shields.io/github/issues/KoffeinFlummi/ACE3.svg?style=flat" alt="ACE issues">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/blob/master/LICENSE">
|
||||
<img src="http://img.shields.io/badge/license-GPLv2-red.svg?style=flat" alt="ACE license">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/releases">
|
||||
<img src="http://img.shields.io/badge/release-3.0-green.svg?style=flat" alt="ACE version">
|
||||
</a>
|
||||
<a href="#">
|
||||
<img src="http://img.shields.io/badge/download-22_MB-blue.svg?style=flat" alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/issues">
|
||||
<img src="http://img.shields.io/github/issues/KoffeinFlummi/ACE3.svg?style=flat" alt="ACE issues">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/blob/master/LICENSE">
|
||||
<img src="http://img.shields.io/badge/license-GPLv2-red.svg?style=flat" alt="ACE license">
|
||||
</a>
|
||||
</p>
|
||||
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a> | <a href="#">BIF thread</a></strong></sup></p>
|
||||
|
||||
|
@ -53,17 +53,6 @@ class RscTitles {
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
|
||||
idd = -1;
|
||||
class controls {
|
||||
class CameraView: RscMapControl {
|
||||
onDraw = "if (cameraView != uiNamespace getVariable 'ACE_EventHandler_CameraMode') then {uiNamespace setVariable ['ACE_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'ACE_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_CameraMode') select 2);};";
|
||||
idc = -1;
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_EventHandlerHelper2: ACE_Rsc_Display_Base {
|
||||
class controls {
|
||||
class MapMarkerCreated: RscMapControl {
|
||||
|
@ -6,9 +6,7 @@ ADDON = false;
|
||||
// ACE Common Function
|
||||
PREP(addActionEventHandler);
|
||||
PREP(addActionMenuEventHandler);
|
||||
PREP(addCameraEventHandler);
|
||||
PREP(addCanInteractWithCondition);
|
||||
PREP(addCustomEventHandler);
|
||||
PREP(addLineToDebugDraw);
|
||||
PREP(addMapMarkerCreatedEventHandler);
|
||||
PREP(addScrollWheelEventHandler);
|
||||
@ -21,8 +19,6 @@ PREP(beingCarried);
|
||||
PREP(binarizeNumber);
|
||||
PREP(blurScreen);
|
||||
PREP(cachedCall);
|
||||
PREP(callCustomEventHandlers);
|
||||
PREP(callCustomEventHandlersGlobal);
|
||||
PREP(canGetInPosition);
|
||||
PREP(canInteract);
|
||||
PREP(canInteractWith);
|
||||
@ -150,9 +146,7 @@ PREP(readSettingFromModule);
|
||||
PREP(receiveRequest);
|
||||
PREP(removeActionEventHandler);
|
||||
PREP(removeActionMenuEventHandler);
|
||||
PREP(removeCameraEventHandler);
|
||||
PREP(removeCanInteractWithCondition);
|
||||
PREP(removeCustomEventHandler);
|
||||
PREP(removeMapMarkerCreatedEventHandler);
|
||||
PREP(removeScrollWheelEventHandler);
|
||||
PREP(removeSpecificMagazine);
|
||||
@ -258,8 +252,6 @@ if (hasInterface) then {
|
||||
ACE_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player];
|
||||
uiNamespace setVariable ["ACE_player", ACE_player];
|
||||
|
||||
// Raise custom event. @todo, remove
|
||||
[missionNamespace, "playerChanged", [ACE_player, _oldPlayer]] call FUNC(callCustomEventHandlers);
|
||||
// Raise ACE event
|
||||
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
||||
};
|
||||
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Add a camera view event handler. The event script is called when the camera view changes.
|
||||
* The argument of the called function is stored in the _this variable and has as first element the new camera mode. Possible arguments are ["INTERNAL"], ["EXTERNAL"], ["GUNNER"] and ["GROUP"].
|
||||
*
|
||||
* Argument:
|
||||
* 0: Code to execute (Code or String)
|
||||
*
|
||||
* Return value:
|
||||
* ID of the event script (used to remove it later).
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
|
||||
_statement = _this select 0;
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]];
|
||||
|
||||
_id = (_actionsVar select 0) + 1;
|
||||
_actionIDs = _actionsVar select 1;
|
||||
_actions = _actionsVar select 2;
|
||||
|
||||
if (_id == 0) then {
|
||||
uiNamespace setVariable ["ACE_EventHandler_CameraMode", cameraView];
|
||||
(QGVAR(EventHandlerHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(EventHandlerHelper), "PLAIN"];
|
||||
};
|
||||
|
||||
_actionIDs pushBack _id;
|
||||
_actions pushBack _statement;
|
||||
|
||||
missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_id, _actionIDs, _actions]];
|
||||
|
||||
_id
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Add a custom event to a unit. The event scripts are called by FUNC(callCustomEventHandlers).
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object the event should be assigned to or namespace (Object OR Namespace)
|
||||
* 1: Name of the event (String)
|
||||
* 2: Code to execute (Code or String)
|
||||
*
|
||||
* Return value:
|
||||
* ID of the event script (used to remove it later).
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_object", "_type", "_statement", "_name", "_actionsVar", "_id", "_actionIDs", "_actions"];
|
||||
|
||||
_object = _this select 0;
|
||||
_type = _this select 1;
|
||||
_statement = _this select 2;
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
_name = format ["ACE_CustomEventHandlers_%1", _type];
|
||||
|
||||
_actionsVar = _object getVariable [_name, [-1, [], []]];
|
||||
|
||||
_id = (_actionsVar select 0) + 1;
|
||||
_actionIDs = _actionsVar select 1;
|
||||
_actions = _actionsVar select 2;
|
||||
|
||||
_actionIDs pushBack _id;
|
||||
_actions pushBack _statement;
|
||||
|
||||
_object setVariable [_name, [_id, _actionIDs, _actions]];
|
||||
|
||||
_id
|
@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Execute all custom event script assigned to this object.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object the eventhandlers are assigned to or namespace (Object or Namespace)
|
||||
* 1: Name of the event (String)
|
||||
* 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to])
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_object", "_type", "_argument", "_name", "_actions"];
|
||||
|
||||
_object = _this select 0;
|
||||
_type = _this select 1;
|
||||
_argument = _this select 2;
|
||||
|
||||
if (isNil "_argument") then {_argument = [_object]};
|
||||
|
||||
_name = format ["ACE_CustomEventHandlers_%1", _type];
|
||||
|
||||
_actions = (_object getVariable [_name, [-1, [], []]]) select 2;
|
||||
|
||||
{
|
||||
_argument call _x; nil;
|
||||
} count _actions;
|
||||
nil
|
@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Execute all custom event script assigned to this object on every machine.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object the eventhandlers are assigned to or namespace (Object or Namespace)
|
||||
* 1: Name of the event (String)
|
||||
* 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to])
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
[_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc);
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Remove a camera view event handler.
|
||||
*
|
||||
* Argument:
|
||||
* 0: ID of the event handler (Number)
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"];
|
||||
|
||||
_id = _this select 0;
|
||||
|
||||
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]];
|
||||
|
||||
_currentId = _actionsVar select 0;
|
||||
_actionIDs = _actionsVar select 1;
|
||||
_actions = _actionsVar select 2;
|
||||
|
||||
_id = _actionIDs find _id;
|
||||
|
||||
if (_id == -1) exitWith {};
|
||||
|
||||
_actionIDs set [_id, -1];
|
||||
_actionIDs = _actionIDs - [-1];
|
||||
|
||||
_actions set [_id, []];//{}
|
||||
_actions = _actions - [[]];//[{}]
|
||||
|
||||
missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_currentId, _actionIDs, _actions]];
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Remove a custom event handler from an object.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Unit the event handler is assigned to or namespace (Object OR Namespace)
|
||||
* 1: Name of the event (String)
|
||||
* 2: ID of the event handler (Number)
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_object", "_type", "_id", "_name", "_actionsVar", "_currentId", "_actionIDs", "_actions"];
|
||||
|
||||
_object = _this select 0;
|
||||
_type = _this select 1;
|
||||
_id = _this select 2;
|
||||
|
||||
_name = format ["ACE_CustomEventHandlers_%1", _type];
|
||||
|
||||
_actionsVar = _object getVariable [_name, [-1, [], []]];
|
||||
|
||||
_currentId = _actionsVar select 0;
|
||||
_actionIDs = _actionsVar select 1;
|
||||
_actions = _actionsVar select 2;
|
||||
|
||||
_id = _actionIDs find _id;
|
||||
|
||||
if (_id == -1) exitWith {};
|
||||
|
||||
_actionIDs set [_id, -1];
|
||||
_actionIDs = _actionIDs - [-1];
|
||||
|
||||
_actions set [_id, []];//{}
|
||||
_actions = _actions - [[]];//[{}]
|
||||
|
||||
_object setVariable [_name, [_currentId, _actionIDs, _actions]];
|
@ -190,15 +190,21 @@
|
||||
#define GETVAR(var1,var2,var3) var1 GETVAR_SYS(var2,var3)
|
||||
#define GETMVAR(var1,var2) missionNamespace GETVAR_SYS(var1,var2)
|
||||
#define GETUVAR(var1,var2) uiNamespace GETVAR_SYS(var1,var2)
|
||||
#define GETPRVAR(var1,var2) profileNamespace GETVAR_SYS(var1,var2)
|
||||
#define GETPAVAR(var1,var2) parsingNamespace GETVAR_SYS(var1,var2)
|
||||
|
||||
#define SETVAR(var1,var2,var3) var1 SETVAR_SYS(var2,var3)
|
||||
#define SETPVAR(var1,var2,var3) var1 SETPVAR_SYS(var2,var3)
|
||||
#define SETMVAR(var1,var2) missionNamespace SETVAR_SYS(var1,var2)
|
||||
#define SETUVAR(var1,var2) uiNamespace SETVAR_SYS(var1,var2)
|
||||
#define SETPRVAR(var1,var2) profileNamespace SETVAR_SYS(var1,var2)
|
||||
#define SETPAVAR(var1,var2) parsingNamespace SETVAR_SYS(var1,var2)
|
||||
|
||||
#define GETGVAR(var1,var2) GETMVAR(GVAR(var1),var2)
|
||||
#define GETEGVAR(var1,var2,var3) GETMVAR(EGVAR(var1,var2),var3)
|
||||
|
||||
#define ARR_SELECT(ARRAY,INDEX,DEFAULT) if (count ARRAY > INDEX) then {ARRAY select INDEX} else {DEFAULT}
|
||||
|
||||
|
||||
#define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \
|
||||
weapon = #WEAPON; \
|
||||
|
@ -9,7 +9,7 @@ class ACE_Medical_Actions {
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 5;
|
||||
treatmentTimeSelfCoef = 1;
|
||||
items[] = {{QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(quikClot)}};
|
||||
items[] = {{"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_quikclot"}};
|
||||
condition = "";
|
||||
itemConsumed = 1;
|
||||
|
||||
@ -27,7 +27,7 @@ class ACE_Medical_Actions {
|
||||
displayName = "$STR_ACE_Medical_Inject_Morphine";
|
||||
displayNameProgress = "$STR_ACE_Medical_Injecting_Morphine";
|
||||
treatmentTime = 2;
|
||||
items[] = {QGVAR(morphine)};
|
||||
items[] = {"ACE_morphine"};
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
@ -36,7 +36,7 @@ class ACE_Medical_Actions {
|
||||
displayNameProgress = "$STR_ACE_Medical_Injecting_Epinephrine";
|
||||
requiredMedic = 1;
|
||||
treatmentTime = 3;
|
||||
items[] = {QGVAR(epinephrine)};
|
||||
items[] = {"ACE_epinephrine"};
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
@ -45,7 +45,7 @@ class ACE_Medical_Actions {
|
||||
displayNameProgress = "$STR_ACE_Medical_Transfusing_Blood";
|
||||
requiredMedic = 1;
|
||||
treatmentTime = 20;
|
||||
items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}};
|
||||
items[] = {{"ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"}};
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
@ -60,7 +60,7 @@ class ACE_Medical_Actions {
|
||||
// The time it takes for a treatment action to complete. Time is in seconds.
|
||||
treatmentTime = 5;
|
||||
// Item required for the action. Leave empty for no item required.
|
||||
items[] = {QGVAR(fieldDressing)};
|
||||
items[] = {"ACE_fieldDressing"};
|
||||
condition = "";
|
||||
// Callbacks
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage));
|
||||
@ -74,67 +74,67 @@ class ACE_Medical_Actions {
|
||||
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||
};
|
||||
class PackingBandage: fieldDressing {
|
||||
items[] = {QGVAR(packingBandage)};
|
||||
items[] = {"ACE_packingBandage"};
|
||||
};
|
||||
class ElasticBandage: fieldDressing {
|
||||
items[] = {QGVAR(elasticBandage)};
|
||||
items[] = {"ACE_elasticBandage"};
|
||||
};
|
||||
class QuikClot: fieldDressing {
|
||||
items[] = {QGVAR(quikClot)};
|
||||
items[] = {"ACE_quikclot"};
|
||||
};
|
||||
class Tourniquet: fieldDressing {
|
||||
items[] = {QGVAR(tourniquet)};
|
||||
items[] = {"ACE_tourniquet"};
|
||||
treatmentTime = 6;
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet));
|
||||
condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)));
|
||||
};
|
||||
class Morphine: fieldDressing {
|
||||
items[] = {QGVAR(morphine)};
|
||||
items[] = {"ACE_morphine"};
|
||||
treatmentTime = 3;
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class Atropine: Morphine {
|
||||
items[] = {QGVAR(atropine)};
|
||||
items[] = {"ACE_atropine"};
|
||||
};
|
||||
class Epinephrine: Morphine {
|
||||
items[] = {QGVAR(epinephrine)};
|
||||
items[] = {"ACE_epinephrine"};
|
||||
};
|
||||
class BloodIV: fieldDressing {
|
||||
items[] = {QGVAR(bloodIV)};
|
||||
items[] = {"ACE_bloodIV"};
|
||||
requiredMedic = 1;
|
||||
treatmentTime = 7;
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentIV));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class BloodIV_500: BloodIV {
|
||||
items[] = {QGVAR(bloodIV_500)};
|
||||
items[] = {"ACE_bloodIV_500"};
|
||||
};
|
||||
class BloodIV_250: BloodIV {
|
||||
items[] = {QGVAR(bloodIV_250)};
|
||||
items[] = {"ACE_bloodIV_250"};
|
||||
};
|
||||
class PlasmaIV: BloodIV {
|
||||
items[] = {QGVAR(plasmaIV)};
|
||||
items[] = {"ACE_plasmaIV"};
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class PlasmaIV_500: PlasmaIV {
|
||||
items[] = {QGVAR(plasmaIV_500)};
|
||||
items[] = {"ACE_plasmaIV_500"};
|
||||
};
|
||||
class PlasmaIV_250: PlasmaIV {
|
||||
items[] = {QGVAR(plasmaIV_250)};
|
||||
items[] = {"ACE_plasmaIV_250"};
|
||||
};
|
||||
class SalineIV: BloodIV {
|
||||
items[] = {QGVAR(salineIV)};
|
||||
items[] = {"ACE_salineIV"};
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class SalineIV_500: SalineIV {
|
||||
items[] = {QGVAR(salineIV_500)};
|
||||
items[] = {"ACE_salineIV_500"};
|
||||
};
|
||||
class SalineIV_250: SalineIV {
|
||||
items[] = {QGVAR(salineIV_250)};
|
||||
items[] = {"ACE_salineIV_250"};
|
||||
};
|
||||
class SurgicalKit: fieldDressing {
|
||||
items[] = {QGVAR(surgicalKit)};
|
||||
items[] = {"ACE_surgicalKit"};
|
||||
treatmentLocations[] = {"MedicalFacility", "MedicalVehicle"};
|
||||
requiredMedic = 2;
|
||||
treatmentTime = 15;
|
||||
@ -143,7 +143,7 @@ class ACE_Medical_Actions {
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class PersonalAidKit: fieldDressing {
|
||||
items[] = {QGVAR(personalAidKit)};
|
||||
items[] = {"ACE_personalAidKit"};
|
||||
treatmentLocations[] = {"All"};
|
||||
requiredMedic = 1;
|
||||
treatmentTime = 15;
|
||||
@ -191,7 +191,7 @@ class ACE_Medical_Actions {
|
||||
treatmentLocations[] = {"All"};
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 7.5;
|
||||
items[] = {QGVAR(bodyBag)};
|
||||
items[] = {"ACE_bodyBag"};
|
||||
condition = "!alive (_this select 1);";
|
||||
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
|
||||
callbackFailure = "";
|
||||
|
@ -42,3 +42,11 @@ class Extended_Local_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Take_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
take = QUOTE(call FUNC(itemCheck));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ class CfgWeapons {
|
||||
class InventoryItem_Base_F;
|
||||
class InventoryFirstAidKitItem_Base_F;
|
||||
class MedikitItem;
|
||||
|
||||
|
||||
// ITEMS
|
||||
class FirstAidKit: ItemCore {
|
||||
type = 0;
|
||||
@ -23,7 +23,7 @@ class CfgWeapons {
|
||||
|
||||
// @todo localize
|
||||
class ACE_ItemCore;
|
||||
class GVAR(fieldDressing): ACE_ItemCore {
|
||||
class ACE_fieldDressing: ACE_ItemCore {
|
||||
scope = 2;
|
||||
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
|
||||
picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa));
|
||||
@ -35,7 +35,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(packingBandage): ItemCore {
|
||||
class ACE_packingBandage: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -50,7 +50,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(elasticBandage): ItemCore {
|
||||
class ACE_elasticBandage: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -65,7 +65,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(tourniquet): ItemCore {
|
||||
class ACE_tourniquet: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -80,7 +80,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(morphine): ItemCore {
|
||||
class ACE_morphine: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -95,7 +95,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(atropine): ItemCore {
|
||||
class ACE_atropine: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -110,7 +110,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(epinephrine): ItemCore {
|
||||
class ACE_epinephrine: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -125,7 +125,7 @@ class CfgWeapons {
|
||||
type=201;
|
||||
};
|
||||
};
|
||||
class GVAR(plasmaIV): ItemCore {
|
||||
class ACE_plasmaIV: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -138,21 +138,21 @@ class CfgWeapons {
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(plasmaIV_500): GVAR(plasmaIV) {
|
||||
class ACE_plasmaIV_500: ACE_plasmaIV {
|
||||
displayName = $STR_ACE_MEDICAL_PLASMA_IV_500;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(plasmaIV_250): GVAR(plasmaIV) {
|
||||
class ACE_plasmaIV_250: ACE_plasmaIV {
|
||||
displayName = $STR_ACE_MEDICAL_PLASMA_IV_250;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 2.5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(bloodIV): ItemCore {
|
||||
class ACE_bloodIV: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -166,21 +166,21 @@ class CfgWeapons {
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(bloodIV_500): GVAR(bloodIV) {
|
||||
class ACE_bloodIV_500: ACE_bloodIV {
|
||||
displayName = $STR_ACE_MEDICAL_BLOOD_IV_500;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(bloodIV_250): GVAR(bloodIV) {
|
||||
class ACE_bloodIV_250: ACE_bloodIV {
|
||||
displayName = $STR_ACE_MEDICAL_BLOOD_IV_250;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 2.5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(salineIV): ItemCore {
|
||||
class ACE_salineIV: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -193,21 +193,21 @@ class CfgWeapons {
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(salineIV_500): GVAR(salineIV) {
|
||||
class ACE_salineIV_500: ACE_salineIV {
|
||||
displayName = $STR_ACE_MEDICAL_SALINE_IV_500;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 2.5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(salineIV_250): GVAR(salineIV) {
|
||||
class ACE_salineIV_250: ACE_salineIV {
|
||||
displayName = $STR_ACE_MEDICAL_SALINE_IV_250;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 2.5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(quikclot): ItemCore {
|
||||
class ACE_quikclot: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -221,7 +221,7 @@ class CfgWeapons {
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(personalAidKit): ItemCore {
|
||||
class ACE_personalAidKit: ItemCore {
|
||||
scope = 2;
|
||||
value = 1;
|
||||
count = 1;
|
||||
@ -236,19 +236,19 @@ class CfgWeapons {
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(surgicalKit): ItemCore {
|
||||
class ACE_surgicalKit: ItemCore {
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
|
||||
model = QUOTE(PATHTOF(data\surgical_kit.p3d));
|
||||
picture = QUOTE(PATHTOF(ui\items\surgicalKit.paa));
|
||||
descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 5;
|
||||
type = 201;
|
||||
};
|
||||
};
|
||||
class GVAR(bodyBag): ItemCore {
|
||||
class ACE_bodyBag: ItemCore {
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY;
|
||||
model = QUOTE(PATHTOF(data\bodybagItem.p3d));
|
||||
|
@ -12,6 +12,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
|
||||
["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
|
||||
["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler;
|
||||
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
|
||||
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
|
||||
|
||||
// Initialize all effects
|
||||
_fnc_createEffect = {
|
||||
|
@ -19,6 +19,7 @@ PREP(addUnconsciousCondition);
|
||||
PREP(addUnloadPatientActions);
|
||||
PREP(canAccessMedicalEquipment);
|
||||
PREP(canTreat);
|
||||
PREP(canTreatCached);
|
||||
PREP(determineIfFatal);
|
||||
PREP(getBloodLoss);
|
||||
PREP(getBloodPressure);
|
||||
@ -47,6 +48,7 @@ PREP(init);
|
||||
PREP(isInMedicalFacility);
|
||||
PREP(isMedic);
|
||||
PREP(isMedicalVehicle);
|
||||
PREP(itemCheck);
|
||||
PREP(onMedicationUsage);
|
||||
PREP(onWoundUpdateRequest);
|
||||
PREP(onPropagateWound);
|
||||
@ -80,6 +82,8 @@ PREP(treatmentTourniquetLocal);
|
||||
PREP(useItem);
|
||||
PREP(useItems);
|
||||
PREP(displayPatientInformation);
|
||||
PREP(displayTriageCard);
|
||||
PREP(dropDownTriageCard);
|
||||
PREP(moduleMedicalSettings);
|
||||
PREP(moduleAssignMedicRoles);
|
||||
PREP(moduleAssignMedicalVehicle);
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {QGVAR(fieldDressingItem), QGVAR(packingBandageItem), QGVAR(elasticBandageItem), QGVAR(tourniquetItem), QGVAR(morphineItem), QGVAR(atropineItem), QGVAR(epinephrineItem), QGVAR(plasmaIVItem), QGVAR(bloodIVItem), QGVAR(salineIVItem), QGVAR(quikclotItem), QGVAR(personalAidKitItem), QGVAR(surgicalKitItem), QGVAR(bodyBagItem)};
|
||||
weapons[] = {QGVAR(fieldDressing), QGVAR(packingBandage), QGVAR(elasticBandage), QGVAR(tourniquet), QGVAR(morphine), QGVAR(atropine), QGVAR(epinephrine), QGVAR(plasmaIV), QGVAR(plasmaIV_500), QGVAR(plasmaIV_250), QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250), QGVAR(salineIV), QGVAR(salineIV_500), QGVAR(salineIV_250), QGVAR(quikclot), QGVAR(personalAidKit), QGVAR(surgicalKit), QGVAR(bodyBag)};
|
||||
units[] = {"ACE_medicalSupplyCrate", "ACE_fieldDressingItem", "ACE_packingBandageItem", "ACE_elasticBandageItem", "ACE_tourniquetItem", "ACE_morphineItem", "ACE_atropineItem", "ACE_epinephrineItem", "ACE_plasmaIVItem", "ACE_bloodIVItem", "ACE_salineIVItem", "ACE_quikclotItem", "ACE_personalAidKitItem", "ACE_surgicalKitItem", "ACE_bodyBagItem"};
|
||||
weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {ace_common, ace_interaction};
|
||||
author[] = {"Glowbal", "KoffienFlummi"};
|
||||
@ -20,3 +20,4 @@ class CfgPatches {
|
||||
#include "ACE_Medical_Treatments.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "UI\RscTitles.hpp"
|
||||
#include "UI\triagecard.hpp"
|
||||
|
@ -36,6 +36,6 @@ _tourniquets set[_part, 0];
|
||||
_target setvariable [QGVAR(tourniquets), _tourniquets, true];
|
||||
|
||||
// Adding the tourniquet item to the caller
|
||||
_caller addItem QGVAR(tourniquet);
|
||||
_caller addItem "ACE_tourniquet";
|
||||
|
||||
// "AinvPknlMstpSlayWrflDnon_medic
|
||||
|
22
addons/medical/functions/fnc_canTreatCached.sqf
Normal file
22
addons/medical/functions/fnc_canTreatCached.sqf
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Cached Check if the treatment action can be performed.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The caller <OBJECT>
|
||||
* 1: The target <OBJECT>
|
||||
* 2: Selection name <STRING>
|
||||
* 3: ACE_Medical_Treatments Classname <STRING>
|
||||
*
|
||||
* ReturnValue:
|
||||
* Can Treat <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define MAX_DURATION_CACHE 2
|
||||
|
||||
// parameters, function, namespace, uid
|
||||
[_this, DFUNC(canTreat), _this select 0, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE] call EFUNC(common,cachedCall);
|
78
addons/medical/functions/fnc_displayTriageCard.sqf
Normal file
78
addons/medical/functions/fnc_displayTriageCard.sqf
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Display triage card for a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target", "_show"];
|
||||
_target = _this select 0;
|
||||
_show = if (count _this > 1) then {_this select 1} else {true};
|
||||
GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} else {0};
|
||||
|
||||
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
|
||||
|
||||
if (_show) then {
|
||||
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"];
|
||||
createDialog QGVAR(triageCard);
|
||||
|
||||
[{
|
||||
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"];
|
||||
_target = (_this select 0) select 0;
|
||||
if (GVAR(TriageCardTarget) != _target) exitwith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getvariable QGVAR(triageCard);
|
||||
if (isnil "_display") exitwith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
_triageCardTexts = [];
|
||||
|
||||
// TODO fill the lb with the appropiate information for the patient
|
||||
_lbCtrl = (_display displayCtrl 200);
|
||||
lbClear _lbCtrl;
|
||||
|
||||
_log = _target getvariable ["myVariableTESTKOEAKJR", []];
|
||||
{
|
||||
// [_message,_moment,_type, _arguments]
|
||||
_message = _x select 0;
|
||||
_moment = _x select 1;
|
||||
_arguments = _x select 3;
|
||||
if (isLocalized _message) then {
|
||||
_message = localize _message;
|
||||
};
|
||||
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
_arguments set [_foreachIndex, localize _x];
|
||||
};
|
||||
}foreach _arguments;
|
||||
_message = format([_message] + _arguments);
|
||||
_lbCtrl lbAdd format["%1 %2", _moment, _message];
|
||||
}foreach _log;
|
||||
|
||||
if (count _triageCardTexts == 0) then {
|
||||
_lbCtrl lbAdd "No entries on this triage card..";
|
||||
};
|
||||
|
||||
_triageStatus = [_target] call FUNC(getTriageStatus);
|
||||
(_display displayCtrl 2000) ctrlSetText (_triageStatus select 0);
|
||||
(_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2);
|
||||
|
||||
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
} else {
|
||||
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
closeDialog 7010;
|
||||
};
|
32
addons/medical/functions/fnc_dropDownTriageCard.sqf
Normal file
32
addons/medical/functions/fnc_dropDownTriageCard.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Display triage card for a unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_show"];
|
||||
_show = _this select 0;
|
||||
disableSerialization;
|
||||
|
||||
_display = uiNamespace getvariable QGVAR(triageCard);
|
||||
if (isnil "_display") exitwith {};
|
||||
|
||||
_pos = [0,0,0,0];
|
||||
if (_show) then {
|
||||
_pos = ctrlPosition (_display displayCtrl 2001);
|
||||
};
|
||||
for "_idc" from 2002 to 2006 step 1 do {
|
||||
_pos set [1, (_pos select 1) + (_pos select 3)];
|
||||
_ctrl = (_display displayCtrl _idc);
|
||||
_ctrl ctrlSetPosition _pos;
|
||||
_ctrl ctrlCommit 0;
|
||||
};
|
@ -45,15 +45,16 @@ _unit setvariable [QGVAR(bodyPartStatus), _damageBodyParts, true];
|
||||
|
||||
[_unit, _selectionName, _newDamage, _typeOfProjectile, _typeOfDamage] call FUNC(handleDamage_wounds);
|
||||
|
||||
if (GVAR(enableAirway)) then {
|
||||
[_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway);
|
||||
};
|
||||
if (GVAR(enableFractures)) then {
|
||||
[_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures);
|
||||
};
|
||||
if (GVAR(enableInternalBleeding)) then {
|
||||
[_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries);
|
||||
};
|
||||
// TODO Disabled until implemented fully
|
||||
//if (GVAR(enableAirway)) then {
|
||||
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_airway);
|
||||
//};
|
||||
//if (GVAR(enableFractures)) then {
|
||||
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_fractures);
|
||||
//};
|
||||
//if (GVAR(enableInternalBleeding)) then {
|
||||
// [_unit,_selectionName,_newDamage,_sourceOfDamage, _typeOfDamage] call FUNC(handleDamage_internalInjuries);
|
||||
//};
|
||||
|
||||
if (alive _unit && {!(_unit getvariable ["ACE_isUnconscious", false])}) then {
|
||||
[_unit, _newDamage] call FUNC(reactionToDamage);
|
||||
|
@ -70,5 +70,5 @@ if (_amountOfDamage > 0.05) then {
|
||||
_fractureID = (_fractures select (_amountOf - 1) select 0) + 1;
|
||||
};
|
||||
_fractures pushback [_fractureID, _fractureType, _bodyPartn, 1 /* percentage treated */];
|
||||
_unit setvariable [GVAR(fractures), _fractures, true];
|
||||
};
|
||||
_unit setvariable [QGVAR(fractures), _fractures, true];
|
||||
};
|
||||
|
@ -111,8 +111,9 @@ if (GVAR(level) >= 2) then {
|
||||
_bloodPressure = [_unit] call FUNC(getBloodPressure);
|
||||
_unit setvariable [QGVAR(bloodPressure), _bloodPressure, _syncValues];
|
||||
|
||||
// TODO Disabled until implemented fully
|
||||
// Handle airway
|
||||
if (GVAR(setting_allowAirwayInjuries)) then {
|
||||
/*if (GVAR(setting_allowAirwayInjuries)) then {
|
||||
_airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100];
|
||||
if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then {
|
||||
if (_airwayStatus >= 0.5) then {
|
||||
@ -131,11 +132,10 @@ if (GVAR(level) >= 2) then {
|
||||
[_unit, true] call FUNC(setDead);
|
||||
};
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
||||
// Check vitals for medical status
|
||||
// TODO check for in revive state instead of variable
|
||||
// TODO Implement cardiac arrest.
|
||||
_bloodPressureL = _bloodPressure select 0;
|
||||
_bloodPressureH = _bloodPressure select 1;
|
||||
|
||||
|
@ -32,7 +32,7 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
|
||||
};
|
||||
|
||||
_return = false;
|
||||
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {(vehicle _medic != _medic)}) then {
|
||||
if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then {
|
||||
_crew = crew vehicle _medic;
|
||||
{
|
||||
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
|
||||
|
@ -74,3 +74,8 @@ _logs = _unit getvariable [QGVAR(allLogs), []];
|
||||
_unit setvariable [_x, nil, true];
|
||||
} foreach _logs;
|
||||
_unit setvariable [QGVAR(allLogs), [], true];
|
||||
|
||||
// items
|
||||
[{
|
||||
_this call FUNC(itemCheck);
|
||||
}, [_unit], 0.5, 0.1] call EFUNC(common,waitAndExecute);
|
||||
|
51
addons/medical/functions/fnc_itemCheck.sqf
Normal file
51
addons/medical/functions/fnc_itemCheck.sqf
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
* Replaces vanilla items with ACE ones.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The unit <OBJECT>
|
||||
*
|
||||
* ReturnValue:
|
||||
* nil
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit"];
|
||||
_unit = _this select 0;
|
||||
|
||||
while {({_x == "FirstAidKit"} count items _unit) > 0} do {
|
||||
_unit removeItem "FirstAidKit";
|
||||
if (GVAR(level) >= 2) then {
|
||||
_unit addItem "ACE_fieldDressing";
|
||||
_unit addItem "ACE_packingBandage";
|
||||
_unit addItem "ACE_morphine";
|
||||
_unit addItem "ACE_tourniquet";
|
||||
} else {
|
||||
_unit addItem "ACE_fieldDressing";
|
||||
_unit addItem "ACE_fieldDressing";
|
||||
_unit addItem "ACE_morphine";
|
||||
};
|
||||
};
|
||||
|
||||
while {({_x == "Medikit"} count items _unit) > 0} do {
|
||||
_unit removeItem "Medikit";
|
||||
if (GVAR(level) >= 2) then {
|
||||
_unit addItemToBackpack "ACE_fieldDressing";
|
||||
_unit addItemToBackpack "ACE_packingBandage";
|
||||
_unit addItemToBackpack "ACE_packingBandage";
|
||||
_unit addItemToBackpack "ACE_epinephrine";
|
||||
_unit addItemToBackpack "ACE_morphine";
|
||||
_unit addItemToBackpack "ACE_salineIV_250";
|
||||
_unit addItemToBackpack "ACE_tourniquet";
|
||||
} else {
|
||||
_unit addItemToBackpack "ACE_epinephrine";
|
||||
_unit addItemToBackpack "ACE_epinephrine";
|
||||
_unit addItemToBackpack "ACE_epinephrine";
|
||||
_unit addItemToBackpack "ACE_epinephrine";
|
||||
_unit addItemToBackpack "ACE_bloodIV";
|
||||
_unit addItemToBackpack "ACE_bloodIV";
|
||||
};
|
||||
};
|
@ -33,5 +33,5 @@ if (!local _unit) then {
|
||||
if (!_exists) then {
|
||||
_openWounds pushback _injury;
|
||||
};
|
||||
_unit setvariable [GVAR(openWounds), _openWounds];
|
||||
_unit setvariable [QGVAR(openWounds), _openWounds];
|
||||
};
|
||||
|
BIN
addons/medical/ui/icons/autoInjector.paa
Normal file
BIN
addons/medical/ui/icons/autoInjector.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/bandage.paa
Normal file
BIN
addons/medical/ui/icons/bandage.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/bodybag.paa
Normal file
BIN
addons/medical/ui/icons/bodybag.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/iv.paa
Normal file
BIN
addons/medical/ui/icons/iv.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/medical_cross.paa
Normal file
BIN
addons/medical/ui/icons/medical_cross.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/packingBandage.paa
Normal file
BIN
addons/medical/ui/icons/packingBandage.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/surgicalKit.paa
Normal file
BIN
addons/medical/ui/icons/surgicalKit.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/tourniquet.paa
Normal file
BIN
addons/medical/ui/icons/tourniquet.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/icons/triageCard.paa
Normal file
BIN
addons/medical/ui/icons/triageCard.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/triage_card_corner_l.paa
Normal file
BIN
addons/medical/ui/triage_card_corner_l.paa
Normal file
Binary file not shown.
BIN
addons/medical/ui/triage_card_corner_r.paa
Normal file
BIN
addons/medical/ui/triage_card_corner_r.paa
Normal file
Binary file not shown.
191
addons/medical/ui/triagecard.hpp
Normal file
191
addons/medical/ui/triagecard.hpp
Normal file
@ -0,0 +1,191 @@
|
||||
class ACE_gui_buttonBase;
|
||||
|
||||
class GVAR(triageCard) {
|
||||
idd = 7010;
|
||||
movingenable = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(triageCard))), _this select 0)]);
|
||||
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QUOTE(GVAR(triageCard))), nil)]);
|
||||
class controlsBackground {
|
||||
class Background: ACE_gui_backgroundBase {
|
||||
idc = -1;
|
||||
type = CT_STATIC;
|
||||
x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "19 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
style = ST_LEFT + ST_SHADOW;
|
||||
font = "PuristaMedium";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
colorText[] = {0.0, 0.0, 0.0, 1};
|
||||
colorBackground[] = {1,1,1,1};
|
||||
text = "";
|
||||
};
|
||||
class cornor_top_l: ACE_gui_backgroundBase {
|
||||
idc = -1;
|
||||
x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
font = "PuristaMedium";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
colorText[] = {1,1,0,1};
|
||||
colorBackground[] = {0,0,0,0};
|
||||
text = QUOTE(PATHTOF(ui\triage_card_corner_l.paa));
|
||||
};
|
||||
class cornor_top_r: cornor_top_l {
|
||||
x = "20 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
text = QUOTE(PATHTOF(ui\triage_card_corner_r.paa));
|
||||
};
|
||||
|
||||
class TriageCardLabel {
|
||||
idc = 199;
|
||||
type = CT_STATIC;
|
||||
x = "14.25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "7.5 * (((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 = 0x02 + 0x100; // ST_LEFT + ST_SHADOW
|
||||
font = "PuristaMedium";
|
||||
colorText[] = {0,0,0,1};
|
||||
colorBackground[] = {0,0,0,0};
|
||||
text = "TRIAGE CARD";
|
||||
};
|
||||
class TriageList: ACE_gui_listBoxBase {
|
||||
idc = 200;
|
||||
x = "11 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "13 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||
rowHeight = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||
colorBackground[] = {0, 0, 0, 0};
|
||||
colorText[] = {0,0,0, 1.0};
|
||||
colorScrollbar[] = {0.95, 0.95, 0.95, 0};
|
||||
colorSelect[] = {0.0, 0.0, 0.0, 1};
|
||||
colorSelect2[] = {0.0, 0.0, 0.0, 1};
|
||||
colorSelectBackground[] = {0, 0, 0, 0.0};
|
||||
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
|
||||
};
|
||||
class TriageTextBottom: TriageCardLabel {
|
||||
idc = 2000;
|
||||
x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "20 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
style = 0x02;
|
||||
colorText[] = {1, 1, 1.0, 1};
|
||||
colorBackground[] = {0,0.0,0.0,0.7};
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
text = "";
|
||||
};
|
||||
class selectTriageStatus: ACE_gui_buttonBase {
|
||||
idc = 2001;
|
||||
x = "10 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
y = "20 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
style = 0x02;
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)";
|
||||
animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)";
|
||||
action = QUOTE([true] call FUNC(dropDownTriageCard););
|
||||
text = "";
|
||||
};
|
||||
class selectTriageStatusNone: selectTriageStatus {
|
||||
idc = 2002;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
text = $STR_ACE_MEDICAL_TRIAGE_STATUS_NONE;
|
||||
style = 0x02;
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',0,true)];);
|
||||
};
|
||||
class selectTriageStatusMinor: selectTriageStatus {
|
||||
idc = 2003;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
text = $STR_ACE_MEDICAL_TRIAGE_STATUS_MINOR;
|
||||
style = 0x02;
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0.5,0,0.9)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0.5,0,0.9)";
|
||||
animTextureOver = "#(argb,8,8,3)color(0,0.5,0,0.9)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(0,0.5,0,0.9)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(0,0.5,0,0.9)";
|
||||
action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',1,true)];);
|
||||
};
|
||||
class selectTriageStatusDelayed: selectTriageStatus {
|
||||
idc = 2004;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
text = $STR_ACE_MEDICAL_TRIAGE_STATUS_DELAYED;
|
||||
style = 0x02;
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
|
||||
animTextureOver = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
|
||||
action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel',2,true)];);
|
||||
};
|
||||
class selectTriageStatusImmediate: selectTriageStatus {
|
||||
idc = 2005;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
text = $STR_ACE_MEDICAL_TRIAGE_STATUS_IMMEDIATE;
|
||||
style = 0x02;
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
|
||||
animTextureOver = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
|
||||
action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 3, true)];);
|
||||
};
|
||||
class selectTriageStatusDeceased: selectTriageStatus {
|
||||
idc = 2006;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
text = $STR_ACE_MEDICAL_TRIAGE_STATUS_DECEASED;
|
||||
style = 0x02;
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)";
|
||||
action = QUOTE([false] call FUNC(dropDownTriageCard); GVAR(TriageCardTarget) setvariable [ARR_3('ACE_medical_triageLevel', 4, true)];);
|
||||
};
|
||||
};
|
||||
};
|
@ -25,8 +25,6 @@ _killer = _this select 1;
|
||||
if (_unit != _killer && side group _unit in [side group ACE_player, civilian] && {side group _killer == side group ACE_player}) then {
|
||||
systemChat format ["%1 was killed by %2", [_unit] call EFUNC(common,getName), [_killer] call EFUNC(common,getName)];
|
||||
|
||||
// Raise custom event. @todo: remove
|
||||
[_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(common,callCustomEventHandlers);
|
||||
// Raise ACE globalEvent
|
||||
["killedByFriendly", [_unit, _killer]] call EFUNC(common,globalEvent);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user