mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Expanded the medical settings
This commit is contained in:
parent
657cf14515
commit
d016874583
@ -14,4 +14,54 @@ class ACE_Settings {
|
||||
typeName = "SCALAR";
|
||||
values[] = {"Players only", "Players and AI"};
|
||||
};
|
||||
class GVAR(maxRevives) {
|
||||
typeName = "NUMBER";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(enableOverdosing) {
|
||||
typeName = "BOOL";
|
||||
value = true;
|
||||
};
|
||||
class GVAR(bleedingCoefficient) {
|
||||
typeName = "NUMBER";
|
||||
value = 1;
|
||||
};
|
||||
|
||||
class GVAR(enableAirway) {
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
class GVAR(enableFractures) {
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
class GVAR(enableAdvancedWounds) {
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
class GVAR(enableVehicleCrashes) {
|
||||
typeName = "BOOL";
|
||||
value = true;
|
||||
};
|
||||
class GVAR(enableScreams) {
|
||||
typeName = "BOOL";
|
||||
value = true;
|
||||
};
|
||||
class GVAR(playerDamageThreshold) {
|
||||
typeName = "NUMBER";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(AIDamageThreshold) {
|
||||
typeName = "NUMBER";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(enableUnsconsiousnessAI) {
|
||||
value = 1;
|
||||
typeName = "NUMBER";
|
||||
values[] = {"Disabled", "Enabled", "50/50"};
|
||||
};
|
||||
class GVAR(preventInstaDeath) {
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
};
|
||||
|
@ -38,6 +38,109 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
class enableFor {
|
||||
displayName = "Enabled for";
|
||||
description = "Select what units the medical system will be enabled for";
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class playableUnits {
|
||||
name = "Players only";
|
||||
value = 0;
|
||||
default = 1;
|
||||
};
|
||||
class playableUnitsAndAI {
|
||||
name = "Players and AI";
|
||||
value = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class enableAirway {
|
||||
displayName = "Enable Airway";
|
||||
description = "Enable Advanced medical Airway";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class enableFractures {
|
||||
displayName = "Enable Fractures";
|
||||
description = "Enable Advanced medical Fractures";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class enableAdvancedWounds {
|
||||
displayName = "Enable Advanced wounds";
|
||||
description = "Allow reopening of bandaged wounds?";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
class enableVehicleCrashes {
|
||||
displayName = "Vehicle Crashes";
|
||||
description = "Do units take damage from a vehicle crash?";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class enableScreams {
|
||||
displayName = "Enable Screams";
|
||||
description = "Enable screaming by injuried units";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class playerDamageThreshold {
|
||||
displayName = "Player Damage";
|
||||
description = "What is the damage a player can take before being killed?";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class AIDamageThreshold {
|
||||
displayName = "AI Damage";
|
||||
description = "What is the damage an AI can take before being killed?";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class enableUnsconsiousnessAI {
|
||||
displayName = "AI Unconsciousness";
|
||||
description = "Allow AI to go unconscious";
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class disable {
|
||||
name = "Disabled";
|
||||
value = 0;
|
||||
};
|
||||
class normal {
|
||||
name = "Enabled";
|
||||
value = 1;
|
||||
default = 1;
|
||||
};
|
||||
class full {
|
||||
name = "50/50";
|
||||
value = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
class preventInstaDeath {
|
||||
displayName = "Prevent instant death";
|
||||
description = "Have a unit move to unconscious instead of death";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 0;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = "Provides a medical system for both players and AI.";
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_moduleTreatmentConfiguration: Module_F {
|
||||
scope = 2;
|
||||
displayName = "Treatment Configuration [ACE]";
|
||||
icon = QUOTE(PATHTOF(ui\moduleIcon.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleTreatmentConfiguration));
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isTriggerActivated = 0;
|
||||
isDisposable = 0;
|
||||
author = "Glowbal";
|
||||
class Arguments {
|
||||
class medicSetting {
|
||||
displayName = "Medics setting";
|
||||
description = "What is the level of detail prefered for medics?";
|
||||
@ -58,25 +161,27 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
class enableFor {
|
||||
displayName = "Enabled for";
|
||||
description = "Select what units the medical system will be enabled for";
|
||||
class maxRevives {
|
||||
displayName = "Max revives";
|
||||
description = "Max amount of revives available (when preventing death)";
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class playableUnits {
|
||||
name = "Players only";
|
||||
value = 0;
|
||||
default = 1;
|
||||
};
|
||||
class playableUnitsAndAI {
|
||||
name = "Players and AI";
|
||||
value = 1;
|
||||
defaultValue = 1;
|
||||
};
|
||||
class enableOverdosing {
|
||||
displayName = "Enable Overdosing";
|
||||
description = "Enable overdosing of medications";
|
||||
typeName = "BOOL";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class bleedingCoefficient {
|
||||
displayName = "Bleeding coefficient";
|
||||
description = "Coefficient to modify the bleeding speed";
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
description = "Provides a medical system for both players and AI.";
|
||||
description = "Configure the treatment settings from ACE Medical";
|
||||
sync[] = {};
|
||||
};
|
||||
};
|
||||
@ -97,6 +202,7 @@ class CfgVehicles {
|
||||
displayName = "List";
|
||||
description = "List of unit names that will be classified as medic, separated by commas.";
|
||||
defaultValue = "";
|
||||
typeName = "STRING";
|
||||
};
|
||||
class role {
|
||||
displayName = "Is Medic";
|
||||
@ -126,12 +232,12 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_moduleAssignMedicRoles: Module_F {
|
||||
class ACE_moduleAssignMedicVehicle: Module_F {
|
||||
scope = 2;
|
||||
displayName = "Set Medic Class [ACE]";
|
||||
displayName = "Set Medical Vehicle [ACE]";
|
||||
icon = QUOTE(PATHTOF(ui\moduleIcon.paa));
|
||||
category = "ACE_medical";
|
||||
function = QUOTE(FUNC(moduleAssignMedicRoles));
|
||||
function = QUOTE(FUNC(moduleAssignMedicalVehicle));
|
||||
functionPriority = 10;
|
||||
isGlobal = 2;
|
||||
isTriggerActivated = 0;
|
||||
@ -140,14 +246,15 @@ class CfgVehicles {
|
||||
class Arguments {
|
||||
class EnableList {
|
||||
displayName = "List";
|
||||
description = "List of unit names that will be classified as medic, separated by commas.";
|
||||
description = "List of vehicles that will be classified as medical vehicle, separated by commas.";
|
||||
defaultValue = "";
|
||||
typeName = "STRING";
|
||||
};
|
||||
class enabled {
|
||||
displayName = "Is Medical Vehicle";
|
||||
description = "Whatever or not the objects in the list will be a medical vehicle.";
|
||||
typeName = "BOOL";
|
||||
defaultValue = true;
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
class ModuleDescription {
|
||||
|
@ -81,6 +81,7 @@ PREP(moduleMedicalSettings);
|
||||
PREP(moduleAssignMedicRoles);
|
||||
PREP(moduleAssignMedicalVehicle);
|
||||
PREP(moduleAssignMedicalFacility);
|
||||
PREP(moduleTreatmentConfiguration);
|
||||
|
||||
GVAR(injuredUnitCollection) = [];
|
||||
call FUNC(parseConfigForInjuries);
|
||||
|
@ -42,4 +42,4 @@ if (GVAR(level) >= 2) then {
|
||||
} else {
|
||||
// TODO basic medical
|
||||
};
|
||||
_totalBloodLoss;
|
||||
_totalBloodLoss * GVAR(bleedingCoefficient);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Module for adjusting the medical settings
|
||||
* Module for adjusting the medical damage settings
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
@ -23,5 +23,12 @@ _activated = _this select 2;
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(level), "level"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(medicSetting), "medicSetting"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableFor), "enableFor"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableAirway), "enableAirway"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableFractures), "enableFractures"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableAdvancedWounds), "enableAdvancedWounds"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableScreams), "enableScreams"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(playerDamageThreshold), "playerDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(AIDamageThreshold), "AIDamageThreshold"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableUnsconsiousnessAI), "enableUnsconsiousnessAI"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(preventInstaDeath), "preventInstaDeath"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Module for adjusting the medical treatment settings
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The module logic <LOGIC>
|
||||
* 1: units <ARRAY>
|
||||
* 2: activated <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None <NIL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_logic", "_units", "_activated"];
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(medicSetting), "medicSetting"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(maxRevives), "maxRevives"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(enableOverdosing), "enableOverdosing"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user