Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added gunbag for DMRs #3749

Merged
merged 20 commits into from
Jun 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/gunbag/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\ace\addons\gunbag
12 changes: 12 additions & 0 deletions addons/gunbag/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

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) );
};
};
99 changes: 99 additions & 0 deletions addons/gunbag/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_Actions {
class ACE_MainActions {
class GVAR(WeapontoGunbag) {
displayName = CSTRING(toGunbag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 0);
statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag));
showDisabled = 0;
priority = 1;
icon = PATHTOF(ui\gunbag_icon_ca.paa);
};
class GVAR(WeaponoffGunbag) {
displayName = CSTRING(offGunbag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 1);
statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag));
showDisabled = 0;
priority = 1;
icon = PATHTOF(ui\gunbag_icon_ca.paa);
};
class GVAR(StatusGunbag) {
displayName = CSTRING(Status);
condition = QUOTE([_target] call FUNC(isGunbag));
statement = QUOTE([_target] call FUNC(status));
showDisabled = 0;
priority = 2;
icon = PATHTOF(ui\gunbag_icon_ca.paa);
};
};
};

class ACE_SelfActions {
class ACE_Equipment {
class GVAR(actions) {
displayName = CSTRING(displayname);
condition = QUOTE([_player] call FUNC(isGunbag));
showDisabled = 0;
priority = 0.1;
icon = PATHTOF(ui\gunbag_icon_ca.paa);

class GVAR(WeapontoGunbag) {
displayName = CSTRING(toGunbag);
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0);
statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag));
showDisabled = 0;
priority = 1;
icon = PATHTOF(ui\gunbag_icon_ca.paa);
};
class GVAR(WeaponoffGunbag) {
displayName = CSTRING(offGunbag);
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1);
statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag));
showDisabled = 0;
priority = 1;
icon = PATHTOF(ui\gunbag_icon_ca.paa);
};
class GVAR(StatusGunbag) {
displayName = CSTRING(Status);
condition = QUOTE([_player] call FUNC(isGunbag));
statement = QUOTE([_player] call FUNC(status));
showDisabled = 0;
priority = 2;
icon = PATHTOF(ui\gunbag_icon_ca.paa);
};
};
};
};
};

class Bag_Base;
class CLASSNAME: Bag_Base {
_generalMacro = QUOTE(CLASSNAME);
author = "Ir0n1E";
scope = 2;
displayName = CSTRING(Displayname);
model = PATHTOF(data\gunbag.p3d);
picture = PATHTOF(ui\gunbag_ca.paa);
icon = PATHTOF(ui\gunbag_icon_ca.paa);
hiddenSelections[] = {QUOTE(Camo),QUOTE(insignia)};
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_co.paa)};
maximumLoad = 80;
mass = 11;
};

class DOUBLES(CLASSNAME,Tan): CLASSNAME {
displayName = CSTRING(Displayname_Tan);
picture = PATHTOF(ui\gunbag_tan_ca.paa);
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_tan_co.paa)};
};

class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportBackpacks {
MACRO_ADDBACKPACK(CLASSNAME,3);
MACRO_ADDBACKPACK(DOUBLES(CLASSNAME,Tan),3);
};
};
};
41 changes: 41 additions & 0 deletions addons/gunbag/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
class CfgWeapons {
class Rifle_Long_Base_F;

/* Long Rifles */

class GM6_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class LRR_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class DMR_06_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class DMR_05_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class DMR_04_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class DMR_03_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class DMR_02_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class DMR_01_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};

class EBR_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
};
10 changes: 10 additions & 0 deletions addons/gunbag/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ace_gunbag
===============

Adds a gunbag for DMRs.


## Maintainers

The people responsible for merging changes to this component or answering potential questions.

Binary file added addons/gunbag/Source/gunbag_ca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added addons/gunbag/Source/gunbag_co.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added addons/gunbag/Source/gunbag_nohq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added addons/gunbag/Source/gunbag_tan_ca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added addons/gunbag/Source/gunbag_tan_co.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions addons/gunbag/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PREP(toGunbag);
PREP(offGunbag);
PREP(status);
PREP(canInteract);
PREP(calculateMass);
PREP(isGunbag);
7 changes: 7 additions & 0 deletions addons/gunbag/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "script_component.hpp"

ADDON = false;

#include "XEH_PREP.hpp"

ADDON = true;
3 changes: 3 additions & 0 deletions addons/gunbag/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "script_component.hpp"

#include "XEH_PREP.hpp"
16 changes: 16 additions & 0 deletions addons/gunbag/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
units[] = {CLASSNAME, DOUBLES(CLASSNAME,Tan), ACE_Box_Misc};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction", "ace_movement"};
author[] = {"Ir0n1E"};
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
Binary file added addons/gunbag/data/gunbag.p3d
Binary file not shown.
89 changes: 89 additions & 0 deletions addons/gunbag/data/gunbag.rvmat
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
class StageTI
{
texture="a3\characters_f_beta\indep\data\officer_ti_ca.paa";
};
ambient[]={0.69999999,0.69999999,0.69999999,1};
diffuse[]={0.69999999,0.69999999,0.69999999,1};
forcedDiffuse[]={0.30000001,0.30000001,0.30000001,0};
emmisive[]={0,0,0,1};
specular[]={0.2,0.2,0.2,1};
specularPower=100;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\gunbag\data\gunbag_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage2
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage4
{
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage5
{
texture="z\ACE\addons\gunbag\data\gunbag_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage6
{
texture="#(ai,64,64,1)fresnel(1,0.3)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_co.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
Binary file added addons/gunbag/data/gunbag_co.paa
Binary file not shown.
Binary file added addons/gunbag/data/gunbag_nohq.paa
Binary file not shown.
Binary file added addons/gunbag/data/gunbag_smdi.paa
Binary file not shown.
Binary file added addons/gunbag/data/gunbag_tan_co.paa
Binary file not shown.
Loading