mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-25 19:26:08 +03:00
Organize files a bit and removed non source pbo's
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,50 @@
|
||||
/****************************************************************************
|
||||
Copyright (C) 2010 Team ~R3F~
|
||||
This program is free software under the terms of the GNU General Public License version 3.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@authors team-r3f.org
|
||||
@version 1.00
|
||||
@date 20101006
|
||||
*****************************************************************************/
|
||||
|
||||
#include "R3F_WEIGHT_Configuration.cfg"
|
||||
|
||||
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
|
||||
|
||||
private ["_n","_gearbox_visible","_control","_display","_initial_text"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
|
||||
|
||||
_initial_text = "";
|
||||
_n = 0;
|
||||
while {true} do
|
||||
{
|
||||
sleep R3F_WEIGHT_SHORT_DELAY;
|
||||
|
||||
#ifdef R3F_WEIGHT_SHOW_WEIGHT
|
||||
_display = findDisplay ARMA2_RSCDISPLAYGEARBOX;
|
||||
_gearbox_visible = ( (str _display) != "No display");
|
||||
#else
|
||||
_gearbox_visible = false;
|
||||
#endif
|
||||
|
||||
if(_gearbox_visible) then {
|
||||
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
|
||||
if(_initial_text == "") then {
|
||||
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
|
||||
_initial_text = ctrlText _control ;
|
||||
};
|
||||
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
|
||||
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight];
|
||||
_n = 0;
|
||||
}else{
|
||||
if( _n > R3F_WEIGHT_LONG_DELAY) then {
|
||||
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
|
||||
_n = 0;
|
||||
};
|
||||
_n = _n + 1 ;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
/****************************************************************************
|
||||
Copyright (C) 2010 Team ~R3F~
|
||||
This program is free software under the terms of the GNU General Public License version 3.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@authors team-r3f.org
|
||||
@version 1.00
|
||||
@date 20101006
|
||||
*****************************************************************************/
|
||||
|
||||
#define ARMA2_RSCDISPLAYGEARBOX 106
|
||||
#define ARMA2_CAPTIONGEARBOX 1001
|
||||
|
||||
|
||||
#define R3F_WEIGHT_SHORT_DELAY 1
|
||||
#define R3F_WEIGHT_LONG_DELAY 10
|
||||
#define R3F_WEIGHT_MAIN_INCREMENT 1
|
||||
|
||||
#define R3F_WEIGHT_SHOW_WEIGHT
|
||||
|
||||
//show or not classes not found in arma.rpt
|
||||
//#define R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
@@ -0,0 +1,12 @@
|
||||
/****************************************************************************
|
||||
Copyright (C) 2010 Team ~R3F~
|
||||
This program is free software under the terms of the GNU General Public License version 3.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@authors team-r3f.org
|
||||
@version 1.00
|
||||
@date 20101006
|
||||
*****************************************************************************/
|
||||
R3F_VERSION_WEIGHTED, "1.04", "1.04"
|
||||
STR_R3F_WEIGHT_InGearBox, "%1 | Weight carried : %2 lb", "%1 | Poids transporté : %2 Kg"
|
||||
STR_R3F_WEIGHT_English, "lb", "Kg"
|
||||
|
@@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
Copyright (C) 2010 Team ~R3F~
|
||||
This program is free software under the terms of the GNU General Public License version 3.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@authors team-r3f.org
|
||||
@version 1.02
|
||||
@date 20101018
|
||||
*****************************************************************************/
|
||||
#include "R3F_WEIGHT_Configuration.cfg"
|
||||
R3F_WEIGHT_FNCT_MakeSingleArray = {
|
||||
private ["_arr_i","_arr_n", "_arr", "_n", "_nb", "_x"];
|
||||
_arr_i = (_this select 0) select 0;
|
||||
_arr_n = (_this select 0) select 1;
|
||||
|
||||
_arr = [];
|
||||
|
||||
_n = 0;
|
||||
{
|
||||
_nb = _arr_n select _n;
|
||||
for [{_i = 0}, {_i < _nb}, {_i = _i + 1}] do{
|
||||
_arr = _arr + [_x];
|
||||
};
|
||||
_n = _n + 1;
|
||||
|
||||
}foreach _arr_i;
|
||||
|
||||
_arr;
|
||||
};
|
||||
|
||||
R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
private ["_arr_class", "_total_weight", "_weight"];
|
||||
_arr_class = (_this select 0) + (_this select 1);
|
||||
_total_weight = 0;
|
||||
_weight = 0;
|
||||
CfgWeight = missionConfigFile >> "CfgWeight";
|
||||
{
|
||||
if(isclass(CfgWeight >> "Weapons" >> _x)) then {
|
||||
_weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
if(isclass(CfgWeight >> "Magazines" >> _x)) then {
|
||||
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
|
||||
_total_weight = _total_weight + _weight;
|
||||
}else{
|
||||
#ifdef R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
diag_log format["Class not found %1", _x];
|
||||
#endif
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
_total_weight;
|
||||
};
|
||||
|
||||
R3F_WEIGHT_FNCT_GetWeight = {
|
||||
private ["_bagpack","_bagpack_weapons", "_bagpack_ammo", "_return","_english"];
|
||||
_return = 0;
|
||||
_bagpack = unitBackpack player;
|
||||
if(!isnull(_bagpack)) then {
|
||||
_bagpack_weapons = [getWeaponCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
|
||||
_bagpack_ammo = [getMagazineCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
|
||||
_return = [_bagpack_weapons, _bagpack_ammo] call R3F_WEIGHT_FNCT_GetItemWeight;
|
||||
};
|
||||
_return = _return + ([(weapons player), (magazines player)] call R3F_WEIGHT_FNCT_GetItemWeight);
|
||||
_english = localize "STR_R3F_WEIGHT_English" == "lb";
|
||||
if(_english) then {
|
||||
_return = _return / 0.45359 ;
|
||||
_return = round (_return * 100)/100;
|
||||
};
|
||||
_return;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/****************************************************************************
|
||||
Copyright (C) 2010 Team ~R3F~
|
||||
This program is free software under the terms of the GNU General Public License version 3.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@authors team-r3f.org
|
||||
@version 1.02
|
||||
@date 20101018
|
||||
*****************************************************************************/
|
||||
|
||||
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
|
||||
|
||||
_void = [] execVM "R3F_Realism\R3F_Weight\R3F_DoWeight.sqf";
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#define ARMA2_RSCDISPLAYGEARBOX 106
|
||||
#define ARMA2_CAPTIONGEARBOX 1001
|
||||
|
||||
|
||||
#define R3F_WEIGHT_SHORT_DELAY 1
|
||||
#define R3F_WEIGHT_LONG_DELAY 10
|
||||
#define R3F_WEIGHT_MAIN_INCREMENT 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user