ACE3/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf
Dedmen Miller e2ac18a05d [WIP] Fix script errors reporting wrong line numbers (#6407)
* advanced_ballistics

* advanced_fatigue

* advanced_throwing

* ai

* aircraft

* arsenal

* atragmx

* attach

* backpacks

* ballistics

* captives

* cargo

* chemlights

* common

* concertina_wire

* cookoff

* dagr

* disarming

* disposable

* dogtags

* dragging

* explosives

* fastroping

* fcs

* finger

* frag

* gestures

* gforces

* goggles

* grenades

* gunbag

* hearing

* hitreactions

* huntir

* interact_menu

* interaction

* inventory

* kestrel4500

* laser

* laserpointer

* logistics_uavbattery

* logistics_wirecutter

* magazinerepack

* map

* map_gestures

* maptools

* markers

* medical

* medical_ai

* medical_blood

* medical_menu

* microdagr

* minedetector

* missileguidance

* missionmodules

* mk6mortar

* modules

* movement

* nametags

* nightvision

* nlaw

* optics

* optionsmenu

* overheating

* overpressure

* parachute

* pylons

* quickmount

* rangecard

* rearm

* recoil

* refuel

* reload

* reloadlaunchers

* repair

* respawn

* safemode

* sandbag

* scopes

* slideshow

* spectator

* spottingscope

* switchunits

* tacticalladder

* tagging

* trenches

* tripod

* ui

* vector

* vehiclelock

* vehicles

* viewdistance

* weaponselect

* weather

* winddeflection

* yardage450

* zeus

* arsenal defines.hpp

* optionals

* DEBUG_MODE_FULL 1

* DEBUG_MODE_FULL 2

* Manual fixes

* Add SQF Validator check for #include after block comment

* explosives fnc_openTimerUI

* fix uniqueItems
2018-09-17 14:19:29 -05:00

51 lines
1.3 KiB
Plaintext

#include "script_component.hpp"
/*
* Author: BaerMitUmlaut, 654wak654
* Generates the CfgVehicles config to allow uniform usage on all sides.
*
* Arguments:
* None
*
* Return Value:
* CfgVehicles Content <STRING>
*
* Example:
* [] call ace_nouniformrestrictions_fnc_exportConfig
*
* Public: Yes
*/
private _modifyClasses = [];
private _baseClasses = [];
{
private _baseClass = inheritsFrom _x;
_modifyClasses pushBackUnique [_x, _baseClass];
if !(_baseClass in (_modifyClasses apply {_x select 0})) then {
_baseClasses pushBackUnique _baseClass;
};
false
} count (
("!isNull (_x >> 'modelSides') &&" +
"{(_x >> 'modelSides') in (configProperties [_x, 'true', false])} &&" +
"{!(getArray (_x >> 'modelSides') isEqualTo [6])} &&" +
"{!(getArray (_x >> 'modelSides') isEqualTo [0,1,2,3])}")
configClasses (configFile >> "CfgVehicles")
);
private _nl = toString [13, 10];
private _output = "class CfgVehicles {" + _nl;
{
ADD(_output,format [ARR_3(" class %1;%2",configName _x,_nl)]);
false
} count _baseClasses;
ADD(_output,_nl);
{
_x params ["_class", "_parent"];
ADD(_output,format [ARR_4(" class %1: %2 {%3 modelSides[] = {6};%3 };%3",configName _class,configName _parent,_nl)]);
false
} count _modifyClasses;
ADD(_output,"};");
copyToClipboard _output;
_output;