mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add launcher handling to advanced trading
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
[CHANGED] With R3Fweight on overburdened players are now forced to move slowly instead of being knocked out. The scream was also removed. #1145 @icomrade @ebaydayz
|
||||
[CHANGED] Abort and respawn are now disabled immediately in the pause menu onLoad to compensate for low fps delay. @ebaydayz
|
||||
[CHANGED] Player_onPause is now customizable by admins along with the new unscheduled fn_pauseMenuChecks. #1340 @Rimblock @ebaydayz
|
||||
[CHANGED] Satchel charges and mines now take one inventory slot instead of two. @ebaydayz
|
||||
[CHANGED] Satchel charges, mines and launcher rounds now take one inventory slot instead of multiple. @ebaydayz
|
||||
|
||||
[FIXED] Zombies now target and attack players correctly with 1.8.8 code
|
||||
[FIXED] Server position sync bug after falling unconscious. Fixes AI on server not seeing the player after knock out and position revert after relog. #1522 @ebaydayz
|
||||
|
||||
@@ -4,7 +4,7 @@ class CfgMagazines
|
||||
class CA_Magazine;
|
||||
class HandGrenade;
|
||||
class TimeBomb;
|
||||
|
||||
class CA_LauncherMagazine;
|
||||
|
||||
|
||||
//Weapon magazines
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
// Use single slot for everything, let R3F weight handle load
|
||||
|
||||
class M136 : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class Javelin : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class AT13 : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class PG7V : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class PG7VL : PG7V {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class PG7VR : PG7V {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class OG7 : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class PG9_AT : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class OG9_HE : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class Stinger : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class SMAW_HEDP : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class SMAW_HEAA : SMAW_HEDP {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class MAAWS_HEDP : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class MAAWS_HEAT : MAAWS_HEDP {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class Strela : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class RPG18 : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class Igla : Strela {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class 2Rnd_Igla : Igla {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class NLAW : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
|
||||
class Dragon_EP1 : CA_LauncherMagazine {
|
||||
type = WeaponSlotItem;
|
||||
};
|
||||
@@ -17,5 +17,6 @@
|
||||
#include "Misc.hpp" //CZ550, Lee-Enfield, Winchester 1866
|
||||
#include "Shotgun.hpp"
|
||||
#include "Arrows.hpp"
|
||||
#include "LauncherAmmo.hpp"
|
||||
|
||||
#undef COMBINE_MAG
|
||||
@@ -50,10 +50,12 @@ if (_selection == 2) then { //gear
|
||||
_allowedBinocular = 2;
|
||||
_duplicate = false;
|
||||
{
|
||||
_type = getNumber (configFile >> "CfgWeapons" >> _x >> "type");
|
||||
if (_type == 2) then { _allowedSidearm = 0; }; // WeaponSlotHandGun (occupies pistol slot)
|
||||
if (_type == 4096) then { _allowedBinocular = _allowedBinocular - 1; }; // WeaponSlotBinocular
|
||||
if (_type == 131072) then { _allowedTools = _allowedTools - 1; }; // WeaponSlotInventory (toolbelt slot)
|
||||
switch getNumber (configFile >> "CfgWeapons" >> _x >> "type") do {
|
||||
case 2: {_allowedSidearm = 0;}; //Pistol
|
||||
case 4: {_allowedBackpacks = 0;}; //Launcher
|
||||
case 4096: {_allowedBinocular = _allowedBinocular - 1;}; //Binocular slot
|
||||
case 131072: {_allowedTools = _allowedTools - 1;}; //Toolbelt slot
|
||||
};
|
||||
if (_x in _toolClasses) exitWith {_duplicate = true;}; // Forbid purchasing duplicate tools into gear
|
||||
} count (weapons player);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ if (Z_SingleCurrency) then {
|
||||
if ('PistolCore' in _parentClasses) then {
|
||||
_sidearmToBuy = _sidearmToBuy + (_x select 9);
|
||||
} else {
|
||||
_primaryToBuy = _primaryToBuy + (_x select 9);
|
||||
_primaryToBuy = _primaryToBuy + (_x select 9); //Include launchers in this count since they also take up 10 slots in backpack
|
||||
};
|
||||
};
|
||||
_priceToBuy = _priceToBuy + ((_x select 11)*(_x select 2)*(_x select 9));
|
||||
|
||||
@@ -14,11 +14,14 @@ if (_selection == 2) then { //gear
|
||||
_p = primaryWeapon player;
|
||||
_allowedPrimary = if (_p != "") then {0} else {1};
|
||||
if (DZE_TwoPrimaries == 2 && dayz_onBack == "") then { _allowedPrimary = _allowedPrimary + 1; };
|
||||
|
||||
|
||||
_backpack = unitBackpack player;
|
||||
_allowedBackpacks = if (isNull _backpack) then {1} else {0};
|
||||
_allowedSidearm = 1;
|
||||
{
|
||||
if (getNumber (configFile >> "CfgWeapons" >> _x >> "type") == 2) exitWith { // 2 = WeaponSlotHandGun (occupies pistol slot)
|
||||
_allowedSidearm = 0;
|
||||
switch getNumber (configFile >> "CfgWeapons" >> _x >> "type") do {
|
||||
case 2: {_allowedSidearm = 0;}; //Pistol
|
||||
case 4: {_allowedBackpacks = 0;}; //Launcher
|
||||
};
|
||||
} count (weapons player);
|
||||
|
||||
@@ -34,9 +37,6 @@ if (_selection == 2) then { //gear
|
||||
, _pic
|
||||
];
|
||||
|
||||
_backpack = unitBackpack player;
|
||||
_allowedBackpacks = if (isNull _backpack) then {1} else {0};
|
||||
|
||||
_returnArray = [_allowedMags, _allowedWeapons, _allowedBackpacks];
|
||||
};
|
||||
|
||||
|
||||
@@ -20,10 +20,18 @@ class PG7VR
|
||||
{
|
||||
weight = 4.5;
|
||||
};
|
||||
class PG9_AT
|
||||
{
|
||||
weight = 4.5;
|
||||
};
|
||||
class OG7
|
||||
{
|
||||
weight = 2;
|
||||
};
|
||||
class OG9_HE
|
||||
{
|
||||
weight = 2;
|
||||
};
|
||||
class RPG18
|
||||
{
|
||||
weight = 1.2;
|
||||
@@ -36,6 +44,10 @@ class Igla
|
||||
{
|
||||
weight = 11;
|
||||
};
|
||||
class 2Rnd_Igla
|
||||
{
|
||||
weight = 22;
|
||||
};
|
||||
class Strela
|
||||
{
|
||||
weight = 10;
|
||||
@@ -60,11 +72,15 @@ class SMAW_HEDP
|
||||
{
|
||||
weight = 6;
|
||||
};
|
||||
class MAAWS_HEAA
|
||||
class MAAWS_HEDP
|
||||
{
|
||||
weight = 6;
|
||||
};
|
||||
class MAAWS_HEDP
|
||||
class MAAWS_HEAT
|
||||
{
|
||||
weight = 6;
|
||||
};
|
||||
class NLAW
|
||||
{
|
||||
weight = 6;
|
||||
};
|
||||
|
||||
@@ -24,6 +24,10 @@ class MAAWS
|
||||
{
|
||||
weight = 7.5;
|
||||
};
|
||||
class BAF_NLAW_Launcher
|
||||
{
|
||||
weight = 7.5;
|
||||
};
|
||||
class M47Launcher_EP1
|
||||
{
|
||||
weight = 7;
|
||||
@@ -52,6 +56,10 @@ class MetisLauncher
|
||||
{
|
||||
weight = 16;
|
||||
};
|
||||
class Javelin
|
||||
{
|
||||
weight = 16;
|
||||
};
|
||||
class Igla
|
||||
{
|
||||
weight = 7;
|
||||
|
||||
@@ -15017,11 +15017,11 @@
|
||||
<Russian>У вас нет рюкзака.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_TRADE_HAVE_BACKPACK">
|
||||
<English>You already have a backpack.</English>
|
||||
<English>You already have a backpack or launcher.</English>
|
||||
<German>Du hast bereits einen Rucksack.</German>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_TRADE_ONE_BACKPACK">
|
||||
<English>You can only buy one backpack into your gear.</English>
|
||||
<English>You can only buy one backpack or launcher into your gear.</English>
|
||||
<German>Du hast nur einen Rucksack in deine Ausrüstung kaufen.</German>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_TRADE_OFFER">
|
||||
|
||||
Reference in New Issue
Block a user