Skip to content

Commit

Permalink
Add Chiappa Component (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-MF authored Apr 23, 2021
1 parent 55776b9 commit ba0db8f
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 0 deletions.
11 changes: 11 additions & 0 deletions addons/ammunition/CfgAmmo.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class CfgAmmo {
class BulletBase;
class B_9x21_Ball_Tracer_Green;
class B_45ACP_Ball;
class B_545x39_Ball_F;
class B_580x42_Ball_F;
class B_556x45_Ball;
Expand Down Expand Up @@ -58,6 +59,16 @@ class CfgAmmo {
submunitionConeAngle = 0.81;
};

// .357 Ammo
class CLASS(357_Magnum): B_45ACP_Ball {
hit = 8;
};

// .44 Magnum Ammo
class CLASS(44_Magnum): CLASS(357_Magnum) {
hit = 11;
};

// 5.45x39 Ammo
class CLASS(545x39_BP): B_545x39_Ball_F {
hit = 9;
Expand Down
14 changes: 14 additions & 0 deletions addons/ammunition/CfgMagazineWells.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
class CfgMagazineWells {
// 357 Magnum Chiappa
class CLASS(Cylinder_357) {
ADDON[] = {
QCLASS(6Rnd_357)
};
};

// 44 Magnum Chiappa
class CLASS(Cylinder_44) {
ADDON[] = {
QCLASS(6Rnd_44)
};
};

class CLASS(9x19_MP5) { // Prevents regular BI Magazines fitting the CUP MP5s as no model shows.
ADDON[] = {
"CUP_30Rnd_9x19_MP5",
Expand Down
1 change: 1 addition & 0 deletions addons/chiappa/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\tacgt\addons\chiappa
20 changes: 20 additions & 0 deletions addons/chiappa/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class CfgMagazines {
class 6Rnd_45ACP_Cylinder;
class CLASS(6Rnd_357): 6Rnd_45ACP_Cylinder {
author = ECSTRING(main,Author);
scope = 2;
scopeArsenal = 2;
ammo = QCLASS(357_Magnum);
displayName = CSTRING(6Rnd_357_Name);
descriptionShort = CSTRING(6Rnd_357_Description);
};

class CLASS(6Rnd_44): 6Rnd_45ACP_Cylinder {
author = ECSTRING(main,Author);
scope = 2;
scopeArsenal = 2;
ammo = QCLASS(44_Magnum);
displayName = CSTRING(6Rnd_44_Name);
descriptionShort = CSTRING(6Rnd_44_Description);
};
};
34 changes: 34 additions & 0 deletions addons/chiappa/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class CfgWeapons {
class Pistol_Base_F;
class hgun_Pistol_heavy_02_F: Pistol_Base_F {
class Single: Mode_SemiAuto {
reloadTime = 0;
};
};

class CLASS(Rhino_357): hgun_Pistol_heavy_02_F {
author = ECSTRING(main,Author);
baseWeapon = QCLASS(Rhino_357);
magazines[] = {QCLASS(6Rnd_357)};
magazineWell[] = {QCLASS(Cylinder_357)};
displayName = CSTRING(Rhino_357_Name);
hiddenSelections[] = {"camo", "camo1"};
hiddenSelectionsTextures[] = {
QPATHTOF(data\357_magnum_co.paa),
"\A3\Weapons_F_EPA\Pistols\Pistol_Heavy_02\data\Pistol_Heavy_02_mag_co"
};
};

class CLASS(Rhino_44): hgun_Pistol_heavy_02_F {
author = ECSTRING(main,Author);
baseWeapon = QCLASS(Rhino_44);
magazines[] = {QCLASS(6Rnd_44)};
magazineWell[] = {QCLASS(Cylinder_44)};
displayName = CSTRING(Rhino_44_Name);
hiddenSelections[] = {"camo", "camo1"};
hiddenSelectionsTextures[] = {
QPATHTOF(data\44_magnum_co.paa),
"\A3\Weapons_F_EPA\Pistols\Pistol_Heavy_02\data\Pistol_Heavy_02_mag_co"
};
};
};
27 changes: 27 additions & 0 deletions addons/chiappa/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {
QCLASS(Rhino_357),
QCLASS(Rhino_44)
};
magazines[] = {
QCLASS(6Rnd_357),
QCLASS(6Rnd_44)
};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"tacgt_main", "tacgt_ammunition"};
author = ECSTRING(main,Authors);
authors[] = {"Tyrone"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

class Mode_SemiAuto;

#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
Binary file added addons/chiappa/data/357_magnum_co.paa
Binary file not shown.
Binary file added addons/chiappa/data/44_magnum_co.paa
Binary file not shown.
4 changes: 4 additions & 0 deletions addons/chiappa/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define COMPONENT chiappa
#define COMPONENT_BEAUTIFIED Chiappa
#include "\x\tacgt\addons\main\script_mod.hpp"
#include "\x\tacgt\addons\main\script_macros.hpp"
23 changes: 23 additions & 0 deletions addons/chiappa/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="TACGT">
<Package name="Chiappa">
<Key ID="STR_TACGT_Chiappa_Rhino_357_Name">
<English>Chiappa Rhino 60DS (.357)</English>
</Key>
<Key ID="STR_TACGT_Chiappa_Rhino_44_Name">
<English>Chiappa Rhino 60DS (.44)</English>
</Key>
<Key ID="STR_TACGT_Chiappa_6Rnd_357_Name">
<English>6Rnd .357 Cylinder</English>
</Key>
<Key ID="STR_TACGT_Chiappa_6Rnd_357_Description">
<English>Caliber: .357 Magnum</English>
</Key>
<Key ID="STR_TACGT_Chiappa_6Rnd_44_Name">
<English>6Rnd .44 Cylinder</English>
</Key>
<Key ID="STR_TACGT_Chiappa_6Rnd_44_Description">
<English>Caliber: .44 Magnum</English>
</Key>
</Package>
</Project>

0 comments on commit ba0db8f

Please sign in to comment.