Skip to content

Commit

Permalink
Add Apap painkiller (#5)
Browse files Browse the repository at this point in the history
* Add Apap painkiller

* Remove original translations

* Remove BOM encoding

* Replace ACE prefix with AFMED

* Make self and others actions separate

* Add/change translations
  • Loading branch information
3Mydlo3 authored Jan 31, 2020
1 parent 75fa2f5 commit 9f08b61
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
#else
#define LINKFUNC(x) FUNC(x)
#endif

#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
}
4 changes: 4 additions & 0 deletions addons/medical_treatment/ACE_Medical_Treatment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ class ACE_ADDON(medical_treatment) {
incompatibleMedication[] = {};
viscosityChange = 5;
};
class Apap: PainKillers {
painReduce = 0.6;
timeTillMaxEffect = 120;
};
};
class IV {
// volume is in millileters
Expand Down
17 changes: 17 additions & 0 deletions addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ class ACEGVAR(medical_treatment,actions) {
treatmentTime = 5;
};

class Morphine;
class EatApap: Morphine {
allowedSelections[] = {"head"};
allowSelfTreatment = 1;
displayName = CSTRING(Eat_Apap);
displayNameProgress = CSTRING(Eating_Apap);
items[] = {"AFMED_apap"};
condition = "(_this select 1) isEqualTo player";
litter[] = { {"All", "", {"AFMED_MedicalLitter_apap"}} };
};
class AdministerApap: EatApap {
allowSelfTreatment = 0;
displayName = CSTRING(Administer_Apap);
displayNameProgress = CSTRING(Administering_Apap);
condition = "!((_this select 1) getVariable ['ACE_isUnconscious', false])";
};

class BloodIV: BasicBandage {
treatmentTime = 5;
};
Expand Down
22 changes: 22 additions & 0 deletions addons/medical_treatment/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class CfgVehicles {
// Apap litter
class Leaflet_05_F;
class AFMED_MedicalLitter_apap: Leaflet_05_F {
hiddenSelectionsTextures[] = {"\armaforces\medical\data\apap_litter.paa"};
};

// Apap item
class Item_Base_F;
class AFMED_apapItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Apap_DisplayName);
author = "ArmaForces";
icon = QPATHTOF(ui\icons\apap.paa);
model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d";
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(AFMED_apap,1);
};
};
};
17 changes: 17 additions & 0 deletions addons/medical_treatment/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class CfgWeapons {
class ACE_ItemCore;
class CBA_MiscItem_ItemInfo;
class AFMED_apap: ACE_ItemCore {
scope = 2;
scopeCurator = 2;
author = "ArmaForces";
displayName = CSTRING(Apap_DisplayName);
picture = QPATHTOF(ui\icons\apap.paa);
model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d";
descriptionShort = CSTRING(Apap_Desc_Short);
descriptionUse = CSTRING(Apap_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 0.5;
};
};
};
2 changes: 2 additions & 0 deletions addons/medical_treatment/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ class CfgPatches {


#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "ACE_Medical_Treatment_Actions.hpp"
#include "ACE_Medical_Treatment.hpp"
38 changes: 38 additions & 0 deletions addons/medical_treatment/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="AFMED">
<Package name="Medical_Treatment">
<!--
MEDICATIONS
-->
<Key ID="STR_AFMED_Medical_Treatment_Apap_DisplayName">
<English>Apap pastille</English>
<Polish>Apap tabletka</Polish>
</Key>
<Key ID="STR_AFMED_Medical_Treatment_Apap_Desc_Short">
<English>Used to combat light pain experiences. No side effects.</English>
<Polish>Lekkie działanie przeciwbólowe. Brak efektów ubocznych.</Polish>
</Key>
<!--
<Key ID="STR_AFMED_Medical_Treatment_Apap_Desc_Use">
<English></English>
<Polish></Polish>
</Key>
-->
<Key ID="STR_AFMED_Medical_Treatment_Eat_Apap">
<English>Eat Apap</English>
<Polish>Zjedz Apap</Polish>
</Key>
<Key ID="STR_AFMED_Medical_Treatment_Eating_Apap">
<English>Eating Apap...</English>
<Polish>Zjadanie Apapu...</Polish>
</Key>
<Key ID="STR_AFMED_Medical_Treatment_Administer_Apap">
<English>Administer Apap</English>
<Polish>Podaj Apap</Polish>
</Key>
<Key ID="STR_AFMED_Medical_Treatment_Administering_Apap">
<English>Administering Apap...</English>
<Polish>Podawanie Apapu...</Polish>
</Key>
</Package>
</Project>
Binary file added addons/medical_treatment/ui/icons/apap.paa
Binary file not shown.

0 comments on commit 9f08b61

Please sign in to comment.