From 81d962f0d5189617c568eac99f64f366fd706d9e Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 19 Sep 2016 09:55:30 +0200 Subject: [PATCH 1/5] port litter to treatment --- addons/medical/XEH_postInit.sqf | 1 - addons/medical/functions/fnc_createLitter.sqf | 93 ------------------ addons/medical_treatment/XEH_PREP.hpp | 6 ++ addons/medical_treatment/XEH_postInit.sqf | 2 + .../functions/fnc_litterCleanupLoop.sqf | 13 ++- .../functions/fnc_litterCreate.sqf | 98 +++++++++++++++++++ .../functions/fnc_litterHandleCreate.sqf} | 33 ++++--- .../functions/fnc_treatment_success.sqf | 2 +- 8 files changed, 137 insertions(+), 111 deletions(-) delete mode 100644 addons/medical/functions/fnc_createLitter.sqf rename addons/{medical => medical_treatment}/functions/fnc_litterCleanupLoop.sqf (71%) create mode 100644 addons/medical_treatment/functions/fnc_litterCreate.sqf rename addons/{medical/functions/fnc_handleCreateLitter.sqf => medical_treatment/functions/fnc_litterHandleCreate.sqf} (61%) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index efb221066c..5e01a649da 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -11,7 +11,6 @@ call FUNC(stateMachine); if (isServer) then { ["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler; }; -[QGVAR(createLitterServer), FUNC(handleCreateLitter)] call CBA_fnc_addEventHandler; ["ace_unconscious", { params ["_unit", "_status"]; diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf deleted file mode 100644 index 2780642056..0000000000 --- a/addons/medical/functions/fnc_createLitter.sqf +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Author: Glowbal - * Spawns litter for the treatment action on the ground around the target - * - * Arguments: - * 0: The Caller - * 1: The target - * 2: The treatment Selection Name - * 3: The treatment classname - * 4: ? - * 5: Users of Items - * 6: Blood Loss on selection (previously called _previousDamage) - * - * Return Value: - * None - * - * Public: No - */ - -#include "script_component.hpp" - -#define MIN_ENTRIES_LITTER_CONFIG 3 - -params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"]; -TRACE_6("params",_caller,_target,_selectionName,_className,_usersOfItems,_bloodLossOnSelection); - -//Ensures comptibilty with other possible medical treatment configs -private _previousDamage = _bloodLossOnSelection; - -if !(GVAR(allowLitterCreation)) exitwith {}; -if (vehicle _caller != _caller || {vehicle _target != _target}) exitwith {}; - -private _config = if (GVAR(level) >= 2) then { - (configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className); -} else { - (configFile >> "ACE_Medical_Actions" >> "Basic" >> _className) -}; -if !(isClass _config) exitwith {TRACE_1("No action config", _className);}; - -if !(isArray (_config >> "litter")) exitwith {TRACE_1("No litter config", _className);}; -private _litter = getArray (_config >> "litter"); - -private _createLitter = { - params ["_unit", "_litterClass"]; - // @TODO: handle carriers over water - // For now, don't spawn litter if we are over water to avoid floating litter - if (surfaceIsWater (getPos _unit)) exitWith { false }; - - private _position = getPosATL _unit; - _position params ["_posX", "_posY", "_posZ"]; - _position = [_posX + (random 2) - 1, _posY + (random 2) - 1, _posZ]; - - private _direction = (random 360); - - // Create the litter, and timeout the event based on the cleanup delay - // The cleanup delay for events in MP is handled by the server side - TRACE_3("Creating Litter on server",_litterClass,_position,_direction); - [QGVAR(createLitterServer), [_litterClass, _position, _direction]] call CBA_fnc_serverEvent; - - true -}; - -private _createdLitter = []; -{ - if (_x isEqualType []) then { - if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {}; - - _x params ["_selection", "_litterCondition", "_litterOptions"]; - - if (toLower _selection in [toLower _selectionName, "all"]) then { // in is case sensitve. We can be forgiving here, so lets use toLower. - - if (isnil _litterCondition) then { - _litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}}; - } else { - _litterCondition = missionNamespace getVariable _litterCondition; - if (!(_litterCondition isEqualType {})) then {_litterCondition = {false}}; - }; - if !([_caller, _target, _selectionName, _className, _usersOfItems, _bloodLossOnSelection] call _litterCondition) exitwith {}; - - if (_litterOptions isEqualType []) then { - // Loop through through the litter options and place the litter - { - if (_x isEqualType [] && {(count _x > 0)}) then { - [_target, selectRandom _x] call _createLitter; - }; - if (_x isEqualType "") then { - [_target, _x] call _createLitter; - }; - } foreach _litterOptions; - }; - }; - }; -} foreach _litter; diff --git a/addons/medical_treatment/XEH_PREP.hpp b/addons/medical_treatment/XEH_PREP.hpp index 078c0336ad..44451d2b6d 100644 --- a/addons/medical_treatment/XEH_PREP.hpp +++ b/addons/medical_treatment/XEH_PREP.hpp @@ -1,3 +1,4 @@ + PREP(actionCheckBloodPressure); PREP(actionCheckBloodPressureLocal); PREP(actionCheckPulse); @@ -52,3 +53,8 @@ PREP(useItem); PREP(useItems); PREP(checkItems); + +// litter +PREP(litterCreate); +PREP(litterHandleCreate); +PREP(litterCleanupLoop); diff --git a/addons/medical_treatment/XEH_postInit.sqf b/addons/medical_treatment/XEH_postInit.sqf index 9353b09c0e..bbc091c8a8 100644 --- a/addons/medical_treatment/XEH_postInit.sqf +++ b/addons/medical_treatment/XEH_postInit.sqf @@ -5,3 +5,5 @@ params ["_unit"]; _unit call FUNC(checkItems); }] call CBA_fnc_addEventHandler; + +[QGVAR(createLitterServer), FUNC(litterHandleCreate)] call CBA_fnc_addEventHandler; diff --git a/addons/medical/functions/fnc_litterCleanupLoop.sqf b/addons/medical_treatment/functions/fnc_litterCleanupLoop.sqf similarity index 71% rename from addons/medical/functions/fnc_litterCleanupLoop.sqf rename to addons/medical_treatment/functions/fnc_litterCleanupLoop.sqf index 417144dd64..ee3ff5d811 100644 --- a/addons/medical/functions/fnc_litterCleanupLoop.sqf +++ b/addons/medical_treatment/functions/fnc_litterCleanupLoop.sqf @@ -10,25 +10,28 @@ * * Public: No */ - #include "script_component.hpp" { _x params ["_time", "_objects"]; - //Older elements are always at the begining of the array: - if ((CBA_missionTime - _time) < GVAR(litterCleanUpDelay)) exitWith {}; + + // Older elements are always at the begining of the array + if (CBA_missionTime - _time < GVAR(litterCleanUpDelay)) exitWith {}; + TRACE_2("deleting",_time,_objects); { deleteVehicle _x; } forEach _objects; + GVAR(allCreatedLitter) set [_forEachIndex, objNull]; } forEach GVAR(allCreatedLitter); + GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull]; -// If no more litter remaining, exit the loop +// If no more litter remain, exit the loop if (GVAR(allCreatedLitter) isEqualTo []) exitWith { GVAR(litterPFHRunning) = false; }; // Schedule the loop to be executed again 30 sec later -[DFUNC(litterCleanupLoop), [], 30] call CBA_fnc_waitAndExecute; +[FUNC(litterCleanupLoop), [], 30] call CBA_fnc_waitAndExecute; diff --git a/addons/medical_treatment/functions/fnc_litterCreate.sqf b/addons/medical_treatment/functions/fnc_litterCreate.sqf new file mode 100644 index 0000000000..115fa10c07 --- /dev/null +++ b/addons/medical_treatment/functions/fnc_litterCreate.sqf @@ -0,0 +1,98 @@ +/* + * Author: Glowbal + * Spawns litter for the treatment action on the ground around the target + * + * Arguments: + * 0: The Caller + * 1: The target + * 2: The treatment Selection Name + * 3: The treatment classname + * 4: ? + * 5: Users of Items + * 6: Blood Loss on selection (previously called _previousDamage) + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +#define MIN_ENTRIES_LITTER_CONFIG 3 + +params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"]; +TRACE_6("params",_caller,_target,_selectionName,_className,_usersOfItems,_bloodLossOnSelection); + +// Ensures comptibilty with other possible medical treatment configs +private _previousDamage = _bloodLossOnSelection; + +// Exit if litter is disabled by setting +if !(EGVAR(medical,allowLitterCreation)) exitWith {}; + +// Don't create litter if medic or patient are inside a vehicle +if (vehicle _caller != _caller || {vehicle _target != _target}) exitWith {}; + +private _config = configFile >> "ACE_Medical_Treatment_Actions" >> ["Basic", "Advanced"] select (EGVAR(medical,level) >= 2) >> _className; +if !(isClass _config) exitWith {TRACE_1("No action config",_className);}; + +if !(isArray (_config >> "litter")) exitWith {TRACE_1("No litter config",_className);}; +private _litter = getArray (_config >> "litter"); + +private _createLitter = { + params ["_unit", "_litterClass"]; + + private _position = getPosASL _unit; + + // @TODO: handle carriers over water + // For now, don't spawn litter if we are over water to avoid floating litter + if (surfaceIsWater _position) exitWith {false}; + + _position = _position vectorAdd [ + random 2 - 1, + random 2 - 1, + 0 + ]; + + private _direction = random 360; + + // Create the litter, and timeout the event based on the cleanup delay + // The cleanup delay for events in MP is handled by the server side + TRACE_3("Creating Litter on server",_litterClass,_position,_direction); + [QGVAR(createLitterServer), [_litterClass, _position, _direction]] call CBA_fnc_serverEvent; + + true +}; + +{ + if (count _x < MIN_ENTRIES_LITTER_CONFIG) then { + WARNING_1("Wrong litter array: %1",_x); + } else { + _x params [ + ["_selection", "", [""]], + ["_litterCondition", "", [""]], + ["_litterOptions", [], [[]]] + ]; + + if (toLower _selection in [toLower _selectionName, "all"]) then { + if (_litterCondition isEqualTo "") then { + _litterCondition = {true}; + } else { + _litterCondition = compile _litterCondition; + }; + + // existing configs seem to use carried over magic variables. we pass them as arguments (_this) anyway + if !([_caller, _target, _selectionName, _className, _usersOfItems, _bloodLossOnSelection] call _litterCondition) exitWith {}; + + // Loop through through the litter options and place the litter + { + if (_x isEqualType "") then { + [_target, _x] call _createLitter; + }; + + if (_x isEqualType [] && {count _x > 0}) then { + [_target, selectRandom _x] call _createLitter; + }; + } foreach _litterOptions; + }; + }; +} foreach _litter; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical_treatment/functions/fnc_litterHandleCreate.sqf similarity index 61% rename from addons/medical/functions/fnc_handleCreateLitter.sqf rename to addons/medical_treatment/functions/fnc_litterHandleCreate.sqf index 2c701a2917..8c5fe49dd7 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical_treatment/functions/fnc_litterHandleCreate.sqf @@ -24,22 +24,33 @@ if (isNil QGVAR(allCreatedLitter)) then { GVAR(litterPFHRunning) = false; }; -private _p3dFile = getText (configFile >> "CfgVehicles" >> _litterClass >> "model"); -if (_p3dFile == "") exitWith {TRACE_2("no model",_litterClass,_p3dFile)}; +private _model = getText (configFile >> "CfgVehicles" >> _litterClass >> "model"); +if (_model == "") exitWith {TRACE_2("no model",_litterClass,_model)}; + // createSimpleObject expects a path without the leading slash -if ((_p3dFile select [0,1]) == "\") then {_p3dFile = _p3dFile select [1];}; +if (_model select [0,1] == "\") then { + _model = _model select [1]; +}; -private _litterObject = createSimpleObject [_p3dFile, [0,0,0]]; +private _litterObject = createSimpleObject [_model, [0,0,0]]; TRACE_2("created",_litterClass,_litterObject); -_litterObject setDir _direction; -_litterObject setPosATL _position; -// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112 -[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call CBA_fnc_execNextFrame; -private _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail); -if ((count GVAR(allCreatedLitter)) > _maxLitterCount) then { +_litterObject setDir _direction; +_litterObject setPosASL _position; + +// Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112 +[{ + params ["_object", "_position"]; + + _object setPosASL _position; +}, [_litterObject, _position]] call CBA_fnc_execNextFrame; + +private _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QEGVAR(medical,litterSimulationDetail) >> "_values") select GVAR(medical,litterSimulationDetail); + +if (count GVAR(allCreatedLitter) > _maxLitterCount) then { // gank the first litter object, and spawn ours. private _oldLitter = GVAR(allCreatedLitter) deleteAt 0; + { deleteVehicle _x; } forEach (_oldLitter select 1); @@ -47,7 +58,7 @@ if ((count GVAR(allCreatedLitter)) > _maxLitterCount) then { GVAR(allCreatedLitter) pushBack [CBA_missionTime, [_litterObject]]; -if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { +if (!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { // Start the litter cleanup loop GVAR(litterPFHRunning) = true; call FUNC(litterCleanupLoop); diff --git a/addons/medical_treatment/functions/fnc_treatment_success.sqf b/addons/medical_treatment/functions/fnc_treatment_success.sqf index 33de6fb3bf..47ab77433c 100644 --- a/addons/medical_treatment/functions/fnc_treatment_success.sqf +++ b/addons/medical_treatment/functions/fnc_treatment_success.sqf @@ -81,7 +81,7 @@ TRACE_1("advanced",_bloodLossOnSelection); _args call _callback; _args pushBack _bloodLossOnSelection; -_args call FUNC(createLitter); +_args call FUNC(litterCreate); //If we're not already tracking vitals, start: if (!(_target getVariable [QGVAR(addedToUnitLoop),false])) then { From 158b1eed698b8f83567784c9acc3f45e797f8fda Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 19 Sep 2016 10:05:16 +0200 Subject: [PATCH 2/5] add server only event handler only on server machine --- addons/medical_treatment/XEH_postInit.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/medical_treatment/XEH_postInit.sqf b/addons/medical_treatment/XEH_postInit.sqf index bbc091c8a8..f144592183 100644 --- a/addons/medical_treatment/XEH_postInit.sqf +++ b/addons/medical_treatment/XEH_postInit.sqf @@ -6,4 +6,6 @@ _unit call FUNC(checkItems); }] call CBA_fnc_addEventHandler; -[QGVAR(createLitterServer), FUNC(litterHandleCreate)] call CBA_fnc_addEventHandler; +if (isServer) then { + [QGVAR(createLitterServer), FUNC(litterHandleCreate)] call CBA_fnc_addEventHandler; +}; From 10d4047b4cb0651d9af28c25f3600a3db707c8be Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 19 Sep 2016 17:52:16 +0200 Subject: [PATCH 3/5] fix problems with ported treatment --- addons/medical_treatment/functions/fnc_litterCreate.sqf | 2 +- addons/medical_treatment/functions/fnc_litterHandleCreate.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/medical_treatment/functions/fnc_litterCreate.sqf b/addons/medical_treatment/functions/fnc_litterCreate.sqf index 115fa10c07..3104f4b2a4 100644 --- a/addons/medical_treatment/functions/fnc_litterCreate.sqf +++ b/addons/medical_treatment/functions/fnc_litterCreate.sqf @@ -65,7 +65,7 @@ private _createLitter = { { if (count _x < MIN_ENTRIES_LITTER_CONFIG) then { - WARNING_1("Wrong litter array: %1",_x); + WARNING(format [ARR_2("Wrong litter array: %1",_x)]); } else { _x params [ ["_selection", "", [""]], diff --git a/addons/medical_treatment/functions/fnc_litterHandleCreate.sqf b/addons/medical_treatment/functions/fnc_litterHandleCreate.sqf index 8c5fe49dd7..2bec813e7b 100644 --- a/addons/medical_treatment/functions/fnc_litterHandleCreate.sqf +++ b/addons/medical_treatment/functions/fnc_litterHandleCreate.sqf @@ -45,7 +45,7 @@ _litterObject setPosASL _position; _object setPosASL _position; }, [_litterObject, _position]] call CBA_fnc_execNextFrame; -private _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QEGVAR(medical,litterSimulationDetail) >> "_values") select GVAR(medical,litterSimulationDetail); +private _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QEGVAR(medical,litterSimulationDetail) >> "_values") select EGVAR(medical,litterSimulationDetail); if (count GVAR(allCreatedLitter) > _maxLitterCount) then { // gank the first litter object, and spawn ours. From c2f8007d36a7c4dfb9e0d5b2b80b68a90928fd78 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 19 Sep 2016 18:05:49 +0200 Subject: [PATCH 4/5] port litter settings to treatment --- addons/medical/ACE_Settings.hpp | 24 -------- addons/medical/stringtable.xml | 72 ----------------------- addons/medical_treatment/ACE_Settings.hpp | 26 ++++++++ addons/medical_treatment/config.cpp | 1 + addons/medical_treatment/stringtable.xml | 72 +++++++++++++++++++++++ 5 files changed, 99 insertions(+), 96 deletions(-) create mode 100644 addons/medical_treatment/ACE_Settings.hpp diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 9434686f4b..871607dcab 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -143,30 +143,6 @@ class ACE_Settings { typeName = "BOOL"; value = 0; }; - class GVAR(allowLitterCreation) { - category = CSTRING(Category_Medical); - displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName); - description = CSTRING(MedicalSettings_allowLitterCreation_Description); - typeName = "BOOL"; - value = 1; - }; - class GVAR(litterSimulationDetail) { - category = CSTRING(Category_Medical); - displayName = CSTRING(litterSimulationDetail); - description = CSTRING(litterSimulationDetail_Desc); - typeName = "SCALAR"; - - value = 3; - values[] = {"Off", "Low", "Medium", "High", "Ultra"}; - _values[] = { 0, 50, 100, 1000, 5000 }; - }; - class GVAR(litterCleanUpDelay) { - category = CSTRING(Category_Medical); - displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName); - description = CSTRING(MedicalSettings_litterCleanUpDelay_Description); - typeName = "SCALAR"; - value = 0; - }; class GVAR(medicSetting_basicEpi) { category = CSTRING(Category_Medical); displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 6f1c67f3fb..f34386ad79 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -25,30 +25,6 @@ Žádné zranění na této části těla... Nenhum ferimento nesta parte do corpo... - - Litter Simulation Detail - Detale zużytych medykamentów - Detalle de simulación de basura - Количество мусора от медицины - Dettagli Simulazione Rifiuti - Niveau de simulation des détritus - Abfall-Detaillevel - Hulladékszimuláció részletessége - Detalhe da simulação de sujeira - Počet zobrazených předmětů po použití zdravotnického materiálu - - - Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting. - Opcja ta ustawia liczbę zużytych medykamentów, jakie pojawiają się lokalnie wokół gracza. Ich zbyt duża ilość może spowodować spadki FPS, dlatego jest to ustawienie tylko po stronie klienta. - Detalle simulación de basura establece el número de artículos de basura que se generan a nivel local en el cliente. Las cantidades excesivas en áreas locales podrían causar caída de rendimiento, así que esto es un ajuste de cliente únicamente. - Устанавливает количество мусора, который появляется после использования мед. препаратов. Большое количество мусора может уменьшить производительность, поэтому данная настройка локальна для клиента. - Il numero di rifiuti che verranno creati localmente. La creazione di troppi rifiuti in aree locali potrebbe causare lag e calo di FPS. Questo è un settaggio lato client. - Le niveau de simulation des détritus règle la quantité de déchets qui vont être créés localement chez le client. Des quantitées excessive chez certains clients peuvent causer des chutes de FPS, c'est donc une option client uniquement. - Die Einstellung für das Abfall-Detaillevel stellt die Menge des lokal angezeigten medizinischen Abfalls ein. Zuviel Abfall kann FPS-Einbrüche erzeugen, weswegen diese Einstellung nur clientseitig ist. - A hulladékszimuláció részletessége megszabja a kliens által megjelenített hulladékobjektumok mennyiségét. Súlyos mennyiségek izolált területeken alacsony FPS-t okozhatnak, így ez egy kliensoldali beállítás. - O nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente. - Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi. - Inject Adenosine Adenosin injizieren @@ -2547,54 +2523,6 @@ Orvosok letiltása Disabilita medici - - 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 - - - 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 - - - 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 - - - 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 - Enable Screams Включить крики diff --git a/addons/medical_treatment/ACE_Settings.hpp b/addons/medical_treatment/ACE_Settings.hpp new file mode 100644 index 0000000000..8b1e32a71c --- /dev/null +++ b/addons/medical_treatment/ACE_Settings.hpp @@ -0,0 +1,26 @@ +class ACE_Settings { + class EGVAR(medical,allowLitterCreation) { + category = CSTRING(Category_Medical); + displayName = CSTRING(allowLitterCreation); + description = CSTRING(allowLitterCreation_Description); + typeName = "BOOL"; + value = 1; + }; + class EGVAR(medical,litterSimulationDetail) { + category = CSTRING(Category_Medical); + displayName = CSTRING(litterSimulationDetail); + description = CSTRING(litterSimulationDetail_Description); + typeName = "SCALAR"; + + value = 3; + values[] = {"Off", "Low", "Medium", "High", "Ultra"}; + _values[] = { 0, 50, 100, 1000, 5000 }; + }; + class EGVAR(medical,litterCleanUpDelay) { + category = CSTRING(Category_Medical); + displayName = CSTRING(litterCleanUpDelay); + description = CSTRING(litterCleanUpDelay_Description); + typeName = "SCALAR"; + value = 0; + }; +}; diff --git a/addons/medical_treatment/config.cpp b/addons/medical_treatment/config.cpp index 5bac8f00ee..c6eb664643 100644 --- a/addons/medical_treatment/config.cpp +++ b/addons/medical_treatment/config.cpp @@ -17,3 +17,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "ACE_Medical_Treatment.hpp" #include "ACE_Medical_Treatment_Actions.hpp" +#include "ACE_Settings" diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index 789a83cd99..dac36b078b 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -1,5 +1,77 @@  + + 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 + + + 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 + + + Litter Simulation Detail + Detale zużytych medykamentów + Detalle de simulación de basura + Количество мусора от медицины + Dettagli Simulazione Rifiuti + Niveau de simulation des détritus + Abfall-Detaillevel + Hulladékszimuláció részletessége + Detalhe da simulação de sujeira + Počet zobrazených předmětů po použití zdravotnického materiálu + + + Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting. + Opcja ta ustawia liczbę zużytych medykamentów, jakie pojawiają się lokalnie wokół gracza. Ich zbyt duża ilość może spowodować spadki FPS, dlatego jest to ustawienie tylko po stronie klienta. + Detalle simulación de basura establece el número de artículos de basura que se generan a nivel local en el cliente. Las cantidades excesivas en áreas locales podrían causar caída de rendimiento, así que esto es un ajuste de cliente únicamente. + Устанавливает количество мусора, который появляется после использования мед. препаратов. Большое количество мусора может уменьшить производительность, поэтому данная настройка локальна для клиента. + Il numero di rifiuti che verranno creati localmente. La creazione di troppi rifiuti in aree locali potrebbe causare lag e calo di FPS. Questo è un settaggio lato client. + Le niveau de simulation des détritus règle la quantité de déchets qui vont être créés localement chez le client. Des quantitées excessive chez certains clients peuvent causer des chutes de FPS, c'est donc une option client uniquement. + Die Einstellung für das Abfall-Detaillevel stellt die Menge des lokal angezeigten medizinischen Abfalls ein. Zuviel Abfall kann FPS-Einbrüche erzeugen, weswegen diese Einstellung nur clientseitig ist. + A hulladékszimuláció részletessége megszabja a kliens által megjelenített hulladékobjektumok mennyiségét. Súlyos mennyiségek izolált területeken alacsony FPS-t okozhatnak, így ez egy kliensoldali beállítás. + O nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente. + Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi. + + + 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 + + + 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 + From 8937a27b96f0237b3915a60219695f5ce7da0c72 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 19 Sep 2016 18:20:56 +0200 Subject: [PATCH 5/5] port litter settings to treatment, stringtable fixes --- addons/medical_treatment/ACE_Settings.hpp | 6 +++--- addons/medical_treatment/config.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/medical_treatment/ACE_Settings.hpp b/addons/medical_treatment/ACE_Settings.hpp index 8b1e32a71c..0767cfb9d1 100644 --- a/addons/medical_treatment/ACE_Settings.hpp +++ b/addons/medical_treatment/ACE_Settings.hpp @@ -1,13 +1,13 @@ class ACE_Settings { class EGVAR(medical,allowLitterCreation) { - category = CSTRING(Category_Medical); + category = ECSTRING(medical,Category_Medical); displayName = CSTRING(allowLitterCreation); description = CSTRING(allowLitterCreation_Description); typeName = "BOOL"; value = 1; }; class EGVAR(medical,litterSimulationDetail) { - category = CSTRING(Category_Medical); + category = ECSTRING(medical,Category_Medical); displayName = CSTRING(litterSimulationDetail); description = CSTRING(litterSimulationDetail_Description); typeName = "SCALAR"; @@ -17,7 +17,7 @@ class ACE_Settings { _values[] = { 0, 50, 100, 1000, 5000 }; }; class EGVAR(medical,litterCleanUpDelay) { - category = CSTRING(Category_Medical); + category = ECSTRING(medical,Category_Medical); displayName = CSTRING(litterCleanUpDelay); description = CSTRING(litterCleanUpDelay_Description); typeName = "SCALAR"; diff --git a/addons/medical_treatment/config.cpp b/addons/medical_treatment/config.cpp index c6eb664643..9dad6833f9 100644 --- a/addons/medical_treatment/config.cpp +++ b/addons/medical_treatment/config.cpp @@ -17,4 +17,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "ACE_Medical_Treatment.hpp" #include "ACE_Medical_Treatment_Actions.hpp" -#include "ACE_Settings" +#include "ACE_Settings.hpp"