R3f realism updated to check for weight in cfgmags

This commit is contained in:
[VB]AWOL
2013-08-27 15:05:46 -05:00
parent a270393def
commit 9ab49ff884
19 changed files with 274 additions and 54 deletions

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -1611,6 +1611,10 @@ class CfgWeight
{ {
weight = 0.002; weight = 0.002;
}; };
class ItemSodaCokeEmpty
{
weight = 0.002;
};
class ItemSodaPepsiEmpty class ItemSodaPepsiEmpty
{ {
weight = 0.002; weight = 0.002;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;

View File

@@ -43,9 +43,21 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight; _total_weight = _total_weight + _weight;
}else{ }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]; diag_log format["Class not found %1", _x];
#endif // #endif
};
}; };
}; };
}foreach _arr_class; }foreach _arr_class;