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

Pharma/Surgery - Tweak open reduction PFH and etomidate time #648

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion addons/pharma/ACE_Medical_Treatment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class ACE_ADDON(Medical_Treatment) {
hrIncreaseLow[] = {-5, -10};
hrIncreaseNormal[] = {-15, -20};
hrIncreaseHigh[] = {-20, -30};
timeInSystem = 45;
timeInSystem = 60;
timeTillMaxEffect = 5;
maxDose = 10;
incompatibleMedication[] = {};
Expand Down
9 changes: 0 additions & 9 deletions addons/surgery/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ PREP_RECOMPILE_END;
true
] call CBA_Settings_fnc_init;

[
QGVAR(etomidateTime),
"SLIDER",
[LLSTRING(ETOMIDATE_TIMER), LLSTRING(ETOMIDATE_TIMER_DESC)],
[CBA_SETTINGS_CAT, LSTRING(SubCategory_SurgicalActions)],
[0,100,45,0],
true
] call CBA_Settings_fnc_init;

[
QGVAR(closedTime),
"SLIDER",
Expand Down
20 changes: 12 additions & 8 deletions addons/surgery/functions/fnc_incisionLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,26 @@ _patient setVariable [QGVAR(fractures), _fractureArray, true];

private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]];
private _liveFracture = _fractureArray select _part;
private _count = [_patient, "Etomidate"] call ACEFUNC(medical_status,getMedicationCount);
private _count = [_patient, "Etomidate", true] call ACEFUNC(medical_status,getMedicationCount);

private _alive = alive _patient;

if ((!_alive) || (_liveFracture == 0)) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
_patient setVariable ["kat_Etomidate_Pain", false]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why its not QGVAR

};

if (((GVAR(Surgery_ConsciousnessRequirement) in [0,1]) && (!(IS_UNCONSCIOUS(_patient)) || _count == 0)) || (GVAR(Surgery_ConsciousnessRequirement) == 3 && _count == 0)) exitWith {
[_patient, "Pain", 10, 40, 200, 0, 40] call ACEFUNC(medical_status,addMedicationAdjustment);
if (((GVAR(Surgery_ConsciousnessRequirement) in [0,1]) && (!(IS_UNCONSCIOUS(_patient)) || _count >= 0.2)) || (GVAR(Surgery_ConsciousnessRequirement) == 3 && _count == 0)) exitWith {
mazinskihenry marked this conversation as resolved.
Show resolved Hide resolved
if !(_patient getVariable ["kat_Etomidate_Pain", false]) then {
[_patient, "Pain", 2, 10, 120, 0.6, 40] call ACEFUNC(medical_status,addMedicationAdjustment);
_patient setVariable ["kat_Etomidate_Pain", true]};
[_patient, true] call ACEFUNC(medical,setUnconscious);
};

if (GVAR(Surgery_ConsciousnessRequirement) == 2 && _count == 0) then {
[_patient, 0.4] call ACEFUNC(medical_status,adjustPainLevel);
[_patient, "Pain", 10, 40, 30, 0, 40] call ACEFUNC(medical_status,addMedicationAdjustment);
if (GVAR(Surgery_ConsciousnessRequirement) == 2 && _count >= 0.2) then {
if !(_patient getVariable ["kat_Etomidate_Pain", false]) then {
[_patient, "Pain", 2, 10, 120, 0.6, 40] call ACEFUNC(medical_status,addMedicationAdjustment);
_patient setVariable ["kat_Etomidate_Pain", true]
};
};

}, GVAR(etomidateTime), [_patient, _part]] call CBA_fnc_addPerFrameHandler;
}, 5, [_patient, _part]] call CBA_fnc_addPerFrameHandler;
Loading