-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add No vehicle clan logo component (#9018)
* Add novehicleclanlogo component * Documentation * Update README.md * Use selection name from vehicle config
- Loading branch information
Showing
14 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
z\ace\addons\novehicleclanlogo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
class Extended_PreStart_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); | ||
}; | ||
}; | ||
|
||
class Extended_PreInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); | ||
}; | ||
}; | ||
|
||
class Extended_PostInit_EventHandlers { | ||
class ADDON { | ||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
novehicleclanlogo | ||
============= | ||
|
||
Prevents clan logo from being displayed on vehicles controlled by players. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PREP(removeClanLogo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "script_component.hpp" | ||
|
||
// clan logos are not used in singleplayer | ||
if (!isMultiplayer) exitWith {}; | ||
|
||
["CBA_settingsInitialized", { | ||
TRACE_1("settingsInit eh",GVAR(enabled)); | ||
|
||
if (isServer && {GVAR(enabled)}) then { | ||
["LandVehicle", "initPost", LINKFUNC(removeClanLogo), true, [], true] call CBA_fnc_addClassEventHandler; | ||
["Air", "initPost", LINKFUNC(removeClanLogo), true, [], true] call CBA_fnc_addClassEventHandler; | ||
["Ship", "initPost", LINKFUNC(removeClanLogo), true, [], true] call CBA_fnc_addClassEventHandler; | ||
}; | ||
}] call CBA_fnc_addEventHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "script_component.hpp" | ||
|
||
ADDON = false; | ||
|
||
PREP_RECOMPILE_START; | ||
#include "XEH_PREP.hpp" | ||
PREP_RECOMPILE_END; | ||
|
||
#include "initSettings.sqf" | ||
|
||
ADDON = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "script_component.hpp" | ||
|
||
#include "XEH_PREP.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "script_component.hpp" | ||
|
||
class CfgPatches { | ||
class ADDON { | ||
name = COMPONENT_NAME; | ||
units[] = {}; | ||
weapons[] = {}; | ||
requiredVersion = REQUIRED_VERSION; | ||
requiredAddons[] = {"ace_common"}; | ||
author = ECSTRING(common,ACETeam); | ||
authors[] = {"veteran29"}; | ||
url = ECSTRING(main,URL); | ||
VERSION_CONFIG; | ||
}; | ||
}; | ||
|
||
#include "CfgEventHandlers.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: veteran29 | ||
* Replaces the vehicle clan logo with an empty texture. | ||
* | ||
* Arguments: | ||
* 0: Vehicle <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [vehicle player] call ace_novehicleclanlogo_fnc_removeClanLogo | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params ["_vehicle"]; | ||
|
||
private _selectionClan = getText (configOf _vehicle >> "selectionClan"); | ||
if !(_selectionClan in selectionNames _vehicle) exitWith { | ||
TRACE_2("vehicle does not have 'selectionClan' selection",_vehicle,_selectionLogo); | ||
}; | ||
|
||
TRACE_1("replacing clan logo with empty texture",_vehicle); | ||
_vehicle setObjectTextureGlobal [_selectionClan, "#(argb,1,1,1)color(0,0,0,0)"] // return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "\z\ace\addons\novehicleclanlogo\script_component.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
private _category = [ELSTRING(common,ACEKeybindCategoryVehicles), LSTRING(DisplayName)],; | ||
|
||
[ | ||
QGVAR(enabled), "CHECKBOX", | ||
[LELSTRING(common,Enabled), LSTRING(Enabled_Tooltip)], | ||
_category, | ||
false, | ||
true, | ||
{}, | ||
true | ||
] call CBA_fnc_addSetting; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#define COMPONENT novehicleclanlogo | ||
#define COMPONENT_BEAUTIFIED No Vehicle Clan Logo | ||
#include "\z\ace\addons\main\script_mod.hpp" | ||
|
||
// #define DEBUG_MODE_FULL | ||
// #define DISABLE_COMPILE_CACHE | ||
|
||
#ifdef DEBUG_ENABLED_NOVEHICLECLANLOGO | ||
#define DEBUG_MODE_FULL | ||
#endif | ||
|
||
#ifdef DEBUG_ENABLED_NOVEHICLECLANLOGO | ||
#define DEBUG_SETTINGS DEBUG_ENABLED_NOVEHICLECLANLOGO | ||
#endif | ||
|
||
#include "\z\ace\addons\main\script_macros.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project name="ACE"> | ||
<Package name="Novehicleclanlogo"> | ||
<Key ID="STR_ACE_Novehicleclanlogo_DisplayName"> | ||
<English>Remove clan logo from vehicles</English> | ||
<Polish>Usuń logo klanu z pojazdów</Polish> | ||
</Key> | ||
<Key ID="STR_ACE_Novehicleclanlogo_Enabled_Tooltip"> | ||
<English>Prevents clan logo from being displayed on vehicles controlled by players.</English> | ||
<Polish>Zapobiega wyświetlaniu logo klanu na pojazdach kontrolowanych przez graczy.</Polish> | ||
</Key> | ||
</Package> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
layout: wiki | ||
title: No vehicle clan logo | ||
component: novehicleclanlogo | ||
description: Removes clan logo from vehicles. | ||
group: feature | ||
category: realism | ||
parent: wiki | ||
mod: ace | ||
version: | ||
major: 3 | ||
minor: 15 | ||
patch: 1 | ||
--- | ||
|
||
## 1. Overview | ||
|
||
Prevents clan logo from vehicles controlled by players. Can be toggled in ACE Vehicles settings category. |