diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf
index 4eb84d54da..273c72323e 100644
--- a/addons/common/functions/fnc_cbaSettings.sqf
+++ b/addons/common/functions/fnc_cbaSettings.sqf
@@ -21,6 +21,9 @@ LOG("Adding ACE_Settings to CBA_settings");
GVAR(cbaSettings_forcedSettings) = [];
GVAR(cbaSettings_missionSettings) = [];
GVAR(settings) = []; // will stay empty - for BWC?
+#ifdef DEBUG_MODE_FULL
+GVAR(settingsMovedToSQF) = [];
+#endif
// Add Event Handlers:
[QGVAR(setSetting), {
@@ -66,6 +69,13 @@ GVAR(settings) = []; // will stay empty - for BWC?
false
} count GVAR(runAtSettingsInitialized);
GVAR(runAtSettingsInitialized) = nil; //cleanup
+
+ #ifdef DEBUG_MODE_FULL
+ INFO_1("checking settingsMovedToSQF [%1]",count GVAR(settingsMovedToSQF));
+ {
+ if (isNil _x) then { WARNING_1("setting [%1] NOT moved to sqf",_x); };
+ } forEach GVAR(settingsMovedToSQF);
+ #endif
}] call CBA_fnc_addEventHandler;
private _start = diag_tickTime;
@@ -81,6 +91,10 @@ for "_index" from 0 to (_countOptions - 1) do {
} else {
WARNING_1("Setting [%1] - Already defined from somewhere else??",_varName);
};
+ #ifdef DEBUG_MODE_FULL
+ } else {
+ GVAR(settingsMovedToSQF) pushBack configName _optionEntry;
+ #endif
};
};
diff --git a/addons/medical/initSettings.sqf b/addons/medical/initSettings.sqf
index 4fc473949f..9b1aee8464 100644
--- a/addons/medical/initSettings.sqf
+++ b/addons/medical/initSettings.sqf
@@ -1,34 +1,30 @@
-// CBA Settings [ADDON: ace_medical]:
-
-private _categoryArray = [LELSTRING(medical,Category), "?"];
-
-// todo: Check the description is still accurate
[
- QGVAR(spontaneousWakeUpChance), "SLIDER",
- [LSTRING(MedicalSettings_spontaneousWakeUpChance_DisplayName), LSTRING(MedicalSettings_spontaneousWakeUpChance_Description)],
- _categoryArray,
- [0,1,0.05,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
- true, // isGlobal
- {[QGVAR(spontaneousWakeUpChance), _this] call EFUNC(common,cbaSettings_settingChanged)},
- true // Needs mission restart
+ QGVAR(limping),
+ "LIST",
+ [LSTRING(Limping_DisplayName), LSTRING(Limping_Description)],
+ LSTRING(Category),
+ [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(Limping_LimpOnOpenWounds), LSTRING(Limping_LimpRequiresStitching)], 1],
+ true,
+ {[QGVAR(limping), _this] call EFUNC(common,cbaSettings_settingChanged)},
+ true
] call CBA_settings_fnc_init;
[
- QEGVAR(medical,limping), "LIST",
- [LSTRING(setting_limping_DisplayName), LSTRING(setting_limping_Description)],
- _categoryArray,
- [[0,1,2],[LELSTRING(common,disabled), LLSTRING(setting_limping_limpOnOpenWounds), LLSTRING(setting_limping_limpRequiresStitching)], 1], // [values, titles, defaultIndex]
- true, // isGlobal
- {[QEGVAR(medical,limping), _this] call EFUNC(common,cbaSettings_settingChanged)},
- true // Needs mission restart
+ QGVAR(fractures),
+ "LIST",
+ [LSTRING(Fractures_DisplayName), LSTRING(Fractures_Description)],
+ LSTRING(Category),
+ [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(Fractures_SplintHealsFully), LSTRING(Fractures_SplintHasEffects)], 1],
+ true,
+ {[QGVAR(fractures), _this] call EFUNC(common,cbaSettings_settingChanged)},
+ true
] call CBA_settings_fnc_init;
[
- QEGVAR(medical,fractures), "LIST",
- [LSTRING(setting_fractures_DisplayName), LSTRING(setting_fractures_Description)],
- _categoryArray,
- [[0,1,2],[LELSTRING(common,disabled), LLSTRING(setting_fractures_splintHealsFully), LLSTRING(setting_fractures_splintHasEffects)], 1], // [values, titles, defaultIndex]
- true, // isGlobal
- {[QEGVAR(medical,fractures), _this] call EFUNC(common,cbaSettings_settingChanged)},
- true // Needs mission restart
+ QGVAR(spontaneousWakeUpChance),
+ "SLIDER",
+ [LSTRING(SpontaneousWakeUpChance_DisplayName), LSTRING(SpontaneousWakeUpChance_Description)],
+ LSTRING(Category),
+ [0, 1, 0.05, 2],
+ true
] call CBA_settings_fnc_init;
diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml
index cce9a8705c..a2bb42f407 100644
--- a/addons/medical/stringtable.xml
+++ b/addons/medical/stringtable.xml
@@ -17,117 +17,49 @@
ACE 医疗系统ACE 醫療系統
-
- Medical Level
- Сложность медицины
- Poziom medyczny
- Nivel médico
- Stufe des Sanitätssystem
- Úroveň medického
- Nível médico
- Niveau de simulation médicale
- Orvosi szint
- Livello Medico
- 医療レベル
- 의료 수준
- 医疗等级
- 醫療等級
+
+ Unconscious Wake Up Chance
+ Wahrscheinlichkeit aufzuwachen
+ 気絶から覚醒する可能性
+ Шанс очнуться при потере сознания
-
- What is the medical simulation level?
- Каков уровень сложности медицинской системы?
- Jaki jest poziom symulacji medycznej?
- ¿Cuál es el nivel de simulación médica?
- Wie hoch soll das medizinische Simulationslevel sein?
- Jaká je úroveň lékařské simulace?
- Qual o nível de simulação médica?
- Quel niveau de simulation médicale choisissez-vous?
- Milyen komplex legyen az orvosi szimuláció?
- Qual'è il livello di simulazione medica?
- 治療の再現度は?
- 의료 시뮬레이션의 수준
- 选择需要的医疗模拟等级
- 選擇需要的醫療模擬等級
+
+ The probablity that a unit with stable vitals will wake up from unconsciousness (checked every 15 seconds).
+ Wahrscheinlichkeit, dass eine bewusstlose Person mit stabilen Vitalwerten wieder aufwacht ()Überprüfung alle 15 Sekunden)
+ 安定状態にある人が覚醒する確率です。(15 秒毎に確認)
+ Вероятность, что стабилизированный юнит очнется от потери сознания (Проверяется каждые 15 сек)
-
- Disable medics
- Отключить медиков
- Wyłącz medyków
- Desactivar médicos
- Sanitäter deaktivieren
- Zakázat zdravotníky
- Desativar médicos
- Désactiver les infirmiers
- Orvosok letiltása
- Disabilita medici
- 衛生兵を無効化
- 의무병 비활성화
- 关闭医护兵
- 關閉醫護兵
+
+ Limping
+ Хромота
-
- Enable Litter
- Включить мусор
- Aktywuj odpadki
- Activar restos médicos
- Abfälle aktivieren
- Povolit odpadky
- Ativar lixo médico
- Activer les détritus
- Szemét engedélyezése
- Abilita Barella
- 医療廃棄物の表示を有効化
- 의료폐기물 활성화
- 启用医疗废弃物
- 啟用醫療廢棄物
+
+ Limp when unit has leg wounds...(todo)
+ Хромота, когда юнит имеет ранения ног...
-
- Enable litter being created upon treatment
- Включить появление мусора после лечения
- Twórz odpadki medyczne podczas leczenia
- Activar los restos médicos que se crean en el tratamiento
- Aktiviere Abfälle, wenn eine Behandlung durchgeführt wurde
- Vytváří odpad zdravotnického materiálu pří léčení
- Ativar lixo ser criado após tratamento
- Activer la création de détrimus au début des traitements
- Engedélyezi a szemét keletkezését ellátáskor
- Abilita la creazione della barella dopo trattamento
- 治療を始めると、医療廃棄物の作成を有効化する
- 의료폐기물이 치료중 주변에 생성되는것을 활성화 합니다
- 本功能启用后,当每次医疗动作结束时,地上会产生相应的医疗废弃物
- 本功能啟用後,當每次醫療動作結束時,地上會產生相應的醫療廢棄物
+
+ Limp on open wounds
+ Хромота при открытых ранах
-
- Life time of litter objects
- Время удаления мусора
- Długość życia odpadków
- Tiempo de vida de los restos médicos
- Dauer des angezeigten Abfalls
- Životnost pro odpadky
- Tempo de vida dos objetos do lixo
- Durée d'affichage des détritus
- Szemétobjektumok élettartama
- Tempo di vita delle barelle
- 医療廃棄物の作成限界数を設定
- 의료폐기물 시간제한
- 医疗废弃物存在时间
- 醫療廢棄物存在時間
+
+ Limp on open or bandaged wounds
+ Хромота при открытых или забинтованых ранах
-
- How long should litter objects stay? In seconds. -1 is forever.
- Как долго мусор будет оставаться на земле? В секундах. -1 означает бесконечное время.
- Ile czasu musi upłynąć, aby odpadki zaczęły znikać? W sekundach. -1 dla nieskończoności.
- ¿Por cuánto tiempo deben permanecer los restos médicos? En segundos. -1 es para siempre.
- Wie lange sollen Abfälle am Boden liegen (in Sekunden)? -1 ist für immer.
- Za jak dlouho začnou odpadky mizet? V sekundách. -1 navždy.
- Quanto tempo os objetos do lixo devem ficar? Em segundos. -1 é para sempre.
- Combien de temps doivent rester affiché les détritus? En secondes. -1 pour tout le temps
- Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent.
- Per quanto devono restare le barelle? In secondi. -1 è permanente
- 医療廃棄物オブジェクトが表示されつづける時間を設定しますか? -1 は永遠です。
- 얼마동안 폐기물이 존재합니까? 초 단위. -1 은 영구적.
- 定义医疗废弃物存在时间,以秒为单位,-1为永远存在。
- 定義醫療廢棄物存在時間,以秒為單位,-1為永遠存在。
+
+ Fractures
+ Переломы
+
+
+ Limp fractures... (todo)
+ Хромота при переломах...
+
+
+ Splints fully heal fractures
+ Шины полностью лечат перелом
+
+
+ Splints heal (but cannot sprint)
+ Шины вылечивают, но не дают бегатьRemote Controlled AI
@@ -209,21 +141,6 @@
医疗系统将同时对玩家与AI发生作用醫療系統將同時對玩家與AI發生作用
-
- Basic Medical Settings [ACE]
- Standard Sanitätseinstellungen [ACE]
- Podstawowe ustawienia medyczne
- Ajustes médicos básicos [ACE]
- Paramètres des soins basiques [ACE]
- Impostazioni Mediche Di Base [ACE]
- Základní zdravotnické nastavení [ACE]
- Ajustes médicos básicos [ACE]
- Настройки базовой медицины [ACE]
- ベーシック医療設定 [ACE]
- 기본 의료 설정 [ACE]
- 基本医疗设定 [ACE]
- 基本醫療設定 [ACE]
- Enabled forВключено для
@@ -320,21 +237,6 @@
设定人员是否会因为载具冲撞别的物件而产生伤害?設定人員是否會因為載具衝撞別的物件而產生傷害?
-
- Where can the Epinephrine be used? (Basic Medical)
- Wo kann Epiniphrin verwendet werden? (Standard Sanitätseinstellungen)
- Configura donde puede usarse Epinefrina (Solo sistema médico básico)
- Gdzie można korzystać z adrenaliny? (Podstawowy system medyczny)
- Où peut être utilisé l'épinéphrine ? (Médical basique)
- Dove si può usare l'epinefrina? (Sistema medico di base)
- Kde může být použit adrenalin? (Pouze základní zdravotní systém)
- Onde pode-se usar a Epinefrina? (Somente sistema médico básico)
- Где может использоваться адреналин? (Базовая медицина)
- どこでもアドレナリンを使えるようにしますか? (ベーシック医療のみ)
- 어디에서 에피네프린을 사용할 수 있습니까? (기본 의료)
- 在哪里可以使用肾上腺素? (基本医疗)
- 在哪裡可以使用腎上腺素? (基本醫療)
- Heal hitpointsHeile Trefferpunkte
@@ -440,18 +342,6 @@
设定当距离超过%1将不能使用治疗动作設定當距離超過%1將不能使用治療動作
-
- Unconscious Wake Up Chance
- Wahrscheinlichkeit aufzuwachen
- 気絶から覚醒する可能性
- Шанс очнуться при потере сознания
-
-
- Probablity that a unit with stable vitals will wake up from unconscious [Checked every 15 sec]
- Wahrscheinlichkeit, dass eine bewusstlose Person mit stabilen Vitalwerten wieder aufwacht [Überprüfung alle 15 Sekunden]
- 安定状態にある人が覚醒する確率です。(15 秒毎に確認)
- Вероятность, что стабилизированный юнит очнется от потери сознания [Проверяется каждые 15 сек]
- Open lidDeckel aufklappen
@@ -474,37 +364,5 @@
Zamknij pokrywęЗакрыть крышку
-
- Limping
- Хромота
-
-
- Limp when unit has leg wounds...(todo)
- Хромота, когда юнит имеет ранения ног...
-
-
- Limp on open wounds
- Хромота при открытых ранах
-
-
- Limp on open or bandaged wounds
- Хромота при открытых или забинтованых ранах
-
-
- Fractures
- Переломы
-
-
- Limp fractures... (todo)
- Хромота при переломах...
-
-
- Splints fully heal fractures
- Шины полностью лечат перелом
-
-
- Splints heal (but cannot sprint)
- Шины вылечивают, но не дают бегать
-
diff --git a/addons/medical_blood/CfgEventHandlers.hpp b/addons/medical_blood/CfgEventHandlers.hpp
index becf395052..0d3301d6e0 100644
--- a/addons/medical_blood/CfgEventHandlers.hpp
+++ b/addons/medical_blood/CfgEventHandlers.hpp
@@ -1,4 +1,3 @@
-
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
diff --git a/addons/medical_blood/README.md b/addons/medical_blood/README.md
index 29632ffd29..848f8f0308 100644
--- a/addons/medical_blood/README.md
+++ b/addons/medical_blood/README.md
@@ -1,7 +1,7 @@
ace_medical_blood
-===============
+=================
-Adds blood visual effect on the ground near a bleeding player.
+Creates blood drops on the ground near bleeding units.
## Maintainers
diff --git a/addons/medical_blood/XEH_PREP.hpp b/addons/medical_blood/XEH_PREP.hpp
index aa7d358388..ebed657cc5 100644
--- a/addons/medical_blood/XEH_PREP.hpp
+++ b/addons/medical_blood/XEH_PREP.hpp
@@ -1,7 +1,7 @@
-
+PREP(cleanupLoop);
+PREP(createBlood);
PREP(handleWoundReceived);
+PREP(init);
PREP(isBleeding);
PREP(onBleeding);
-PREP(createBlood);
-PREP(serverCleanupBlood);
PREP(spurt);
diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf
index 11f86fdaca..02201f5506 100644
--- a/addons/medical_blood/XEH_postInit.sqf
+++ b/addons/medical_blood/XEH_postInit.sqf
@@ -10,33 +10,18 @@ if (isServer) then {
[QGVAR(bloodDropCreated), {
params ["_bloodDrop"];
- // Add to created queue with format [expireTime, object]
- private _index = GVAR(bloodDrops) pushBack [(CBA_missionTime + BLOOD_OBJECT_LIFETIME), _bloodDrop];
- if (count GVAR(bloodDrops) >= MAX_BLOOD_OBJECTS) then {
+ // Add to created queue with format: [expire time, blood object]
+ private _index = GVAR(bloodDrops) pushBack [CBA_missionTime + GVAR(bloodLifetime), _bloodDrop];
+
+ if (count GVAR(bloodDrops) >= GVAR(maxBloodObjects)) then {
(GVAR(bloodDrops) deleteAt 0) params ["", "_deletedBloodDrop"];
deleteVehicle _deletedBloodDrop;
};
- if (_index == 1) then { // Start the waitAndExecute loop
- [FUNC(serverCleanupBlood), [], BLOOD_OBJECT_LIFETIME] call CBA_fnc_waitAndExecute;
+ // Start the cleanup loop
+ if (_index == 0) then {
+ [FUNC(cleanupLoop), [], GVAR(bloodLifetime)] call CBA_fnc_waitAndExecute;
};
}] call CBA_fnc_addEventHandler;
};
-
-["ace_settingsInitialized", {
- TRACE_1("settingsInitialized", GVAR(enabledFor));
- if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled
- if ((GVAR(enabledFor) == 1) && {!hasInterface}) exitWith {}; // 1: enabledFor_OnlyPlayers
-
- private _listcode = if (GVAR(enabledFor) == 1) then {
- {if (alive ACE_player) then {[ACE_player]} else {[]}} // ace_player is only possible local player
- } else {
- EFUNC(common,getLocalUnits) // filter all local units
- };
-
- private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create;
- [_stateMachine, LINKFUNC(onBleeding), {}, {}, "Bleeding"] call CBA_statemachine_fnc_addState;
-
- [QEGVAR(medical,woundReceived), FUNC(handleWoundReceived)] call CBA_fnc_addEventHandler;
-}] call CBA_fnc_addEventHandler;
diff --git a/addons/medical_blood/config.cpp b/addons/medical_blood/config.cpp
index 5c133b9456..3e5d5227da 100644
--- a/addons/medical_blood/config.cpp
+++ b/addons/medical_blood/config.cpp
@@ -14,5 +14,5 @@ class CfgPatches {
};
};
-#include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp"
+#include "ACE_Settings.hpp"
diff --git a/addons/medical_blood/functions/fnc_serverCleanupBlood.sqf b/addons/medical_blood/functions/fnc_cleanupLoop.sqf
similarity index 55%
rename from addons/medical_blood/functions/fnc_serverCleanupBlood.sqf
rename to addons/medical_blood/functions/fnc_cleanupLoop.sqf
index 5a1762a7a8..e8461b2e31 100644
--- a/addons/medical_blood/functions/fnc_serverCleanupBlood.sqf
+++ b/addons/medical_blood/functions/fnc_cleanupLoop.sqf
@@ -1,23 +1,26 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
- * Loop that cleans up blood
+ * Handles cleaning up blood objects that have reached the end of their lifetime.
*
* Arguments:
* None
*
- * ReturnValue:
+ * Return Value:
* None
*
+ * Example:
+ * [] call ace_medical_blood_fnc_cleanupLoop
+ *
* Public: No
*/
-
+
(GVAR(bloodDrops) deleteAt 0) params ["", "_deletedBloodDrop"];
deleteVehicle _deletedBloodDrop;
-// If we cleaned out the array, exit loop
+// Exit the loop if we have cleaned out the array
if (GVAR(bloodDrops) isEqualTo []) exitWith {};
// Wait until the next blood drop in the queue will expire
(GVAR(bloodDrops) select 0) params ["_expireTime"];
-[FUNC(serverCleanupBlood), [], (_expireTime - CBA_missionTime)] call CBA_fnc_waitAndExecute;
+[FUNC(cleanupLoop), [], _expireTime - CBA_missionTime] call CBA_fnc_waitAndExecute;
diff --git a/addons/medical_blood/functions/fnc_createBlood.sqf b/addons/medical_blood/functions/fnc_createBlood.sqf
index 8d3fbc8776..e54247d02e 100644
--- a/addons/medical_blood/functions/fnc_createBlood.sqf
+++ b/addons/medical_blood/functions/fnc_createBlood.sqf
@@ -1,15 +1,15 @@
#include "script_component.hpp"
/*
* Author: Glowbal
- * Spawn a blood drop.
+ * Creates a blood object and handles its cleanup.
* Available blood drop classes are blooddrop_1 through blooddrop_4.
*
* Arguments:
- * 0: classname of blood drop