2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-10-27 17:34:25 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut, 654wak654
|
2016-12-12 18:36:53 +00:00
|
|
|
* Generates the CfgVehicles config to allow uniform usage on all sides.
|
2016-10-27 17:34:25 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
2016-12-12 18:36:53 +00:00
|
|
|
* CfgVehicles Content <STRING>
|
2016-10-27 17:34:25 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ace_nouniformrestrictions_fnc_exportConfig
|
|
|
|
*
|
2016-12-12 18:36:53 +00:00
|
|
|
* Public: Yes
|
2016-10-27 17:34:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
private _modifyClasses = [];
|
|
|
|
private _baseClasses = [];
|
|
|
|
{
|
2016-12-21 22:41:16 +00:00
|
|
|
private _baseClass = inheritsFrom _x;
|
|
|
|
_modifyClasses pushBackUnique [_x, _baseClass];
|
|
|
|
if !(_baseClass in (_modifyClasses apply {_x select 0})) then {
|
|
|
|
_baseClasses pushBackUnique _baseClass;
|
2016-10-27 17:34:25 +00:00
|
|
|
};
|
2024-08-12 21:22:53 +00:00
|
|
|
} forEach ((toString {
|
|
|
|
!isNull (_x >> 'modelSides') &&
|
|
|
|
{(_x >> 'modelSides') in (configProperties [_x, 'true', false])} &&
|
|
|
|
{getArray (_x >> 'modelSides') isNotEqualTo [6]} &&
|
|
|
|
{getArray (_x >> 'modelSides') isNotEqualTo [0,1,2,3]}
|
|
|
|
}) configClasses (configFile >> "CfgVehicles"));
|
2016-10-27 17:34:25 +00:00
|
|
|
|
2024-08-12 21:22:53 +00:00
|
|
|
private _nl = endl;
|
|
|
|
private _output = ["class CfgVehicles {", _nl];
|
2016-10-27 17:34:25 +00:00
|
|
|
{
|
2024-08-12 21:22:53 +00:00
|
|
|
_output pushBack format [" class %1;%2", configName _x, _nl];
|
|
|
|
} forEach _baseClasses;
|
|
|
|
_output pushBack _nl;
|
2016-10-27 17:34:25 +00:00
|
|
|
{
|
|
|
|
_x params ["_class", "_parent"];
|
2024-08-12 21:22:53 +00:00
|
|
|
_output pushBack format [" class %1: %2 {%3 modelSides[] = {6};%3 };%3", configName _class, configName _parent, _nl];
|
|
|
|
} forEach _modifyClasses;
|
|
|
|
_output pushBack "};";
|
|
|
|
|
|
|
|
_output = _output joinString "";
|
2016-10-27 17:34:25 +00:00
|
|
|
|
|
|
|
copyToClipboard _output;
|
2024-08-12 21:22:53 +00:00
|
|
|
_output // return
|