-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Medical Update (SAM Splint) #6412
Changes from 17 commits
8f9e836
a705c63
2d3a5b0
410a341
b51c853
67dfd56
78459aa
4db3b4a
e27fb89
61327bd
925ca6f
d1fdf22
672fa6a
cdc19ff
27a1da1
0d7fc24
747902b
acd216f
f9e8582
e26af32
5f6752e
5ff17d2
9a344fe
834b808
f583a5b
ca8c48f
5e21b42
7ba2cde
05d6fcb
c49209d
90a0e42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage)); | ||
callbackFailure = ""; | ||
callbackProgress = ""; | ||
treatmentType = "Bandage"; | ||
|
||
animationPatient = ""; | ||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; | ||
|
@@ -40,6 +41,8 @@ class ACE_Medical_Actions { | |
treatmentTime = 2; | ||
items[] = {"ACE_morphine"}; | ||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine)); | ||
treatmentType = "Injection"; | ||
treatmentDisplay = "Morphine"; | ||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} }; | ||
}; | ||
|
@@ -53,6 +56,8 @@ class ACE_Medical_Actions { | |
treatmentTime = 3; | ||
items[] = {"ACE_epinephrine"}; | ||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen)); | ||
treatmentType = "Injection"; | ||
treatmentDisplay = "Epinephrine"; | ||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} }; | ||
treatmentLocations[] = {QGVAR(useLocation_basicEpi)}; | ||
|
@@ -68,6 +73,8 @@ class ACE_Medical_Actions { | |
items[] = {"ACE_bloodIV"}; | ||
// callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag)); | ||
callbackSuccess = QUOTE(DFUNC(treatmentIV)); | ||
treatmentType = "Injection"; | ||
treatmentDisplay = "IV"; | ||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; | ||
litter[] = {}; | ||
}; | ||
|
@@ -91,6 +98,8 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag)); | ||
callbackFailure = ""; | ||
callbackProgress = ""; | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Placing in Bodybag"; | ||
animationPatient = ""; | ||
animationPatientUnconscious = ""; | ||
itemConsumed = 1; | ||
|
@@ -108,6 +117,8 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(actionDiagnose)); | ||
callbackFailure = ""; | ||
callbackProgress = ""; | ||
treatmentType = "none"; | ||
treatmentDisplay = ""; | ||
animationPatient = ""; | ||
animationCaller = ""; // TODO | ||
itemConsumed = 0; | ||
|
@@ -127,6 +138,8 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR)); | ||
callbackFailure = ""; | ||
callbackProgress = "!([((_this select 0) select 1)] call ace_common_fnc_isAwake)"; | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Performing CPR"; | ||
animationPatient = ""; | ||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; | ||
animationCaller = "AinvPknlMstpSlayWnonDnon_medic"; | ||
|
@@ -159,6 +172,7 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_bandage)); | ||
callbackFailure = ""; | ||
callbackProgress = ""; | ||
treatmentType = "Bandage"; | ||
itemConsumed = 1; | ||
animationPatient = ""; | ||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; | ||
|
@@ -201,6 +215,7 @@ class ACE_Medical_Actions { | |
items[] = {"ACE_tourniquet"}; | ||
treatmentTime = 4; | ||
callbackSuccess = QUOTE(DFUNC(treatmentTourniquet)); | ||
treatmentType = "TourniquetOn"; | ||
condition = QUOTE(!([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo))); | ||
litter[] = {}; | ||
}; | ||
|
@@ -212,24 +227,29 @@ class ACE_Medical_Actions { | |
items[] = {"ACE_morphine"}; | ||
treatmentTime = 3; | ||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication)); | ||
treatmentType = "Injection"; | ||
treatmentDisplay = "Morphine"; | ||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} }; | ||
}; | ||
class Adenosine: Morphine { | ||
displayName = CSTRING(Inject_Adenosine); | ||
displayNameProgress = CSTRING(Injecting_Adenosine); | ||
treatmentDisplay = "Adenosine"; | ||
items[] = {"ACE_adenosine"}; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_adenosine"}} }; | ||
}; | ||
class Atropine: Morphine { | ||
displayName = CSTRING(Inject_Atropine); | ||
displayNameProgress = CSTRING(Injecting_Atropine); | ||
treatmentDisplay = "Atropine"; | ||
items[] = {"ACE_atropine"}; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_atropine"}} }; | ||
}; | ||
class Epinephrine: Morphine { | ||
displayName = CSTRING(Inject_Epinephrine); | ||
displayNameProgress = CSTRING(Injecting_Epinephrine); | ||
treatmentDisplay = "Epinephrine"; | ||
items[] = {"ACE_epinephrine"}; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} }; | ||
}; | ||
|
@@ -243,6 +263,8 @@ class ACE_Medical_Actions { | |
requiredMedic = 1; | ||
treatmentTime = 7; | ||
callbackSuccess = QUOTE(DFUNC(treatmentIV)); | ||
treatmentType = "Injection"; | ||
treatmentDisplay = "IV"; | ||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; | ||
litter[] = {}; | ||
}; | ||
|
@@ -294,6 +316,8 @@ class ACE_Medical_Actions { | |
treatmentTime = "(count ((_this select 1) getVariable ['ACE_Medical_bandagedWounds', []]) * 5)"; | ||
callbackSuccess = ""; | ||
callbackProgress = QUOTE(DFUNC(treatmentAdvanced_surgicalKit_onProgress)); | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Using SurgicalKit"; | ||
itemConsumed = QGVAR(consumeItem_SurgicalKit); | ||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1"; | ||
litter[] = { {"All", "", {"ACE_MedicalLitter_gloves"} }}; | ||
|
@@ -309,6 +333,8 @@ class ACE_Medical_Actions { | |
patientStateCondition = QGVAR(useCondition_PAK); | ||
treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime)); | ||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_fullHeal)); | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Using PAK"; | ||
itemConsumed = QGVAR(consumeItem_PAK); | ||
animationPatient = ""; | ||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; | ||
|
@@ -334,6 +360,8 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(actionCheckPulse)); | ||
callbackFailure = ""; | ||
callbackProgress = ""; | ||
treatmentType = "none"; | ||
treatmentDisplay = ""; | ||
animationPatient = ""; | ||
animationCaller = ""; // TODO | ||
animationCallerProne = ""; | ||
|
@@ -357,6 +385,7 @@ class ACE_Medical_Actions { | |
items[] = {}; | ||
treatmentTime = 2.5; | ||
callbackSuccess = QUOTE(DFUNC(actionRemoveTourniquet)); | ||
treatmentType = "TourniquetOff"; | ||
condition = QUOTE([ARR_2(_this select 1, _this select 2)] call FUNC(hasTourniquetAppliedTo)); | ||
displayNameProgress = CSTRING(RemovingTourniquet); | ||
litter[] = {}; | ||
|
@@ -375,6 +404,8 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR)); | ||
callbackFailure = ""; | ||
callbackProgress = "!([((_this select 0) select 1)] call ace_common_fnc_isAwake)"; | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Performing CPR"; | ||
animationPatient = ""; | ||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; | ||
animationCaller = "AinvPknlMstpSlayWnonDnon_medic"; | ||
|
@@ -397,11 +428,27 @@ class ACE_Medical_Actions { | |
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag)); | ||
callbackFailure = ""; | ||
callbackProgress = ""; | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Placing in Bodybag"; | ||
animationPatient = ""; | ||
animationPatientUnconscious = ""; | ||
itemConsumed = 1; | ||
litter[] = {}; | ||
}; | ||
class SAMSplint: fieldDressing { | ||
displayName = CSTRING(apply_samSplint); | ||
displayNameProgress = CSTRING(applying_samSplint); | ||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"}; | ||
allowSelfTreatment = 0; | ||
requiredMedic = 0; | ||
items[] = {"ACE_samSplint"}; | ||
treatmentTime = 10; | ||
callbackSuccess = QUOTE(DFUNC(treatmentSAMSplint)); | ||
treatmentType = "Others"; | ||
treatmentDisplay = "Applying SAM Splint"; | ||
condition = "[_this select 1, _this select 2] call ace_medical_fnc_canTreatSAMSplint"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Roger, will have this fixed by tonight. Would it be better to use 'private _target = _this select 1' since the caller (0th item of _this array) or just accept all 4 items via 'params'? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used |
||
litter[] = {}; | ||
}; | ||
}; | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Author: Orbis2358 | ||
* Check if can treat Splint | ||
* | ||
* Arguments: | ||
* 0: The patient <OBJECT> | ||
* 1: SelectionName <STRING> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [patient, "SelectionName"] call ace_medical_fnc_canTreatSAMSplint | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
#include "script_component.hpp" | ||
|
||
params ["_target", "_part"]; | ||
|
||
if !(_part isEqualType 0) then { | ||
_part = [_part] call FUNC(selectionNameToNumber); | ||
}; | ||
|
||
private _damage = _target getVariable [QGVAR(bodyPartStatus), [0, 0, 0, 0, 0, 0]]; | ||
private _hasDamage = (_damage select _part) > 0; | ||
|
||
private _sam = _target getVariable [QGVAR(samSplint), [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]]; | ||
private _hasSAM = ((_sam select _part) select 0) > 0; | ||
|
||
private _tourniquets = _target getVariable [QGVAR(tourniquets), [0, 0, 0, 0, 0, 0]]; | ||
private _hasTourniquet = (_tourniquets select _part) != 0; | ||
|
||
private _openWounds = _target getVariable [QGVAR(openWounds), []]; | ||
private _bleedingWound = {((_x select 2) isEqualTo _part) && ((_x select 4) * (_x select 3) > 0)} count _openWounds > 0; | ||
|
||
(_hasDamage && !_hasSAM && (_hasTourniquet || !_bleedingWound)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These still belong to the UI part don't they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, forgot those. Will remove them tonight.