Add setting for limiting usage of Epinephrine in basic medical #1792

Part of focus feature medical #3134. Default settings are inline with old default.
This commit is contained in:
Glowbal 2016-02-07 13:10:38 +01:00
parent bfd90cd5d3
commit 575f362fb6
6 changed files with 98 additions and 2 deletions

View File

@ -50,12 +50,13 @@ class ACE_Medical_Actions {
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
allowSelfTreatment = 1;
category = "medication";
requiredMedic = 1;
requiredMedic = QGVAR(medicSetting_basicEpi);
treatmentTime = 3;
items[] = {"ACE_epinephrine"};
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
treatmentLocations[] = {QGVAR(useLocation_basicEpi)};
};
class BloodIV: Bandage {
displayName = CSTRING(Transfuse_Blood);

View File

@ -133,6 +133,12 @@ class ACE_Settings {
typeName = "SCALAR";
value = 0;
};
class GVAR(medicSetting_basicEpi) {
category = CSTRING(Category_Medical);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_PAK) {
category = CSTRING(Category_Medical);
typeName = "SCALAR";
@ -157,6 +163,12 @@ class ACE_Settings {
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(useLocation_basicEpi) {
category = CSTRING(Category_Medical);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useLocation_PAK) {
category = CSTRING(Category_Medical);
typeName = "SCALAR";

View File

@ -151,7 +151,48 @@ class CfgVehicles {
sync[] = {};
};
};
class ACE_moduleBasicMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa));
category = "ACE_medical";
function = QUOTE(FUNC(moduleBasicMedicalSettings));
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class medicSetting_basicEpi {
displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
typeName = "NUMBER";
class values {
class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; };
class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; };
class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; };
};
};
class useLocation_basicEpi {
displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
typeName = "NUMBER";
class values {
class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; default = 1; };
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; };
class disabled { name = ECSTRING(common,Disabled); value = 4;};
};
};
};
class ModuleDescription {
description = CSTRING(BasicMedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleAdvancedMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);

View File

@ -107,6 +107,7 @@ PREP(displayPatientInformation);
PREP(displayTriageCard);
PREP(dropDownTriageCard);
PREP(moduleMedicalSettings);
PREP(moduleBasicMedicalSettings);
PREP(moduleAdvancedMedicalSettings);
PREP(moduleReviveSettings);
PREP(moduleAssignMedicRoles);

View File

@ -0,0 +1,23 @@
/*
* Author: Glowbal
* Module for adjusting the medical treatment settings
*
* Arguments:
* 0: The module logic <LOGIC>
* 1: units <ARRAY>
* 2: activated <BOOL>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {};
[_logic, QGVAR(medicSetting_basicEpi), "medicSetting_basicEpi"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(useLocation_basicEpi), "useLocation_basicEpi"] call EFUNC(common,readSettingFromModule);

View File

@ -3126,6 +3126,9 @@
<French>Fourni un système médical pour les joueurs tout comme pour les IA.</French>
<Hungarian>Egy orvosi rendszert ad játékosok és AI-k számára.</Hungarian>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_Module_DisplayName">
<English>Basic Medical Settings [ACE]</English>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_Module_DisplayName">
<English>Advanced Medical Settings [ACE]</English>
<Russian>Настройки усложненной медицины [ACE]</Russian>
@ -3225,6 +3228,12 @@
<French>Les unités subissent des dégats lors d'accident</French>
<Hungarian>Sérülnek-e az egységek autós ütközés során?</Hungarian>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_medicSetting_basicEpi_DisplayName">
<English>Allow Epinephrine</English>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_medicSetting_basicEpi_Description">
<English>Who can use Epinephrine for full heal? (Basic medical only)</English>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_medicSetting_PAK_DisplayName">
<English>Allow PAK</English>
<Russian>Использование аптечки</Russian>
@ -3302,6 +3311,12 @@
<French>Le Kit de Premier Secours doit il être enlevé à l'utilisation?</French>
<Hungarian>Eltávolítódjon az elsősegélycsomag használatkor?</Hungarian>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_useLocation_basicEpi_DisplayName">
<English>Locations Epinephrine</English>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_useLocation_basicEpi_Description">
<English>Where can the Epinephrine be used? (Basic Medical)</English>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_useLocation_PAK_DisplayName">
<English>Locations PAK</English>
<Russian>Место использования аптечки</Russian>
@ -3518,8 +3533,11 @@
<Hungarian>A fájdalom csak ideiglenesen csökken, nem távolítódik el</Hungarian>
<Russian>Боль приглушается только временно</Russian>
</Key>
<Key ID="STR_ACE_Medical_BasicMedicalSettings_Module_Description">
<English>Configure the treatment settings from ACE Basic Medical</English>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_Module_Description">
<English>Configure the treatment settings from ACE Medical</English>
<English>Configure the treatment settings from ACE Advanced Medical</English>
<Russian>Настройка лечения в медицинской системе ACE</Russian>
<Polish>Skonfiguruj zaawansowane ustawienia leczenia systemu medycznego ACE</Polish>
<Spanish>Configure las opciones de tratamiento del ACE Médico</Spanish>