tested local
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include "defines\BattalionInfo.hpp"
|
#include "defines\BattalionInfo.hpp"
|
||||||
#include "defines\DisallowedEquipment.hpp"
|
#include "defines\DisallowedEquipment.hpp"
|
||||||
#include "defines\SupplyCrates.hpp"
|
#include "defines\SupplyCrates.hpp"
|
||||||
|
#include "defines\VehicleFlags.hpp"
|
||||||
|
|
||||||
//-------------------------------------------MISSION INFO--------------------------------------------------------------------
|
//-------------------------------------------MISSION INFO--------------------------------------------------------------------
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ private _allCategoryActions = [];
|
|||||||
private _flagOptionTitle = getText(_flagOptionCfg >> "actionTitle");
|
private _flagOptionTitle = getText(_flagOptionCfg >> "actionTitle");
|
||||||
private _flagOptionTexture = getText(_flagOptionCfg >> "texture");
|
private _flagOptionTexture = getText(_flagOptionCfg >> "texture");
|
||||||
|
|
||||||
|
// if the texture doesn't exist at the config path, skip this flag option
|
||||||
|
if (not (fileExists _flagOptionTexture)) then {continue};
|
||||||
|
|
||||||
// diag_log format ["NewFlagOption: %1 %2", _flagOptionID, _flagOptionData];
|
// diag_log format ["NewFlagOption: %1 %2", _flagOptionID, _flagOptionData];
|
||||||
|
|
||||||
private _newFlagOption = [
|
private _newFlagOption = [
|
||||||
|
|||||||
@@ -6,18 +6,6 @@ if (!isClass _vehicleFlagsCfg) exitWith {
|
|||||||
["WARNING: Vehicle Flags: Vehicle Flags config not found. Vehicle Flags will not be available."] call BIS_fnc_error;
|
["WARNING: Vehicle Flags: Vehicle Flags config not found. Vehicle Flags will not be available."] call BIS_fnc_error;
|
||||||
};
|
};
|
||||||
|
|
||||||
// get texture pbo class
|
|
||||||
private _texturePboName = getText(_vehicleFlagsCfg >> "texturePBOName");
|
|
||||||
if (_texturePboName == "") exitWith {
|
|
||||||
["WARNING: Vehicle Flags: Texture PBO definition is missing or a blank string! Vehicle Flags will not be available."] call BIS_fnc_error;
|
|
||||||
};
|
|
||||||
if (!isClass (configFile >> "CfgPatches" >> _texturePboName)) exitWith {
|
|
||||||
[
|
|
||||||
"WARNING: Vehicle Flags: Texture PBO not found (%1). Vehicle Flags will not be available.",
|
|
||||||
_texturePboName
|
|
||||||
] call BIS_fnc_error;
|
|
||||||
};
|
|
||||||
|
|
||||||
private _baseClassesToApplyActionsFor =
|
private _baseClassesToApplyActionsFor =
|
||||||
(_vehicleFlagsCfg >> "baseClassesToApplyActionsFor") call BIS_fnc_getCfgDataArray;
|
(_vehicleFlagsCfg >> "baseClassesToApplyActionsFor") call BIS_fnc_getCfgDataArray;
|
||||||
private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_returnChildren;
|
private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_returnChildren;
|
||||||
@@ -84,7 +72,7 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_
|
|||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// create action
|
// create action
|
||||||
private _removeFlagAction = [
|
private _removeFlagAction = [
|
||||||
_flagRootAction + "_removeflag", // id
|
_rootActionID + "_removeflag", // id
|
||||||
"Remove Flag", // displayed title
|
"Remove Flag", // displayed title
|
||||||
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
||||||
{
|
{
|
||||||
@@ -103,7 +91,7 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_
|
|||||||
[
|
[
|
||||||
(_this select 0), // object
|
(_this select 0), // object
|
||||||
0, // action 0 or self-action 1
|
0, // action 0 or self-action 1
|
||||||
["ACE_MainActions", _flagActionID], // parent
|
["ACE_MainActions", _rootActionID], // parent
|
||||||
_removeFlagAction // action
|
_removeFlagAction // action
|
||||||
] call ace_interact_menu_fnc_addActionToObject;
|
] call ace_interact_menu_fnc_addActionToObject;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
params ["_className", "", [""]];
|
params [["_className", "", [""]]];
|
||||||
if (_className == "") exitWith {false};
|
if (_className == "") exitWith {false};
|
||||||
|
|
||||||
private _vehicleFlagsCfg = call milsim_vehicleFlags_fnc_getVehicleFlagsCfg;
|
private _vehicleFlagsCfg = call milsim_vehicleFlags_fnc_getVehicleFlagsCfg;
|
||||||
|
|||||||
Reference in New Issue
Block a user