mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix event name overlap and macros (#6514)
This commit is contained in:
parent
88238dd0b5
commit
0a97ef3cc8
@ -1,6 +1,5 @@
|
||||
[
|
||||
QGVAR(enabledFor),
|
||||
"CHECKBOX",
|
||||
"LIST",
|
||||
[LLSTRING(enableFor_title), LLSTRING(enableFor_desc)],
|
||||
LLSTRING(settingCategory),
|
||||
|
@ -74,7 +74,7 @@ if (_show == 1) then {
|
||||
if (HAS_TOURNIQUET_APPLIED_ON(_target,_selectionN)) then {
|
||||
_genericMessages pushback [localize ELSTRING(medical_treatment,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
|
||||
};
|
||||
if (GVAR(showPainInMenu) && {[ACE_player, EGVAR(medical,medicSetting_PainVisualization)] call EFUNC(medical_treatment,isMedic)}) then {
|
||||
if (GVAR(showPainInMenu) && {[ACE_player, GVAR(painVisualization)] call EFUNC(medical_treatment,isMedic)}) then {
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_target);
|
||||
if (_painLevel > 0) then {
|
||||
private _painText = localize ELSTRING(medical_treatment,Status_Pain);
|
||||
@ -119,7 +119,7 @@ if (_show == 1) then {
|
||||
_allInjuryTexts pushBack [format["Partial %1", _woundDescription], [1,1,1,1]];
|
||||
};
|
||||
} else {
|
||||
if (!EGVAR(medical_treatment,advancedBandages) || {!EGVAR(medical,woundReopening)}) then {
|
||||
if (!EGVAR(medical_treatment,advancedBandages) || {!EGVAR(medical_treatment,woundReopening)}) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select _category;
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
|
@ -51,7 +51,7 @@ if (HAS_TOURNIQUET_APPLIED_ON(_target,_selectionN)) then {
|
||||
_genericMessages pushBack [localize ELSTRING(medical_treatment,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
|
||||
};
|
||||
|
||||
if (GVAR(showPainInMenu) && {[ACE_player, EGVAR(medical,medicSetting_PainVisualization)] call EFUNC(medical_treatment,isMedic)}) then {
|
||||
if (GVAR(showPainInMenu) && {[ACE_player, GVAR(painVisualization)] call EFUNC(medical_treatment,isMedic)}) then {
|
||||
private _painLevel = GET_PAIN_PERCEIVED(_target);
|
||||
if (_painLevel > 0) then {
|
||||
private _painText = localize ELSTRING(medical_treatment,Status_Pain);
|
||||
@ -97,7 +97,7 @@ private _allInjuryTexts = [];
|
||||
_allInjuryTexts pushBack [format["Partial %1", _woundDescription], [1,1,1,1]];
|
||||
};
|
||||
} else {
|
||||
if (!EGVAR(medical_treatment,advancedBandages) || {!EGVAR(medical,woundReopening)}) then {
|
||||
if (!EGVAR(medical_treatment,advancedBandages) || {!EGVAR(medical_treatment,woundReopening)}) then {
|
||||
private _className = (EGVAR(medical_damage,woundsData) select _woundClassID) select 6;
|
||||
private _postfix = ["Minor", "Medium", "Large"] select _category;
|
||||
private _woundDescription = localize format [ELSTRING(medical_damage,%1_%2), _className, _postfix];
|
||||
|
@ -8,7 +8,7 @@ class ACE_Medical_StateMachine {
|
||||
onState = QFUNC(handleStateDefault);
|
||||
class Injury {
|
||||
targetState = "Injured";
|
||||
events[] = {QEGVAR(medical,injured)};
|
||||
events[] = {QEGVAR(medical,injured), QEGVAR(medical,LoweredVitals)};
|
||||
};
|
||||
class CriticalInjuryOrVitals {
|
||||
targetState = "Unconscious";
|
||||
@ -47,7 +47,7 @@ class ACE_Medical_StateMachine {
|
||||
onStateEntered = QUOTE([ARR_2(_this,(true))] call EFUNC(medical_status,setUnconsciousStatemachine));
|
||||
class DeathAI {
|
||||
targetState = "Dead";
|
||||
condition = QUOTE(!isPlayer _this && {EGVAR(medical,unconsciousConditionAI)});
|
||||
condition = QUOTE(!isPlayer _this && {GVAR(unconsciousConditionAI)});
|
||||
};
|
||||
class WakeUp {
|
||||
targetState = "Injured";
|
||||
|
@ -15,6 +15,6 @@
|
||||
params ["_unit"];
|
||||
|
||||
private _startTime = _unit getVariable [QGVAR(cardiacArrestStart), CBA_missionTime];
|
||||
private _lifeTime = _unit getVariable [QGVAR(cardiacArrestTime), EGVAR(medical,cardiacArrestTime)];
|
||||
private _lifeTime = _unit getVariable [QGVAR(cardiacArrestTime), GVAR(cardiacArrestTime)];
|
||||
|
||||
(CBA_missionTime - _startTime) > _lifeTime
|
||||
|
@ -15,7 +15,7 @@
|
||||
params ["_unit"];
|
||||
|
||||
// 10% possible variance in cardiac arrest time
|
||||
private _time = EGVAR(medical,cardiacArrestTime);
|
||||
private _time = GVAR(cardiacArrestTime);
|
||||
_time = _time + random [_time*-0.1, 0, _time*0.1];
|
||||
|
||||
_unit setVariable [QGVAR(cardiacArrestTime), _time];
|
||||
|
@ -57,7 +57,7 @@ class Cfg3DEN {
|
||||
control = "Checkbox";
|
||||
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
|
||||
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
|
||||
expression = QUOTE(_this setVariable [ARR_3(QQEQGVAR(medical,isMedicalFacility),_value,true)];);
|
||||
expression = QUOTE(_this setVariable [ARR_3(QQEGVAR(medical,isMedicalFacility),_value,true)];);
|
||||
typeName = "BOOL";
|
||||
condition = "(1 - objectBrain) * (1 - objectVehicle)";
|
||||
defaultValue = "false";
|
||||
|
@ -39,7 +39,7 @@ _openWounds set [_woundIndex, _wound];
|
||||
_target setVariable [QEGVAR(medical,openWounds), _openWounds, true];
|
||||
|
||||
// Handle the reopening of bandaged wounds
|
||||
if (_impact > 0 && {GVAR(advancedBandages) && {EGVAR(medical,woundReopening)}}) then {
|
||||
if (_impact > 0 && {GVAR(advancedBandages) && {GVAR(woundReopening)}}) then {
|
||||
[_target, _impact, _partIndex, _woundIndex, _wound, _bandage] call FUNC(handleBandageOpening);
|
||||
};
|
||||
|
||||
|
@ -130,10 +130,10 @@ switch (true) do {
|
||||
[QEGVAR(medical,CriticalVitals), _unit] call CBA_fnc_localEvent;
|
||||
};
|
||||
case (_bloodLoss > 0): {
|
||||
[QEGVAR(medical,Injury), _unit] call CBA_fnc_localEvent;
|
||||
[QEGVAR(medical,LoweredVitals), _unit] call CBA_fnc_localEvent;
|
||||
};
|
||||
case (_inPain): {
|
||||
[QEGVAR(medical,Injury), _unit] call CBA_fnc_localEvent;
|
||||
[QEGVAR(medical,LoweredVitals), _unit] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user