tested local

This commit is contained in:
2024-02-03 22:55:21 -08:00
parent 09dcde7471
commit d7b8e5186e
4 changed files with 7 additions and 15 deletions

View File

@@ -21,6 +21,7 @@
#include "defines\BattalionInfo.hpp"
#include "defines\DisallowedEquipment.hpp"
#include "defines\SupplyCrates.hpp"
#include "defines\VehicleFlags.hpp"
//-------------------------------------------MISSION INFO--------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -42,6 +42,9 @@ private _allCategoryActions = [];
private _flagOptionTitle = getText(_flagOptionCfg >> "actionTitle");
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];
private _newFlagOption = [

View File

@@ -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;
};
// 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 =
(_vehicleFlagsCfg >> "baseClassesToApplyActionsFor") call BIS_fnc_getCfgDataArray;
private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_returnChildren;
@@ -84,7 +72,7 @@ private _flagCategoryCfgs = (_vehicleFlagsCfg >> "FlagCategories") call BIS_fnc_
////////////////////////////////////////////////////////////////////////
// create action
private _removeFlagAction = [
_flagRootAction + "_removeflag", // id
_rootActionID + "_removeflag", // id
"Remove Flag", // displayed title
"\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
0, // action 0 or self-action 1
["ACE_MainActions", _flagActionID], // parent
["ACE_MainActions", _rootActionID], // parent
_removeFlagAction // action
] call ace_interact_menu_fnc_addActionToObject;

View File

@@ -10,7 +10,7 @@
if (!hasInterface) exitWith {};
params ["_className", "", [""]];
params [["_className", "", [""]]];
if (_className == "") exitWith {false};
private _vehicleFlagsCfg = call milsim_vehicleFlags_fnc_getVehicleFlagsCfg;