mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add 'uniforms' Component (#4435)
This commit is contained in:
parent
49b5a0ea86
commit
fd1888be36
@ -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
|
||||
|
1
optionals/nouniformrestrictions/$PBOPREFIX$
Normal file
1
optionals/nouniformrestrictions/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\nouniformrestrictions
|
11
optionals/nouniformrestrictions/CfgEventHandlers.hpp
Normal file
11
optionals/nouniformrestrictions/CfgEventHandlers.hpp
Normal 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));
|
||||
};
|
||||
};
|
1658
optionals/nouniformrestrictions/CfgVehicles.hpp
Normal file
1658
optionals/nouniformrestrictions/CfgVehicles.hpp
Normal file
File diff suppressed because it is too large
Load Diff
12
optionals/nouniformrestrictions/README.md
Normal file
12
optionals/nouniformrestrictions/README.md
Normal 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)
|
1
optionals/nouniformrestrictions/XEH_PREP.hpp
Normal file
1
optionals/nouniformrestrictions/XEH_PREP.hpp
Normal file
@ -0,0 +1 @@
|
||||
PREP(exportConfig);
|
7
optionals/nouniformrestrictions/XEH_preInit.sqf
Normal file
7
optionals/nouniformrestrictions/XEH_preInit.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
ADDON = true;
|
3
optionals/nouniformrestrictions/XEH_preStart.sqf
Normal file
3
optionals/nouniformrestrictions/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
18
optionals/nouniformrestrictions/config.cpp
Normal file
18
optionals/nouniformrestrictions/config.cpp
Normal 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"
|
@ -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;
|
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\nouniformrestrictions\script_component.hpp"
|
18
optionals/nouniformrestrictions/script_component.hpp
Normal file
18
optionals/nouniformrestrictions/script_component.hpp
Normal 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"
|
Loading…
Reference in New Issue
Block a user