Skip to content

Commit

Permalink
Revert "Chemical/Misc/Surgery/Pharma - Fix Hashmap retrieval, inherit…
Browse files Browse the repository at this point in the history
…ance and CWMP issues" (#555)
  • Loading branch information
mazinskihenry authored Jul 12, 2024
1 parent c1b04a3 commit 6f70411
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 85 deletions.
2 changes: 1 addition & 1 deletion addons/chemical/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class CfgVehicles {
};
};
class Mortar_01_base_F: StaticMortar {
class ace_csw {
class ace_csw: ace_csw {
proxyWeapon = "ace_mortar_82mm";
};

Expand Down
163 changes: 83 additions & 80 deletions addons/misc/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@ class CfgVehicles {
class CAManBase: Man {
class ACE_Actions {
class ACE_MainActions {
class KAT_UnloadAndCarryPatient {
displayName = CSTRING(CarryPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {!(isNull (objectParent _target))} && {isNull (objectParent _player)});
statement = QUOTE([ARR_2(_player,_target)] call FUNC(unloadAndCarryPatient));
icon = QACEPATHTOF(dragging,UI\icons\person_carry.paa);
};
class KAT_IFAK_Item {
displayName = CSTRING(IFAK_Unpack);
condition = QUOTE([ARR_4(_target,'kat_IFAK',0,0)] call FUNC(FAK_checkSlot) && !([_target] call ACEFUNC(common,isAwake)));
Expand Down Expand Up @@ -485,78 +479,6 @@ class CfgVehicles {
};
};
};
class ACE_ArmLeft {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_ArmRight {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_LegLeft {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_LegRight {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
};
class ACE_SelfActions
{
Expand Down Expand Up @@ -1349,6 +1271,89 @@ class CfgVehicles {
};
};
};

class ACE_Actions {
class ACE_ArmLeft {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_ArmRight {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'hand_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_LegLeft {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_l', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_l', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_LegRight {
class SalineIV;
class SalineIV_Stand: SalineIV {
displayName = CSTRING(Display_IVStand);
condition = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_r', 'SalineIV_Stand'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_500: SalineIV {
displayName = CSTRING(Display_IVStand_500);
condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_500'] call ace_medical_treatment_fnc_treatment";
};
class SalineIV_Stand_250: SalineIV {
displayName = CSTRING(Display_IVStand_250);
condition = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_canTreatCached";
statement = "[_player, _target, 'leg_r', 'SalineIV_Stand_250'] call ace_medical_treatment_fnc_treatment";
};
};
class ACE_MainActions {
class KAT_UnloadAndCarryPatient {
displayName = CSTRING(CarryPatient);
condition = QUOTE(_target getVariable [ARR_2('ACE_isUnconscious',false)] && {!(isNull (objectParent _target))} && {isNull (objectParent _player)});
statement = QUOTE([ARR_2(_player,_target)] call FUNC(unloadAndCarryPatient));
icon = QACEPATHTOF(dragging,UI\icons\person_carry.paa);
};
};
};
};

class LandVehicle;
Expand All @@ -1368,8 +1373,6 @@ class CfgVehicles {

class Car_F: Car {};
class Quadbike_01_base_F: Car_F {
stretcherPos[] = {0,0.8,-0.56};
stretcherVector[] = {{1, 0, 0}, {0, 0, 1}};
class ACE_Actions: ACE_Actions {
class ACE_MainActions: ACE_MainActions {
class KAT_UnloadAndCarryPatient {
Expand Down
4 changes: 2 additions & 2 deletions addons/misc/functions/fnc_treatment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if (_medic isNotEqualTo player || {!_isInZeus}) then {
};

// Determine the animation length
private _animDuration = ACEGVAR(medical_treatment,animDurations) get toLowerANSI _medicAnim;
private _animDuration = ACEGVAR(medical_treatment,animDurations) getVariable _medicAnim;
if (isNil "_animDuration") then {
WARNING_2("animation [%1] for [%2] has no duration defined",_medicAnim,_classname);
_animDuration = 10;
Expand Down Expand Up @@ -197,4 +197,4 @@ if (_callbackProgress isEqualTo {}) then {
["isNotInside", "isNotSwimming", "isNotInZeus"]
] call ACEFUNC(common,progressBar);

true
true
5 changes: 5 additions & 0 deletions addons/misc/vehicle_stretcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ class B_Heli_Transport_01_F: Heli_Transport_01_base_F {
stretcherPos[] = {0,1.6,-1.55};
stretcherVector[] = {{1, 0, 0}, {0, 0, 1}};
};
class Quadbike_01_base_F;
class B_Quadbike_01_F: Quadbike_01_base_F {
stretcherPos[] = {0,0.8,-0.56};
stretcherVector[] = {{1, 0, 0}, {0, 0, 1}};
};
class B_Truck_01_transport_F;
class B_Truck_01_medical_F: B_Truck_01_transport_F {
stretcherPos[] = {-0.15,-4.7,0};
Expand Down
4 changes: 2 additions & 2 deletions addons/pharma/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class ACE_Medical_Treatment_Actions {
callbackSuccess = QFUNC(medication);
};
class CWMP: Morphine {
displayName = CSTRING(Give_CWMP);
displayName = CSTRING(Use_CWMP);
displayNameProgress = CSTRING(Using);
allowedSelections[] = {"Head"};
items[] = {"kat_Painkiller"};
condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)]));
callbackSuccess = QFUNC(treatmentAdvanced_CWMP);
callbackSuccess = QFUNC(treatmentAdvanced_Painkillers);
icon = QPATHTOF(ui\icon_painkillers_action.paa);
animationPatient = "";
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
Expand Down
1 change: 1 addition & 0 deletions addons/surgery/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class ACE_Medical_Treatment_Actions {
class BasicBandage;
class CheckPulse;
class ApplyTourniquet;
class ApplyTourniquet: BasicBandage {
condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) && ([ARR_2(_patient,_bodyPart)] call FUNC(hasAdditionalTourniquetAppliedTo)));
};
Expand Down

0 comments on commit 6f70411

Please sign in to comment.