mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 09:32:02 +03:00
R3f realism updated to check for weight in cfgmags
This commit is contained in:
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -1611,6 +1611,10 @@ class CfgWeight
|
||||
{
|
||||
weight = 0.002;
|
||||
};
|
||||
class ItemSodaCokeEmpty
|
||||
{
|
||||
weight = 0.002;
|
||||
};
|
||||
class ItemSodaPepsiEmpty
|
||||
{
|
||||
weight = 0.002;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
|
||||
_weight = 0;
|
||||
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
|
||||
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
|
||||
};
|
||||
|
||||
if(_weight > 0) then {
|
||||
_total_weight = _total_weight + _weight;
|
||||
} else {
|
||||
// log only if not found
|
||||
// #ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
// #endif
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
|
||||
Reference in New Issue
Block a user