Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
IMPROVED: Painkillers
Browse files Browse the repository at this point in the history
Painkillers will now avaible via addItemTo. ATTENTION: New Classname
  • Loading branch information
Katalam committed Feb 10, 2019
1 parent ae37764 commit adc688b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
30 changes: 16 additions & 14 deletions addons/kat_acecirculation/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
class CfgPatches {
class kat_aceCirculation {
units[] = {
"KAT_PainkillersItem",
"KAT_Painkiller_Item",
"KAT_X_AEDItem"
};
weapons[] = {
"KAT_Painkillers",
"KAT_Painkiller",
"KAT_bloodIV_O",
"KAT_bloodIV_A",
"KAT_bloodIV_B",
Expand All @@ -28,8 +28,8 @@ class CfgPatches {
"adv_aceCPR",
"cba_settings"
};
version = "0.9";
versionStr = "0.9";
version = "0.9.5";
versionStr = "0.9.5";
author = "[SeL] Katalam";
authorUrl = "http://spezialeinheit-luchs.de/";
};
Expand Down Expand Up @@ -164,7 +164,7 @@ class cfgWeapons {
class KAT_bloodIV_AB_250: ACE_bloodIV_250 {
displayName = "$STR_KAT_aceCirculation_BloodIV_AB_250";
};
class KAT_Painkillers: ACE_ItemCore {
class KAT_Painkiller_Item: ACE_ItemCore {
scope = 1; // no mistake, just a placeholder, cause ACE can't handle magazines. DO NOT USE!
author = "Katalam";
displayName = "$STR_KAT_aceCirculation_Painkillers_Box_Display";
Expand All @@ -189,7 +189,7 @@ class cfgWeapons {
class cfgMagazines {
class CA_Magazine;

class KAT_Painkillers: CA_Magazine {
class KAT_Painkiller: CA_Magazine {
author = "Katalam";
scope = 2;

Expand All @@ -216,14 +216,14 @@ class cfgVehicles {
class TransportMagazines;
};

class KAT_PainkillersItem: WeaponHolder_Single_limited_item_F {
class KAT_PainkillerItem: WeaponHolder_Single_limited_item_F {
scope = 2;
scopeCurator = 2;
displayName= "$STR_KAT_aceCirculation_Painkillers_Box_Display";
author = "Katalam";
vehicleClass = "Magazines";
class TransportItems {
MACRO_ADDITEM(KAT_Painkillers,1);
MACRO_ADDITEM(KAT_Painkiller,1);
};
};
class KAT_X_AEDItem: adv_aceCPR_AEDItem {
Expand All @@ -243,7 +243,7 @@ class cfgVehicles {
MACRO_ADDITEM(KAT_X_AED,1);
};
class TransportMagazines: TransportMagazines {
MACRO_ADDMAGAZINE(KAT_Painkillers,10);
MACRO_ADDMAGAZINE(KAT_Painkiller,10);
};
};
class KAT_medicalSupplyCrate: ACE_medicalSupplyCrate {
Expand Down Expand Up @@ -274,7 +274,7 @@ class Man;
class CheckBloodPressure {}; // Remove the ability to check blood pressure at the head
class Painkillers {
displayName = "$STR_KAT_aceCirculation_Inject_Box_Painkillers";
condition = "('KAT_Painkillers' in (magazines _player) || 'KAT_Painkillers' in (magazines _target))";
condition = "('KAT_Painkiller' in (magazines _player) || 'KAT_Painkiller' in (magazines _target))";
statement = "[_player, _target, 'head', 'Painkillers'] call ace_medical_fnc_treatment";
showDisabled = 0;
exceptions[] = {"isNotSitting"};
Expand Down Expand Up @@ -316,7 +316,7 @@ class Man;
class CheckBloodPressure {}; // Remove the ability to check blood pressure at the head
class Painkillers {
displayName = "$STR_KAT_aceCirculation_Inject_Box_Painkillers";
condition = "('KAT_Painkillers' in (magazines _player) || 'KAT_Painkillers' in (magazines _target))";
condition = "('KAT_Painkiller' in (magazines _player) || 'KAT_Painkiller' in (magazines _target))";
statement = "[_player, _target, 'head', 'Painkillers'] call ace_medical_fnc_treatment";
showDisabled = 0;
exceptions[] = {"isNotSitting"};
Expand Down Expand Up @@ -361,7 +361,7 @@ class Man;
class CheckBloodPressure {};
class Painkillers {
displayName = "$STR_KAT_aceCirculation_Inject_Box_Painkillers";
condition = "'KAT_Painkillers' in (magazines _player)";
condition = "'KAT_Painkiller' in (magazines _player)";
statement = "[_player, _target, 'head', 'Painkillers'] call ace_medical_fnc_treatment";
showDisabled = 0;
exceptions[] = {"isNotInside", "isNotSitting"};
Expand Down Expand Up @@ -403,8 +403,8 @@ class ACE_Medical_Actions {
displayNameProgress = $STR_KAT_aceCirculation_Using;
allowedSelections[] = {"head"};
items[] = {};
callbackSuccess = "['KAT_Painkillers', _player, _target, _selectionName, 'Painkillers'] call kat_aceCirculation_fnc_removeItemfromMag";
condition = "('KAT_Painkillers' in (magazines _player) || 'KAT_Painkillers' in (magazines _target))";
callbackSuccess = "['KAT_Painkiller', _player, _target, _selectionName, 'Painkillers'] call kat_aceCirculation_fnc_removeItemfromMag";
condition = "('KAT_Painkiller' in (magazines _player) || 'KAT_Painkiller' in (magazines _target))";
};
class CheckDogtags: checkPulse {
displayName = $STR_KAT_aceCirculation_DogTag;
Expand Down Expand Up @@ -522,6 +522,8 @@ class ACE_Medical_Advanced {
// The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress. For liquids, it corresponds to the informal concept of "thickness".
// This value will increase/decrease the viscoty of the blood with the percentage given. Where 100 = max. Using the minus will decrease viscosity
viscosityChange = 5;
// item class name
itemClassName = "KAT_Painkiller_Item";
};
};
};
Expand Down
4 changes: 4 additions & 0 deletions addons/kat_acecirculation/functions/fn_removeItemfromMag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ if ((_oldMag select 1) > 1) then {

playsound3D ["kat_aceCirculation\sounds\take_painkillers.wav", _player, false, getPosASL _player, 8, 1, 15];

if (isText (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication" >> _className >> "itemClassName")) then {
_mag = getText (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "Medication" >> _className >> "itemClassName");
};

[_player, _target, _selectionName, _className, [_mag]] call ace_medical_fnc_treatmentAdvanced_medication;
2 changes: 1 addition & 1 deletion addons/kat_acecirculation/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<Spanish>Analgésicos</Spanish>
</Key>
<Key ID="STR_KAT_aceCirculation_Inject_Box_Painkillers">
<English>Use Painkillers</English>
<English>Take Painkillers</English>
<German>Schlucke Schmerzmittel</German>
<Polish>Użyj leku przeciwbólowego</Polish>
<Spanish>Usar analgésico</Spanish>
Expand Down

0 comments on commit adc688b

Please sign in to comment.