Add 'uniforms' Component (#4435)

This commit is contained in:
Ozan Eğitmen 2016-10-27 20:34:25 +03:00 committed by Glowbal
parent 49b5a0ea86
commit fd1888be36
12 changed files with 1783 additions and 0 deletions

View File

@ -29,6 +29,7 @@ Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
[BIG]Bull
11RDP-LoupVert <loupvert@11rdp.fr>
654wak654 <ozanegitmen@gmail.com>
ACCtomeek <tomeek99@gmail.com>
adam3adam <br.ada@seznam.cz>
Adanteh

View File

@ -0,0 +1 @@
z\ace\addons\nouniformrestrictions

View File

@ -0,0 +1,11 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
ace_nouniformrestrictions
=======
Removes side restrictions from all vanilla uniforms.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [654wak654](https://github.com/654wak654)
- [Jonpas](https://github.com/jonpas)

View File

@ -0,0 +1 @@
PREP(exportConfig);

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam);
authors[] = {"654wak654", "jonpas"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,52 @@
/*
* Author: BaerMitUmlaut, 654wak654
* Generates the CfgVehicles.hpp to unlock all uniforms.
*
* Arguments:
* None
*
* Return Value:
* CfgVehicles.hpp content <STRING>
*
* Example:
* [] call ace_nouniformrestrictions_fnc_exportConfig
*
* Public: [Yes]
*/
#include "script_component.hpp"
private _modifyClasses = [];
private _baseClasses = [];
{
private _modifyClass = {
if (!isNull (_x >> "modelSides")) exitWith {_x};
} forEach (configHierarchy _x);
private _baseClass = inheritsFrom _modifyClass;
_modifyClasses pushBackUnique [_modifyClass, _baseClass];
if !(_baseClass in (_modifyClasses apply {_x select 0})) then {
_baseClasses pushBackUnique _baseClass;
};
false
} count (
("!isNull (_x >> 'modelSides') &&" +
"{!(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;

View File

@ -0,0 +1 @@
#include "\z\ace\addons\nouniformrestrictions\script_component.hpp"

View File

@ -0,0 +1,18 @@
#define COMPONENT nouniformrestrictions
#define COMPONENT_BEAUTIFIED No Uniform Restrictions
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_UNIFORMS
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_UNIFORMS
#define DEBUG_SETTINGS DEBUG_SETTINGS_UNIFORMS
#endif
#include "\z\ace\addons\main\script_macros.hpp"