Skip to content
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

add ace medical painkillers #156

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions addons/ace_tweaks/ACE_Medical_Treatment.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

class ace_medical_treatment {
class Medication {
class PainKillers {
Drofseh marked this conversation as resolved.
Show resolved Hide resolved
painReduce = 0.1; //morphine is 0.8
timeInSystem = 1200;
timeTillMaxEffect = 60;
maxDose = 25;
incompatibleMedication[] = {};
viscosityChange = 5;
};
};
};
21 changes: 21 additions & 0 deletions addons/ace_tweaks/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

class ace_medical_treatment_actions {

// - Syringes -------------------------------------------------------------
class Morphine;
class Painkillers: Morphine {
Drofseh marked this conversation as resolved.
Show resolved Hide resolved
displayName = CSTRING(Give_Painkilllers);
displayNameProgress = CSTRING(Giving_Painkilllers);
allowSelfTreatment = 1;
allowedSelections[] = {"head"};
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
callbackSuccess = "ace_medical_treatment_fnc_medication";
category = "medication";
condition = "!(_patient getVariable ['ACE_isUnconscious',false])";
icon = QPATHTOF(ui\icons\painkillers.paa);
items[] = {QGVAR(painkillers)};
litter[] = {{"ACE_MedicalLitter_painkillers"}};
// sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}};//TODO
treatmentTime = 5;
};
};
38 changes: 38 additions & 0 deletions addons/ace_tweaks/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

class CBA_Extended_EventHandlers;

class CfgVehicles {

// Medical litter classes
class Thing;
class ACE_MedicalLitterBase;
class ACE_MedicalLitter_painkillers: ACE_MedicalLitterBase {
model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d";
};

// Treatment items
class Item_Base_F;
class ACE_painkillersItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Painkillers);
author = "Drofseh";
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_painkillers,1);
};
};

// Medical supply crates
class NATO_Box_Base;
class ACE_medicalSupplyCrate: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_painkillers,25);
};
};
class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate {
class TransportItems {
MACRO_ADDITEM(ACE_painkillers,15);
};
};
};
16 changes: 15 additions & 1 deletion addons/ace_tweaks/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@ class CfgWeapons {
};
class FirstAidKit: ItemCore {
class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 8;
mass = 8.25;
};
};
class CBA_MiscItem_ItemInfo;
class ACE_ItemCore;
class GVAR(painkillers) : ACE_ItemCore {
scope = 2;
author = "Drofseh";
displayName = CSTRING(Painkilllers);
picture = QPATHTOF(ui\items\painkillers_ca.paa);
model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d";
descriptionShort = CSTRING(Treatment_Painkillers_Desc_Short);
descriptionUse = CSTRING(Treatment_Painkillers_Desc_Use);
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 0.25;
};
};
};
6 changes: 5 additions & 1 deletion addons/ace_tweaks/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CfgPatches
author = "ARCOMM";
url = "https://github.com/ARCOMM/arc_misc";
units[] = {};
weapons[] = {};
weapons[] = {"ACE_painkillers"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
QGVARMAIN(main),
Expand All @@ -29,6 +29,7 @@ class ACE_Medical_StateMachine {
class ace_medical_replacementItems {
ItemType_401[] = {
{"ACE_fieldDressing", 5},
{"ACE_painkillers", 1},
Drofseh marked this conversation as resolved.
Show resolved Hide resolved
{"ACE_morphine", 1},
{"ACE_tourniquet", 2}
};
Expand All @@ -44,6 +45,9 @@ class ace_medical_replacementItems {
};

#include "ACE_detector.hpp"
#include "ACE_Medical_Treatment.hpp"
#include "ACE_Medical_Treatment_Actions.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "Cfg3DEN.hpp"
5 changes: 5 additions & 0 deletions addons/ace_tweaks/script_component.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#define COMPONENT ace_tweaks
#include "\x\arc_misc\addons\main\script_macros.hpp"
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"

#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
}
40 changes: 40 additions & 0 deletions addons/ace_tweaks/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="arc_misc">
<Package name="ace_tweaks">
<Key ID="STR_arc_misc_ace_tweaks_Painkilllers">
<English>Painkillers</English>
</Key>
<Key ID="STR_arc_misc_ace_tweaks_Give_Painkilllers">
<English>Give painkillers</English>
<French>Donnez des analgésiques</French>
<German>Schmerztabletten geben</German>
<Portuguese>Dar analgésicos</Portuguese>
<Polish>Podajcie środki przeciwbólowe</Polish>
<Russian>Дайте обезболивающее</Russian>
</Key>
<Key ID="STR_arc_misc_ace_tweaks_Giving_Painkilllers">
<English>Giving painkillers</English>
<French>Donner des analgésiques</French>
<German>Schmerzmittel verabreichen</German>
<Portuguese>Dando analgésicos</Portuguese>
<Polish>Podawanie leków przeciwbólowych</Polish>
<Russian>Давая обезболивающие</Russian>
</Key>
<Key ID="STR_arc_misc_ace_tweaks_Treatment_Painkillers_Desc_Short">
<English>Taken orally to treat mild pain. Safer than morphine, but much less effective.</English>
<French>Pris par voie orale pour traiter les douleurs légères. Plus sûr que la morphine, mais beaucoup moins efficace.</French>
<German>Wird oral eingenommen, um leichte Schmerzen zu behandeln. Sicherer als Morphium, aber viel weniger wirksam.</German>
<Polish>Zabierany doustnie w celu leczenia łagodnego bólu. Bezpieczniejsze niż morfina, ale znacznie mniej skuteczne.</Polish>
<Portuguese>Tomada oralmente para tratar dores leves. Mais seguro que a morfina, mas muito menos eficaz.</Portuguese>
<Russian>Взято перорально, чтобы лечить легкую боль. Безопаснее морфина, но гораздо менее эффективно.</Russian>
</Key>
<Key ID="STR_arc_misc_ace_tweaks_Treatment_Painkillers_Desc_Use">
<English>Taken orally to treat mild pain. Safer than morphine, but much less effective.</English>
<French>Pris par voie orale pour traiter les douleurs légères. Plus sûr que la morphine, mais beaucoup moins efficace.</French>
<German>Wird oral eingenommen, um leichte Schmerzen zu behandeln. Sicherer als Morphium, aber viel weniger wirksam.</German>
<Polish>Zabierany doustnie w celu leczenia łagodnego bólu. Bezpieczniejsze niż morfina, ale znacznie mniej skuteczne.</Polish>
<Portuguese>Tomada oralmente para tratar dores leves. Mais seguro que a morfina, mas muito menos eficaz.</Portuguese>
<Russian>Взято перорально, чтобы лечить легкую боль. Безопаснее морфина, но гораздо менее эффективно.</Russian>
</Key>
</Package>
</Project>
Binary file added addons/ace_tweaks/ui/icons/painkillers.paa
Binary file not shown.
Binary file added addons/ace_tweaks/ui/items/painkillers_ca.paa
Binary file not shown.