mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed redundant level checks
This commit is contained in:
parent
7ea31f8b05
commit
56dad70a9e
@ -6,8 +6,6 @@ class ACE_Medical_Actions {
|
|||||||
treatmentLocations[] = {"Field", "MedicalFacility", "MedicalVehicle"};
|
treatmentLocations[] = {"Field", "MedicalFacility", "MedicalVehicle"};
|
||||||
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
// Available under which medical level settings? 0 = basic, 1 = advanced.
|
|
||||||
availableLevels[] = {0, 1};
|
|
||||||
// The time it takes for a treatment action to complete. Time is in seconds.
|
// The time it takes for a treatment action to complete. Time is in seconds.
|
||||||
treatmentTime = 5;
|
treatmentTime = 5;
|
||||||
// Item required for the action. Leave empty for no item required.
|
// Item required for the action. Leave empty for no item required.
|
||||||
@ -27,8 +25,6 @@ class ACE_Medical_Actions {
|
|||||||
treatmentLocations[] = {"Field", "MedicalFacility", "MedicalVehicle"};
|
treatmentLocations[] = {"Field", "MedicalFacility", "MedicalVehicle"};
|
||||||
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
// Available under which medical level settings? 0 = basic, 1 = advanced.
|
|
||||||
availableLevels[] = {0, 1};
|
|
||||||
// The time it takes for a treatment action to complete. Time is in seconds.
|
// The time it takes for a treatment action to complete. Time is in seconds.
|
||||||
treatmentTime = 5;
|
treatmentTime = 5;
|
||||||
// Item required for the action. Leave empty for no item required.
|
// Item required for the action. Leave empty for no item required.
|
||||||
|
@ -28,9 +28,6 @@ if (GVAR(level)>=1) then {
|
|||||||
};
|
};
|
||||||
if !(isClass _config) exitwith {false};
|
if !(isClass _config) exitwith {false};
|
||||||
|
|
||||||
_availableLevels = getArray (_config >> "availableLevels");
|
|
||||||
if !(GVAR(level) in _availableLevels) exitwith {false};
|
|
||||||
|
|
||||||
_medicRequired = getNumber (_config >> "requiredMedic");
|
_medicRequired = getNumber (_config >> "requiredMedic");
|
||||||
if !([_caller, _medicRequired] call FUNC(isMedic) || [_target, _medicRequired] call FUNC(isMedic)) exitwith {false};
|
if !([_caller, _medicRequired] call FUNC(isMedic) || [_target, _medicRequired] call FUNC(isMedic)) exitwith {false};
|
||||||
|
|
||||||
|
@ -28,9 +28,6 @@ if (GVAR(level)>=1) then {
|
|||||||
};
|
};
|
||||||
if !(isClass _config) exitwith {false};
|
if !(isClass _config) exitwith {false};
|
||||||
|
|
||||||
_availableLevels = getArray (_config >> "availableLevels");
|
|
||||||
if !(GVAR(level) in _availableLevels) exitwith {false};
|
|
||||||
|
|
||||||
_medicRequired = getNumber (_config >> "requiredMedic");
|
_medicRequired = getNumber (_config >> "requiredMedic");
|
||||||
if !([_caller, _medicRequired] call FUNC(isMedic) || [_target, _medicRequired] call FUNC(isMedic)) exitwith {false};
|
if !([_caller, _medicRequired] call FUNC(isMedic) || [_target, _medicRequired] call FUNC(isMedic)) exitwith {false};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user