mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3
This commit is contained in:
commit
3122542814
@ -19,6 +19,18 @@ private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "version
|
||||
|
||||
ACE_LOGINFO_1("ACE is version %1.",_version);
|
||||
|
||||
//CBA Versioning check - close main display if using incompatible version
|
||||
private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr");
|
||||
private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1;
|
||||
ACE_LOGINFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr);
|
||||
if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then {
|
||||
private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr];
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
};
|
||||
|
||||
//private _addons = activatedAddons; // broken with High-Command module, see #2134
|
||||
private _addons = "true" configClasses (configFile >> "CfgPatches");//
|
||||
_addons = _addons apply {toLower configName _x};//
|
||||
|
@ -588,3 +588,16 @@ class CfgMods {
|
||||
|
||||
#include "CfgModuleCategories.hpp"
|
||||
#include "CfgVehicleClasses.hpp"
|
||||
|
||||
class CfgSettings {
|
||||
class CBA {
|
||||
class Versioning {
|
||||
class ACE {
|
||||
class dependencies {
|
||||
CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "true"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -13,3 +13,4 @@
|
||||
|
||||
// MINIMAL required version for the Mod. Components can specify others..
|
||||
#define REQUIRED_VERSION 1.56
|
||||
#define REQUIRED_CBA_VERSION {2,3,1}
|
||||
|
@ -27,4 +27,5 @@ if (isNull _unit ||
|
||||
!(_nozzle getVariable [QGVAR(isRefueling), false]) &&
|
||||
{[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} &&
|
||||
{!isNull (_nozzle getVariable [QGVAR(sink), objNull])} &&
|
||||
{(fuel (_nozzle getVariable QGVAR(sink))) < 1}
|
||||
{(fuel (_nozzle getVariable QGVAR(sink))) < 1} &&
|
||||
{!(isEngineOn (_nozzle getVariable QGVAR(sink)))}
|
||||
|
@ -52,6 +52,9 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >>
|
||||
private _finished = false;
|
||||
private _fueling = _nozzle getVariable [QGVAR(isRefueling), false];
|
||||
if (_fueling) then {
|
||||
if (isEngineOn _sink) exitWith {
|
||||
_nozzle setVariable [QGVAR(isRefueling), false, true];
|
||||
};
|
||||
private _fuelInSource = [_source] call FUNC(getFuel);
|
||||
if (_fuelInSource == 0) exitWith {
|
||||
[LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured);
|
||||
|
Loading…
Reference in New Issue
Block a user