added R3F and IgiLoad

This commit is contained in:
Zepheris 2018-03-03 11:34:07 -07:00
parent 74d5668d41
commit 0aa3abb8e3
114 changed files with 14053 additions and 3140 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
waituntil {!isnil "bis_fnc_init"};
//if (isDedicated) exitwith {};
//if (isServer) exitwith {};
//waitUntil { !(isNull player) };
waitUntil { time > 0 };
IL_EV_Count = 0;
IL_Veh_Array = [];
//cutText ["IgiLoad is loading. Please wait...","PLAIN",2];
sleep (random 30);
//cutText [Format ["IgiLoad init Player: %1", Player],"PLAIN",2];
_null = [Player] execVM "IgiLoad\IgiLoad.sqf";
waitUntil {scriptDone _null};
sleep (random (IL_Check_Veh_Max - IL_Check_Veh_Min));
{
if ((typeOf _x) in (IL_Supported_Vehicles_All)) then
{
IL_Veh_Array = IL_Veh_Array + [_x];
_null = [_x] execVM "IgiLoad\IgiLoad.sqf";
waitUntil {scriptDone _null};
};
} forEach (vehicles);
call compileFinal preprocessFileLineNumbers "IgiLoad\IgiLoadTaru.sqf";
//cutText ["IgiLoad loaded. Have fun :)","PLAIN",2];
while {true} do
{
sleep (IL_Check_Veh_Min + (random (IL_Check_Veh_Max - IL_Check_Veh_Min)));
IL_LST_Count = nearestObjects[getPos player,IL_Supported_Init_All,75];
//Delete vehicles from "IL_Veh_Array" if not in "vehicles"
{
if !(_x in vehicles) then
{
IL_Veh_Array = IL_Veh_Array - [_x];
};
} forEach (IL_Veh_Array);
{
if (((typeOf _x) in (IL_Supported_Vehicles_All)) && !(_x in IL_Veh_Array)) then
{
IL_Veh_Array = IL_Veh_Array + [_x];
_null = [_x] execVM "IgiLoad\IgiLoad.sqf";
waitUntil {scriptDone _null};
};
} forEach IL_LST_Count;
};

View File

@ -0,0 +1,478 @@
/*
This script is based on Xeno Taru mod from NorX Aengell.
http://www.armaholic.com/page.php?id=27532
Original author: NorX Aengell
Rewrite and Epoch adaptation: Slayer
*/
IL_Taru_DevMod = false;
//above this altitude dropping with parachute
IL_Taru_Parachute_Altitude = 70;
//open parachute when altitude is less or equal this parameter
IL_Taru_Parachute_Open_Altitude = 60;
//IL_Taru_Parachute_Altitude must be greater then IL_Taru_Parachute_Open_Altitude
IL_Taru_Disable_Deattaching_Altitude = 3;
//Not posible to deattach when altitude is extrely low, because new position of pod will be under terrain level.
//Recomended values are between 3 and 10.
if (hasInterface && !isDedicated) then {
if (IL_Taru_DevMod) then {
diag_log "Igi Load Taru started";
};
IL_Taru_Init =
{
waituntil
{
sleep 2;
{
if (isnil {_x getVariable "IL_Taru_Action_Attach"}) then
{
_x setVariable ["IL_Taru_Action_Attach",true,false];
IL_Taru_Action_Attach = _x addAction ["<img image='IgiLoad\images\load.paa' /><t color=""#007f0e""> Attach the Pod</t>", "[""attach"",_this] call IL_Taru_Do_Action;", nil, 2, false, true, "",
"[_this] call IL_Verify_Heli and {[vehicle _this] call IL_Verify_Pod} and {!([vehicle _this] call IL_Verify_Attached_Object)}"];
};
if (isnil {_x getVariable "IL_Taru_Action_Deattach"}) then
{
_x setVariable ["IL_Taru_Action_Deattach",true,false];
IL_Taru_Action_Deattach = _x addAction ["<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000""> Detach the Pod</t>", "[""deattach"",_this] call IL_Taru_Do_Action;", nil, 2, false, true, "",
"[_this] call IL_Verify_Heli and [_this] call IL_Verify_Altitude and {[vehicle _this] call IL_Verify_Attached_Object}"];
};
if (isnil {_x getVariable "IL_Taru_Action_Drop"}) then
{
_x setVariable ["IL_Taru_Action_Drop",true,false];
IL_Taru_Action_Drop = _x addAction ["<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff""> Drop the Pod</t>", "[""drop"",_this] call IL_Taru_Do_Action;", nil, 2, false, true, "",
"[_this] call IL_Verify_Heli and {[vehicle _this] call IL_Verify_Attached_Object}"];
};
} foreach units group player;
};
};
IL_Verify_Attached_Object =
{
if (IL_Taru_DevMod) then {
diag_log "IL_Verify_Attached_Object called";
};
_helico = (_this select 0);
_object_Verifier = false;
if (count (attachedObjects _helico) isEqualTo 0) exitwith {_object_Verifier};
{
if (_x isKindOf "Pod_Heli_Transport_04_base_F") exitwith {_object_Verifier = true;};
} foreach attachedObjects _helico;
if (IL_Taru_DevMod) then {
diag_log format["IL_Verify_Attached_Object returns %1",_object_Verifier];
};
_object_Verifier
};
IL_Verify_Pod =
{
if (IL_Taru_DevMod) then {
diag_log "IL_Verify_Pod called";
};
_pod = getSlingLoad (_this select 0);
_pod_Verifier = false;
if (isnull (getSlingLoad vehicle player)) exitwith {_pod_Verifier};
if (_pod isKindOf "Pod_Heli_Transport_04_base_F") then {_pod_Verifier = true;};
if (IL_Taru_DevMod) then {
diag_log format["IL_Verify_Pod returns %1",_pod_Verifier];
};
_pod_Verifier
};
IL_Verify_Heli =
{
if (IL_Taru_DevMod) then {
diag_log "IL_Verify_Heli called";
};
_helico = vehicle (_this select 0);
_helico_Verifier = false;
if (_helico isKindOf "Heli_Transport_04_base_F") then {_helico_Verifier = true;};
if (IL_Taru_DevMod) then {
diag_log format["IL_Verify_Heli returns %1",_helico_Verifier];
};
_helico_Verifier
};
IL_Verify_Altitude = {
if (IL_Taru_DevMod) then {
diag_log "IL_Verify_Altitude called";
};
_helico = vehicle (_this select 0);
_allow_deattach = false;
if ((getPosATL _helico) select 2 > IL_Taru_Disable_Deattaching_Altitude) then {_allow_deattach = true;};
if (IL_Taru_DevMod) then {
diag_log format["IL_Verify_Altitude returns %1",_allow_deattach];
};
_allow_deattach
};
IL_Taru_Do_Action =
{
_action = _this select 0;
_helico = "";
if (typename (_this select 1) isEqualTo "OBJECT") then {_helico = vehicle (_this select 1);};
if (typename (_this select 1) isEqualTo "ARRAY") then {_helico = vehicle ((_this select 1) select 0);};
_cables = ropes _helico;
if (ropeUnwound (_cables select 0)) then
{
[_action, _helico] call IL_Pod_Manager;
};
};
IL_Taru_Transmission =
{
private ["_soundToPlay", "_helico", "_soundToPlay","_args","_pod"];
_args = _this select 1;
_helico = vehicle (_args select 1);
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
switch (_args select 0) do {
case 'rope_unwind': {
_pod = _args select 2;
_helico disableCollisionWith _pod;
{ropeUnwind [_x, _args select 3, _args select 4];} foreach ropes _helico;
sleep 4;
_helico enableCollisionWith _pod;
};
case 'rope_unwind_and_wait': {
_pod = _args select 2;
_helico disableCollisionWith _pod;
{ropeUnwind [_x, _args select 3, _args select 4];} foreach ropes _helico;
waituntil {ropeLength ((ropes _helico) select 0) isEqualTo 1};
sleep 4;
_helico enableCollisionWith _pod;
};
case 'chat_attach': {
if (!(player in crew _helico)) exitWith{};
["Success",["Pod successfully attached!"]] call ExileClient_gui_notification_event_addNotification;
};
case 'chat_deattach': {
if (!(player in crew _helico)) exitWith{};
["Success",["Pod successfully dettached!"]] call ExileClient_gui_notification_event_addNotification;
};
case 'chat_drop_with_parachute': {
if (!(player in crew _helico)) exitWith{};
["Success",["Pod Paradropt!"]] call ExileClient_gui_notification_event_addNotification;
};
case 'chat_drop_without_parachute': {
if (!(player in crew _helico)) exitWith{};
["Success",["Pod drop without Parachut!"]] call ExileClient_gui_notification_event_addNotification;
};
case 'sound_attach': {
if (!(player in crew _helico)) exitWith{};
_soundToPlay = _soundPath + "IgiLoad\sounds\attach.wss";
playSound3D [_soundToPlay, _helico, false, getPosATL _helico, 10, 1, 0];
};
case 'sound_deattach': {
if (!(player in crew _helico)) exitWith{};
_soundToPlay = _soundPath + "IgiLoad\sounds\deattach.wss";
playSound3D [_soundToPlay, _helico, false, getPosATL _helico, 10, 1, 0];
};
case 'sound_drop': {
if (!(player in crew _helico)) exitWith{};
_soundToPlay = _soundPath + "IgiLoad\sounds\drop.wss";
playSound3D [_soundToPlay, _helico, false, getPosATL _helico, 10, 1, 0];
};
};
};
waitUntil {!isNull player};
[] spawn IL_Taru_Init;
IL_Taru_EH_Respawn = player addEventHandler ["Respawn", "[] spawn IL_Taru_Init;"];
};
IL_Pod_Manager = {
IL_CLient_Pod_Manager = _this;
if (isDedicated || isServer) then
{
IL_CLient_Pod_Manager spawn IL_Server_Pod_Manager;
}
else
{
publicVariableServer "IL_CLient_Pod_Manager";
};
};
"IL_Client_Pod_Manager" addPublicVariableEventHandler IL_Pod_Manager;
IL_Client_Control = {
private ["_nearBy","_heli","_heli_pos"];
IL_Server_Client_Control = _this;
if (hasInterface && !isDedicated) then
{
IL_Server_Client_Control spawn IL_Taru_Transmission; Exile_
}
else
{
_heli = IL_Server_Client_Control select 1;
_nearBy = (getPosATL _heli) nearEntities [["Exile_Unit_Player","LandVehicle","Ship","Air"], 300];
{
if (isPlayer _x) then {
(owner _x) publicVariableClient "IL_Server_Client_Control";
};
} forEach _nearBy;
};
};
"IL_Server_Client_Control" addPublicVariableEventHandler IL_Client_Control;
if (isDedicated || isServer) then {
if (IL_Taru_DevMod) then {
diag_log "Igi Load Taru started";
};
IL_Server_Pod_Manager = {
private ["_args"];
_args = _this select 1;
switch (_args select 0) do {
case "attach": {
[_args select 1] spawn IL_Taru_Attach_Pod;
};
case "deattach": {
[_args select 1] spawn IL_Taru_Deattach_Pod;
};
case "drop": {
[_args select 1] spawn IL_Taru_Drop_Pod;
};
};
};
IL_Taru_Attach_Pod =
{
_helico = _this select 0;
_pod = getSlingLoad _helico;
_mass_of_pod = getmass getSlingLoad _helico;
_mass_of_heli = getmass _helico;
if (!isTouchingGround _helico) then
{
["sound_attach", _helico] call IL_Client_Control;
["rope_unwind_and_wait", _helico, _pod, 1.9, 1, 1] call IL_Client_Control;
sleep 1;
{ropeUnwind [_x, 1.9, 1];} foreach ropes _helico;
waituntil {ropeLength (ropes _helico select 0) isEqualTo 1};
};
_helico disableCollisionWith _pod;
[] call {
_pod_type = typeOf _pod;
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_bench_F") exitwith
{
_pod attachTo [_helico,[0,0.1,-1.13]];
_helico setCustomWeightRTD 680;
_helico setmass _mass_of_pod + _mass_of_heli;
};
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_covered_F") exitwith
{
_pod attachTo [_helico,[-0.1,-1.05,-0.82]];
_helico setCustomWeightRTD 1413;
_helico setmass _mass_of_pod + _mass_of_heli;
};
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_fuel_F") exitwith
{
_pod attachTo [_helico,[0,-0.282,-1.25]];
_helico setCustomWeightRTD 13311;
_helico setmass _mass_of_pod + _mass_of_heli;
};
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_medevac_F") exitwith
{
_pod attachTo [_helico,[-0.14,-1.05,-0.92]];
_helico setCustomWeightRTD 1321;
_helico setmass _mass_of_pod + _mass_of_heli;
};
if (_pod_type in ["Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_box_F","Land_Pod_Heli_Transport_04_ammo_F"]) exitwith
{
_pod attachTo [_helico,[-0.09,-1.05,-1.1]];
_helico setCustomWeightRTD 1270;
_helico setmass _mass_of_pod + _mass_of_heli;
};
};
["rope_unwind", _helico, _pod, 250, 1] call IL_Client_Control;
sleep 1;
{ropeUnwind [_x, 250, 1];} foreach ropes _helico;
_helico enableCollisionWith _pod;
["sound_attach", _helico] call IL_Client_Control;
["chat_attach", _helico] call IL_Client_Control;
if (isnil {_helico getVariable "EH_GetOut_Taru"}) then
{
_helico addEventHandler ["Getin", "[_this] spawn IL_Taru_GetIn;"];
_helico setVariable ["EH_GetIn_Taru", true, false];
};
};
IL_Taru_Deattach_Pod =
{
_helico = _this select 0;
_attached_object = [];
_mass_of_heli = getmass _helico;
{
if (_x isKindOf "Pod_Heli_Transport_04_base_F") exitwith {_attached_object = _x;};
} foreach attachedObjects _helico;
_mass_of_pod = getmass _attached_object;
_helico disableCollisionWith _attached_object;
[] call {
_pod_type = typeOf _attached_object;
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_bench_F") exitwith
{
_attached_object attachTo [_helico,[0,0.1,-2.83]];
};
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_covered_F") exitwith
{
_attached_object attachTo [_helico,[-0.1,-1.05,-2.52]];
};
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_fuel_F") exitwith
{
_attached_object attachTo [_helico,[0,-0.282,-3.05]];
};
if (_pod_type isEqualTo "Land_Pod_Heli_Transport_04_medevac_F") exitwith
{
_attached_object attachTo [_helico,[-0.14,-1.05,-2.62]];
};
if (_pod_type in ["Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_box_F","Land_Pod_Heli_Transport_04_ammo_F"]) exitwith
{
_attached_object attachTo [_helico,[-0.09,-1.05,-2.8]];
};
};
["rope_unwind", _helico, _attached_object, 1,9, 10] call IL_Client_Control;
sleep 1;
{
ropeUnwind [_x, 1.9, 10];
} foreach ropes _helico;
["sound_deattach", _helico] call IL_Client_Control;
_helico setCustomWeightRTD 0;
_helico setmass _mass_of_heli - _mass_of_pod;
["sound_deattach", _helico] call IL_Client_Control;
["chat_deattach", _helico] call IL_Client_Control;
detach _attached_object;
sleep 4;
_helico enableCollisionWith _attached_object;
//if (!isTouchingGround _helico) then {waituntil {ropeLength (ropes _helico select 0) isEqualTo 10};};
};
IL_Taru_Drop_Pod =
{
_helico = _this select 0;
_attached_object = [];
{
if (_x isKindOf "Pod_Heli_Transport_04_base_F") exitwith {_attached_object = _x;};
} foreach attachedObjects _helico;
_helico disableCollisionWith _attached_object;
{ropeCut [_x, 0];} foreach ropes _helico;
_helico setCustomWeightRTD 0;
["sound_drop", _helico] call IL_Client_Control;
detach _attached_object;
sleep 4;
_helico enableCollisionWith _attached_object;
sleep 0.5;
if ((getPosATL _attached_object) select 2 >= IL_Taru_Parachute_Altitude) exitwith
{
["chat_drop_with_parachute", _helico] call IL_Client_Control;
waituntil {(getPosATL _attached_object) select 2 <= IL_Taru_Parachute_Open_Altitude};
_parachute = createVehicle ["B_Parachute_02_F",getposatl _attached_object, [], 0, "CAN COLLIDE"];
_parachute attachTo [_attached_object,[0,0,-1]];
[_attached_object,_parachute,_helico] spawn
{
_attached_object = _this select 0;
_parachute = _this select 1;
_helico = _this select 2;
waituntil
{
if ((getPosATL _attached_object) select 2 <= 5) exitwith
{
detach _attached_object;
_vitesse_nacelle = velocity _attached_object;
_parachute setVelocity [_vitesse_nacelle select 0 + 1, _vitesse_nacelle select 1 + 1, 0];
true
};
false
};
};
waituntil
{
if (getposasl _helico distance getposasl _attached_object >= 50) exitwith
{
detach _parachute;
_attached_object attachTo [_parachute,[0,0,-1]];
true
};
false
};
};
["chat_drop_without_parachute", _helico] call IL_Client_Control;
};
IL_Taru_GetIn =
{
_vehicle = _this select 0 select 0;
if ([_vehicle] call IL_Verify_Heli) then
{
if (count attachedObjects _vehicle > 0) then
{
_time = time + 2;
waituntil
{
_vehicle setvelocity [0, 0, 0];
if (time > _time or {time > _time + 15}) exitwith {true};
};
};
};
};
IL_Save_Pod_Position =
{
while{true}do {
sleep 20;
{
sleep 2;
//when you dropping with parachute or deattaching pod without player, new position of the pod is not saved to db.
//with following ugly hack we are saving pod position every 20 seconds
if (_x isKindOf "Pod_Heli_Transport_04_base_F") then {
_x call ExileServer_object_vehicle_database_update;
};
} forEach vehicles;
};
};
[] spawn IL_Save_Pod_Position;
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
/**
* Logistics configuration for A3 vanilla.
* The configuration is splitted in categories dispatched in the included files.
*/
#include "A3_vanilla\Air.sqf"
#include "A3_vanilla\LandVehicle.sqf"
#include "A3_vanilla\StaticWeapon.sqf"
#include "A3_vanilla\Ship.sqf"
#include "A3_vanilla\Building.sqf"
#include "A3_vanilla\ReammoBox_F.sqf"
#include "A3_vanilla\Others.sqf"
#include "A3_vanilla\delta_A3_1.32_to_1.35.sqf"

View File

@ -0,0 +1,44 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
"plane"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"heli_light_02_base_f",
"heli_transport_01_base_f",
"heli_transport_02_base_f"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["helicopter_base_f", 8],
["heli_attack_01_base_f", 2],
["heli_attack_02_base_f", 20],
["heli_light_02_base_f", 15],
["heli_transport_01_base_f", 15],
["heli_transport_02_base_f", 120],
["i_heli_light_03_base_f", 25],
["uav_01_base_f", 0],
["plane", 3],
["uav", 0]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["uav_01_base_f", 3],
["uav_02_base_f", 100]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"uav_01_base_f"
];

View File

@ -0,0 +1,97 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["camping_base_f", 1],
["flagsmall_f", 1],
["hbarrier_base_f", 3],
["land_hbarriertower_f", 8],
["land_hbarrierwall6_f", 4],
["land_hbarrierwall_corridor_f", 4],
["land_hbarrier_1_f", 1],
["land_hbarrier_3_f", 2],
["helper_base_f", 1],
["helih", 1],
["land_portablelight_single_f", 1],
["land_metalbarrel_empty_f", 2],
["land_campfire_f", 1],
["land_fireplace_f", 1],
["land_obstacle_bridge_f", 2],
["land_razorwire_f", 2],
["land_sign_mines_f", 1],
["land_pallet_milboxes_f", 5],
["land_paperbox_closed_f", 5],
["land_paperbox_open_empty_f", 5],
["land_paperbox_open_full_f", 5],
["land_bargate_f", 2],
["land_cncbarriermedium4_f", 6],
["land_cncbarriermedium_f", 2],
["land_cncbarrier_f", 2],
["land_cncbarrier_stripes_f", 2],
["land_cncwall1_f", 2],
["land_cncwall4_f", 6],
["land_mil_concretewall_f", 2],
["land_shoot_house_wall_f", 2],
["sign_f", 2],
["signad_sponsors_f", 1],
["shelter_base_f", 2],
["land_plasticbarrier_01_f", 2],
["land_plasticbarrier_02_f", 2],
["bagbunker_base_f", 15],
["land_bagbunker_small_f", 6],
["bagfence_base_f", 2],
["flagcarriercore", 2]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"camping_base_f",
"flagsmall_f",
"hbarrier_base_f",
"helper_base_f",
"helih",
"land_portablelight_single_f",
"land_metalbarrel_empty_f",
"land_campfire_f",
"land_fireplace_f",
"land_obstacle_bridge_f",
"land_razorwire_f",
"land_sign_mines_f",
"land_pallet_milboxes_f",
"land_paperbox_closed_f",
"land_paperbox_open_empty_f",
"land_paperbox_open_full_f",
"land_bargate_f",
"land_cncbarriermedium4_f",
"land_cncbarriermedium_f",
"land_cncbarrier_f",
"land_cncbarrier_stripes_f",
"land_cncwall1_f",
"land_cncwall4_f",
"land_mil_concretewall_f",
"land_shoot_house_wall_f",
"sign_f",
"land_plasticbarrier_01_f",
"land_plasticbarrier_02_f",
"bagbunker_base_f",
"bagfence_base_f",
"flagcarriercore"
];

View File

@ -0,0 +1,68 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
"machine_base_f"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"b_heli_transport_03_base_f",
"heli_transport_04_base_f"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"cargo10_base_f",
"machine_base_f",
"cargonet_01_base_f",
"slingload_01_base_f"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["cargo10_base_f", 40],
["metalcase_01_base_f", 4],
["plasticcase_01_base_f", 4],
["cargonet_01_base_f", 14],
["b_slingload_01_cargo_f", 110],
["b_slingload_01_ammo_f", 90],
["b_heli_transport_03_base_f", 70],
["o_heli_transport_04_ammo_f", 40],
["o_heli_transport_04_box_f", 40],
["heli_transport_04_base_f", 40],
["o_heli_transport_04_bench_f", 5],
["o_heli_transport_04_f", 5],
["o_heli_transport_04_fuel_f", 5]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["gastank_base_f", 2],
["tooltrolley_base_f", 3],
["land_weldingtrolley_01_f", 4],
["pallettrolley_01_base_f", 3],
["land_mobilelandingplatform_01_f", 10],
["windsock_01_f", 2],
["cargo10_base_f", 45],
["land_portablehelipadlight_01_f", 1],
["metalcase_01_base_f", 5],
["plasticcase_01_base_f", 5],
["cargonet_01_base_f", 16],
["flexibletank_base_f", 2],
["pod_heli_transport_04_base_f", 200]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"gastank_base_f",
"tooltrolley_base_f",
"land_weldingtrolley_01_f",
"pallettrolley_01_base_f",
"windsock_01_f",
"land_mobilelandingplatform_01_f",
"land_portablehelipadlight_01_f",
"flexibletank_base_f"
];

View File

@ -0,0 +1,69 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
"truck_01_base_f",
"truck_02_base_f",
"truck_03_base_f",
"b_apc_tracked_01_crv_f"
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
"car_f"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"bus",
"car_f"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["tank", 5],
["car", 6],
["motorcycle", 2],
["truck_f", 100],
["bus", 30],
["kart_01_base_f", 2],
["mrap_01_base_f", 12],
["mrap_02_base_f", 12],
["mrap_03_base_f", 12],
["offroad_01_base_f", 10],
["offroad_01_armed_base_f", 4],
["quadbike_01_base_f", 3],
["quadbike_base_f", 3],
["b_truck_01_mover_f", 5],
["b_truck_01_repair_f", 170],
["b_truck_01_covered_f", 120],
["b_truck_01_ammo_f", 120],
["b_truck_01_box_f", 170],
["truck_02_base_f", 120],
["i_truck_02_medical_f", 100],
["i_truck_02_fuel_f", 5],
["i_truck_02_transport_f", 100],
["o_truck_02_fuel_f", 5],
["o_truck_02_transport_f", 100],
["o_truck_03_ammo_f", 140],
["o_truck_03_device_f", 5],
["o_truck_03_fuel_f", 5],
["van_01_base_f", 5],
["c_van_01_box_f", 40],
["c_van_01_transport_f", 25],
["i_g_van_01_transport_f", 25],
["wheeled_apc_f", 10]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["kart_01_base_f", 40],
["quadbike_01_base_f", 40],
["ugv_01_base_f", 100]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,89 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"cargo_base_f",
"land_cargobox_v1_f"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["cargo_base_f", 170],
["land_cargobox_v1_f", 14]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["targetbase", 3],
["land_pierladder_f", 3],
["metal_pole_f", 1],
["arrowmarker_r_f", 1],
["land_pallet_f", 2],
["land_pallets_stack_f", 4],
["land_chairplastic_f", 1],
["land_chairwood_f", 1],
["items_base_f", 1],
["land_canisterfuel_f", 2],
["land_metalbarrel_f", 5],
["land_portable_generator_f", 6],
["land_waterbarrel_f", 15],
["land_watertank_f", 20],
["land_campingchair_v1_f", 1],
["land_campingchair_v2_f", 1],
["land_campingtable_f", 2],
["land_campingtable_small_f", 1],
["land_camping_light_off_f", 1],
["land_cargobox_v1_f", 15],
["land_fieldtoilet_f", 4],
["land_ground_sheet_folded_f", 1],
["land_mapboard_f", 3],
["land_plasticbarrier_03_f", 2],
["land_redwhitepole_f", 1],
["land_sink_f", 5],
["land_sleeping_bag_folded_f", 1],
["land_toiletbox_f", 4],
["land_woodentable_large_f", 3],
["land_woodentable_small_f", 2],
["pole_f", 1],
["roadcone_f", 1]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"targetbase",
"land_pierladder_f",
"metal_pole_f",
"arrowmarker_r_f",
"land_pallet_f",
"land_pallets_stack_f",
"furniture_base_f",
"items_base_f",
"land_campingchair_v1_f",
"land_campingchair_v2_f",
"land_campingtable_f",
"land_campingtable_small_f",
"land_camping_light_off_f",
"land_cargobox_v1_f",
"land_fieldtoilet_f",
"land_ground_sheet_folded_f",
"land_mapboard_f",
"land_plasticbarrier_03_f",
"land_redwhitepole_f",
"land_sink_f",
"land_sleeping_bag_folded_f",
"land_toiletbox_f",
"land_woodentable_large_f",
"land_woodentable_small_f",
"pole_f",
"roadcone_f"
];

View File

@ -0,0 +1,66 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"b_supplycrate_f",
"c_supplycrate_f",
"box_east_ammoveh_f",
"ig_supplycrate_f",
"box_ind_ammoveh_f",
"box_nato_ammoveh_f"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["b_supplycrate_f", 9],
["c_supplycrate_f", 9],
["box_east_ammoveh_f", 14],
["ig_supplycrate_f", 9],
["box_ind_ammoveh_f", 14],
["box_nato_ammoveh_f", 14]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["reammobox_f", 4],
["b_supplycrate_f", 10],
["c_supplycrate_f", 10],
["box_east_ammoord_f", 2],
["box_east_ammoveh_f", 15],
["box_east_ammo_f", 2],
["box_east_grenades_f", 2],
["box_east_support_f", 2],
["box_east_wpslaunch_f", 2],
["box_east_wps_f", 3],
["ig_supplycrate_f", 10],
["box_ind_ammoord_f", 2],
["box_ind_ammoveh_f", 15],
["box_ind_ammo_f", 2],
["box_ind_grenades_f", 2],
["box_ind_support_f", 2],
["box_ind_wpslaunch_f", 2],
["box_ind_wps_f", 3],
["land_box_ammoold_f", 2],
["box_nato_ammoord_f", 2],
["box_nato_ammoveh_f", 15],
["box_nato_ammo_f", 2],
["box_nato_grenades_f", 2],
["box_nato_support_f", 2],
["box_nato_wpslaunch_f", 2],
["box_nato_wps_f", 3]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"reammobox_f"
];

View File

@ -0,0 +1,40 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
"ship_f"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"ship_f"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["ship_f", 5],
["boat_civil_01_base_f", 10],
["boat_armed_01_base_f", 15]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["land_camping_light_f", 1],
["roadcone_l_f", 1],
["roadbarrier_small_f", 1],
["rubber_duck_base_f", 40]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"land_camping_light_f",
"roadcone_l_f",
"roadbarrier_small_f",
"rubber_duck_base_f"
];

View File

@ -0,0 +1,31 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["staticweapon", 5],
["staticmortar", 6]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"reammobox_f",
"staticweapon"
];

View File

@ -0,0 +1,15 @@
/**
* Logistics configuration for All in Arma.
* The configuration is splitted in categories dispatched in the included files.
*/
// Load the logistics config only if the addon is used
if (isClass (configfile >> "CfgPatches" >> "AiA_Core")) then
{
#include "All_in_Arma\Air.sqf"
#include "All_in_Arma\LandVehicle.sqf"
#include "All_in_Arma\Ship.sqf"
#include "All_in_Arma\Building.sqf"
#include "All_in_Arma\ReammoBox.sqf"
#include "All_in_Arma\Others.sqf"
};

View File

@ -0,0 +1,59 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"ah64_base_ep1",
"aw159_lynx_baf",
"baf_merlin_hc3_d",
"ch47_base_ep1",
"ka60_base_pmc",
"kamov_base",
"mi17_base",
"mi24_base",
"uh1_base",
"uh60_base"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["ah1_base", 5],
["ah64_base_ep1", 10],
["ah6_base_ep1", 20],
["aw159_lynx_baf", 40],
["baf_merlin_hc3_d", 100],
["ch47_base_ep1", 130],
["ka60_base_pmc", 60],
["kamov_base", 10],
["mi17_base", 80],
["mi24_base", 50],
["uh1h_base", 40],
["uh1_base", 40],
["uh60_base", 60],
["an2_base_ep1", 50],
["c130j", 250],
["dc3", 90],
["mv22", 60]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["ka137_mg_pmc", 45],
["ka137_pmc", 45],
["pchela1t", 45]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"ka137_mg_pmc",
"ka137_pmc"
];

View File

@ -0,0 +1,171 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"land_misc_cargo1a_ep1",
"land_misc_cargo1ao",
"land_misc_cargo1ao_ep1",
"land_misc_cargo1b",
"land_misc_cargo1b_ep1",
"land_misc_cargo1bo",
"land_misc_cargo1c",
"land_misc_cargo1c_ep1",
"land_misc_cargo1d",
"land_misc_cargo1d_ep1",
"land_misc_cargo1e",
"land_misc_cargo1e_ep1",
"land_misc_cargo1f",
"land_misc_cargo1g",
"land_misc_cargomarket1a_ep1",
"base_warfarebcontructionsite",
"misc_cargo_cont_net1",
"misc_cargo_cont_small",
"misc_cargo_cont_small2"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["land_misc_cargo1ao", 110],
["land_misc_cargo1a_ep1", 110],
["land_misc_cargo1ao_ep1", 110],
["land_misc_cargo1b", 110],
["land_misc_cargo1b_ep1", 110],
["land_misc_cargo1bo", 110],
["land_misc_cargo1c", 110],
["land_misc_cargo1c_ep1", 110],
["land_misc_cargo1d", 110],
["land_misc_cargo1d_ep1", 110],
["land_misc_cargo1e", 110],
["land_misc_cargo1e_ep1", 110],
["land_misc_cargo1f", 110],
["land_misc_cargo1g", 110],
["land_misc_cargomarket1a_ep1", 110],
["base_warfarebcontructionsite", 110],
["fortress2", 20],
["warfarebcamp", 30],
["misc_cargo_cont_small", 65],
["misc_cargo_cont_small2", 50]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["concrete_wall_ep1", 3],
["fencewood", 1],
["fencewoodpalet", 1],
["wire", 2],
["fire", 1],
["flagcarriersmall", 1],
["fort_razorwire", 2],
["gunrack1", 2],
["base_warfarebbarrier5x", 3],
["base_warfarebbarrier10x", 6],
["base_warfarebbarrier10xtall", 12],
["base_warfarebbarrier5xpreview", 2],
["land_camonet_east", 2],
["land_camonet_nato", 2],
["land_fire", 1],
["land_fire_barrel", 3],
["land_fort_watchtower", 20],
["land_guardshed", 3],
["land_misc_cargo1ao", 120],
["land_misc_cargo1a_ep1", 120],
["land_misc_cargo1ao_ep1", 120],
["land_misc_cargo1b", 120],
["land_misc_cargo1b_ep1", 120],
["land_misc_cargo1bo", 120],
["land_misc_cargo1c", 120],
["land_misc_cargo1c_ep1", 120],
["land_misc_cargo1d", 120],
["land_misc_cargo1d_ep1", 120],
["land_misc_cargo1e", 120],
["land_misc_cargo1e_ep1", 120],
["land_misc_cargo1f", 120],
["land_misc_cargo1g", 120],
["land_misc_cargomarket1a_ep1", 120],
["land_woodenramp", 2],
["land_fort_bagfence_corner", 3],
["land_fort_bagfence_long", 2],
["land_fort_bagfence_round", 4],
["land_fort_rampart", 4],
["land_fortified_nest_big", 20],
["land_fortified_nest_small", 10],
["land_cncblock", 2],
["land_cncblock_d", 2],
["land_cncblock_stripes", 2],
["land_hbarrier_large", 4],
["land_bagfencecorner", 2],
["land_hbarrier1", 1],
["land_hbarrier3", 2],
["land_hbarrier5", 3],
["land_toilet", 3],
["paletabase", 2],
["roadbarrier_light", 2],
["targettraining", 2],
["warfarebunkersign", 3],
["zavoraanim", 2],
["base_warfarebcontructionsite", 120],
["fortress1", 10],
["hedgehog", 3],
["land_prebehlavka", 3],
["land_prolejzacka", 2],
["ammocrate_nointeractive_", 7],
["misc_cargo_cont_net1", 25],
["misc_cargo_cont_small", 75],
["misc_cargo_cont_small2", 60],
["shed", 2],
["target", 2]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"concrete_wall_ep1",
"fencewood",
"fencewoodpalet",
"wire",
"fire",
"flagcarriersmall",
"fort_razorwire",
"gunrack1",
"base_warfarebbarrier5x",
"land_camonet_east",
"land_camonet_nato",
"land_fire",
"land_fort_watchtower",
"land_guardshed",
"land_woodenramp",
"land_fort_bagfence_corner",
"land_fort_bagfence_long",
"land_fort_bagfence_round",
"land_fort_rampart",
"land_fortified_nest_big",
"land_fortified_nest_small",
"land_cncblock",
"land_cncblock_d",
"land_cncblock_stripes",
"land_hbarrier_large",
"land_bagfencecorner",
"land_toilet",
"paletabase",
"roadbarrier_light",
"targettraining",
"warfarebunkersign",
"zavoraanim",
"fortress1",
"hedgehog",
"land_prebehlavka",
"land_prolejzacka",
"ammocrate_nointeractive_",
"misc_cargo_cont_net1",
"shed",
"target"
];

View File

@ -0,0 +1,122 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
"towingtractor",
"tractorold",
"mtvr",
"t810_turrets_base_acr"
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
"d30_base",
"m119",
"zu23_base"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"heli_light_02_base_f",
"heli_transport_01_base_f",
"heli_transport_02_base_f"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"atv_base_ep1",
"armoredsuv_base_pmc",
"baf_jackal2_base_d",
"datsun_pk1",
"dingo_base_acr",
"hilux_pk1",
"hmmwv_base",
"ikarus",
"lada_base",
"landrover_base",
"octavia_acr",
"offroad_dshkm_base",
"pickup_pk_base",
"s1203_tk_civ_ep1",
"suv_base_ep1",
"skodabase",
"towingtractor",
"tractorold",
"kamaz_base",
"mtvr",
"t810_turrets_base_acr",
"truck_base_h",
"ural_base_withturret",
"v3s_base",
"uaz_base",
"volha_tk_civ_base_ep1",
"vwgolf",
"btr40_mg_base_ep1",
"btr90_base",
"gaz_vodnik_hmg",
"lav25_base",
"strykerbase_ep1",
"hilux1_civil_1_open",
"d30_base",
"m119",
"zu23_base",
"m113_base"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["atv_base_ep1", 3],
["armoredsuv_base_pmc", 15],
["baf_jackal2_base_d", 18],
["datsun_pk1", 10],
["dingo_base_acr", 25],
["hilux_pk1", 10],
["hmmwv_base", 18],
["hmmwv_avenger", 5],
["ikarus", 60],
["landrover_base", 15],
["offroad_dshkm_base", 10],
["pickup_pk_base", 10],
["s1203_tk_civ_ep1", 20],
["suv_base_ep1", 12],
["kamaz_base", 100],
["mtvr", 80],
["t810_turrets_base_acr", 80],
["truck_base_h", 50],
["ural_base_withturret", 10],
["ural_base", 100],
["v3s_base", 90],
["uaz_base", 15],
["brdm2_base", 15],
["btr40_mg_base_ep1", 12],
["btr90_base", 18],
["gaz_vodnik_hmg", 18],
["lav25_base", 18],
["strykerbase_ep1", 18],
["hilux1_civil_1_open", 12],
["baf_fv510_d", 8],
["m113_base", 10],
["m2a2_ep1", 8],
["aav", 8]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["atv_base_ep1", 40],
["mmt_base", 8],
["m1030", 30],
["tt650_base", 30],
["stinger_pod", 15],
["stinger_pod_us_ep1", 15],
["tow_tripod", 10],
["tow_tripod_base", 10],
["m119", 50],
["d30_base", 50],
["zu23_base", 50],
["warfarebmgnest_m240_base", 10],
["uh1wreck", 200],
["uh60_wreck_ep1", 200]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"mmt_base"
];

View File

@ -0,0 +1,72 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["targetgrenadbase", 5],
["wallmap", 2],
["foldchair", 1],
["woodchair", 1],
["foldtable", 2],
["land_barrel_empty", 2],
["land_barrel_sand", 2],
["land_barrel_water", 2],
["land_conelight", 1],
["barrel1", 2],
["barrel2", 2],
["barrel3", 2],
["barrel4", 2],
["barrel5", 2],
["barrel6", 2],
["wooden_barrel", 2],
["fuel_can", 1],
["notice_board", 2],
["roadcone", 1],
["sign_danger", 2],
["smalltable", 2],
["small_items", 1],
["land_shelf_ep1", 2]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"wallmap",
"foldchair",
"woodchair",
"foldtable",
"land_barrel_empty",
"land_barrel_sand",
"land_barrel_water",
"land_conelight",
"barrel1",
"barrel2",
"barrel3",
"barrel4",
"barrel5",
"barrel6",
"wooden_barrel",
"fuel_can",
"notice_board",
"roadcone",
"sign_danger",
"smalltable",
"small_items",
"land_shelf_ep1"
];

View File

@ -0,0 +1,69 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["guerillacachebox", 5],
["specialweaponsbox", 10],
["rubasicammunitionbox", 5],
["rubasicweaponsbox", 15],
["ruspecialweaponsbox", 12],
["ruvehiclebox", 50],
["ammobox_pmc", 5],
["baf_vehiclebox", 30],
["czbasicweapons_ep1", 5],
["gerbasicweapons_ep1", 5],
["guerillacachebox_ep1", 5],
["tkbasicammunitionbox_ep1", 5],
["tkvehiclebox_ep1", 40],
["tkbasicweapons_ep1", 5],
["tklaunchers_ep1", 5],
["tkspecialweapons_ep1", 5],
["unbasicammunitionbox_ep1", 5],
["unbasicweapons_ep1", 5],
["usbasicammunitionbox_ep1", 5],
["usvehiclebox_ep1", 30],
["usbasicweapons_ep1", 5],
["uslaunchers_ep1", 5],
["usspecialweapons_ep1", 8],
["usbasicammunitionbox", 5],
["usvehiclebox", 20]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"guerillacachebox",
"rubasicammunitionbox",
"ammobox_pmc",
"czbasicweapons_ep1",
"gerbasicweapons_ep1",
"guerillacachebox_ep1",
"tkbasicammunitionbox_ep1",
"tkbasicweapons_ep1",
"tklaunchers_ep1",
"tkspecialweapons_ep1",
"unbasicammunitionbox_ep1",
"unbasicweapons_ep1",
"usbasicammunitionbox_ep1",
"usbasicweapons_ep1",
"uslaunchers_ep1",
"usspecialweapons_ep1",
"usbasicammunitionbox"
];

View File

@ -0,0 +1,41 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
"boat",
"pbx_acr",
"seafox",
"smallboat_1"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"heli_light_02_base_f",
"heli_transport_01_base_f",
"heli_transport_02_base_f"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"boat",
"seafox",
"smallboat_1"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["rubberboat", 40],
["pbx_acr", 40]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"rubberboat",
"pbx_acr"
];

View File

@ -0,0 +1,15 @@
/**
* Logistics configuration for All in Arma.
* The configuration is splitted in categories dispatched in the included files.
*/
// Load the logistics config only if the addon is used
if (isClass (configfile >> "CfgPatches" >> "CUP_Vehicles_Core")) then
{
#include "CUP\Air.sqf"
#include "CUP\LandVehicle.sqf"
#include "CUP\Ship.sqf"
#include "CUP\Building.sqf"
#include "CUP\ReammoBox.sqf"
#include "CUP\Others.sqf"
};

View File

@ -0,0 +1,64 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["CUP_B_CH53E_USMC", 50],
["CUP_B_UH1Y_UNA_F", 50],
["CUP_B_UH1Y_MEV_F", 50],
["CUP_C_Mi17_Civilian_RU", 50],
["CUP_B_Mi17_CDF", 50],
["CUP_O_Mi17_TK", 50],
["CUP_B_Mi17_medevac_CDF", 50],
["CUP_B_Mi171Sh_Unarmed_ACR", 50],
["CUP_O_Mi8_medevac_CHDKZ", 50],
["CUP_O_Mi8_medevac_RU", 50],
["CUP_Merlin_HC3_FFV", 50],
["CUP_Merlin_HC3", 50],
["CUP_Merlin_HC3_MED", 50],
["CUP_B_MH60S_USMC", 50],
["CUP_B_MH60S_FFV_USMC", 50],
["CUP_B_AW159_Unarmed_BAF", 50],
["CUP_B_CH47F_USA", 50],
["CUP_B_CH47F_GB", 50],
["CUP_B_UH60M_US", 50],
["CUP_B_UH60L_US", 50],
["CUP_B_UH60M_FFV_US", 50],
["CUP_B_UH60L_FFV_US", 50],
["CUP_B_UH60M_Unarmed_US", 50],
["CUP_B_UH60L_Unarmed_US", 50],
["CUP_B_UH60M_Unarmed_FFV_US", 50],
["CUP_B_UH60L_Unarmed_FFV_US", 50],
["CUP_B_UH60M_Unarmed_FFV_MEV_US", 50],
["CUP_B_UH60L_Unarmed_FFV_MEV_US", 50],
["CUP_I_UH60L_RACS", 50],
["CUP_I_UH60L_FFV_RACS", 50],
["CUP_I_UH60L_Unarmed_RACS", 50],
["CUP_I_UH60L_Unarmed_FFV_Racs", 50],
["CUP_I_UH60L_Unarmed_FFV_MEV_Racs", 50],
["CUP_B_AH1Z_NoWeapons", 50]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,31 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,559 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
//Unarmed
"CUP_C_Datsun",
"CUP_C_Datsun_4seat",
"CUP_C_Datsun_Plain",
"CUP_C_Datsun_Covered",
"CUP_C_Datsun_Tubeframe",
"CUP_C_Ural_Civ_01",
"CUP_C_Ural_Civ_02",
"CUP_C_Ural_Civ_03",
"CUP_C_Ural_Open_Civ_01",
"CUP_C_Ural_Open_Civ_02",
"CUP_C_Ural_Open_Civ_03",
"CUP_O_Ural_TKA",
"CUP_O_Ural_RU",
"CUP_I_Ural_UN",
"CUP_B_Ural_CDF",
"CUP_O_Ural_CHDKZ",
"CUP_O_Ural_SLA",
"CUP_O_Ural_Open_TKA",
"CUP_B_Ural_Open_CDF",
"CUP_O_Ural_Open_RU",
"CUP_O_Ural_Open_CHDKZ",
"CUP_O_Ural_Open_SLA",
"CUP_O_Ural_Empty_SLA",
"CUP_B_Ural_Empty_CDF",
"CUP_I_Ural_Empty_UN",
"CUP_O_Ural_Empty_RU",
"CUP_O_Ural_Empty_CHDKZ",
"CUP_O_Ural_Empty_TKA",
"CUP_O_Ural_Repair_SLA",
"CUP_O_Ural_Repair_TKA",
"CUP_O_Ural_Repair_CHDKZ",
"CUP_O_Ural_Repair_RU",
"CUP_I_Ural_Repair_UN",
"CUP_B_Ural_Repair_CDF",
"CUP_B_Ural_Refuel_CDF",
"CUP_O_Ural_Refuel_RU",
"CUP_O_Ural_Refuel_CHDKZ",
"CUP_O_Ural_Refuel_TKA",
"CUP_O_Ural_Refuel_SLA",
"CUP_C_LR_Transport_CTK",
"CUP_O_LR_Transport_TKA",
"CUP_O_LR_Transport_TKM",
"CUP_B_LR_Transport_CZ_W",
"CUP_B_LR_Transport_CZ_D",
"CUP_B_LR_Transport_GB_W",
"CUP_B_LR_Transport_GB_D",
"CUP_B_LR_Ambulance_CZ_W",
"CUP_B_LR_Ambulance_CZ_D",
"CUP_B_LR_Ambulance_GB_W",
"CUP_B_LR_Ambulance_GB_D",
"CUP_O_LR_Ambulance_TKA",
"CUP_C_UAZ_Unarmed_TK_CIV",
"CUP_O_UAZ_Unarmed_RU",
"CUP_I_UAZ_Unarmed_UN",
"CUP_O_UAZ_Unarmed_TKA",
"CUP_O_UAZ_Unarmed_CHDKZ",
"CUP_B_UAZ_Unarmed_ACR",
"CUP_B_UAZ_Unarmed_CDF",
"CUP_C_UAZ_Open_TK_CIV",
"CUP_O_UAZ_Open_CHDKZ",
"CUP_O_UAZ_Open_RU",
"CUP_O_UAZ_Open_TKA",
"CUP_I_UAZ_Open_UN",
"CUP_B_UAZ_Open_ACR",
"CUP_B_UAZ_Open_CDF",
"CUP_B_HMMWV_Unarmed_USA",
"CUP_B_HMMWV_Unarmed_USMC",
"CUP_B_HMMWV_Ambulance_USMC",
"CUP_B_HMMWV_Ambulance_USA",
"CUP_B_HMMWV_Ambulance_ACR",
"CUP_B_HMMWV_Transport_USA",
"CUP_I_M113_Med_RACS",
"CUP_I_M113_Med_UN",
//Armed
"Wheeled_APC_F",
"CUP_StrykerBase",
"CUP_O_LR_MG_TKM",
"CUP_O_LR_MG_TKA",
"CUP_I_Datsun_PK",
"CUP_I_Datsun_PK_Random",
"CUP_I_Datsun_PK_TK",
"CUP_I_Datsun_PK_TK_Random",
"CUP_O_Datsun_PK",
"CUP_O_Datsun_PK_Random",
"CUP_O_UAZ_MG_CHDKZ",
"CUP_O_UAZ_MG_RU",
"CUP_O_UAZ_MG_TKA",
"CUP_I_UAZ_MG_UN",
"CUP_B_UAZ_MG_ACR",
"CUP_B_UAZ_MG_CDF",
"CUP_B_UAZ_AGS30_CDF",
"CUP_O_UAZ_AGS30_CHDKZ",
"CUP_O_UAZ_AGS30_RU",
"CUP_O_UAZ_AGS30_TKA",
"CUP_I_UAZ_AGS30_UN",
"CUP_I_M113_RACS",
"CUP_I_M113_UN",
"CUP_BAF_Jackal2_L2A1_W",
"CUP_BAF_Jackal2_L2A1_D",
"CUP_BAF_Jackal2_GMG_D",
"CUP_BAF_Jackal2_GMG_W",
"CUP_B_LR_Special_CZ_W",
"CUP_B_LR_Special_Des_CZ_D",
"CUP_B_LR_MG_CZ_W",
"CUP_B_LR_MG_GB_W",
"CUP_B_HMMWV_M1114_USMC",
"CUP_B_HMMWV_M2_USMC",
"CUP_B_HMMWV_Crows_M2_USA",
"CUP_B_HMMWV_M2_GPK_USA",
"CUP_B_HMMWV_M2_USA",
"CUP_B_HMMWV_DSHKM_GPK_ACR",
"CUP_B_HMMWV_AGS_GPK_ACR",
"CUP_B_HMMWV_MK19_USMC",
"CUP_B_HMMWV_MK19_USA",
"CUP_B_HMMWV_Crows_MK19_USA",
"CUP_B_HMMWV_SOV_USA",
"CUP_B_BRDM2_HQ_CDF",
"CUP_O_BRDM2_HQ_SLA",
"CUP_I_BRDM2_HQ_UN",
"CUP_I_BRDM2_HQ_NAPA",
"CUP_I_BRDM2_HQ_TK_Gue",
"CUP_O_BRDM2_HQ_TKA",
"CUP_O_BRDM2_HQ_CHDKZ",
"CUP_O_BRDM2_CHDKZ",
"CUP_O_BRDM2_SLA",
"CUP_O_BRDM2_TKA",
"CUP_I_BRDM2_NAPA",
"CUP_I_BRDM2_TK_Gue",
"CUP_I_BRDM2_UN",
"CUP_B_BRDM2_CDF"
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
//Unarmed
"CUP_C_Datsun",
"CUP_C_Datsun_4seat",
"CUP_C_Datsun_Plain",
"CUP_C_Datsun_Covered",
"CUP_C_Datsun_Tubeframe",
"CUP_C_Ural_Civ_01",
"CUP_C_Ural_Civ_02",
"CUP_C_Ural_Civ_03",
"CUP_C_Ural_Open_Civ_01",
"CUP_C_Ural_Open_Civ_02",
"CUP_C_Ural_Open_Civ_03",
"CUP_O_Ural_TKA",
"CUP_O_Ural_RU",
"CUP_I_Ural_UN",
"CUP_B_Ural_CDF",
"CUP_O_Ural_CHDKZ",
"CUP_O_Ural_SLA",
"CUP_O_Ural_Open_TKA",
"CUP_B_Ural_Open_CDF",
"CUP_O_Ural_Open_RU",
"CUP_O_Ural_Open_CHDKZ",
"CUP_O_Ural_Open_SLA",
"CUP_O_Ural_Empty_SLA",
"CUP_B_Ural_Empty_CDF",
"CUP_I_Ural_Empty_UN",
"CUP_O_Ural_Empty_RU",
"CUP_O_Ural_Empty_CHDKZ",
"CUP_O_Ural_Empty_TKA",
"CUP_O_Ural_Repair_SLA",
"CUP_O_Ural_Repair_TKA",
"CUP_O_Ural_Repair_CHDKZ",
"CUP_O_Ural_Repair_RU",
"CUP_I_Ural_Repair_UN",
"CUP_B_Ural_Repair_CDF",
"CUP_B_Ural_Refuel_CDF",
"CUP_O_Ural_Refuel_RU",
"CUP_O_Ural_Refuel_CHDKZ",
"CUP_O_Ural_Refuel_TKA",
"CUP_O_Ural_Refuel_SLA",
"CUP_C_LR_Transport_CTK",
"CUP_O_LR_Transport_TKA",
"CUP_O_LR_Transport_TKM",
"CUP_B_LR_Transport_CZ_W",
"CUP_B_LR_Transport_CZ_D",
"CUP_B_LR_Transport_GB_W",
"CUP_B_LR_Transport_GB_D",
"CUP_B_LR_Ambulance_CZ_W",
"CUP_B_LR_Ambulance_CZ_D",
"CUP_B_LR_Ambulance_GB_W",
"CUP_B_LR_Ambulance_GB_D",
"CUP_O_LR_Ambulance_TKA",
"CUP_C_UAZ_Unarmed_TK_CIV",
"CUP_O_UAZ_Unarmed_RU",
"CUP_I_UAZ_Unarmed_UN",
"CUP_O_UAZ_Unarmed_TKA",
"CUP_O_UAZ_Unarmed_CHDKZ",
"CUP_B_UAZ_Unarmed_ACR",
"CUP_B_UAZ_Unarmed_CDF",
"CUP_C_UAZ_Open_TK_CIV",
"CUP_O_UAZ_Open_CHDKZ",
"CUP_O_UAZ_Open_RU",
"CUP_O_UAZ_Open_TKA",
"CUP_I_UAZ_Open_UN",
"CUP_B_UAZ_Open_ACR",
"CUP_B_UAZ_Open_CDF",
"CUP_B_HMMWV_Unarmed_USA",
"CUP_B_HMMWV_Unarmed_USMC",
"CUP_B_HMMWV_Ambulance_USMC",
"CUP_B_HMMWV_Ambulance_USA",
"CUP_B_HMMWV_Ambulance_ACR",
"CUP_B_HMMWV_Transport_USA",
"CUP_I_M113_Med_RACS",
"CUP_I_M113_Med_UN",
//Armed
"Wheeled_APC_F",
"CUP_StrykerBase",
"CUP_O_LR_MG_TKM",
"CUP_O_LR_MG_TKA",
"CUP_I_Datsun_PK",
"CUP_I_Datsun_PK_Random",
"CUP_I_Datsun_PK_TK",
"CUP_I_Datsun_PK_TK_Random",
"CUP_O_Datsun_PK",
"CUP_O_Datsun_PK_Random",
"CUP_O_UAZ_MG_CHDKZ",
"CUP_O_UAZ_MG_RU",
"CUP_O_UAZ_MG_TKA",
"CUP_I_UAZ_MG_UN",
"CUP_B_UAZ_MG_ACR",
"CUP_B_UAZ_MG_CDF",
"CUP_B_UAZ_AGS30_CDF",
"CUP_O_UAZ_AGS30_CHDKZ",
"CUP_O_UAZ_AGS30_RU",
"CUP_O_UAZ_AGS30_TKA",
"CUP_I_UAZ_AGS30_UN",
"CUP_I_M113_RACS",
"CUP_I_M113_UN",
"CUP_BAF_Jackal2_L2A1_W",
"CUP_BAF_Jackal2_L2A1_D",
"CUP_BAF_Jackal2_GMG_D",
"CUP_BAF_Jackal2_GMG_W",
"CUP_B_LR_Special_CZ_W",
"CUP_B_LR_Special_Des_CZ_D",
"CUP_B_LR_MG_CZ_W",
"CUP_B_LR_MG_GB_W",
"CUP_B_HMMWV_M1114_USMC",
"CUP_B_HMMWV_M2_USMC",
"CUP_B_HMMWV_Crows_M2_USA",
"CUP_B_HMMWV_M2_GPK_USA",
"CUP_B_HMMWV_M2_USA",
"CUP_B_HMMWV_DSHKM_GPK_ACR",
"CUP_B_HMMWV_AGS_GPK_ACR",
"CUP_B_HMMWV_MK19_USMC",
"CUP_B_HMMWV_MK19_USA",
"CUP_B_HMMWV_Crows_MK19_USA",
"CUP_B_HMMWV_SOV_USA",
"CUP_B_BRDM2_HQ_CDF",
"CUP_O_BRDM2_HQ_SLA",
"CUP_I_BRDM2_HQ_UN",
"CUP_I_BRDM2_HQ_NAPA",
"CUP_I_BRDM2_HQ_TK_Gue",
"CUP_O_BRDM2_HQ_TKA",
"CUP_O_BRDM2_HQ_CHDKZ",
"CUP_O_BRDM2_CHDKZ",
"CUP_O_BRDM2_SLA",
"CUP_O_BRDM2_TKA",
"CUP_I_BRDM2_NAPA",
"CUP_I_BRDM2_TK_Gue",
"CUP_I_BRDM2_UN",
"CUP_B_BRDM2_CDF"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
//Unarmed
"CUP_C_Datsun",
"CUP_C_Datsun_4seat",
"CUP_C_Datsun_Plain",
"CUP_C_Datsun_Covered",
"CUP_C_Datsun_Tubeframe",
"CUP_C_Ural_Civ_01",
"CUP_C_Ural_Civ_02",
"CUP_C_Ural_Civ_03",
"CUP_C_Ural_Open_Civ_01",
"CUP_C_Ural_Open_Civ_02",
"CUP_C_Ural_Open_Civ_03",
"CUP_O_Ural_TKA",
"CUP_O_Ural_RU",
"CUP_I_Ural_UN",
"CUP_B_Ural_CDF",
"CUP_O_Ural_CHDKZ",
"CUP_O_Ural_SLA",
"CUP_O_Ural_Open_TKA",
"CUP_B_Ural_Open_CDF",
"CUP_O_Ural_Open_RU",
"CUP_O_Ural_Open_CHDKZ",
"CUP_O_Ural_Open_SLA",
"CUP_O_Ural_Empty_SLA",
"CUP_B_Ural_Empty_CDF",
"CUP_I_Ural_Empty_UN",
"CUP_O_Ural_Empty_RU",
"CUP_O_Ural_Empty_CHDKZ",
"CUP_O_Ural_Empty_TKA",
"CUP_O_Ural_Repair_SLA",
"CUP_O_Ural_Repair_TKA",
"CUP_O_Ural_Repair_CHDKZ",
"CUP_O_Ural_Repair_RU",
"CUP_I_Ural_Repair_UN",
"CUP_B_Ural_Repair_CDF",
"CUP_B_Ural_Refuel_CDF",
"CUP_O_Ural_Refuel_RU",
"CUP_O_Ural_Refuel_CHDKZ",
"CUP_O_Ural_Refuel_TKA",
"CUP_O_Ural_Refuel_SLA",
"CUP_C_LR_Transport_CTK",
"CUP_O_LR_Transport_TKA",
"CUP_O_LR_Transport_TKM",
"CUP_B_LR_Transport_CZ_W",
"CUP_B_LR_Transport_CZ_D",
"CUP_B_LR_Transport_GB_W",
"CUP_B_LR_Transport_GB_D",
"CUP_B_LR_Ambulance_CZ_W",
"CUP_B_LR_Ambulance_CZ_D",
"CUP_B_LR_Ambulance_GB_W",
"CUP_B_LR_Ambulance_GB_D",
"CUP_O_LR_Ambulance_TKA",
"CUP_C_UAZ_Unarmed_TK_CIV",
"CUP_O_UAZ_Unarmed_RU",
"CUP_I_UAZ_Unarmed_UN",
"CUP_O_UAZ_Unarmed_TKA",
"CUP_O_UAZ_Unarmed_CHDKZ",
"CUP_B_UAZ_Unarmed_ACR",
"CUP_B_UAZ_Unarmed_CDF",
"CUP_C_UAZ_Open_TK_CIV",
"CUP_O_UAZ_Open_CHDKZ",
"CUP_O_UAZ_Open_RU",
"CUP_O_UAZ_Open_TKA",
"CUP_I_UAZ_Open_UN",
"CUP_B_UAZ_Open_ACR",
"CUP_B_UAZ_Open_CDF",
"CUP_B_HMMWV_Unarmed_USA",
"CUP_B_HMMWV_Unarmed_USMC",
"CUP_B_HMMWV_Ambulance_USMC",
"CUP_B_HMMWV_Ambulance_USA",
"CUP_B_HMMWV_Ambulance_ACR",
"CUP_B_HMMWV_Transport_USA",
"CUP_I_M113_Med_RACS",
"CUP_I_M113_Med_UN",
//Armed
"Wheeled_APC_F",
"CUP_StrykerBase",
"CUP_O_LR_MG_TKM",
"CUP_O_LR_MG_TKA",
"CUP_I_Datsun_PK",
"CUP_I_Datsun_PK_Random",
"CUP_I_Datsun_PK_TK",
"CUP_I_Datsun_PK_TK_Random",
"CUP_O_Datsun_PK",
"CUP_O_Datsun_PK_Random",
"CUP_O_UAZ_MG_CHDKZ",
"CUP_O_UAZ_MG_RU",
"CUP_O_UAZ_MG_TKA",
"CUP_I_UAZ_MG_UN",
"CUP_B_UAZ_MG_ACR",
"CUP_B_UAZ_MG_CDF",
"CUP_B_UAZ_AGS30_CDF",
"CUP_O_UAZ_AGS30_CHDKZ",
"CUP_O_UAZ_AGS30_RU",
"CUP_O_UAZ_AGS30_TKA",
"CUP_I_UAZ_AGS30_UN",
"CUP_I_M113_RACS",
"CUP_I_M113_UN",
"CUP_BAF_Jackal2_L2A1_W",
"CUP_BAF_Jackal2_L2A1_D",
"CUP_BAF_Jackal2_GMG_D",
"CUP_BAF_Jackal2_GMG_W",
"CUP_B_LR_Special_CZ_W",
"CUP_B_LR_Special_Des_CZ_D",
"CUP_B_LR_MG_CZ_W",
"CUP_B_LR_MG_GB_W",
"CUP_B_HMMWV_M1114_USMC",
"CUP_B_HMMWV_M2_USMC",
"CUP_B_HMMWV_Crows_M2_USA",
"CUP_B_HMMWV_M2_GPK_USA",
"CUP_B_HMMWV_M2_USA",
"CUP_B_HMMWV_DSHKM_GPK_ACR",
"CUP_B_HMMWV_AGS_GPK_ACR",
"CUP_B_HMMWV_MK19_USMC",
"CUP_B_HMMWV_MK19_USA",
"CUP_B_HMMWV_Crows_MK19_USA",
"CUP_B_HMMWV_SOV_USA",
"CUP_B_BRDM2_HQ_CDF",
"CUP_O_BRDM2_HQ_SLA",
"CUP_I_BRDM2_HQ_UN",
"CUP_I_BRDM2_HQ_NAPA",
"CUP_I_BRDM2_HQ_TK_Gue",
"CUP_O_BRDM2_HQ_TKA",
"CUP_O_BRDM2_HQ_CHDKZ",
"CUP_O_BRDM2_CHDKZ",
"CUP_O_BRDM2_SLA",
"CUP_O_BRDM2_TKA",
"CUP_I_BRDM2_NAPA",
"CUP_I_BRDM2_TK_Gue",
"CUP_I_BRDM2_UN",
"CUP_B_BRDM2_CDF"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
//Unarmed
["CUP_C_Datsun", 25],
["CUP_C_Datsun_4seat", 25],
["CUP_C_Datsun_Plain", 25],
["CUP_C_Datsun_Covered", 25],
["CUP_C_Datsun_Tubeframe", 25],
["CUP_C_Ural_Civ_01", 25],
["CUP_C_Ural_Civ_02", 25],
["CUP_C_Ural_Civ_03", 25],
["CUP_C_Ural_Open_Civ_01", 25],
["CUP_C_Ural_Open_Civ_02", 25],
["CUP_C_Ural_Open_Civ_03", 25],
["CUP_O_Ural_TKA", 25],
["CUP_O_Ural_RU", 25],
["CUP_I_Ural_UN", 25],
["CUP_B_Ural_CDF", 25],
["CUP_O_Ural_CHDKZ", 25],
["CUP_O_Ural_SLA", 25],
["CUP_O_Ural_Open_TKA", 25],
["CUP_B_Ural_Open_CDF", 25],
["CUP_O_Ural_Open_RU", 25],
["CUP_O_Ural_Open_CHDKZ", 25],
["CUP_O_Ural_Open_SLA", 25],
["CUP_O_Ural_Empty_SLA", 25],
["CUP_B_Ural_Empty_CDF", 25],
["CUP_I_Ural_Empty_UN", 25],
["CUP_O_Ural_Empty_RU", 25],
["CUP_O_Ural_Empty_CHDKZ", 25],
["CUP_O_Ural_Empty_TKA", 25],
["CUP_O_Ural_Repair_SLA", 25],
["CUP_O_Ural_Repair_TKA", 25],
["CUP_O_Ural_Repair_CHDKZ", 25],
["CUP_O_Ural_Repair_RU", 25],
["CUP_I_Ural_Repair_UN", 25],
["CUP_B_Ural_Repair_CDF", 25],
["CUP_B_Ural_Refuel_CDF", 25],
["CUP_O_Ural_Refuel_RU", 25],
["CUP_O_Ural_Refuel_CHDKZ", 25],
["CUP_O_Ural_Refuel_TKA", 25],
["CUP_O_Ural_Refuel_SLA", 25],
["CUP_C_LR_Transport_CTK", 50],
["CUP_O_LR_Transport_TKA", 50],
["CUP_O_LR_Transport_TKM", 50],
["CUP_B_LR_Transport_CZ_W", 50],
["CUP_B_LR_Transport_CZ_D", 50],
["CUP_B_LR_Transport_GB_W", 50],
["CUP_B_LR_Transport_GB_D", 50],
["CUP_B_LR_Ambulance_CZ_W", 25],
["CUP_B_LR_Ambulance_CZ_D", 25],
["CUP_B_LR_Ambulance_GB_W", 25],
["CUP_B_LR_Ambulance_GB_D", 25],
["CUP_O_LR_Ambulance_TKA", 25],
["CUP_C_UAZ_Unarmed_TK_CIV", 25],
["CUP_O_UAZ_Unarmed_RU", 25],
["CUP_I_UAZ_Unarmed_UN", 25],
["CUP_O_UAZ_Unarmed_TKA", 25],
["CUP_O_UAZ_Unarmed_CHDKZ", 25],
["CUP_B_UAZ_Unarmed_ACR", 25],
["CUP_B_UAZ_Unarmed_CDF", 25],
["CUP_C_UAZ_Open_TK_CIV", 25],
["CUP_O_UAZ_Open_CHDKZ", 25],
["CUP_O_UAZ_Open_RU", 25],
["CUP_O_UAZ_Open_TKA", 25],
["CUP_I_UAZ_Open_UN", 25],
["CUP_B_UAZ_Open_ACR", 25],
["CUP_B_UAZ_Open_CDF", 25],
["CUP_B_HMMWV_Unarmed_USA", 25],
["CUP_B_HMMWV_Unarmed_USMC", 25],
["CUP_B_HMMWV_Ambulance_USMC", 25],
["CUP_B_HMMWV_Ambulance_USA", 25],
["CUP_B_HMMWV_Ambulance_ACR", 25],
["CUP_B_HMMWV_Transport_USA", 50],
["CUP_I_M113_Med_RACS", 25],
["CUP_I_M113_Med_UN", 25],
//Armed
["Wheeled_APC_F",50],
["CUP_StrykerBase", 50],
["CUP_O_LR_MG_TKM", 25],
["CUP_O_LR_MG_TKA", 25],
["CUP_I_Datsun_PK", 25],
["CUP_I_Datsun_PK_Random", 25],
["CUP_I_Datsun_PK_TK", 25],
["CUP_I_Datsun_PK_TK_Random", 25],
["CUP_O_Datsun_PK", 25],
["CUP_O_Datsun_PK_Random", 25],
["CUP_O_UAZ_MG_CHDKZ", 25],
["CUP_O_UAZ_MG_RU", 25],
["CUP_O_UAZ_MG_TKA", 25],
["CUP_I_UAZ_MG_UN", 25],
["CUP_B_UAZ_MG_ACR", 25],
["CUP_B_UAZ_MG_CDF", 25],
["CUP_B_UAZ_AGS30_CDF", 25],
["CUP_O_UAZ_AGS30_CHDKZ", 25],
["CUP_O_UAZ_AGS30_RU", 25],
["CUP_O_UAZ_AGS30_TKA", 25],
["CUP_I_UAZ_AGS30_UN", 25],
["CUP_I_M113_RACS", 25],
["CUP_I_M113_UN", 25],
["CUP_BAF_Jackal2_L2A1_W", 25],
["CUP_BAF_Jackal2_L2A1_D", 25],
["CUP_BAF_Jackal2_GMG_D", 25],
["CUP_BAF_Jackal2_GMG_W", 25],
["CUP_B_LR_Special_CZ_W", 25],
["CUP_B_LR_Special_Des_CZ_D", 25],
["CUP_B_LR_MG_CZ_W", 25],
["CUP_B_LR_MG_GB_W", 25],
["CUP_B_HMMWV_M1114_USMC", 25],
["CUP_B_HMMWV_M2_USMC", 25],
["CUP_B_HMMWV_Crows_M2_USA", 25],
["CUP_B_HMMWV_M2_GPK_USA", 25],
["CUP_B_HMMWV_M2_USA", 25],
["CUP_B_HMMWV_DSHKM_GPK_ACR", 25],
["CUP_B_HMMWV_AGS_GPK_ACR", 25],
["CUP_B_HMMWV_MK19_USMC", 25],
["CUP_B_HMMWV_MK19_USA", 25],
["CUP_B_HMMWV_Crows_MK19_USA", 25],
["CUP_B_HMMWV_SOV_USA", 25],
["CUP_B_BRDM2_HQ_CDF", 25],
["CUP_O_BRDM2_HQ_SLA", 25],
["CUP_I_BRDM2_HQ_UN", 25],
["CUP_I_BRDM2_HQ_NAPA", 25],
["CUP_I_BRDM2_HQ_TK_Gue", 25],
["CUP_O_BRDM2_HQ_TKA", 25],
["CUP_O_BRDM2_HQ_CHDKZ", 25],
["CUP_O_BRDM2_CHDKZ", 25],
["CUP_O_BRDM2_SLA", 25],
["CUP_O_BRDM2_TKA", 25],
["CUP_I_BRDM2_NAPA", 25],
["CUP_I_BRDM2_TK_Gue", 25],
["CUP_I_BRDM2_UN", 25],
["CUP_B_BRDM2_CDF", 25]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,29 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,29 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,32 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,10 @@
/**
* Logistics configuration for All in Arma.
* The configuration is splitted in categories dispatched in the included files.
*/
#include "Exile\Air.sqf"
#include "Exile\LandVehicle.sqf"
#include "Exile\Ship.sqf"
#include "Exile\Building.sqf"
#include "Exile\ReammoBox.sqf"
#include "Exile\Others.sqf"

View File

@ -0,0 +1,33 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"Helicopter",
"Helicopter_Base_F"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
["Air", 50]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,31 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,169 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
//Larger Vehicles
"BRDM2_HQ_Base",
"BTR40_MG_base_EP1",
"Landrover_civ",
"Offroad_02_base_F",
"Offroad_01_unarmed_base_F",
"Offroad_01_repair_base_F",
"LSV_01_base_F",
"LSV_02_base_F",
"MRAP_03_base_F",
"SUV_01_base_F",
"SUV_armored_Base",
"SUV_Base",
"UAZ_Base",
"HMMWV_Base",
//Trucks
"Truck_F",
"MRAP_01_base_F",
"MRAP_02_base_F",
//Armed
"Offroad_01_military_base_F",
//Boats
"Boat_Transport_02_base_F",
"SDV_01_base_F",
"Boat_Civil_01_base_F"
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
//Cars
"Hatchback_01_base_F",
"Lada_Base",
"Octavia_Base",
"volha_Base",
//Larger Vehicles
"BRDM2_HQ_Base",
"BTR40_MG_base_EP1",
"Landrover_civ",
"Offroad_02_base_F",
"Offroad_01_unarmed_base_F",
"Offroad_01_repair_base_F",
"LSV_01_base_F",
"LSV_02_base_F",
"MRAP_03_base_F",
"SUV_01_base_F",
"SUV_armored_Base",
"SUV_Base",
"UAZ_Base",
"HMMWV_Base",
//Trucks
"Truck_F",
"MRAP_01_base_F",
"MRAP_02_base_F",
//Armed
"Offroad_01_military_base_F",
//Boats
"Boat_Transport_02_base_F",
"SDV_01_base_F",
"Boat_Civil_01_base_F"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
//Cars
"Hatchback_01_base_F",
"Lada_Base",
"Octavia_Base",
"volha_Base",
//Larger Vehicles
"BRDM2_HQ_Base",
"BTR40_MG_base_EP1",
"Landrover_civ",
"Offroad_02_base_F",
"Offroad_01_unarmed_base_F",
"Offroad_01_repair_base_F",
"LSV_01_base_F",
"LSV_02_base_F",
"MRAP_03_base_F",
"SUV_01_base_F",
"SUV_armored_Base",
"SUV_Base",
"UAZ_Base",
"HMMWV_Base",
//Trucks
"Truck_F",
"MRAP_01_base_F",
"MRAP_02_base_F",
//Armed
"Offroad_01_military_base_F",
"Tank_F",
//Boats
"Boat_Transport_02_base_F",
"SDV_01_base_F",
"Boat_Civil_01_base_F"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
//Cars
["Hatchback_01_base_F", 10],
["Lada_Base", 10],
["Octavia_Base", 10],
["volha_Base", 10],
//Larger Vehicles
["BRDM2_HQ_Base", 25],
["BTR40_MG_base_EP1", 25],
["Landrover_civ", 25],
["Offroad_02_base_F", 25],
["Offroad_01_unarmed_base_F", 25],
["Offroad_01_repair_base_F", 25],
["LSV_01_base_F", 50],
["LSV_02_base_F", 50],
["MRAP_03_base_F", 50],
["SUV_01_base_F", 25],
["SUV_armored_Base", 25],
["SUV_Base", 25],
["UAZ_Base", 25],
["HMMWV_Base", 25],
["MRAP_01_base_F", 50],
["MRAP_02_base_F", 50],
//Trucks
["Truck_F", 100],
//Armed
["Offroad_01_military_base_F", 25],
//Boats
["Boat_Transport_02_base_F", 25],
["SDV_01_base_F", 25],
["Boat_Civil_01_base_F", 25]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["Quadbike_01_base_F", 25],
["Bicycle", 10],
["Golf_Base", 25],
["Kart_01_Base_F", 25],
["Tractor_Base", 25],
["Rubber_duck_base_F", 25],
["TowingTractor", 25]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
"Bicycle"
];

View File

@ -0,0 +1,29 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,29 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,32 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,78 @@
/**
* Dump the effective logistics configuration to the RPT file.
*
* Copyright (C) 2014 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/>.
*/
private ["_idx"];
systemChat "DUMPING CONFIG...";
diag_log text "============= BEGIN OF LOGISTICS CONFIG DUMP =============";
diag_log text "R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_tow}, {_idx = _idx+1}] do
{
diag_log text format [" ""%1""%2", R3F_LOG_CFG_can_tow select _idx, if (_idx < count R3F_LOG_CFG_can_tow - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "";
diag_log text "R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_be_towed}, {_idx = _idx+1}] do
{
diag_log text format [" ""%1""%2", R3F_LOG_CFG_can_be_towed select _idx, if (_idx < count R3F_LOG_CFG_can_be_towed - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "";
diag_log text "R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_lift}, {_idx = _idx+1}] do
{
diag_log text format [" ""%1""%2", R3F_LOG_CFG_can_lift select _idx, if (_idx < count R3F_LOG_CFG_can_lift - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "";
diag_log text "R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_be_lifted}, {_idx = _idx+1}] do
{
diag_log text format [" ""%1""%2", R3F_LOG_CFG_can_be_lifted select _idx, if (_idx < count R3F_LOG_CFG_can_be_lifted - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "";
diag_log text "R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_transport_cargo}, {_idx = _idx+1}] do
{
diag_log text format [" [""%1"", %2]%3", R3F_LOG_CFG_can_transport_cargo select _idx select 0, R3F_LOG_CFG_can_transport_cargo select _idx select 1, if (_idx < count R3F_LOG_CFG_can_transport_cargo - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "";
diag_log text "R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_be_transported_cargo}, {_idx = _idx+1}] do
{
diag_log text format [" [""%1"", %2]%3", R3F_LOG_CFG_can_be_transported_cargo select _idx select 0, R3F_LOG_CFG_can_be_transported_cargo select _idx select 1, if (_idx < count R3F_LOG_CFG_can_be_transported_cargo - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "";
diag_log text "R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +";
diag_log text "[";
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_be_moved_by_player}, {_idx = _idx+1}] do
{
diag_log text format [" ""%1""%2", R3F_LOG_CFG_can_be_moved_by_player select _idx, if (_idx < count R3F_LOG_CFG_can_be_moved_by_player - 1) then {","} else {""}];
};
diag_log text "];";
diag_log text "============== END OF LOGISTICS CONFIG DUMP ==============";
systemChat "CONFIG DUMPED TO RPT !";

View File

@ -0,0 +1,321 @@
/**
* Launch the tool helping to edit the logistics configuration.
*
* THIS TOOL IS UNOFFICIAL AND FOR EXPERT ONLY !
* READ THE PDF DOCUMENTATION TO KNOW HOW TO USE IT !
*
* @usage Don't forget to fill the list of class names to configure in list_of_objects_to_config.sqf.
* @usage execVM "R3F_LOG\addons_config\logistics_config_maker_tool\launch_config_tool.sqf";
*
* Copyright (C) 2014 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/>.
*/
waitUntil {!isNil "R3F_LOG_active"};
waitUntil {!isNull player};
if (!isServer || {isPlayer _x} count playableUnits > 1) exitWith {systemChat "NOT FOR USE IN MULTIPLAYER !";};
if (!isNil "BOOL_continue" && {BOOL_continue}) exitWith {systemChat "CONFIG TOOLS ALREADY IN USE !";};
R3F_LOG_CFG_string_condition_allow_logistics_on_this_client = "false";
TAB_class_names_to_config = [
#include "list_of_objects_to_config.sqf"
];
/*
* On inverse l'ordre de toutes les listes de noms de classes pour donner
* la priorité aux classes spécifiques sur les classes génériques
*/
reverse R3F_LOG_CFG_can_tow;
reverse R3F_LOG_CFG_can_be_towed;
reverse R3F_LOG_CFG_can_lift;
reverse R3F_LOG_CFG_can_be_lifted;
reverse R3F_LOG_CFG_can_transport_cargo;
reverse R3F_LOG_CFG_can_be_transported_cargo;
reverse R3F_LOG_CFG_can_be_moved_by_player;
reverse R3F_LOG_classes_transporteurs;
reverse R3F_LOG_classes_objets_transportables;
R3F_LOG_spawn_position = player modelToWorld [0, 30, 0];
player addAction ["Dump config to RPT", "R3F_LOG\addons_config\logistics_config_maker_tool\dump_config.sqf"];
player addAction ["Set new spawn position", {R3F_LOG_spawn_position = player modelToWorld [0, 30, 0]; systemChat "New spawn position defined.";}];
player addEventHandler ["HandleDamage", {0}];
BOOL_continue = true;
IDX_requested_vehicle = 0;
KEY_mode = "";
INT_capacity = 0;
disableSerialization;
while {isNull (findDisplay 46)} do {sleep 1;};
FNCT_onKeyDown =
{
private ["_ret"];
_ret = false;
switch (_this select 1) do
{
// Left key - previous
case 203:
{
IDX_requested_vehicle = 0 max (IDX_requested_vehicle - 1);
_ret = true;
};
// Right key - next
case 205:
{
IDX_requested_vehicle = (count TAB_class_names_to_config - 1) min (IDX_requested_vehicle + 1);
_ret = true;
};
// Enter key - add the selected feature
case 28:
{
private ["_class_name"];
_class_name = toLower configName (configFile >> "CfgVehicles" >> (TAB_class_names_to_config select IDX_requested_vehicle));
switch (KEY_mode) do
{
case "m":
{
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player - [_class_name];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player + [_class_name];
};
case "l":
{
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted - [_class_name];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted + [_class_name];
};
case "t":
{
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed - [_class_name];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed + [_class_name];
};
case "L":
{
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift - [_class_name];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift + [_class_name];
};
case "T":
{
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow - [_class_name];
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow + [_class_name];
};
case "c":
{
private ["_idx"];
R3F_LOG_classes_objets_transportables = R3F_LOG_classes_objets_transportables - [_class_name];
R3F_LOG_classes_objets_transportables = R3F_LOG_classes_objets_transportables + [_class_name];
R3F_LOG_CFG_objets_transportables_new = [];
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_be_transported_cargo}, {_idx = _idx+1}] do
{
if (toLower (R3F_LOG_CFG_can_be_transported_cargo select _idx select 0) != _class_name) then
{
R3F_LOG_CFG_objets_transportables_new = R3F_LOG_CFG_objets_transportables_new + [R3F_LOG_CFG_can_be_transported_cargo select _idx];
};
};
R3F_LOG_CFG_can_be_transported_cargo = +R3F_LOG_CFG_objets_transportables_new;
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo + [[_class_name, INT_capacity]];
};
case "C":
{
private ["_idx"];
R3F_LOG_classes_transporteurs = R3F_LOG_classes_transporteurs - [_class_name];
R3F_LOG_classes_transporteurs = R3F_LOG_classes_transporteurs + [_class_name];
R3F_LOG_CFG_transporteurs_new = [];
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_transport_cargo}, {_idx = _idx+1}] do
{
if (toLower (R3F_LOG_CFG_can_transport_cargo select _idx select 0) != _class_name) then
{
R3F_LOG_CFG_transporteurs_new = R3F_LOG_CFG_transporteurs_new + [R3F_LOG_CFG_can_transport_cargo select _idx];
};
};
R3F_LOG_CFG_can_transport_cargo = +R3F_LOG_CFG_transporteurs_new;
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo + [[_class_name, INT_capacity]];
};
};
KEY_mode = "";
INT_capacity = 0;
_ret = true;
};
// Del key - delete the selected feature
case 211:
{
private ["_class_name"];
_class_name = toLower configName (configFile >> "CfgVehicles" >> (TAB_class_names_to_config select IDX_requested_vehicle));
switch (KEY_mode) do
{
case "m":
{
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player - [_class_name];
};
case "l":
{
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted - [_class_name];
};
case "t":
{
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed - [_class_name];
};
case "L":
{
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift - [_class_name];
};
case "T":
{
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow - [_class_name];
};
case "c":
{
private ["_idx"];
R3F_LOG_classes_objets_transportables = R3F_LOG_classes_objets_transportables - [_class_name];
R3F_LOG_CFG_objets_transportables_new = [];
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_be_transported_cargo}, {_idx = _idx+1}] do
{
if (toLower (R3F_LOG_CFG_can_be_transported_cargo select _idx select 0) != _class_name) then
{
R3F_LOG_CFG_objets_transportables_new = R3F_LOG_CFG_objets_transportables_new + [R3F_LOG_CFG_can_be_transported_cargo select _idx];
};
};
R3F_LOG_CFG_can_be_transported_cargo = +R3F_LOG_CFG_objets_transportables_new;
};
case "C":
{
private ["_idx"];
R3F_LOG_classes_transporteurs = R3F_LOG_classes_transporteurs - [_class_name];
R3F_LOG_CFG_transporteurs_new = [];
for [{_idx = 0}, {_idx < count R3F_LOG_CFG_can_transport_cargo}, {_idx = _idx+1}] do
{
if (toLower (R3F_LOG_CFG_can_transport_cargo select _idx select 0) != _class_name) then
{
R3F_LOG_CFG_transporteurs_new = R3F_LOG_CFG_transporteurs_new + [R3F_LOG_CFG_can_transport_cargo select _idx];
};
};
R3F_LOG_CFG_can_transport_cargo = +R3F_LOG_CFG_transporteurs_new;
};
};
KEY_mode = "";
INT_capacity = 0;
_ret = true;
};
case 39:{KEY_mode = "m"; _ret = true;};
case 38:{KEY_mode = if (_this select 2) then {"L"} else {"l"}; _ret = true;};
case 20:{KEY_mode = if (_this select 2) then {"T"} else {"t"}; _ret = true;};
case 46:{KEY_mode = if (_this select 2) then {"C"} else {"c"}; _ret = true;};
case 82:{INT_capacity = INT_capacity * 10 + 0; _ret = true;};
case 79:{INT_capacity = INT_capacity * 10 + 1; _ret = true;};
case 80:{INT_capacity = INT_capacity * 10 + 2; _ret = true;};
case 81:{INT_capacity = INT_capacity * 10 + 3; _ret = true;};
case 75:{INT_capacity = INT_capacity * 10 + 4; _ret = true;};
case 76:{INT_capacity = INT_capacity * 10 + 5; _ret = true;};
case 77:{INT_capacity = INT_capacity * 10 + 6; _ret = true;};
case 71:{INT_capacity = INT_capacity * 10 + 7; _ret = true;};
case 72:{INT_capacity = INT_capacity * 10 + 8; _ret = true;};
case 73:{INT_capacity = INT_capacity * 10 + 9; _ret = true;};
};
_ret
};
(findDisplay 46) displayAddEventHandler ["KeyDown", "_this call FNCT_onKeyDown"];
while {BOOL_continue} do
{
private ["_idx_current_vehicle", "_class", "_class_name", "_vehicle", "_class_infos"];
_idx_current_vehicle = IDX_requested_vehicle;
_class = configFile >> "CfgVehicles" >> (TAB_class_names_to_config select _idx_current_vehicle);
_class_name = toLower configName _class;
_vehicle = _class_name createVehicle R3F_LOG_spawn_position;
while {_idx_current_vehicle == IDX_requested_vehicle} do
{
_class_infos = "<t align='left'>";
_class_infos = _class_infos + "<t align='center'>%1 (%2/%3)</t><br/>";
_class_infos = _class_infos + "<br/>";
_class_infos = _class_infos + "<t color='#6666ff'>Specific config :</t><br/>";
_class_infos = _class_infos + format ["<t color='#66ffff'>[%1] Movable</t><br/>", if (_class_name in R3F_LOG_CFG_can_be_moved_by_player) then {"M"} else {" "}];
_class_infos = _class_infos + format ["<t color='#bbbbff'>[%1] Liftable</t><br/>", if (_class_name in R3F_LOG_CFG_can_be_lifted) then {"L"} else {" "}];
_class_infos = _class_infos + format ["<t color='#ff8888'>[%1] Towable</t><br/>", if (_class_name in R3F_LOG_CFG_can_be_towed) then {"T"} else {" "}];
_class_infos = _class_infos + format ["<t color='#00ff00'>[%1] Cargo-able (transport)</t><br/>", if (_class_name in R3F_LOG_classes_objets_transportables) then {format ["C%1", R3F_LOG_CFG_can_be_transported_cargo select (R3F_LOG_classes_objets_transportables find _class_name) select 1]} else {" "}];
_class_infos = _class_infos + "<br/>";
_class_infos = _class_infos + format ["<t color='#bbbbff'>[%1] Lifter</t><br/>", if (_class_name in R3F_LOG_CFG_can_lift) then {"L"} else {" "}];
_class_infos = _class_infos + format ["<t color='#ff8888'>[%1] Tower</t><br/>", if (_class_name in R3F_LOG_CFG_can_tow) then {"T"} else {" "}];
_class_infos = _class_infos + format ["<t color='#00ff00'>[%1] Cargo (transporter)</t><br/>", if (_class_name in R3F_LOG_classes_transporteurs) then {format ["C%1", R3F_LOG_CFG_can_transport_cargo select (R3F_LOG_classes_transporteurs find _class_name) select 1]} else {" "}];
_class_infos = _class_infos + "<br/>";
_class_infos = _class_infos + "<t color='#6666ff'>Inherited config :</t><br/>";
private ["_j", "_tab_inheritance_tree"];
_tab_inheritance_tree = [_class];
while {isClass inheritsFrom (_tab_inheritance_tree select 0)} do
{
_tab_inheritance_tree = [inheritsFrom (_tab_inheritance_tree select 0)] + _tab_inheritance_tree;
};
for [{_j = 0}, {_j < count _tab_inheritance_tree}, {_j = _j+1}] do
{
private ["_class_name_inherit", "_options"];
_class_name_inherit = toLower configName (_tab_inheritance_tree select _j);
_options = "[";
if (_class_name_inherit in R3F_LOG_CFG_can_be_moved_by_player)
then {_options = _options + "<t color='#00ff00'>M</t>";};
if (_class_name_inherit in R3F_LOG_CFG_can_be_lifted)
then {_options = _options + "<t color='#00ff00'>L</t>";};
if (_class_name_inherit in R3F_LOG_CFG_can_be_towed)
then {_options = _options + "<t color='#00ff00'>T</t>";};
if (_class_name_inherit in R3F_LOG_classes_objets_transportables)
then {_options = _options + format ["<t color='#00ff00'>C%1</t>", R3F_LOG_CFG_can_be_transported_cargo select (R3F_LOG_classes_objets_transportables find _class_name_inherit) select 1];};
_options = _options + "|";
if (_class_name_inherit in R3F_LOG_CFG_can_lift)
then {_options = _options + "<t color='#00ff00'>L</t>";};
if (_class_name_inherit in R3F_LOG_CFG_can_tow)
then {_options = _options + "<t color='#00ff00'>T</t>";};
if (_class_name_inherit in R3F_LOG_classes_transporteurs)
then {_options = _options + format ["<t color='#00ff00'>C%1</t>", R3F_LOG_CFG_can_transport_cargo select (R3F_LOG_classes_transporteurs find _class_name_inherit) select 1];};
_options = _options + "] ";
_class_infos = _class_infos + _options + _class_name_inherit + "<br/>";
};
_class_infos = _class_infos + "</t>";
hintSilent parseText format [_class_infos, _class_name, (_idx_current_vehicle+1), count TAB_class_names_to_config];
sleep 0.05;
};
deleteVehicle _vehicle;
sleep 0.01;
// Clean potential object spawned by the vehicle (effect, etc.)
{
if (_x != player) then
{
deleteVehicle _x;
};
} forEach nearestObjects [R3F_LOG_spawn_position, ["All"], 50];
sleep 0.025;
};

View File

@ -0,0 +1,27 @@
"B_static_AA_F",
"I_static_AA_F",
"O_static_AA_F",
"AT_01_base_F",
"B_static_AT_F",
"I_static_AT_F",
"O_static_AT_F",
"HMG_01_base_F",
"B_HMG_01_F",
"HMG_01_A_base_F",
"B_HMG_01_A_F",
"I_HMG_01_A_F",
"O_HMG_01_A_F",
"HMG_01_high_base_F",
"B_HMG_01_high_F",
"I_HMG_01_high_F",
"O_HMG_01_high_F",
"I_HMG_01_F",
"O_HMG_01_F",
"StaticMortar",
"Mortar_01_base_F",
"B_Mortar_01_F",
"I_G_Mortar_01_F",
"B_G_Mortar_01_F",
"O_G_Mortar_01_F",
"I_Mortar_01_F",
"O_Mortar_01_F"

View File

@ -0,0 +1,31 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
"r3f_uniformbox",
"r3f_weaponstock"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["r3f_uniformbox", 5],
["r3f_weaponstock", 5]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,15 @@
/**
* Logistics configuration for All in Arma.
* The configuration is splitted in categories dispatched in the included files.
*/
// Load the logistics config only if the addon is used
if (isClass (configfile >> "CfgPatches" >> "AiA_Core")) then
{
#include "Super\Air.sqf"
#include "Super\LandVehicle.sqf"
#include "Super\Ship.sqf"
#include "Super\Building.sqf"
#include "Super\ReammoBox.sqf"
#include "Super\Others.sqf"
};

View File

@ -0,0 +1,170 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
"Helicopter",
"Helicopter_Base_F"
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
//Cars
"B_G_Offroad_01_F",
"B_G_Offroad_01_repair_F",
"B_G_Quadbike_01_F",
"B_MRAP_01_F",
"B_Quadbike_01_F",
"O_G_Quadbike_01_F",
"O_MRAP_02_F",
"O_Quadbike_01_F",
"I_Quadbike_01_F",
"I_G_Quadbike_01_F",
"I_MRAP_03_F",
"C_Offroad_02_unarmed_F",
"C_Offroad_02_unarmed_black_F",
"C_Offroad_02_unarmed_blue_F",
"C_Offroad_02_unarmed_green_F",
"C_Offroad_02_unarmed_orange_F",
"C_Offroad_02_unarmed_red_F",
"C_Offroad_02_unarmed_white_F",
"I_C_Offroad_02_unarmed_F",
"I_C_Offroad_02_unarmed_brown_F",
"I_C_Offroad_02_unarmed_olive_F",
"B_T_MRAP_01_F",
"B_T_LSV_01_armed_F",
"B_T_LSV_01_armed_CTRG_F",
"B_T_LSV_01_unarmed_F",
"B_T_LSV_01_unarmed_CTRG_F",
"B_LSV_01_armed_F",
"B_LSV_01_unarmed_F",
"B_CTRG_LSV_01_light_F",
"B_LSV_01_armed_black_F",
"B_LSV_01_armed_olive_F",
"B_LSV_01_armed_sand_F",
"B_LSV_01_unarmed_black_F",
"B_LSV_01_unarmed_olive_F",
"B_LSV_01_unarmed_sand_F",
"B_T_LSV_01_armed_black_F",
"B_T_LSV_01_armed_olive_F",
"B_T_LSV_01_armed_sand_F",
"B_T_LSV_01_unarmed_black_F",
"B_T_LSV_01_unarmed_olive_F",
"B_T_LSV_01_unarmed_sand_F",
"O_T_LSV_02_armed_F",
"O_T_LSV_02_armed_viper_F",
"O_T_LSV_02_unarmed_F",
"O_T_LSV_02_unarmed_viper_F",
"O_LSV_02_armed_F",
"O_LSV_02_armed_viper_F",
"O_LSV_02_unarmed_F",
"O_LSV_02_unarmed_viper_F",
"O_T_LSV_02_armed_black_F",
"O_T_LSV_02_armed_ghex_F",
"O_T_LSV_02_armed_arid_F",
"O_T_LSV_02_unarmed_black_F",
"O_T_LSV_02_unarmed_ghex_F",
"O_T_LSV_02_unarmed_arid_F",
"O_LSV_02_armed_black_F",
"O_LSV_02_armed_ghex_F",
"O_LSV_02_armed_arid_F",
"O_LSV_02_unarmed_black_F",
"O_LSV_02_unarmed_ghex_F",
"O_LSV_02_unarmed_arid_F",
"O_T_Quadbike_01_ghex_F",
//Trucks
"B_Truck_01_transport_F",
"B_Truck_01_covered_F",
"B_Truck_01_mover_F",
"B_Truck_01_box_F",
"B_Truck_01_Repair_F",
"B_Truck_01_ammo_F",
"B_Truck_01_fuel_F",
"B_Truck_01_medical_F",
"B_G_Van_01_transport_F",
"B_G_Van_01_fuel_F",
"O_G_Offroad_01_repair_F",
"O_G_Offroad_01_F",
"O_Truck_02_covered_F",
"O_Truck_02_transport_F",
"O_Truck_03_transport_F",
"O_Truck_03_covered_F",
"O_Truck_03_repair_F",
"O_Truck_03_ammo_F",
"O_Truck_03_fuel_F",
"O_Truck_03_medical_F",
"O_Truck_03_device_F",
"O_Truck_02_box_F",
"O_Truck_02_medical_F",
"O_Truck_02_Ammo_F",
"O_Truck_02_fuel_F",
"O_G_Van_01_transport_F",
"O_G_Van_01_fuel_F",
"I_G_Offroad_01_F",
"I_G_Offroad_01_armed_F",
"I_Truck_02_transport_F",
"I_Truck_02_ammo_F",
"I_Truck_02_box_F",
"I_Truck_02_medical_F",
"I_Truck_02_fuel_F",
"I_G_Van_01_transport_F",
"I_G_Van_01_fuel_F",
"B_T_Truck_01_mover_F",
"B_T_Truck_01_transport_F",
"B_T_Truck_01_covered_F",
"O_T_Truck_03_transport_ghex_F",
"O_T_Truck_03_covered_ghex_F",
"O_T_Truck_03_device_ghex_F",
"I_C_Van_01_transport_F",
"I_C_Van_01_transport_brown_F",
"I_C_Van_01_transport_olive_F",
//Armed
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
"B_MRAP_01_gmg_F",
"B_MRAP_01_hmg_F",
"O_MRAP_02_gmg_F",
"O_MRAP_02_hmg_F",
"I_MRAP_03_hmg_F",
"I_MRAP_03_gmg_F",
"B_APC_Wheeled_01_cannon_F",
"I_APC_Wheeled_03_cannon_F",
//Tanks
"Tank",
"B_APC_Tracked_01_rcws_F",
"B_APC_Tracked_01_CRV_F",
"B_APC_Tracked_01_AA_F",
"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
"B_MBT_01_TUSK_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_MBT_02_cannon_F",
"O_MBT_02_arty_F",
"O_APC_Wheeled_02_rcws_F",
"I_APC_tracked_03_cannon_F",
"I_MBT_03_cannon_F"
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,31 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,373 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
//Trucks
"B_Truck_01_transport_F",
"B_Truck_01_covered_F",
"B_Truck_01_mover_F",
"B_Truck_01_box_F",
"B_Truck_01_Repair_F",
"B_Truck_01_ammo_F",
"B_Truck_01_fuel_F",
"B_Truck_01_medical_F",
"B_G_Van_01_transport_F",
"B_G_Van_01_fuel_F",
"O_G_Offroad_01_repair_F",
"O_G_Offroad_01_F",
"O_Truck_02_covered_F",
"O_Truck_02_transport_F",
"O_Truck_03_transport_F",
"O_Truck_03_covered_F",
"O_Truck_03_repair_F",
"O_Truck_03_ammo_F",
"O_Truck_03_fuel_F",
"O_Truck_03_medical_F",
"O_Truck_03_device_F",
"O_Truck_02_box_F",
"O_Truck_02_medical_F",
"O_Truck_02_Ammo_F",
"O_Truck_02_fuel_F",
"O_G_Van_01_transport_F",
"O_G_Van_01_fuel_F",
"I_G_Offroad_01_F",
"I_G_Offroad_01_armed_F",
"I_Truck_02_transport_F",
"I_Truck_02_ammo_F",
"I_Truck_02_box_F",
"I_Truck_02_medical_F",
"I_Truck_02_fuel_F",
"I_G_Van_01_transport_F",
"I_G_Van_01_fuel_F",
//Armed
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
"B_MRAP_01_gmg_F",
"B_MRAP_01_hmg_F",
"O_MRAP_02_gmg_F",
"O_MRAP_02_hmg_F",
"I_MRAP_03_hmg_F",
"I_MRAP_03_gmg_F",
"B_APC_Wheeled_01_cannon_F",
"I_APC_Wheeled_03_cannon_F",
//Tanks
"B_APC_Tracked_01_rcws_F",
"B_APC_Tracked_01_CRV_F",
"B_APC_Tracked_01_AA_F",
"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
"B_MBT_01_TUSK_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_MBT_02_cannon_F",
"O_MBT_02_arty_F",
"O_APC_Wheeled_02_rcws_F",
"I_APC_tracked_03_cannon_F",
"I_MBT_03_cannon_F"
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
//Cars
"B_G_Offroad_01_F",
"B_G_Offroad_01_repair_F",
"B_G_Quadbike_01_F",
"B_MRAP_01_F",
"B_Quadbike_01_F",
"O_G_Quadbike_01_F",
"O_MRAP_02_F",
"O_Quadbike_01_F",
"I_Quadbike_01_F",
"I_G_Quadbike_01_F",
"I_MRAP_03_F",
"C_Offroad_02_unarmed_F",
"C_Offroad_02_unarmed_black_F",
"C_Offroad_02_unarmed_blue_F",
"C_Offroad_02_unarmed_green_F",
"C_Offroad_02_unarmed_orange_F",
"C_Offroad_02_unarmed_red_F",
"C_Offroad_02_unarmed_white_F",
"I_C_Offroad_02_unarmed_F",
"I_C_Offroad_02_unarmed_brown_F",
"I_C_Offroad_02_unarmed_olive_F",
"B_T_MRAP_01_F",
"B_T_LSV_01_armed_F",
"B_T_LSV_01_armed_CTRG_F",
"B_T_LSV_01_unarmed_F",
"B_T_LSV_01_unarmed_CTRG_F",
"B_LSV_01_armed_F",
"B_LSV_01_unarmed_F",
"B_CTRG_LSV_01_light_F",
"B_LSV_01_armed_black_F",
"B_LSV_01_armed_olive_F",
"B_LSV_01_armed_sand_F",
"B_LSV_01_unarmed_black_F",
"B_LSV_01_unarmed_olive_F",
"B_LSV_01_unarmed_sand_F",
"B_T_LSV_01_armed_black_F",
"B_T_LSV_01_armed_olive_F",
"B_T_LSV_01_armed_sand_F",
"B_T_LSV_01_unarmed_black_F",
"B_T_LSV_01_unarmed_olive_F",
"B_T_LSV_01_unarmed_sand_F",
"O_T_LSV_02_armed_F",
"O_T_LSV_02_armed_viper_F",
"O_T_LSV_02_unarmed_F",
"O_T_LSV_02_unarmed_viper_F",
"O_LSV_02_armed_F",
"O_LSV_02_armed_viper_F",
"O_LSV_02_unarmed_F",
"O_LSV_02_unarmed_viper_F",
"O_T_LSV_02_armed_black_F",
"O_T_LSV_02_armed_ghex_F",
"O_T_LSV_02_armed_arid_F",
"O_T_LSV_02_unarmed_black_F",
"O_T_LSV_02_unarmed_ghex_F",
"O_T_LSV_02_unarmed_arid_F",
"O_LSV_02_armed_black_F",
"O_LSV_02_armed_ghex_F",
"O_LSV_02_armed_arid_F",
"O_LSV_02_unarmed_black_F",
"O_LSV_02_unarmed_ghex_F",
"O_LSV_02_unarmed_arid_F",
"O_T_Quadbike_01_ghex_F",
//Trucks
"B_Truck_01_transport_F",
"B_Truck_01_covered_F",
"B_Truck_01_mover_F",
"B_Truck_01_box_F",
"B_Truck_01_Repair_F",
"B_Truck_01_ammo_F",
"B_Truck_01_fuel_F",
"B_Truck_01_medical_F",
"B_G_Van_01_transport_F",
"B_G_Van_01_fuel_F",
"O_G_Offroad_01_repair_F",
"O_G_Offroad_01_F",
"O_Truck_02_covered_F",
"O_Truck_02_transport_F",
"O_Truck_03_transport_F",
"O_Truck_03_covered_F",
"O_Truck_03_repair_F",
"O_Truck_03_ammo_F",
"O_Truck_03_fuel_F",
"O_Truck_03_medical_F",
"O_Truck_03_device_F",
"O_Truck_02_box_F",
"O_Truck_02_medical_F",
"O_Truck_02_Ammo_F",
"O_Truck_02_fuel_F",
"O_G_Van_01_transport_F",
"O_G_Van_01_fuel_F",
"I_G_Offroad_01_F",
"I_G_Offroad_01_armed_F",
"I_Truck_02_transport_F",
"I_Truck_02_ammo_F",
"I_Truck_02_box_F",
"I_Truck_02_medical_F",
"I_Truck_02_fuel_F",
"I_G_Van_01_transport_F",
"I_G_Van_01_fuel_F",
"B_T_Truck_01_mover_F",
"B_T_Truck_01_transport_F",
"B_T_Truck_01_covered_F",
"O_T_Truck_03_transport_ghex_F",
"O_T_Truck_03_covered_ghex_F",
"O_T_Truck_03_device_ghex_F",
"I_C_Van_01_transport_F",
"I_C_Van_01_transport_brown_F",
"I_C_Van_01_transport_olive_F",
//Armed
"B_G_Offroad_01_armed_F",
"O_G_Offroad_01_armed_F",
"B_MRAP_01_gmg_F",
"B_MRAP_01_hmg_F",
"O_MRAP_02_gmg_F",
"O_MRAP_02_hmg_F",
"I_MRAP_03_hmg_F",
"I_MRAP_03_gmg_F",
"B_APC_Wheeled_01_cannon_F",
"I_APC_Wheeled_03_cannon_F",
//Tanks
"B_APC_Tracked_01_rcws_F",
"B_APC_Tracked_01_CRV_F",
"B_APC_Tracked_01_AA_F",
"B_MBT_01_arty_F",
"B_MBT_01_mlrs_F",
"B_MBT_01_TUSK_F",
"O_APC_Tracked_02_cannon_F",
"O_APC_Tracked_02_AA_F",
"O_MBT_02_cannon_F",
"O_MBT_02_arty_F",
"O_APC_Wheeled_02_rcws_F",
"I_APC_tracked_03_cannon_F",
"I_MBT_03_cannon_F"
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
//Cars
["B_G_Offroad_01_F", 20],
["B_G_Offroad_01_repair_F", 20],
["B_G_Quadbike_01_F", 10],
["B_MRAP_01_F", 25],
["B_Quadbike_01_F", 10],
["O_G_Quadbike_01_F", 10],
["O_MRAP_02_F", 25],
["O_Quadbike_01_F", 10],
["I_Quadbike_01_F", 10],
["I_G_Quadbike_01_F", 10],
["I_MRAP_03_F", 25],
["C_Offroad_02_unarmed_F", 20],
["C_Offroad_02_unarmed_black_F", 20],
["C_Offroad_02_unarmed_blue_F", 20],
["C_Offroad_02_unarmed_green_F", 20],
["C_Offroad_02_unarmed_orange_F", 20],
["C_Offroad_02_unarmed_red_F", 20],
["C_Offroad_02_unarmed_white_F", 20],
["I_C_Offroad_02_unarmed_F", 20],
["I_C_Offroad_02_unarmed_brown_F", 20],
["I_C_Offroad_02_unarmed_olive_F", 20],
["B_T_MRAP_01_F", 25],
["B_T_LSV_01_armed_F", 25],
["B_T_LSV_01_armed_CTRG_F", 25],
["B_T_LSV_01_unarmed_F", 25],
["B_T_LSV_01_unarmed_CTRG_F", 25],
["B_LSV_01_armed_F", 25],
["B_LSV_01_unarmed_F", 25],
["B_CTRG_LSV_01_light_F", 25],
["B_LSV_01_armed_black_F", 25],
["B_LSV_01_armed_olive_F", 25],
["B_LSV_01_armed_sand_F", 25],
["B_LSV_01_unarmed_black_F", 25],
["B_LSV_01_unarmed_olive_F", 25],
["B_LSV_01_unarmed_sand_F", 25],
["B_T_LSV_01_armed_black_F", 25],
["B_T_LSV_01_armed_olive_F", 25],
["B_T_LSV_01_armed_sand_F", 25],
["B_T_LSV_01_unarmed_black_F", 25],
["B_T_LSV_01_unarmed_olive_F", 25],
["B_T_LSV_01_unarmed_sand_F", 25],
["O_T_LSV_02_armed_F", 25],
["O_T_LSV_02_armed_viper_F", 25],
["O_T_LSV_02_unarmed_F", 25],
["O_T_LSV_02_unarmed_viper_F", 25],
["O_LSV_02_armed_F", 25],
["O_LSV_02_armed_viper_F", 25],
["O_LSV_02_unarmed_F", 25],
["O_LSV_02_unarmed_viper_F", 25],
["O_T_LSV_02_armed_black_F", 25],
["O_T_LSV_02_armed_ghex_F", 25],
["O_T_LSV_02_armed_arid_F", 25],
["O_T_LSV_02_unarmed_black_F", 25],
["O_T_LSV_02_unarmed_ghex_F", 25],
["O_T_LSV_02_unarmed_arid_F", 25],
["O_LSV_02_armed_black_F", 25],
["O_LSV_02_armed_ghex_F", 25],
["O_LSV_02_armed_arid_F", 25],
["O_LSV_02_unarmed_black_F", 25],
["O_LSV_02_unarmed_ghex_F", 25],
["O_LSV_02_unarmed_arid_F", 25],
["O_T_Quadbike_01_ghex_F", 10],
//Trucks
["B_Truck_01_transport_F", 100],
["B_Truck_01_covered_F", 100],
["B_Truck_01_mover_F", 100],
["B_Truck_01_box_F", 100],
["B_Truck_01_Repair_F", 25],
["B_Truck_01_ammo_F", 50],
["B_Truck_01_fuel_F", 25],
["B_Truck_01_medical_F", 25],
["B_G_Van_01_transport_F", 50],
["B_G_Van_01_fuel_F", 25],
["O_G_Offroad_01_repair_F", 25],
["O_G_Offroad_01_F", 25],
["O_Truck_02_covered_F", 50],
["O_Truck_02_transport_F", 100],
["O_Truck_03_transport_F", 100],
["O_Truck_03_covered_F", 100],
["O_Truck_03_repair_F", 25],
["O_Truck_03_ammo_F", 50],
["O_Truck_03_fuel_F", 25],
["O_Truck_03_medical_F", 25],
["O_Truck_03_device_F", 25],
["O_Truck_02_box_F", 100],
["O_Truck_02_medical_F", 25],
["O_Truck_02_Ammo_F", 50],
["O_Truck_02_fuel_F", 25],
["O_G_Van_01_transport_F", 50],
["O_G_Van_01_fuel_F", 25],
["I_G_Offroad_01_F", 25],
["I_G_Offroad_01_armed_F", 25],
["I_Truck_02_transport_F", 100],
["I_Truck_02_ammo_F", 50],
["I_Truck_02_box_F", 25],
["I_Truck_02_medical_F", 25],
["I_Truck_02_fuel_F", 25],
["I_G_Van_01_transport_F", 50],
["I_G_Van_01_fuel_F", 25],
["B_T_Truck_01_mover_F", 100],
["B_T_Truck_01_transport_F", 100],
["B_T_Truck_01_covered_F", 100],
["O_T_Truck_03_transport_ghex_F", 100],
["O_T_Truck_03_covered_ghex_F", 100],
["O_T_Truck_03_device_ghex_F", 100],
["I_C_Van_01_transport_F", 100],
["I_C_Van_01_transport_brown_F", 100],
["I_C_Van_01_transport_olive_F", 100],
//Armed
["B_G_Offroad_01_armed_F", 25],
["O_G_Offroad_01_armed_F", 25],
["B_MRAP_01_gmg_F", 50],
["B_MRAP_01_hmg_F", 50],
["O_MRAP_02_gmg_F", 50],
["O_MRAP_02_hmg_F", 50],
["I_MRAP_03_hmg_F", 50],
["I_MRAP_03_gmg_F", 50],
["B_APC_Wheeled_01_cannon_F", 10],
["I_APC_Wheeled_03_cannon_F", 10],
//Tanks
["B_APC_Tracked_01_rcws_F", 50],
["B_APC_Tracked_01_CRV_F", 50],
["B_APC_Tracked_01_AA_F", 50],
["B_MBT_01_arty_F", 50],
["B_MBT_01_mlrs_F", 50],
["B_MBT_01_TUSK_F", 50],
["O_APC_Tracked_02_cannon_F", 50],
["O_APC_Tracked_02_AA_F", 50],
["O_MBT_02_cannon_F", 50],
["O_MBT_02_arty_F", 50],
["O_APC_Wheeled_02_rcws_F", 50],
["I_APC_tracked_03_cannon_F", 50],
["I_MBT_03_cannon_F", 50]
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
["kart_01_base_f", 40],
["quadbike_01_base_f", 40],
["ugv_01_base_f", 100]
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,29 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,29 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,32 @@
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
];
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
];

View File

@ -0,0 +1,121 @@
/**
* English and French comments
* Commentaires anglais et français
*
* This file is a template to add objetcs from an addon in the configuration variables of the logistics system.
* Make a copy of this file and fill it. Then add a #include to this file in the file R3F_LOG\config.sqf.
*
* IMPORTANT NOTE : when a logistics feature is given to an object/vehicle class name, all the classes which inherit
* of the parent/generic class (according to the CfgVehicles) will also have this feature.
* CfgVehicles tree view example : http://madbull.arma.free.fr/A3_stable_1.20.124746_CfgVehicles_tree.html
*
*
* Ce fichier est un exemple vierge permettant d'ajouter des objets d'un addon dans la configuration du système de logistique.
* Faites une copie de ce fichier et remplissez-le. Puis ajouter un #include vers celui-ci dans le fichier R3F_LOG\config.sqf.
*
* NOTE IMPORTANTE : lorsqu'une fonctionnalité logistique est accordée à un nom de classe d'objet/véhicule, les classes
* héritant de cette classe mère/générique (selon le CfgVehicles) se verront également dotées de cette fonctionnalité.
* Exemple d'arborescence du CfgVehicles : http://madbull.arma.free.fr/A3_stable_1.20.124746_CfgVehicles_tree.html
*/
/**
* List of class names of ground vehicles which can tow objects.
* Liste des noms de classes des véhicules terrestres pouvant remorquer des objets.
*/
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
// e.g. : "MyTowingVehicleClassName1", "MyTowingVehicleClassName2"
];
/**
* List of class names of objects which can be towed.
* Liste des noms de classes des objets remorquables.
*/
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
// e.g. : "MyTowableObjectClassName1", "MyTowableObjectClassName2"
];
/****** LIFT WITH VEHICLE / HELIPORTER AVEC VEHICULE ******/
/**
* List of class names of helicopters which can lift objects.
* Liste des noms de classes des hélicoptères pouvant héliporter des objets.
*/
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
// e.g. : "MyLifterVehicleClassName1", "MyLifterVehicleClassName2"
];
/**
* List of class names of objects which can be lifted.
* Liste des noms de classes des objets héliportables.
*/
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
// e.g. : "MyLiftableObjectClassName1", "MyLiftableObjectClassName2"
];
/****** LOAD IN VEHICLE / CHARGER DANS LE VEHICULE ******/
/*
* This section uses a numeric quantification of capacity and cost of the objets.
* For example, in a vehicle has a capacity of 100, we will be able to load in 5 objects costing 20 capacity units.
* The capacity doesn't represent a real volume or weight, but a choice made for gameplay.
*
* Note : the priority of a declaration of cost/capacity to another one corresponds to the inverse order in the tables.
* It means that the most generic classes should be listed before the less generic classes.
* For example : the "Truck_F" class is a child of the "Car_F" class (see http://madbull.arma.free.fr/A3_stable_1.20.124746_CfgVehicles_tree.html).
* If "Car_F" is declared before "Truck_F" with a capacity of 40, and "Truck_F" is declared after with a capacity of 140,
* Then all the child classes of "Truck_F" will have a capacity of 140.
* And all the derived classes of "Car_F", not in "Truck_F", will have a capacity of 40.
*
*
* Cette section utilise une quantification numérique de la capacité et du coût des objets.
* Par exemple, dans un véhicule d'une capacité de 100, nous pouvons charger 5 objets coûtant 20 unités de capacité.
* La capacité ne représente ni un poids, ni un volume, mais un choix fait pour la jouabilité.
*
* Note : la priorité d'une déclaration de coût/capacité sur une autre correspond à l'ordre inverse dans les tableaux.
* Cela implique que les classes les plus génériques doivent être listées avant les classes moins gnériques.
* Par exemple : la classe "Truck_F" est une classe dérviée de "Car_F" (voir http://madbull.arma.free.fr/A3_stable_1.20.124746_CfgVehicles_tree.html).
* Si "Car_F" est déclaré avant "Truck_F" avec une capacité de 40, et que "Truck_F" est déclaré après avec une capacité de 140,
* Alors toutes les classes dérivées de "Truck_F" auront une capacité de 140.
* Et toutes les classes dans "Car_F", non présentes dans "Truck_F", auront une capacité de 40.
*/
/**
* List of class names of vehicles or cargo objects which can transport objects.
* The second element of the nested arrays is the load capacity (in relation with the capacity cost of the objects).
*
* Liste des noms de classes des véhicules ou "objets contenant" pouvant transporter des objets.
* Le deuxième élément des sous-tableaux est la capacité de chargement (en relation avec le coût de capacité des objets).
*/
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
// e.g. : ["MyTransporterClassName1", itsCapacity], ["MyTransporterClassName2", itsCapacity]
];
/**
* List of class names of objects which can be loaded in transport vehicle/cargo.
* The second element of the nested arrays is the cost capacity (in relation with the capacity of the vehicles).
*
* Liste des noms de classes des objets transportables.
* Le deuxième élément des sous-tableaux est le coût de capacité (en relation avec la capacité des véhicules).
*/
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
// e.g. : ["MyTransportableObjectClassName1", itsCost], ["MyTransportableObjectClassName2", itsCost]
];
/****** MOVABLE-BY-PLAYER OBJECTS / OBJETS DEPLACABLES PAR LE JOUEUR ******/
/**
* List of class names of objects which can be carried and moved by a player.
* Liste des noms de classes des objets qui peuvent être portés et déplacés par le joueur.
*/
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
// e.g. : "MyMovableObjectClassName1", "MyMovableObjectClassName2"
];

View File

@ -0,0 +1,95 @@
v3.1
- Added : ability to send/sell back objects to the creation factory (fully configurable)
- Added : the objects are locked to the side/faction/player/none (default config : side, optional unlocking countdown)
- Added : planes and wheeled vehicles have been set as towable in default configuration
- Added : countdown during the helicopter lift hooking process (stay hover)
- Added : logistics configuration for the "All in Arma" addon (auto-activated only if used)
- Added : logistics configuration update from A3 1.22 to A3 1.35
- Added : disable the R3F's airlift when the BIS' airlift is currently in use
- Added : tutorial mission to learn how to use logistics
- Improved : the towing feature is allowed only if the front side of towable object is near of the rear of towing object
- Improved : the cost of creation in the factories are configurable and more realistic (see R3F_LOG_CFG_CF_creation_cost_factor)
- Improved : the vehicle's content interface shows the place taken by each item and a global progress bar of the cargo load
- Improved : easier and more efficient way to protect essential objects (see USER_FUNCT\do_not_lose_it.sqf)
- Improved : when creating/unloading a movable object, the initial height fits to the player's sight
- Improved : when creating/unloading a non-movable object, the warning message is replaced by a confirm dialog
- Improved : take benefits of the getHit command in the injury protection system (http://feedback.arma3.com/view.php?id=18261)
- Improved : performance optimizations to determine the logistics capabilities of an object/vehicle
- Fixed : AI can no longer walk through walls and other objects (http://feedback.arma3.com/view.php?id=19588)
- Fixed : autonomous vehicles can now be loaded/moved/towed
- Fixed : autonomous vehicles from the creation factory can now be used
- Fixed : underwater diver can now take an object in its hands
v3.0 (migration to Arma 3)
- Removed : the [R3F] Artillery is moved to an independent addon (not released)
- Added : new full documentation, please read it carefully before asking questions
- Added : functions to automatically load objects in vehicles at mission start
- Added : creation factory to spawn objects and vehicles, with a credits management
- Improved : player can no longer injure other players while moving objects
- Improved : movable objects can be placed in height (floor, roof and any other surface)
- Improved : movable objects has three pitch orientation methods
- Improved : movable objects can be rotated and translated during their moves
- Improved : the loaded objects interface is now refreshed when the vehicle content changes
- Improved : possibility to enable logistics only on some specific objects and clients
- Improved : several improvements about movements and interactions
- Improved : many other improvements, fixes and optimizations
- See also the v2.0 changes (not publicly released)
v2.0 (not publicly released)
- Added : vehicles and objects from BAF/PMC/ACR/ACE are available for logistics
- Added : the RM70 is available for artillery
- Fixed : take into account the altitude offset on map click (e.g. 2000m offset on Takistan)
- Improved : dialogs and interactions improvements
- Improved : smoke shells are now more efficients
- Improved : the player is automatically forced to walk while moving an object
- Improved : the island height is automatically detected for artillery coordinates
- Improved : the player identity is no longer used in the info messages in the chat
- Improved : the player's language is now automatically detected
v1.6
- Added : smoke shells and cluster shells (sub-munitions/DPICM)
- Added : the mortar of the Stryker MC has now the artillery features
- Added : check if the AI is really able to aim in the requested direction before firing
v1.5
- Added : the AIs can now receive and execute a fire order
- Added : virtual magazines system wich allows to add different charges and effects without addon
- Added : MLRS and BM-21 Grad ballistics calculation for AA:OA and AA:CO 1.54+
- Added : config variables to give access to the artillery computer from inside or outside
- Added : the M109 gun from the vilas' project '85 is in the default configuration
- Fixed : compatibility with the OA 1.54 patch
- Fixed : UTF-8 encoding for the language files
- Improved : source optimization and beautification
v1.4
- Added : compatibility to ArmA 2 (alone) + Operation Arrowhead (alone) + Combined Operations (A2 + OA)
- Added : the Arrowhead (and ArmA 2) objects are now in the logisitics default config
- Added : the ACE OA objects are now in the logisitics default config
- Improved : the artillery system now manages both north-west and south-west origin coord systems
- Added : many new island heights are listed in the config file
- The stringtable.csv is replaced by a simpler alternative system
- Fixed : script warning when a JIP player was not fully initialized
- Added : we can now remove the logistics system (like we already could with the artillery part)
v1.3
- Improved : Lightweightness of the logistics (objects auto-detection)
- Improved : Fire solution search algorithm (max duration decreased and script warning removed)
- Fixed : Something seemed to make the ArmA 2 game engine unstable on specific computer configurations
- Only the players in the same faction are now displayed in the arty computer interface
- Help in the arty computer interface slightly improved
v1.2
- Fix the displayed value for elevation when the artillery piece is in slope
- Adjust the cost capacity of the containers which were equals to their own capacity
- Optimization of the ballistic calculations (speed and precision)
- The longitude/latitude coordinates format are now in a 4 digits notation
- The fire adjustments is now in a "Add, Drop, Left, Right + Dir. to target" notation
- Add the possibility to close/open the interface in an artillery piece
v1.1
- Fix of a bug with velocity of objects with ACE2
- Add the possibility to have a non-movable artillery command quarter
- Some additional precisions in the explanation about the ballistic table generation
v1.0
- First public release

View File

@ -0,0 +1,363 @@
/**
* MAIN CONFIGURATION FILE
*
* English and French comments
* Commentaires anglais et français
*
* (EN)
* This file contains the configuration variables of the logistics system.
* For the configuration of the creation factory, see the file "config_creation_factory.sqf".
* IMPORTANT NOTE : when a logistics feature is given to an object/vehicle class name, all the classes which inherit
* of the parent/generic class (according to the CfgVehicles) will also have this feature.
* CfgVehicles tree view example : http://madbull.arma.free.fr/A3_stable_1.20.124746_CfgVehicles_tree.html
*
* (FR)
* Fichier contenant les variables de configuration du système de logistique.
* Pour la configuration de l'usine de création, voir le fichier "config_creation_factory.sqf".
* NOTE IMPORTANTE : lorsqu'une fonctionnalité logistique est accordée à un nom de classe d'objet/véhicule, les classes
* héritant de cette classe mère/générique (selon le CfgVehicles) se verront également dotées de cette fonctionnalité.
* Exemple d'arborescence du CfgVehicles : http://madbull.arma.free.fr/A3_stable_1.20.124746_CfgVehicles_tree.html
*/
/**
* DISABLE LOGISTICS ON OBJECTS BY DEFAULT
*
* (EN)
* Define if objects and vehicles have logistics features by default,
* or if it must be allowed explicitely on specific objects/vehicles.
*
* If false : all objects are enabled according to the class names listed in this configuration file
* You can disable some objects with : object setVariable ["R3F_LOG_disabled", true];
* If true : all objects are disabled by default
* You can enable some objects with : object setVariable ["R3F_LOG_disabled", false];
*
*
* (FR)
* Défini si les objets et véhicules disposent des fonctionnalités logistiques par défaut,
* ou si elles doivent être autorisés explicitement sur des objets/véhicules spécifiques.
*
* Si false : tous les objets sont actifs en accord avec les noms de classes listés dans ce fichier
* Vous pouvez désactiver certains objets avec : objet setVariable ["R3F_LOG_disabled", true];
* Si true : tous les objets sont inactifs par défaut
* Vous pouvez activer quelques objets avec : objet setVariable ["R3F_LOG_disabled", false];
*/
R3F_LOG_CFG_disabled_by_default = false;
/**
* LOCK THE LOGISTICS FEATURES TO SIDE, FACTION OR PLAYER
*
* (EN)
* Define the lock mode of the logistics features for an object.
* An object can be locked to the a side, faction, a player (respawn) or a unit (life).
* If the object is locked, the player can unlock it according to the
* value of the config variable R3F_LOG_CFG_unlock_objects_timer.
*
* If "none" : no lock features, everyone can used the logistics features.
* If "side" : the object is locked to the last side which interacts with it.
* If "faction" : the object is locked to the last faction which interacts with it.
* If "player" : the object is locked to the last player which interacts with it. The lock is transmitted after respawn.
* If "unit" : the object is locked to the last player which interacts with it. The lock is lost when the unit dies.
*
* Note : for military objects (not civilian), the lock is initialized to the object's side.
*
* See also the config variable R3F_LOG_CFG_unlock_objects_timer.
*
* (FR)
* Défini le mode de verrouillage des fonctionnalités logistics pour un objet donné.
* Un objet peut être verrouillé pour une side, une faction, un joueur (respawn) ou une unité (vie).
* Si l'objet est verrouillé, le joueur peut le déverrouiller en fonction de la
* valeur de la variable de configiration R3F_LOG_CFG_unlock_objects_timer.
*
* Si "none" : pas de verrouillage, tout le monde peut utiliser les fonctionnalités logistiques.
* Si "side" : l'objet est verrouillé pour la dernière side ayant interagit avec lui.
* Si "faction" : l'objet est verrouillé pour la dernière faction ayant interagit avec lui.
* Si "player" : l'objet est verrouillé pour le dernier joueur ayant interagit avec lui. Le verrou est transmis après respawn.
* Si "unit" : l'objet est verrouillé pour le dernier joueur ayant interagit avec lui. Le verrou est perdu quand l'unité meurt.
*
* Note : pour les objets militaires (non civils), le verrou est initialisé à la side de l'objet.
*
* Voir aussi la variable de configiration R3F_LOG_CFG_unlock_objects_timer.
*/
R3F_LOG_CFG_lock_objects_mode = "none";
/**
* COUNTDOWN TO UNLOCK AN OBJECT
*
* Define the countdown duration (in seconds) to unlock a locked object.
* Set to -1 to deny the unlock of objects.
* See also the config variable R3F_LOG_CFG_lock_objects_mode.
*
* Défini la durée (en secondes) du compte-à-rebours pour déverrouiller un objet.
* Mettre à -1 pour qu'on ne puisse pas déverrouiller les objets.
* Voir aussi la variable de configiration R3F_LOG_CFG_lock_objects_mode.
*/
R3F_LOG_CFG_unlock_objects_timer = 30;
/**
* ALLOW NO GRAVITY OVER GROUND
*
* Define if movable objects with no gravity simulation can be set in height over the ground (no ground contact).
* The no gravity objects corresponds to most of decoration and constructions items.
*
* Défini si les objets déplaçable sans simulation de gravité peuvent être position en hauteur sans être contact avec le sol.
* Les objets sans gravité correspondent à la plupart des objets de décors et de construction.
*/
R3F_LOG_CFG_no_gravity_objects_can_be_set_in_height_over_ground = true;
/**
* LANGUAGE
*
* Automatic language selection according to the game language.
* New languages can be easily added (read below).
*
* Sélection automatique de la langue en fonction de la langue du jeu.
* De nouveaux langages peuvent facilement être ajoutés (voir ci-dessous).
*/
R3F_LOG_CFG_language = switch (language) do
{
case "English":{"en"};
case "French":{"fr"};
// Feel free to create you own language file named "XX_strings_lang.sqf", where "XX" is the language code.
// Make a copy of an existing language file (e.g. en_strings_lang.sqf) and translate it.
// Then add a line with this syntax : case "YOUR_GAME_LANGUAGE":{"LANGUAGE_CODE"};
// For example :
//case "Czech":{"cz"}; // Not supported. Need your own "cz_strings_lang.sqf"
//case "Polish":{"pl"}; // Not supported. Need your own "pl_strings_lang.sqf"
//case "Portuguese":{"pt"}; // Not supported. Need your own "pt_strings_lang.sqf"
//case "YOUR_GAME_LANGUAGE":{"LANGUAGE_CODE"}; // Need your own "LANGUAGE_CODE_strings_lang.sqf"
default {"en"}; // If language is not supported, use English
};
/**
* CONDITION TO ALLOW LOGISTICS
*
* (EN)
* This variable allow to set a dynamic SQF condition to allow/deny all logistics features only on specific clients.
* The variable must be a STRING delimited by quotes and containing a valid SQF condition to evaluate during the game.
* For example you can allow logistics only on few clients having a known game ID by setting the variable to :
* "getPlayerUID player in [""76xxxxxxxxxxxxxxx"", ""76yyyyyyyyyyyyyyy"", ""76zzzzzzzzzzzzzzz""]"
* Or based on the profile name : "profileName in [""john"", ""jack"", ""james""]"
* Or only for the server admin : "serverCommandAvailable "#kick"""
* The condition is evaluted in real time, so it can use condition depending on the mission progress : "alive officer && taskState task1 == ""Succeeded"""
* Or to deny logistics in a circular area defined by a marker : "player distance getMarkerPos ""markerName"" > getMarkerSize ""markerName"" select 0"
* Note that quotes of the strings inside the string condition must be doubled.
* Note : if the condition depends of the aimed objects/vehicle, you can use the command cursorTarget
* To allow the logistics to everyone, just set the condition to "true".
*
* (FR)
* Cette variable permet d'utiliser une condition SQF dynamique pour autoriser ou non les fonctions logistiques sur des clients spécifiques.
* La variable doit être une CHAINE de caractères délimitée par des guillemets et doit contenir une condition SQF valide qui sera évaluée durant la mission.
* Par exemple pour autoriser la logistique sur seulement quelques joueurs ayant un ID de jeu connu, la variable peut être défini comme suit :
* "getPlayerUID player in [""76xxxxxxxxxxxxxxx"", ""76yyyyyyyyyyyyyyy"", ""76zzzzzzzzzzzzzzz""]"
* Ou elle peut se baser sur le nom de profil : "profileName in [""maxime"", ""martin"", ""marc""]"
* Ou pour n'autoriser que l'admin de serveur : "serverCommandAvailable "#kick"""
* Les condition sont évaluées en temps réel, et peuvent donc dépendre du déroulement de la mission : "alive officier && taskState tache1 == ""Succeeded"""
* Ou pour interdire la logistique dans la zone défini par un marqueur circulaire : "player distance getMarkerPos ""markerName"" > getMarkerSize ""markerName"" select 0"
* Notez que les guillemets des chaînes de caractères dans la chaîne de condition doivent être doublés.
* Note : si la condition dépend de l'objet/véhicule pointé, vous pouvez utiliser la commande cursorTarget
* Pour autoriser la logistique chez tout le monde, il suffit de définir la condition à "true".
*/
R3F_LOG_CFG_string_condition_allow_logistics_on_this_client = "true";
/**
* CONDITION TO ALLOW CREATION FACTORY
*
* (EN)
* This variable allow to set a dynamic SQF condition to allow/deny the access to the creation factory only on specific clients.
* The variable must be a STRING delimited by quotes and containing a valid SQF condition to evaluate during the game.
* For example you can allow the creation factory only on few clients having a known game ID by setting the variable to :
* "getPlayerUID player in [""76xxxxxxxxxxxxxxx"", ""76yyyyyyyyyyyyyyy"", ""76zzzzzzzzzzzzzzz""]"
* Or based on the profile name : "profileName in [""john"", ""jack"", ""james""]"
* Or only for the server admin : "serverCommandAvailable "#kick"""
* Note that quotes of the strings inside the string condition must be doubled.
* Note : if the condition depends of the aimed objects/véhicule, you can use the command cursorTarget
* Note also that the condition is evaluted in real time, so it can use condition depending on the mission progress :
* "alive officer && taskState task1 == ""Succeeded"""
* To allow the creation factory to everyone, just set the condition to "true".
*
* (FR)
* Cette variable permet d'utiliser une condition SQF dynamique pour rendre accessible ou non l'usine de création sur des clients spécifiques.
* La variable doit être une CHAINE de caractères délimitée par des guillemets et doit contenir une condition SQF valide qui sera évaluée durant la mission.
* Par exemple pour autoriser l'usine de création sur seulement quelques joueurs ayant un ID de jeu connu, la variable peut être défini comme suit :
* "getPlayerUID player in [""76xxxxxxxxxxxxxxx"", ""76yyyyyyyyyyyyyyy"", ""76zzzzzzzzzzzzzzz""]"
* Ou elle peut se baser sur le nom de profil : "profileName in [""maxime"", ""martin"", ""marc""]"
* Ou pour n'autoriser que l'admin de serveur : "serverCommandAvailable "#kick"""
* Notez que les guillemets des chaînes de caractères dans la chaîne de condition doivent être doublés.
* Note : si la condition dépend de l'objet/véhicule pointé, vous pouvez utiliser la commande cursorTarget
* Notez aussi que les condition sont évaluées en temps réel, et peuvent donc dépendre du déroulement de la mission :
* "alive officier && taskState tache1 == ""Succeeded"""
* Pour autoriser l'usine de création chez tout le monde, il suffit de définir la condition à "true".
*/
R3F_LOG_CFG_string_condition_allow_creation_factory_on_this_client = "false";
/*
********************************************************************************************
* BELOW IS THE CLASS NAMES CONFIGURATION / CI-DESSOUS LA CONFIGURATION DES NOMS DE CLASSES *
********************************************************************************************
*
* (EN)
* There are two ways to manage new objects with the logistics system. The first one is to add these objects in the
* following appropriate lists. The second one is to create a new external file in the /addons_config/ directory,
* based on /addons_config/TEMPLATE.sqf, and to add a #include below to.
* The first method is better to add/fix only some various class names.
* The second method is better to take into account an additional addon.
*
* These variables are based on the inheritance principle according to the CfgVehicles tree.
* It means that a features accorded to a class name, is also accorded to all child classes.
* Inheritance tree view : http://madbull.arma.free.fr/A3_1.32_CfgVehicles_tree.html
*
* (FR)
* Deux moyens existent pour gérer de nouveaux objets avec le système logistique. Le premier consiste à ajouter
* ces objets dans les listes appropriées ci-dessous. Le deuxième est de créer un fichier externe dans le répertoire
* /addons_config/ basé sur /addons_config/TEMPLATE.sqf, et d'ajouter un #include ci-dessous.
* La première méthode est préférable lorsqu'il s'agit d'ajouter ou corriger quelques classes diverses.
* La deuxième méthode est préférable s'il s'agit de prendre en compte le contenu d'un addon supplémentaire.
*
* Ces variables sont basées sur le principe d'héritage utilisés dans l'arborescence du CfgVehicles.
* Cela signifie qu'une fonctionnalité accordée à une classe, le sera aussi pour toutes ses classes filles.
* Vue de l'arborescence d'héritage : http://madbull.arma.free.fr/A3_1.32_CfgVehicles_tree.html
*/
/****** LIST OF ADDONS CONFIG TO INCLUDE / LISTE DES CONFIG D'ADDONS A INCLURE ******/
//#include "addons_config\A3_vanilla.sqf" // THIS IS INCLUDED IN EXILE.SQF
//#include "addons_config\CUP.sqf" // REMOVE THIS LINE IF YOU DONT USE CUP VEHICLES
#include "addons_config\Exile.sqf"
//#include "addons_config\Super.sqf"
//#include "addons_config\YOUR_ADDITIONAL_ADDON.sqf"
/****** TOW WITH VEHICLE / REMORQUER AVEC VEHICULE ******/
/**
* List of class names of ground vehicles which can tow objects.
* Liste des noms de classes des véhicules terrestres pouvant remorquer des objets.
*/
R3F_LOG_CFG_can_tow = R3F_LOG_CFG_can_tow +
[
];
/**
* List of class names of objects which can be towed.
* Liste des noms de classes des objets remorquables.
*/
R3F_LOG_CFG_can_be_towed = R3F_LOG_CFG_can_be_towed +
[
];
/****** LIFT WITH VEHICLE / HELIPORTER AVEC VEHICULE ******/
/**
* List of class names of helicopters which can lift objects.
* Liste des noms de classes des hélicoptères pouvant héliporter des objets.
*/
R3F_LOG_CFG_can_lift = R3F_LOG_CFG_can_lift +
[
];
/**
* List of class names of objects which can be lifted.
* Liste des noms de classes des objets héliportables.
*/
R3F_LOG_CFG_can_be_lifted = R3F_LOG_CFG_can_be_lifted +
[
];
/****** LOAD IN VEHICLE / CHARGER DANS LE VEHICULE ******/
/*
* (EN)
* This section uses a numeric quantification of capacity and cost of the objets.
* For example, in a vehicle has a capacity of 100, we will be able to load in 5 objects costing 20 capacity units.
* The capacity doesn't represent a real volume or weight, but a choice made for gameplay.
*
* (FR)
* Cette section utilise une quantification numérique de la capacité et du coût des objets.
* Par exemple, dans un véhicule d'une capacité de 100, nous pouvons charger 5 objets coûtant 20 unités de capacité.
* La capacité ne représente ni un poids, ni un volume, mais un choix fait pour la jouabilité.
*/
/**
* List of class names of vehicles or cargo objects which can transport objects.
* The second element of the nested arrays is the load capacity (in relation with the capacity cost of the objects).
*
* Liste des noms de classes des véhicules ou "objets contenant" pouvant transporter des objets.
* Le deuxième élément des sous-tableaux est la capacité de chargement (en relation avec le coût de capacité des objets).
*/
R3F_LOG_CFG_can_transport_cargo = R3F_LOG_CFG_can_transport_cargo +
[
];
/**
* List of class names of objects which can be loaded in transport vehicle/cargo.
* The second element of the nested arrays is the cost capacity (in relation with the capacity of the vehicles).
*
* Liste des noms de classes des objets transportables.
* Le deuxième élément des sous-tableaux est le coût de capacité (en relation avec la capacité des véhicules).
*/
R3F_LOG_CFG_can_be_transported_cargo = R3F_LOG_CFG_can_be_transported_cargo +
[
// e.g. : ["MyTransportableObjectClassName1", itsCost], ["MyTransportableObjectClassName2", itsCost]
// Here Comes the Stuff what you want to load in the Vehicle example: ["IG_supplyCrate_F", 40]
["Box_IND_AmmoVeh_F", 25],
["CUP_BAF_BasicAmmunitionBox", 25],
["Box_NATO_Uniforms_F", 5],
["CargoNet_01_box_F", 25],
["Exile_Container_SupplyBox", 25],
["Box_NATO_AmmoVeh_F", 25],
["B_supplyCrate_F", 25],
["I_CargoNET_01_F", 25],
["Box_NATO_Wps_F", 25],
["C_supplyCrate_F", 25],
["IG_supplyCrate_F", 25],
["I_supplyCrate_F", 25],
["Box_NATO_Ammo_F", 25]
];
/****** MOVABLE-BY-PLAYER OBJECTS / OBJETS DEPLACABLES PAR LE JOUEUR ******/
/**
* List of class names of objects which can be carried and moved by a player.
* Liste des noms de classes des objets qui peuvent être portés et déplacés par le joueur.
*/
R3F_LOG_CFG_can_be_moved_by_player = R3F_LOG_CFG_can_be_moved_by_player +
[
// Here Comes that stuff in what a player can Move
// e.g. : "MyMovableObjectClassName1", "MyMovableObjectClassName2"
"CargoNet_01_box_F",
"Exile_Container_SupplyBox",
"Box_NATO_AmmoVeh_F",
"B_supplyCrate_F",
"I_CargoNET_01_F",
"Box_NATO_Wps_F",
"C_supplyCrate_F",
"IG_supplyCrate_F",
"Box_IND_AmmoVeh_F",
"B_Slingload_01_Cargo_F",
"B_Slingload_01_Fuel_F",
"B_Slingload_01_Ammo_F",
"B_Slingload_01_Medevac_F",
"B_Slingload_01_Repair_F",
"Land_Pod_Heli_Transport_04_covered_F",
"Land_Pod_Heli_Transport_04_fuel_F",
"Land_Pod_Heli_Transport_04_box_F",
"Land_Pod_Heli_Transport_04_repair_F",
"Land_Pod_Heli_Transport_04_medevac_F",
"Land_Pod_Heli_Transport_04_bench_F",
"Land_Pod_Heli_Transport_04_covered_black_F",
"Land_Pod_Heli_Transport_04_fuel_black_F",
"Land_Pod_Heli_Transport_04_box_black_F",
"Land_Pod_Heli_Transport_04_repair_black_F",
"Land_Pod_Heli_Transport_04_medevac_black_F",
"Land_Pod_Heli_Transport_04_bench_black_F",
"Box_NATO_Ammo_F"
];

View File

@ -0,0 +1,248 @@
/**
* CREATION FACTORY CONFIGURATION FILE
*
* English and French comments
* Commentaires anglais et français
*
* (EN)
* This file contains the predefined lists of available categories in the creation factory.
* The objects/vehicles categories are the same as in the mission editor.
* It corresponds to the tree CfgVehicleClasses in the config file.
* To add a category in one of the lists, you must write its class name. Use the BIS' "Config viewer".
*
* To understand the white or black list system, read also the needed parameters in USER_FUNCT\init_creation_factory.sqf
* There are three white list "FULL", "MEDIUM" and "LIGHT", and a black list.
* The black list is used if no white list is mentioned when calling USER_FUNCT\init_creation_factory.sqf.
*
* (FR)
* Ce fichier contient la liste des catégories disponibles dans l'usine de création.
* Les catégories d'objets/véhicules sont les mêmes que dans l'éditeur de mission.
* Cela correspond à l'arborescence CfgVehicleClasses dans le config file.
* Pour ajouter une catégorie dans une des listes, vous devez écrire son nom de classe. Utilisez le "Config viewer" de BIS.
*
* Pour comprendre le système de white/black list, consultez les paramètres requis par USER_FUNCT\init_creation_factory.sqf
* Il y a trois white list "FULL", "MEDIUM" and "LIGHT", et une black list.
* La black list est utilisée si aucune white list n'est mentionnée lors de l'appel de USER_FUNCT\init_creation_factory.sqf.
*/
/**
* SELL BACK REIMBURSEMENT RATE
*
* Rate of reimbursement from the buying price granted to the factory when the object is send back to it.
* Value of 0 means no credits back, 0.5 means half buying price, 1 means full buying price, and so on.
* Set to -1 to disable the possibility to give back objects to the creation factory.
* Note : the reimbursement amount take also into account of the damage level of the object.
*
* Taux de remboursement par rapport au prix d'achat accordé à l'usine lors de la restitution d'un objet.
* Une valeur de 0 signifie pas de crédits en retour, 0.5 donne 50% du prix d'achat, 1 correspond à 100% du prix d'achat.
* Mettre à -1 pour désactiver la possibilité de redonner les objets à l'usine de création.
* Note : le montant du remboursement prend aussi en compte l'état (dommage) de l'objet.
*/
R3F_LOG_CFG_CF_sell_back_bargain_rate = 0.75;
/**
* LIGHT WHITE LIST
* Categories of objects/vehicles available in a "LIGHT" factory (see USER_FUNCT\init_creation_factory.sqf).
*/
R3F_LOG_CFG_CF_whitelist_light_categories =
[
"Objects", // Objects (1 entries)
"Armory", // Armory (0 entries)
"Targets", // Targets (0 entries)
"Cargo", // Objects (Construction) (43 entries)
"Flag", // Objects (Flags) (35 entries)
"Lamps", // Objects (Lamps) (0 entries)
"Communication", // Objects (Communications) (0 entries)
"Furniture", // Objects (Furniture) (22 entries)
"Misc", // Objects (0 entries)
"Signs", // Objects (Signs) (50 entries)
"Small_items", // Objects (Small) (88 entries)
"Training", // Training (80 entries)
"Shelters", // Objects (Shelters) (0 entries)
"Fortifications", // Objects (Fortifications) (47 entries)
"Tents", // Objects (Camping) (46 entries)
"Market", // Objects (Market) (11 entries)
"Structures", // Structures (0 entries)
"Structures_Military", // Structures (Military) (12 entries)
"Structures_Walls", // Structures (Walls) (0 entries)
"Structures_Fences" // Structures (Fences) (1 entries)
];
/**
* MEDIUM WHITE LIST
* Categories of objects/vehicles available in a "MEDIUM" factory (see USER_FUNCT\init_creation_factory.sqf).
* It includes all the categories of the "LIGHT" list, and the listed categories below.
*/
R3F_LOG_CFG_CF_whitelist_medium_categories = R3F_LOG_CFG_CF_whitelist_light_categories +
[
"Ammo", // Ammo (49 entries)
"Static", // Static (28 entries)
"Container", // Objects (Containers) (39 entries)
"Objects_Airport", // Objects (Airport) (20 entries)
// All in Arma
"StaticW", // Static (woodland) (4 entries)
"Static_ChDKZ", // Static (Insurgency) (0 entries)
"Static_USMC", // Static (USMC) (0 entries)
"Static_RU", // Static (RU) (0 entries)
"Static_CDF" // Static (CDF) (0 entries)
];
/**
* FULL WHITE LIST
* Categories of objects/vehicles available in a "FULL" factory (see USER_FUNCT\init_creation_factory.sqf).
* It includes all the categories of the "MEDIUM" list, and the listed categories below.
*/
R3F_LOG_CFG_CF_whitelist_full_categories = R3F_LOG_CFG_CF_whitelist_medium_categories +
[
"Car", // Cars (42 entries)
"Armored", // Armored (16 entries)
"Air", // Air (19 entries)
"Support", // Supports (21 entries)
"Ship", // Ships (13 entries)
"Autonomous", // Autonomous (15 entries)
"Submarine", // Submarines (3 entries)
"Wreck", // Wrecks (24 entries)
"Wreck_sub", // Wrecks (Submerged) (5 entries)
"Military", // Objects (Military) (9 entries)
"Structures_Commercial", // Structures (Commercial) (1 entries)
"Structures_Infrastructure", // Structures (Infrastructure) (1 entries)
"Structures_Town", // Structures (Town) (4 entries)
"Structures_Cultural", // Structures (Cultural) (0 entries)
"Structures_Industrial", // Structures (Industrial) (0 entries)
"Structures_Transport", // Structures (Transport) (0 entries)
"Structures_Village", // Structures (Village) (0 entries)
"Structures_Slums", // Structures (Slums) (0 entries)
"Structures_Airport", // Structures (Airport) (0 entries)
// All in Arma
"Wrecks", // Wrecks (19 entries)
"Military_US_EP1", // Military (US) (12 entries)
"Military_TKA_EP1", // Military (TKA) (12 entries)
"Military_GUE_EP1", // Military (Guerillas) (12 entries)
"SupportWoodland_ACR", // Support (woodland) (4 entries)
"WarfareBuildingsClassname", // Warfare Buildings (79 entries)
"ArmouredD", // Armored (desert) (1 entries)
"ArmouredW", // Armored (woodland) (7 entries)
"CarD", // Cars (desert) (4 entries)
"CarW", // Cars (woodland) (10 entries)
"Military_With_side", // Military (36 entries)
"WarfareClassName", // Warfare (16 entries)
"Armored_CDF", // Armored (CDF) (0 entries)
"Armored_ChDKZ", // Armored (Insurgency) (0 entries)
"Armored_USMC", // Armored (USMC) (0 entries)
"Armored_RU", // Armored (RU) (0 entries)
"Car_USMC", // Cars (USMC) (0 entries)
"Car_RU", // Cars (RU) (0 entries)
"Car_ChDKZ", // Cars (Insurgency) (0 entries)
"Car_CDF", // Cars (CDF) (0 entries)
"Air_ChDKZ", // Air (Insurgency) (0 entries)
"Air_USMC", // Air (USMC) (0 entries)
"Air_RU", // Air (RU) (0 entries)
"Air_CDF", // Air (CDF) (0 entries)
"Ship_CDF", // Ship (CDF) (0 entries)
"Ship_ChDKZ", // Ship (Insurgency) (0 entries)
"Ship_USMC", // Ship (USMC) (0 entries)
"Ship_RU", // Ship (RU) (0 entries)
"support_ChDKZ", // Support (Insurgency) (0 entries)
"support_USMC", // Support (USMC) (0 entries)
"support_RU", // Support (RU) (0 entries)
"support_CDF", // Support (CDF) (0 entries)
"Structures_E", // Structures EP1 (0 entries)
"Ruins" // Ruins (0 entries)
];
/**
* BLACK LIST
* Categories of objects/vehicles to deny if no white list is set to the factory (see USER_FUNCT\init_creation_factory.sqf).
*/
R3F_LOG_CFG_CF_blacklist_categories =
[
"Submerged", // Objects (Sea) (2 entries)
"Camera", // Cameras (0 entries)
"Sounds", // Sounds (9 entries)
"Mines", // Mines (15 entries)
"Backpacks", // Backpacks (157 entries)
"Uniforms", // Uniforms (0 entries)
"Anomalies", // Anomalies (0 entries)
"Test", // TEST (0 entries)
"Locations", // Locations (0 entries)
"Modules", // Modules (128 entries)
"Emitters", // Emitters (0 entries)
"WeaponsPrimary", // Weapons (Primary) (30 entries)
"WeaponsSecondary", // Weapons (Launchers) (10 entries)
"WeaponsHandguns", // Weapons (Sidearms) (6 entries)
"WeaponAccessories", // Weapon Accessories (26 entries)
"Magazines", // Magazines (0 entries)
"Items", // Items (18 entries)
"ItemsHeadgear", // Items (Headgear) (110 entries)
"ItemsVests", // Items (Vests) (39 entries)
"ItemsUniforms", // Items (Uniforms) (53 entries)
"Intel", // Intel (3 entries)
"Virtual", // Virtual Entities (0 entries)
"Garbage", // Objects (Garbage) (15 entries)
"Helpers", // Objects (Helpers) (34 entries)
"Dead_bodies", // Objects (Dead bodies) (12 entries)
"SystemLocations", // Locations (11 entries)
"SystemSides", // Sides (3 entries)
"SystemMisc", // Misc (3 entries)
"Objects_VR", // Objects (Virtual Reality) (1 entries)
"Objects_Sports", // Objects (Sports) (24 entries)
"Structures_VR", // Structures (Virtual Reality) (10 entries)
"Structures_Sports", // Structures (Sports) (11 entries)
"Explosives", // Explosives (0 entries)
"Respawn", // Respawn (5 entries)
// All in Arma
"IEDs", // IEDs (4 entries)
"LocationLogics", // Locations (14 entries)
"Test_EP1" // Test EP1 (0 entries)
];
/**
* CREATION COST FACTOR
*
* Multiplication factor to fix the CfgVehicles' "cost" property values of vehicles/objects.
* It permits to have a better homogeneity between values.
* For example a SDV (Submarine) has a cost (divided by 100) of 100 and a Hunter (Car) of 5000.
* By fixing the values with factors, the SDV (Submarine) costs 100x4000 = 400.000 and the Hunter (Car) 5000x12 = 60.000.
* The format of the array is ["categorie class name", multiplication factor].
* All non-listed categories have a factor of 1x.
*
* Facteur de multiplication pour corriger la propriété "cost" des objets/véhicules dans le CfgVehicles.
* Par exemple, un sous-marins SDV (Submarine) a un coût (divisé par 100) de 100 et un Hunter (Car) du 5000.
* En appliquant un facteur de correction, le SDV (Submarine) vaut 100x4000 = 400 000 et le Hunter (Car) 5000x12 = 60 000.
* Le format du tableau est ["nom de classe de la catégorie", facteur de multiplication]
* Les catégories non listées ont un facteur de 1x.
*/
R3F_LOG_CFG_CF_creation_cost_factor =
[
["Car", 12],
["Armored", 15],
["Air", 15],
["Support", 100],
["Ammo", 5000],
["Ship", 8],
["Static", 3],
["Autonomous", 10],
["Submarine", 1500],
["Wreck", 100],
["Wreck_sub", 100],
["Cargo", 10],
["Container", 5],
["Objects_Airport", 50],
// All in Arma
["StaticW", 3],
["Military_US_EP1", 8000],
["Military_TKA_EP1", 8000],
["Military_GUE_EP1", 8000],
["SupportWoodland_ACR", 70],
["WarfareBuildingsClassname", 100],
["ArmouredD", 5],
["ArmouredW", 20],
["CarD", 60],
["CarW", 60],
["Military_With_side", 1000],
["WarfareClassName", 50]
];

View File

@ -0,0 +1,6 @@
#include "R3F_LOG_ENABLE.h"
#ifdef R3F_LOG_enable
#include "transporteur\dlg_contenu_vehicule.h"
#include "usine_creation\dlg_liste_objets.h"
#endif

View File

@ -0,0 +1,93 @@
/*
* TRANSLATION FILE (ENGLIGH)
*
* Alternative to stringtable.csv which is simpler to install for the mission maker.
* The token ""%1"" represents a dynamic value generated by the scripts, like a vehicle name.
*
* Alternative au stringtable.csv qui est plus simple à installer pour le créateur de mission.
* Le mot-clé ""%1"" représente une valeur dynamique fournie par les scripts, comme par exemple un nom de véhicule.
*/
STR_R3F_LOG_action_heliporter = "Lift the object";
STR_R3F_LOG_action_heliporter_fait = "Object ""%1"" attached.";
STR_R3F_LOG_action_heliport_larguer = "Drop the object";
STR_R3F_LOG_action_heliport_larguer_fait = "Object ""%1"" dropped.";
STR_R3F_LOG_action_heliport_attente = "Hooking... (%1)";
STR_R3F_LOG_action_heliport_echec_attente = "Lift aborted ! Stay hover during the hooking.";
STR_R3F_LOG_action_deplacer_objet = "Take ""%1""";
STR_R3F_LOG_action_relacher_objet = "Release ""%1""";
STR_R3F_LOG_action_aligner_pente = "Adjust to the slope";
STR_R3F_LOG_action_aligner_sol = "Adjust to the ground";
STR_R3F_LOG_action_aligner_horizon = "Adjust horizontally";
STR_R3F_LOG_action_tourner = "Turn left/right (X / C keys)";
STR_R3F_LOG_action_rapprocher = "Closer/further (F / R keys)";
STR_R3F_LOG_ne_pas_monter_dans_vehicule = "You can't get in a vehicle while you're carrying this object !";
STR_R3F_LOG_action_charger_deplace = "Load in the vehicle";
STR_R3F_LOG_action_selectionner_objet_charge = "Load ""%1"" in...";
STR_R3F_LOG_action_charger_selection = "... load in ""%1""";
STR_R3F_LOG_action_selectionner_objet_fait = "Now select the destination for ""%1""...";
STR_R3F_LOG_action_charger_en_cours = "Loading in progress...";
STR_R3F_LOG_action_charger_fait = "The object ""%1"" has been loaded in ""%2"".";
STR_R3F_LOG_action_charger_pas_assez_de_place = "There is not enough space for this object in this vehicle !";
STR_R3F_LOG_action_remorquer_direct = "Tow ""%1""";
STR_R3F_LOG_action_remorquer_deplace = "Tow the object";
STR_R3F_LOG_action_detacher = "Untow the object";
STR_R3F_LOG_action_detacher_fait = "Object untowed.";
STR_R3F_LOG_action_detacher_impossible_pour_ce_vehicule = "Only the pilot can detach this object.";
STR_R3F_LOG_action_contenu_vehicule = "View the vehicle's content";
STR_R3F_LOG_action_decharger_en_cours = "Unloading in progress...";
STR_R3F_LOG_action_decharger_fait = "The object ""%1"" has been unloaded from the vehicle.";
STR_R3F_LOG_action_decharger_deja_fait = "The object has already been unloaded !";
STR_R3F_LOG_action_decharger_deplacable_exceptionnel = "Once released, this object will no more be movable manually.<br/>Do you confirm the action ?";
STR_R3F_LOG_action_ouvrir_usine = "Open the creation factory";
STR_R3F_LOG_action_creer_en_cours = "Creation in progress...";
STR_R3F_LOG_action_creer_fait = "The object ""%1"" has been created.";
STR_R3F_LOG_action_creer_pas_assez_credits = "The factory has not enough credits to create this object.";
STR_R3F_LOG_action_revendre_usine_direct = "Send back ""%1"" to the factory";
STR_R3F_LOG_action_revendre_usine_deplace = "Send back to the factory";
STR_R3F_LOG_action_revendre_usine_selection = "... send back to the factory";
STR_R3F_LOG_action_revendre_en_cours = "Sending back to the factory...";
STR_R3F_LOG_action_revendre_fait = "The object ""%1"" has been sent back to the factory.";
STR_R3F_LOG_action_revendre_decharger_avant = "You can't sent it back while its cargo content is not empty !";
STR_R3F_LOG_mutex_action_en_cours = "The current operation isn't finished !";
STR_R3F_LOG_joueur_dans_objet = "There is a player in the object ""%1"" !";
STR_R3F_LOG_objet_en_cours_transport = "The object ""%1"" is already in transit !";
STR_R3F_LOG_objet_remorque_en_cours = "Impossible because the object ""%1"" is towing another object !";
STR_R3F_LOG_trop_loin = "Impossible because the object ""%1"" is too far !";
STR_R3F_LOG_dlg_CV_titre = "Vehicle's content";
STR_R3F_LOG_dlg_CV_capacite_vehicule = "Loading : %1/%2";
STR_R3F_LOG_dlg_CV_btn_decharger = "UNLOAD";
STR_R3F_LOG_dlg_CV_btn_fermer = "CANCEL";
STR_R3F_LOG_dlg_LO_titre = "Creation factory";
STR_R3F_LOG_dlg_LO_credits_restants = "Remaining credits : %1";
STR_R3F_LOG_dlg_LO_btn_creer = "CREATE";
STR_R3F_LOG_dlg_LO_btn_fermer = "CANCEL";
STR_R3F_LOG_nom_fonctionnalite_proprietes = "Properties";
STR_R3F_LOG_nom_fonctionnalite_side = "Side";
STR_R3F_LOG_nom_fonctionnalite_places = "Seating";
STR_R3F_LOG_nom_fonctionnalite_passif = "It can be :";
STR_R3F_LOG_nom_fonctionnalite_passif_deplace = "Moved by player";
STR_R3F_LOG_nom_fonctionnalite_passif_heliporte = "Lifted";
STR_R3F_LOG_nom_fonctionnalite_passif_remorque = "Towed";
STR_R3F_LOG_nom_fonctionnalite_passif_transporte = "Transported";
STR_R3F_LOG_nom_fonctionnalite_passif_transporte_capacite = "load cost %1";
STR_R3F_LOG_nom_fonctionnalite_actif = "It can :";
STR_R3F_LOG_nom_fonctionnalite_actif_heliporte = "Lift";
STR_R3F_LOG_nom_fonctionnalite_actif_remorque = "Tow";
STR_R3F_LOG_nom_fonctionnalite_actif_transporte = "Transport";
STR_R3F_LOG_nom_fonctionnalite_actif_transporte_capacite = "max load %1";
STR_R3F_LOG_deverrouillage_en_cours = "Unlocking... (%1)";
STR_R3F_LOG_deverrouillage_echec_attente = "Unlock canceled ! Hold the aiming of the object during the countdown.";
STR_R3F_LOG_deverrouillage_succes_attente = "Object unlocked.";
STR_R3F_LOG_action_deverrouiller = "Unlock ""%1""";
STR_R3F_LOG_action_deverrouiller_impossible = "Object locked";

View File

@ -0,0 +1,112 @@
/**
* Détermine les fonctionnalités logistique disponibles pour une classe donnée
*
* @param 0 le nom de classe pour lequel déterminer les fonctionnalités logistique
*
* @return 0 true si can_be_depl_heli_remorq_transp
* @return 1 true si can_be_moved_by_player
* @return 2 true si can_be_lifted
* @return 3 true si can_be_towed
* @return 4 true si can_be_transported_cargo
* @return 5 true si can_lift
* @return 6 true si can_tow
* @return 7 true si can_transport_cargo
*
* Copyright (C) 2014 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/>.
*/
private ["_classe", "_tab_classe_heritage", "_config", "_idx"];
private ["_can_be_depl_heli_remorq_transp", "_can_lift", "_can_tow", "_can_transport_cargo", "_can_transport_cargo_cout"];
private ["_can_be_moved_by_player", "_can_be_lifted", "_can_be_towed", "_can_be_transported_cargo", "_can_be_transported_cargo_cout"];
_classe = _this select 0;
// Calcul de l'arborescence d'héritage
_tab_classe_heritage = [];
for [
{_config = configFile >> "CfgVehicles" >> _classe},
{isClass _config},
{_config = inheritsFrom _config}
] do
{
_tab_classe_heritage pushBack (toLower configName _config);
};
// Calcul des fonctionnalités
_can_be_depl_heli_remorq_transp = false;
{
if (_x in R3F_LOG_objets_depl_heli_remorq_transp) exitWith {_can_be_depl_heli_remorq_transp = true;};
} forEach _tab_classe_heritage;
_can_be_moved_by_player = false;
_can_be_lifted = false;
_can_be_towed = false;
_can_be_transported_cargo = false;
_can_be_transported_cargo_cout = 0;
if (_can_be_depl_heli_remorq_transp) then
{
{
if (_x in R3F_LOG_CFG_can_be_moved_by_player) exitWith {_can_be_moved_by_player = true;};
} forEach _tab_classe_heritage;
{
if (_x in R3F_LOG_CFG_can_be_lifted) exitWith {_can_be_lifted = true;};
} forEach _tab_classe_heritage;
{
if (_x in R3F_LOG_CFG_can_be_towed) exitWith {_can_be_towed = true;};
} forEach _tab_classe_heritage;
{
_idx = R3F_LOG_classes_objets_transportables find _x;
if (_idx != -1) exitWith
{
_can_be_transported_cargo = true;
_can_be_transported_cargo_cout = R3F_LOG_CFG_can_be_transported_cargo select _idx select 1;
};
} forEach _tab_classe_heritage;
};
_can_lift = false;
{
if (_x in R3F_LOG_CFG_can_lift) exitWith {_can_lift = true;};
} forEach _tab_classe_heritage;
_can_tow = false;
{
if (_x in R3F_LOG_CFG_can_tow) exitWith {_can_tow = true;};
} forEach _tab_classe_heritage;
_can_transport_cargo = false;
_can_transport_cargo_cout = 0;
{
_idx = R3F_LOG_classes_transporteurs find _x;
if (_idx != -1) exitWith
{
_can_transport_cargo = true;
_can_transport_cargo_cout = R3F_LOG_CFG_can_transport_cargo select _idx select 1;
};
} forEach _tab_classe_heritage;
// Cargo de capacité nulle
if (_can_transport_cargo_cout <= 0) then {_can_transport_cargo = false;};
// Retour des fonctionnalités
[
_can_be_depl_heli_remorq_transp,
_can_be_moved_by_player,
_can_lift,
_can_be_lifted,
_can_tow,
_can_be_towed,
_can_transport_cargo,
_can_transport_cargo_cout,
_can_be_transported_cargo,
_can_be_transported_cargo_cout
]

View File

@ -0,0 +1,63 @@
/**
* Affiche dans la zone "hint" les fonctionnalités logistique disponibles pour une classe donnée
*
* @param 0 le nom de classe pour lequel consulter les fonctionnalités logistique
* @return structuredText des fonctionnalités logistique
*
* Copyright (C) 2014 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/>.
*/
private ["_classe", "_fonctionnalites", "_side", "_places", "_infos", "_j", "_tab_inheritance_tree"];
_classe = _this select 0;
if !(isClass (configFile >> "CfgVehicles" >> _classe)) exitWith {};
_fonctionnalites = [_classe] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique;
_side = switch (getNumber (configFile >> "CfgVehicles" >> _classe >> "side")) do
{
case 0: {"EAST"};
case 1: {"WEST"};
case 2: {"GUER"};
case 3: {"CIV"};
default {"NONE"};
};
_places = 0;
if (!isNil "R3F_LOG_VIS_objet" && {!isNull R3F_LOG_VIS_objet && {typeOf R3F_LOG_VIS_objet == _classe}}) then
{
{
_places = _places + (R3F_LOG_VIS_objet emptyPositions _x);
} forEach ["Commander", "Driver", "Gunner", "Cargo"];
};
_infos = "<t align='left'>";
_infos = _infos + format ["%1 : %2<br/>", STR_R3F_LOG_nom_fonctionnalite_side, _side];
if (_places != 0) then {_infos = _infos + format ["%1 : %2<br/>", STR_R3F_LOG_nom_fonctionnalite_places, _places]} else {_infos = _infos + "<br/>";};
_infos = _infos + "<br/>";
_infos = _infos + format ["%1<br/>", STR_R3F_LOG_nom_fonctionnalite_passif];
_infos = _infos + format ["<t color='%2'>- %1</t><br/>", STR_R3F_LOG_nom_fonctionnalite_passif_deplace, if (_fonctionnalites select R3F_LOG_IDX_can_be_moved_by_player) then {"#00eeff"} else {"#777777"}];
_infos = _infos + format ["<t color='%2'>- %1</t><br/>", STR_R3F_LOG_nom_fonctionnalite_passif_heliporte, if (_fonctionnalites select R3F_LOG_IDX_can_be_lifted) then {"#00ee00"} else {"#777777"}];
_infos = _infos + format ["<t color='%2'>- %1</t><br/>", STR_R3F_LOG_nom_fonctionnalite_passif_remorque, if (_fonctionnalites select R3F_LOG_IDX_can_be_towed) then {"#00ee00"} else {"#777777"}];
_infos = _infos + format ["<t color='%2'>- %1%3</t><br/>",
STR_R3F_LOG_nom_fonctionnalite_passif_transporte,
if (_fonctionnalites select R3F_LOG_IDX_can_be_transported_cargo) then {"#f5f500"} else {"#777777"},
if (_fonctionnalites select R3F_LOG_IDX_can_be_transported_cargo) then {format [" (" + STR_R3F_LOG_nom_fonctionnalite_passif_transporte_capacite + ")", _fonctionnalites select R3F_LOG_IDX_can_be_transported_cargo_cout]} else {""}
];
_infos = _infos + "<br/>";
_infos = _infos + format ["%1<br/>", STR_R3F_LOG_nom_fonctionnalite_actif];
_infos = _infos + format ["<t color='%2'>- %1</t><br/>", STR_R3F_LOG_nom_fonctionnalite_actif_heliporte, if (_fonctionnalites select R3F_LOG_IDX_can_lift) then {"#00ee00"} else {"#777777"}];
_infos = _infos + format ["<t color='%2'>- %1</t><br/>", STR_R3F_LOG_nom_fonctionnalite_actif_remorque, if (_fonctionnalites select R3F_LOG_IDX_can_tow) then {"#00ee00"} else {"#777777"}];
_infos = _infos + format ["<t color='%2'>- %1%3</t><br/>",
STR_R3F_LOG_nom_fonctionnalite_actif_transporte,
if (_fonctionnalites select R3F_LOG_IDX_can_transport_cargo) then {"#f5f500"} else {"#777777"},
if (_fonctionnalites select R3F_LOG_IDX_can_transport_cargo) then {format [" (" + STR_R3F_LOG_nom_fonctionnalite_actif_transporte_capacite + ")", _fonctionnalites select R3F_LOG_IDX_can_transport_cargo_cout]} else {""}
];
_infos = _infos + "</t>";
parseText _infos

View File

@ -0,0 +1,46 @@
/**
* Formate un nombre entier avec des séparateurs de milliers
*
* @param 0 le nombre à formater
* @return chaîne de caractère représentant le nombre formaté
*
* Copyright (C) 2014 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/>.
*/
private ["_nombre", "_centaines", "_str_signe", "_str_nombre", "_str_centaines"];
_nombre = _this select 0;
_str_signe = if (_nombre < 0) then {"-"} else {""};
_nombre = floor abs _nombre;
_str_nombre = "";
while {_nombre >= 1000} do
{
_centaines = _nombre - (1000 * floor (0.001 * _nombre));
_nombre = floor (0.001 * _nombre);
if (_centaines < 100) then
{
if (_centaines < 10) then
{
_str_centaines = "00" + str _centaines;
}
else
{
_str_centaines = "0" + str _centaines;
};
}
else
{
_str_centaines = str _centaines;
};
_str_nombre = "." + _str_centaines + _str_nombre;
};
_str_signe + str _nombre + _str_nombre

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,108 @@
/**
* Bibliothèque de fonctions permettant la visualisation 3D d'objets
*
* Copyright (C) 2014 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/>.
*/
/**
* Démarre le mode de visualisation 3D
*/
R3F_LOG_VIS_FNCT_demarrer_visualisation =
{
// Création d'une caméra
R3F_LOG_VIS_cam = "camera" camCreate ([[5000, 5000, 0]] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel);
R3F_LOG_VIS_cam cameraEffect ["Internal", "BACK"];
R3F_LOG_VIS_cam camSetFocus [-1, -1];
showCinemaBorder false;
R3F_LOG_VIS_cam camCommit 0;
camUseNVG (sunOrMoon == 0);
R3F_LOG_VIS_objet = objNull;
// Fil d'exécution réalisant une rotation continue de la caméra autour de l'objet à visualiser
0 spawn
{
// Tant qu'on ne quitte pas la visualisation
while {!isNull R3F_LOG_VIS_cam} do
{
private ["_objet", "_distance_cam", "_azimut_cam"];
// Attente d'un objet à visualiser
waitUntil {!isNull R3F_LOG_VIS_objet};
_objet = R3F_LOG_VIS_objet;
_distance_cam = 2.25 * (
[boundingBoxReal _objet select 0 select 0, boundingBoxReal _objet select 0 select 2]
distance
[boundingBoxReal _objet select 1 select 0, boundingBoxReal _objet select 1 select 2]
);
_azimut_cam = 0;
R3F_LOG_VIS_cam camSetTarget _objet;
R3F_LOG_VIS_cam camSetPos (_objet modelToWorld [_distance_cam * sin _azimut_cam, _distance_cam * cos _azimut_cam, _distance_cam * 0.33]);
R3F_LOG_VIS_cam camCommit 0;
// Rotation autour de l'objet
while {R3F_LOG_VIS_objet == _objet} do
{
_azimut_cam = _azimut_cam + 3.25;
R3F_LOG_VIS_cam camSetPos (_objet modelToWorld [_distance_cam * sin _azimut_cam, _distance_cam * cos _azimut_cam, _distance_cam * 0.33]);
R3F_LOG_VIS_cam camCommit 0.05;
sleep 0.05;
};
};
};
};
/**
* Termine le mode de visualisation 3D
*/
R3F_LOG_VIS_FNCT_terminer_visualisation =
{
if (!isNull R3F_LOG_VIS_objet) then {detach R3F_LOG_VIS_objet; deleteVehicle R3F_LOG_VIS_objet;};
R3F_LOG_VIS_objet = objNull;
R3F_LOG_VIS_cam cameraEffect ["Terminate", "BACK"];
camDestroy R3F_LOG_VIS_cam;
R3F_LOG_VIS_cam = objNull;
};
/**
* Visualiser un type d'objet en 3D
*
* @param 0 le nom de classe de l'objet à visualiser
*/
R3F_LOG_VIS_FNCT_voir_objet =
{
private ["_classe_a_visualiser", "_objet", "_position_attache"];
if (isNil "R3F_LOG_VIS_cam") then
{
call R3F_LOG_VIS_FNCT_demarrer_visualisation;
};
_classe_a_visualiser = _this select 0;
// Ignorer les objets non instanciables
if (_classe_a_visualiser != "" && {isClass (configFile >> "CfgVehicles" >> _classe_a_visualiser) && {getNumber (configFile >> "CfgVehicles" >> _classe_a_visualiser >> "scope") > 0}}) then
{
// Ignorer si l'objet à visualiser est le même que précédemment
if (isNull R3F_LOG_VIS_objet || {_classe_a_visualiser != typeOf R3F_LOG_VIS_objet}) then
{
// Créer et placer l'objet dans le ciel
_position_attache = [[5000, 5000, 0]] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel;
_objet = _classe_a_visualiser createVehicleLocal _position_attache;
_objet attachTo [R3F_LOG_PUBVAR_point_attache, _position_attache];
if (!isNull R3F_LOG_VIS_objet) then {detach R3F_LOG_VIS_objet; deleteVehicle R3F_LOG_VIS_objet;};
R3F_LOG_VIS_objet = _objet;
};
};
};

View File

@ -0,0 +1,41 @@
/**
* Vérifie si une unité marche sur un objet ou est collée contre celui-ci
*
* @param 0 l'unité
* @param 1 l'objet pour lequel vérifier si l'unité marche dessus
*
* @return vrai si une unité marche sur un objet ou est collée contre celui-ci
*
* @note les bounding box, trop approximatives, ne sont pas utilisées
* @note le calcul se fait à l'aide de quelques dizaines de "lineIntersectsWith"
*
* Copyright (C) 2014 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/>.
*/
private ["_unite", "_objet", "_contact", "_rayon", "_angle", "_pos_debut_segment", "_pos_fin_segment"];
_unite = _this select 0;
_objet = _this select 1;
_contact = false;
// On scanne autour de l'unité avec des segments répartis sur 3 cercles
for "_rayon" from 0.3 to 0.9 step 0.3 do
{
for "_angle" from 0 to 359 step 360 / (40 * _rayon) do
{
_pos_debut_segment = _unite modelToWorld [_rayon*sin _angle, _rayon*cos _angle, 1];
_pos_fin_segment = [_pos_debut_segment select 0, _pos_debut_segment select 1, -1];
if (_objet in lineIntersectsWith [ATLtoASL _pos_debut_segment, ATLtoASL _pos_fin_segment, _unite, objNull, false]) then
{
_contact = true;
};
};
};
_contact

View File

@ -0,0 +1,93 @@
/*
* TRANSLATION FILE (FRENCH)
*
* Alternative to stringtable.csv which is simpler to install for the mission maker.
* The token ""%1"" represents a dynamic value generated by the scripts, like a vehicle name.
*
* Alternative au stringtable.csv qui est plus simple à installer pour le créateur de mission.
* Le mot-clé ""%1"" représente une valeur dynamique fournie par les scripts, comme par exemple un nom de véhicule.
*/
STR_R3F_LOG_action_heliporter = "Heliporter l'objet";
STR_R3F_LOG_action_heliporter_fait = "Objet ""%1"" accroché.";
STR_R3F_LOG_action_heliport_larguer = "Larguer l'objet";
STR_R3F_LOG_action_heliport_larguer_fait = "Objet ""%1"" largué.";
STR_R3F_LOG_action_heliport_attente = "Accrochage... (%1)";
STR_R3F_LOG_action_heliport_echec_attente = "Heliportage annulé ! Restez en stationnaire pendant l'accrochage.";
STR_R3F_LOG_action_deplacer_objet = "Prendre ""%1""";
STR_R3F_LOG_action_relacher_objet = "Relâcher ""%1""";
STR_R3F_LOG_action_aligner_pente = "Ajuster à la pente";
STR_R3F_LOG_action_aligner_sol = "Ajuster au sol";
STR_R3F_LOG_action_aligner_horizon = "Ajuster de niveau";
STR_R3F_LOG_action_tourner = "Pivoter (touches X / C)";
STR_R3F_LOG_action_rapprocher = "Rapprocher (touches F / R)";
STR_R3F_LOG_ne_pas_monter_dans_vehicule = "Vous ne pouvez pas monter dans un véhicule tant que vous déplacez cet objet !";
STR_R3F_LOG_action_charger_deplace = "Charger dans le véhicule";
STR_R3F_LOG_action_selectionner_objet_charge = "Charger ""%1"" dans...";
STR_R3F_LOG_action_charger_selection = "... charger dans ""%1""";
STR_R3F_LOG_action_selectionner_objet_fait = "Sélectionnez maintenant la destination pour ""%1""...";
STR_R3F_LOG_action_charger_en_cours = "Chargement en cours...";
STR_R3F_LOG_action_charger_fait = "L'objet ""%1"" a été chargé dans ""%2"".";
STR_R3F_LOG_action_charger_pas_assez_de_place = "Il n'y pas assez de place pour cet objet dans ce véhicule !";
STR_R3F_LOG_action_remorquer_direct = "Remorquer ""%1""";
STR_R3F_LOG_action_remorquer_deplace = "Remorquer l'objet";
STR_R3F_LOG_action_detacher = "Décrocher l'objet";
STR_R3F_LOG_action_detacher_fait = "Objet décroché.";
STR_R3F_LOG_action_detacher_impossible_pour_ce_vehicule = "Seul le pilote peut décrocher cet objet.";
STR_R3F_LOG_action_contenu_vehicule = "Voir le contenu du véhicule";
STR_R3F_LOG_action_decharger_en_cours = "Déchargement en cours...";
STR_R3F_LOG_action_decharger_fait = "L'objet ""%1"" a été déchargé du véhicule.";
STR_R3F_LOG_action_decharger_deja_fait = "L'objet a déjà été déchargé !";
STR_R3F_LOG_action_decharger_deplacable_exceptionnel = "Une fois relâché, cet objet ne pourra plus être déplacé manuellement.<br/>Confirmez-vous l'action ?";
STR_R3F_LOG_action_ouvrir_usine = "Ouvrir l'usine de création";
STR_R3F_LOG_action_creer_en_cours = "Création en cours...";
STR_R3F_LOG_action_creer_fait = "L'objet ""%1"" a été créé.";
STR_R3F_LOG_action_creer_pas_assez_credits = "L'usine ne dispose pas assez de crédits pour créer cet objet.";
STR_R3F_LOG_action_revendre_usine_direct = "Renvoyer ""%1"" à l'usine";
STR_R3F_LOG_action_revendre_usine_deplace = "Renvoyer à l'usine";
STR_R3F_LOG_action_revendre_usine_selection = "... renvoyer à l'usine";
STR_R3F_LOG_action_revendre_en_cours = "Renvoi à l'usine en cours...";
STR_R3F_LOG_action_revendre_fait = "L'objet ""%1"" a été renvoyé à l'usine.";
STR_R3F_LOG_action_revendre_decharger_avant = "Vous ne pouvez pas le renvoyer à l'usine tant que sa cargaison n'est pas vide !";
STR_R3F_LOG_mutex_action_en_cours = "L'opération en cours n'est pas terminée !";
STR_R3F_LOG_joueur_dans_objet = "Un joueur se trouve dans l'objet ""%1"" !";
STR_R3F_LOG_objet_en_cours_transport = "L'objet ""%1"" est déjà en cours de transport !";
STR_R3F_LOG_objet_remorque_en_cours = "Impossible car l'objet ""%1"" remorque un autre objet !";
STR_R3F_LOG_trop_loin = "Impossible car l'objet ""%1"" est trop loin !";
STR_R3F_LOG_dlg_CV_titre = "Contenu du véhicule";
STR_R3F_LOG_dlg_CV_capacite_vehicule = "Chargement : %1/%2";
STR_R3F_LOG_dlg_CV_btn_decharger = "DECHARGER";
STR_R3F_LOG_dlg_CV_btn_fermer = "ANNULER";
STR_R3F_LOG_dlg_LO_titre = "Usine de création";
STR_R3F_LOG_dlg_LO_credits_restants = "Crédits restants : %1";
STR_R3F_LOG_dlg_LO_btn_creer = "CREER";
STR_R3F_LOG_dlg_LO_btn_fermer = "ANNULER";
STR_R3F_LOG_nom_fonctionnalite_proprietes = "Propriétés";
STR_R3F_LOG_nom_fonctionnalite_side = "Camp";
STR_R3F_LOG_nom_fonctionnalite_places = "Places assises";
STR_R3F_LOG_nom_fonctionnalite_passif = "Il peut être :";
STR_R3F_LOG_nom_fonctionnalite_passif_deplace = "Déplacé par le joueur";
STR_R3F_LOG_nom_fonctionnalite_passif_heliporte = "Héliporté";
STR_R3F_LOG_nom_fonctionnalite_passif_remorque = "Remorqué";
STR_R3F_LOG_nom_fonctionnalite_passif_transporte = "Transporté";
STR_R3F_LOG_nom_fonctionnalite_passif_transporte_capacite = "coût charg. %1";
STR_R3F_LOG_nom_fonctionnalite_actif = "Il peut :";
STR_R3F_LOG_nom_fonctionnalite_actif_heliporte = "Héliporter";
STR_R3F_LOG_nom_fonctionnalite_actif_remorque = "Remorquer";
STR_R3F_LOG_nom_fonctionnalite_actif_transporte = "Transporter";
STR_R3F_LOG_nom_fonctionnalite_actif_transporte_capacite = "charg. max %1";
STR_R3F_LOG_deverrouillage_en_cours = "Déverrouillage... (%1)";
STR_R3F_LOG_deverrouillage_echec_attente = "Déverrouillage annulé ! Maintenez la visée de l'objet pendant le compte-à-rebours.";
STR_R3F_LOG_deverrouillage_succes_attente = "Objet déverrouillé.";
STR_R3F_LOG_action_deverrouiller = "Déverrouiller ""%1""";
STR_R3F_LOG_action_deverrouiller_impossible = "Objet verrouillé";

View File

@ -0,0 +1,219 @@
/**
* Héliporte un objet avec un héliporteur
*
* @param 0 l'héliporteur
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_heliporteur", "_objet"];
_heliporteur = _this select 0;
// Recherche de l'objet à héliporter
_objet = objNull;
{
if (
(_x getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select R3F_LOG_IDX_can_be_lifted) &&
_x != _heliporteur && !(_x getVariable "R3F_LOG_disabled") &&
((getPosASL _heliporteur select 2) - (getPosASL _x select 2) > 2 && (getPosASL _heliporteur select 2) - (getPosASL _x select 2) < 15)
) exitWith {_objet = _x;};
} forEach (nearestObjects [_heliporteur, ["All"], 20]);
if (!isNull _objet) then
{
if !(_objet getVariable "R3F_LOG_disabled") then
{
if (isNull (_objet getVariable "R3F_LOG_est_transporte_par") && (isNull (_objet getVariable "R3F_LOG_est_deplace_par") || (!alive (_objet getVariable "R3F_LOG_est_deplace_par")) || (!isPlayer (_objet getVariable "R3F_LOG_est_deplace_par")))) then
{
// Finalement on autorise l'héliport d'un véhicule avec du personnel à bord
//if (count crew _objet == 0 || getNumber (configFile >> "CfgVehicles" >> (typeOf _objet) >> "isUav") == 1) then
//{
// Ne pas héliporter quelque chose qui remorque autre chose
if (isNull (_objet getVariable ["R3F_LOG_remorque", objNull])) then
{
private ["_duree", "_ctrl_titre", "_ctrl_fond", "_ctrl_jauge", "_time_debut", "_attente_valide", "_pas_de_hook"];
_duree = 10;
#define _JAUGE_Y 0.7
#define _JAUGE_W 0.4
#define _JAUGE_H 0.025
disableSerialization;
// Création du titre du compte-à-rebours dans le display du jeu
_ctrl_titre = (findDisplay 46) ctrlCreate ["RscText", -1];
_ctrl_titre ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y - 1.5*_JAUGE_H, _JAUGE_W, 1.5*_JAUGE_H];
_ctrl_titre ctrlSetFontHeight 1.5*_JAUGE_H;
_ctrl_titre ctrlSetText format [STR_R3F_LOG_action_heliport_attente, _duree];
_ctrl_titre ctrlCommit 0;
// Création de l'arrière-plan de la jauge dans le display du jeu
_ctrl_fond = (findDisplay 46) ctrlCreate ["RscText", -1];
_ctrl_fond ctrlSetBackgroundColor [0, 0, 0, 0.4];
_ctrl_fond ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y, _JAUGE_W, _JAUGE_H];
_ctrl_fond ctrlCommit 0;
// Création d'une jauge à 0% dans le display du jeu
_ctrl_jauge = (findDisplay 46) ctrlCreate ["RscText", -1];
_ctrl_jauge ctrlSetBackgroundColor [0, 0.6, 0, 1];
_ctrl_jauge ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y, 0, _JAUGE_H];
_ctrl_jauge ctrlCommit 0;
// La jauge passe progressivement de 0% à 100%
_ctrl_jauge ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y, _JAUGE_W, _JAUGE_H];
_ctrl_jauge ctrlCommit _duree;
_time_debut = time;
_attente_valide = true;
while {_attente_valide && time - _time_debut < _duree} do
{
_ctrl_titre ctrlSetText format [STR_R3F_LOG_action_heliport_attente, ceil (_duree - (time - _time_debut))];
// A partir des versions > 1.32, on interdit le lift si le hook de BIS est utilisé
if (productVersion select 2 > 132) then
{
// Call compile car la commande getSlingLoad n'existe pas en 1.32
_pas_de_hook = _heliporteur call compile format ["isNull getSlingLoad _this"];
}
else
{
_pas_de_hook = true;
};
// Pour valider l'héliportage, il faut rester en stationnaire au dessus de l'objet pendant le compte-à-rebours
if !(
alive player && vehicle player == _heliporteur && !(_heliporteur getVariable "R3F_LOG_disabled") && _pas_de_hook &&
isNull (_heliporteur getVariable "R3F_LOG_heliporte") && (vectorMagnitude velocity _heliporteur < 6) && (_heliporteur distance _objet < 15) &&
!(_objet getVariable "R3F_LOG_disabled") && isNull (_objet getVariable "R3F_LOG_est_transporte_par") &&
(isNull (_objet getVariable "R3F_LOG_est_deplace_par") || (!alive (_objet getVariable "R3F_LOG_est_deplace_par")) || (!isPlayer (_objet getVariable "R3F_LOG_est_deplace_par"))) &&
((getPosASL _heliporteur select 2) - (getPosASL _objet select 2) > 2 && (getPosASL _heliporteur select 2) - (getPosASL _objet select 2) < 15)
) then
{
_attente_valide = false;
};
sleep 0.1;
};
// On effecture l'héliportage
if (_attente_valide) then
{
ctrlDelete _ctrl_titre;
ctrlDelete _ctrl_fond;
ctrlDelete _ctrl_jauge;
_heliporteur setVariable ["R3F_LOG_heliporte", _objet, true];
_objet setVariable ["R3F_LOG_est_transporte_par", _heliporteur, true];
// Attacher sous l'héliporteur au ras du sol
_objet attachTo [_heliporteur, [
0,
0,
(boundingBoxReal _heliporteur select 0 select 2) - (boundingBoxReal _objet select 0 select 2) - (getPos _heliporteur select 2) + 0.5
]];
// Ré-aligner dans le sens de la longueur si besoin
if (((boundingBoxReal _objet select 1 select 0) - (boundingBoxReal _objet select 0 select 0)) >
((boundingBoxReal _objet select 1 select 1) - (boundingBoxReal _objet select 0 select 1))) then
{
[_objet, "setDir", 90] call R3F_LOG_FNCT_exec_commande_MP;
};
systemChat format [STR_R3F_LOG_action_heliporter_fait, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
// Boucle de contrôle pendant l'héliportage
[_heliporteur, _objet] spawn
{
private ["_heliporteur", "_objet", "_a_ete_souleve"];
_heliporteur = _this select 0;
_objet = _this select 1;
_a_ete_souleve = false;
while {_heliporteur getVariable "R3F_LOG_heliporte" == _objet} do
{
// Mémoriser si l'objet a déjà été soulevé (cables tendus)
if (!_a_ete_souleve && getPos _objet select 2 > 3) then
{
_a_ete_souleve = true;
};
// Si l'hélico se fait détruire ou si l'objet héliporté entre en contact avec le sol, on largue l'objet
if (!alive _heliporteur || (_a_ete_souleve && getPos _objet select 2 < 0)) exitWith
{
_heliporteur setVariable ["R3F_LOG_heliporte", objNull, true];
_objet setVariable ["R3F_LOG_est_transporte_par", objNull, true];
// Détacher l'objet et lui appliquer la vitesse de l'héliporteur (inertie)
[_objet, "detachSetVelocity", velocity _heliporteur] call R3F_LOG_FNCT_exec_commande_MP;
systemChat format [STR_R3F_LOG_action_heliport_larguer_fait, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
sleep 0.1;
};
};
}
else
{
systemChat STR_R3F_LOG_action_heliport_echec_attente;
// La jauge s'arrête
_ctrl_jauge ctrlSetPosition ctrlPosition _ctrl_jauge;
// La jauge clignote rouge
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 1];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 0];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 1];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 0];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 1];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 0];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
_ctrl_jauge ctrlSetBackgroundColor [1, 0, 0, 1];
_ctrl_jauge ctrlCommit 0; sleep 0.175;
ctrlDelete _ctrl_titre;
ctrlDelete _ctrl_fond;
ctrlDelete _ctrl_jauge;
};
}
else
{
systemChat format [STR_R3F_LOG_objet_remorque_en_cours, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
//}
//else
//{
// systemChat format [STR_R3F_LOG_joueur_dans_objet, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
//};
}
else
{
systemChat format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
};
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,19 @@
/**
* Initialise un véhicule héliporteur
*
* @param 0 l'héliporteur
*/
private ["_heliporteur"];
_heliporteur = _this select 0;
// Définition locale de la variable si elle n'est pas définie sur le réseau
if (isNil {_heliporteur getVariable "R3F_LOG_heliporte"}) then
{
_heliporteur setVariable ["R3F_LOG_heliporte", objNull, false];
};
_heliporteur addAction [("<t color=""#00dd00"">" + STR_R3F_LOG_action_heliporter + "</t>"), {_this call R3F_LOG_FNCT_heliporteur_heliporter}, nil, 6, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_heliporter_valide"];
_heliporteur addAction [("<t color=""#00dd00"">" + STR_R3F_LOG_action_heliport_larguer + "</t>"), {_this call R3F_LOG_FNCT_heliporteur_larguer}, nil, 6, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_heliport_larguer_valide"];

View File

@ -0,0 +1,35 @@
/**
* Larguer un objet en train d'être héliporté
*
* @param 0 l'héliporteur
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_heliporteur", "_objet"];
_heliporteur = _this select 0;
_objet = _heliporteur getVariable "R3F_LOG_heliporte";
_heliporteur setVariable ["R3F_LOG_heliporte", objNull, true];
_objet setVariable ["R3F_LOG_est_transporte_par", objNull, true];
// Détacher l'objet et lui appliquer la vitesse de l'héliporteur (inertie)
[_objet, "detachSetVelocity", velocity _heliporteur] call R3F_LOG_FNCT_exec_commande_MP;
systemChat format [STR_R3F_LOG_action_heliport_larguer_fait, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,345 @@
/**
* Script principal qui initialise le système de logistique
*
* Copyright (C) 2014 Team ~R3F~
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "R3F_LOG_ENABLE.h"
#ifdef R3F_LOG_enable
/* DEBUT import config */
// Initialise les listes vides avant que le config.sqf les concatène
R3F_LOG_CFG_can_tow = [];
R3F_LOG_CFG_can_be_towed = [];
R3F_LOG_CFG_can_lift = [];
R3F_LOG_CFG_can_be_lifted = [];
R3F_LOG_CFG_can_transport_cargo = [];
R3F_LOG_CFG_can_be_transported_cargo = [];
R3F_LOG_CFG_can_be_moved_by_player = [];
// Initialise les listes vides de config_creation_factory.sqf
R3F_LOG_CFG_CF_whitelist_full_categories = [];
R3F_LOG_CFG_CF_whitelist_medium_categories = [];
R3F_LOG_CFG_CF_whitelist_light_categories = [];
R3F_LOG_CFG_CF_blacklist_categories = [];
#include "config.sqf"
//#include "config_creation_factory.sqf"
// Chargement du fichier de langage
call compile preprocessFile format ["R3F_LOG\%1_strings_lang.sqf", R3F_LOG_CFG_language];
/*
* On inverse l'ordre de toutes les listes de noms de classes pour donner
* la priorité aux classes spécifiques sur les classes génériques
*/
reverse R3F_LOG_CFG_can_tow;
reverse R3F_LOG_CFG_can_be_towed;
reverse R3F_LOG_CFG_can_lift;
reverse R3F_LOG_CFG_can_be_lifted;
reverse R3F_LOG_CFG_can_transport_cargo;
reverse R3F_LOG_CFG_can_be_transported_cargo;
reverse R3F_LOG_CFG_can_be_moved_by_player;
// On passe tous les noms de classes en minuscules
{R3F_LOG_CFG_can_tow set [_forEachIndex, toLower _x];} forEach R3F_LOG_CFG_can_tow;
{R3F_LOG_CFG_can_be_towed set [_forEachIndex, toLower _x];} forEach R3F_LOG_CFG_can_be_towed;
{R3F_LOG_CFG_can_lift set [_forEachIndex, toLower _x];} forEach R3F_LOG_CFG_can_lift;
{R3F_LOG_CFG_can_be_lifted set [_forEachIndex, toLower _x];} forEach R3F_LOG_CFG_can_be_lifted;
{R3F_LOG_CFG_can_transport_cargo select _forEachIndex set [0, toLower (_x select 0)];} forEach R3F_LOG_CFG_can_transport_cargo;
{R3F_LOG_CFG_can_be_transported_cargo select _forEachIndex set [0, toLower (_x select 0)];} forEach R3F_LOG_CFG_can_be_transported_cargo;
{R3F_LOG_CFG_can_be_moved_by_player set [_forEachIndex, toLower _x];} forEach R3F_LOG_CFG_can_be_moved_by_player;
// On construit la liste des classes des transporteurs dans les quantités associées (pour les nearestObjects, count isKindOf, ...)
R3F_LOG_classes_transporteurs = [];
{
R3F_LOG_classes_transporteurs pushBack (_x select 0);
} forEach R3F_LOG_CFG_can_transport_cargo;
// On construit la liste des classes des transportables dans les quantités associées (pour les nearestObjects, count isKindOf, ...)
R3F_LOG_classes_objets_transportables = [];
{
R3F_LOG_classes_objets_transportables pushBack (_x select 0);
} forEach R3F_LOG_CFG_can_be_transported_cargo;
// Union des tableaux de types d'objets servant dans un isKindOf
R3F_LOG_objets_depl_heli_remorq_transp = [];
{
if !(_x in R3F_LOG_objets_depl_heli_remorq_transp) then
{
R3F_LOG_objets_depl_heli_remorq_transp pushBack _x;
};
} forEach (R3F_LOG_CFG_can_be_moved_by_player + R3F_LOG_CFG_can_be_lifted + R3F_LOG_CFG_can_be_towed + R3F_LOG_classes_objets_transportables);
// Gestion compatibilité fichier de config 3.0 => 3.1 (définition de valeurs par défaut)
if (isNil "R3F_LOG_CFG_lock_objects_mode") then {R3F_LOG_CFG_lock_objects_mode = "side";};
if (isNil "R3F_LOG_CFG_unlock_objects_timer") then {R3F_LOG_CFG_unlock_objects_timer = 30;};
if (isNil "R3F_LOG_CFG_CF_sell_back_bargain_rate") then {R3F_LOG_CFG_CF_sell_back_bargain_rate = 0.75;};
if (isNil "R3F_LOG_CFG_CF_creation_cost_factor") then {R3F_LOG_CFG_CF_creation_cost_factor = [];};
/* FIN import config */
if (isServer) then
{
// On crée le point d'attache qui servira aux attachTo pour les objets à charger virtuellement dans les véhicules
R3F_LOG_PUBVAR_point_attache = "Land_HelipadEmpty_F" createVehicle [0,0,0];
R3F_LOG_PUBVAR_point_attache setPosASL [0,0,0];
R3F_LOG_PUBVAR_point_attache setVectorDirAndUp [[0,1,0], [0,0,1]];
// Partage du point d'attache avec tous les joueurs
publicVariable "R3F_LOG_PUBVAR_point_attache";
/** Liste des objets à ne pas perdre dans un vehicule/cargo détruit */
R3F_LOG_liste_objets_a_proteger = [];
/* Protège les objets présents dans R3F_LOG_liste_objets_a_proteger */
execVM "R3F_LOG\surveiller_objets_a_proteger.sqf";
};
/**
* Suite à une PVEH, exécute une commande en fonction de la localité de l'argument
* @param 0 l'argument sur lequel exécuter la commande
* @param 1 la commande à exécuter (chaîne de caractères)
* @param 2 les éventuels paramètres de la commande (optionnel)
* @note il faut passer par la fonction R3F_LOG_FNCT_exec_commande_MP
*/
R3F_LOG_FNCT_PVEH_commande_MP =
{
private ["_argument", "_commande", "_parametre"];
_argument = _this select 1 select 0;
_commande = _this select 1 select 1;
_parametre = if (count (_this select 1) == 3) then {_this select 1 select 2} else {0};
// Commandes à argument global et effet local
switch (_commande) do
{
// Aucune pour l'instant
// ex : case "switchMove": {_argument switchMove _parametre;};
};
// Commandes à argument local et effet global
if (local _argument) then
{
switch (_commande) do
{
case "setDir": {_argument setDir _parametre;};
case "setVelocity": {_argument setVelocity _parametre;};
case "detachSetVelocity": {detach _argument; _argument setVelocity _parametre;};
};
};
// Commandes à faire uniquement sur le serveur
if (isServer) then
{
if (_commande == "setOwnerTo") then
{
_argument setOwner (owner _parametre);
};
};
};
"R3F_LOG_PV_commande_MP" addPublicVariableEventHandler R3F_LOG_FNCT_PVEH_commande_MP;
/**
* Ordonne l'exécution d'une commande quelque soit la localité de l'argument ou de l'effet
* @param 0 l'argument sur lequel exécuter la commande
* @param 1 la commande à exécuter (chaîne de caractères)
* @param 2 les éventuels paramètres de la commande (optionnel)
* @usage [_objet, "setDir", 160] call R3F_LOG_FNCT_exec_commande_MP
*/
R3F_LOG_FNCT_exec_commande_MP =
{
R3F_LOG_PV_commande_MP = _this;
publicVariable "R3F_LOG_PV_commande_MP";
["R3F_LOG_PV_commande_MP", R3F_LOG_PV_commande_MP] spawn R3F_LOG_FNCT_PVEH_commande_MP;
};
/** Pseudo-mutex permettant de n'exécuter qu'un script de manipulation d'objet à la fois (true : vérouillé) */
R3F_LOG_mutex_local_verrou = false;
call compile preprocessFile "R3F_LOG\fonctions_generales\lib_geometrie_3D.sqf";
// Indices du tableau des fonctionnalités retourné par R3F_LOG_FNCT_determiner_fonctionnalites_logistique
R3F_LOG_IDX_can_be_depl_heli_remorq_transp = 0;
R3F_LOG_IDX_can_be_moved_by_player = 1;
R3F_LOG_IDX_can_lift = 2;
R3F_LOG_IDX_can_be_lifted = 3;
R3F_LOG_IDX_can_tow = 4;
R3F_LOG_IDX_can_be_towed = 5;
R3F_LOG_IDX_can_transport_cargo = 6;
R3F_LOG_IDX_can_transport_cargo_cout = 7;
R3F_LOG_IDX_can_be_transported_cargo = 8;
R3F_LOG_IDX_can_be_transported_cargo_cout = 9;
R3F_LOG_CST_zero_log = [false, false, false, false, false, false, false, 0, false, 0];
R3F_LOG_FNCT_determiner_fonctionnalites_logistique = compile preprocessFile "R3F_LOG\fonctions_generales\determiner_fonctionnalites_logistique.sqf";
R3F_LOG_FNCT_calculer_chargement_vehicule = compile preprocessFile "R3F_LOG\transporteur\calculer_chargement_vehicule.sqf";
R3F_LOG_FNCT_transporteur_charger_auto = compile preprocessFile "R3F_LOG\transporteur\charger_auto.sqf";
// Un serveur dédié n'en a pas besoin
if !(isDedicated) then
{
// Le client attend que le serveur ai créé et publié la référence de l'objet servant de point d'attache
waitUntil {!isNil "R3F_LOG_PUBVAR_point_attache"};
/** Indique quel objet le joueur est en train de déplacer, objNull si aucun */
R3F_LOG_joueur_deplace_objet = objNull;
/** Objet actuellement sélectionner pour être chargé/remorqué */
R3F_LOG_objet_selectionne = objNull;
/** Tableau contenant toutes les usines créées */
R3F_LOG_CF_liste_usines = [];
call compile preprocessFile "R3F_LOG\fonctions_generales\lib_visualisation_objet.sqf";
R3F_LOG_FNCT_objet_relacher = compile preprocessFile "R3F_LOG\objet_deplacable\relacher.sqf";
R3F_LOG_FNCT_objet_deplacer = compile preprocessFile "R3F_LOG\objet_deplacable\deplacer.sqf";
R3F_LOG_FNCT_heliporteur_heliporter = compile preprocessFile "R3F_LOG\heliporteur\heliporter.sqf";
R3F_LOG_FNCT_heliporteur_larguer = compile preprocessFile "R3F_LOG\heliporteur\larguer.sqf";
R3F_LOG_FNCT_heliporteur_init = compile preprocessFile "R3F_LOG\heliporteur\heliporteur_init.sqf";
R3F_LOG_FNCT_remorqueur_detacher = compile preprocessFile "R3F_LOG\remorqueur\detacher.sqf";
R3F_LOG_FNCT_remorqueur_remorquer_deplace = compile preprocessFile "R3F_LOG\remorqueur\remorquer_deplace.sqf";
R3F_LOG_FNCT_remorqueur_remorquer_direct = compile preprocessFile "R3F_LOG\remorqueur\remorquer_direct.sqf";
R3F_LOG_FNCT_remorqueur_init = compile preprocessFile "R3F_LOG\remorqueur\remorqueur_init.sqf";
R3F_LOG_FNCT_transporteur_charger_deplace = compile preprocessFile "R3F_LOG\transporteur\charger_deplace.sqf";
R3F_LOG_FNCT_transporteur_charger_selection = compile preprocessFile "R3F_LOG\transporteur\charger_selection.sqf";
R3F_LOG_FNCT_transporteur_decharger = compile preprocessFile "R3F_LOG\transporteur\decharger.sqf";
R3F_LOG_FNCT_transporteur_selectionner_objet = compile preprocessFile "R3F_LOG\transporteur\selectionner_objet.sqf";
R3F_LOG_FNCT_transporteur_voir_contenu_vehicule = compile preprocessFile "R3F_LOG\transporteur\voir_contenu_vehicule.sqf";
R3F_LOG_FNCT_transporteur_init = compile preprocessFile "R3F_LOG\transporteur\transporteur_init.sqf";
/*
R3F_LOG_FNCT_usine_remplir_liste_objets = compile preprocessFile "R3F_LOG\usine_creation\remplir_liste_objets.sqf";
R3F_LOG_FNCT_usine_creer_objet = compile preprocessFile "R3F_LOG\usine_creation\creer_objet.sqf";
R3F_LOG_FNCT_usine_ouvrir_usine = compile preprocessFile "R3F_LOG\usine_creation\ouvrir_usine.sqf";
R3F_LOG_FNCT_usine_init = compile preprocessFile "R3F_LOG\usine_creation\usine_init.sqf";
R3F_LOG_FNCT_usine_revendre_deplace = compile preprocessFile "R3F_LOG\usine_creation\revendre_deplace.sqf";
R3F_LOG_FNCT_usine_revendre_selection = compile preprocessFile "R3F_LOG\usine_creation\revendre_selection.sqf";
R3F_LOG_FNCT_usine_revendre_direct = compile preprocessFile "R3F_LOG\usine_creation\revendre_direct.sqf";
R3F_LOG_FNCT_recuperer_liste_cfgVehicles_par_categories = compile preprocessFile "R3F_LOG\usine_creation\recuperer_liste_cfgVehicles_par_categories.sqf";
R3F_LOG_FNCT_determiner_cout_creation = compile preprocessFile "R3F_LOG\usine_creation\determiner_cout_creation.sqf";
*/
R3F_LOG_FNCT_objet_init = compile preprocessFile "R3F_LOG\objet_commun\objet_init.sqf";
R3F_LOG_FNCT_objet_est_verrouille = compile preprocessFile "R3F_LOG\objet_commun\objet_est_verrouille.sqf";
R3F_LOG_FNCT_deverrouiller_objet = compile preprocessFile "R3F_LOG\objet_commun\deverrouiller_objet.sqf";
R3F_LOG_FNCT_definir_proprietaire_verrou = compile preprocessFile "R3F_LOG\objet_commun\definir_proprietaire_verrou.sqf";
R3F_LOG_FNCT_formater_fonctionnalites_logistique = compile preprocessFile "R3F_LOG\fonctions_generales\formater_fonctionnalites_logistique.sqf";
R3F_LOG_FNCT_formater_nombre_entier_milliers = compile preprocessFile "R3F_LOG\fonctions_generales\formater_nombre_entier_milliers.sqf";
// Liste des variables activant ou non les actions de menu
R3F_LOG_action_charger_deplace_valide = false;
R3F_LOG_action_charger_selection_valide = false;
R3F_LOG_action_contenu_vehicule_valide = false;
R3F_LOG_action_remorquer_deplace_valide = false;
R3F_LOG_action_heliporter_valide = false;
R3F_LOG_action_heliport_larguer_valide = false;
R3F_LOG_action_deplacer_objet_valide = false;
R3F_LOG_action_remorquer_direct_valide = false;
R3F_LOG_action_detacher_valide = false;
R3F_LOG_action_selectionner_objet_charge_valide = false;
R3F_LOG_action_ouvrir_usine_valide = false;
R3F_LOG_action_revendre_usine_direct_valide = false;
R3F_LOG_action_revendre_usine_deplace_valide = false;
R3F_LOG_action_revendre_usine_selection_valide = false;
R3F_LOG_action_deverrouiller_valide = false;
/** Sur ordre (publicVariable), révéler la présence d'un objet au joueur (accélérer le retour des addActions) */
R3F_LOG_FNCT_PUBVAR_reveler_au_joueur =
{
private ["_objet"];
_objet = _this select 1;
if (alive player) then
{
player reveal _objet;
};
};
"R3F_LOG_PUBVAR_reveler_au_joueur" addPublicVariableEventHandler R3F_LOG_FNCT_PUBVAR_reveler_au_joueur;
/** Event handler GetIn : ne pas monter dans un véhicule qui est en cours de transport */
R3F_LOG_FNCT_EH_GetIn =
{
if (local (_this select 2)) then
{
_this spawn
{
sleep 0.1;
if ((!(isNull (_this select 0 getVariable "R3F_LOG_est_deplace_par")) && (alive (_this select 0 getVariable "R3F_LOG_est_deplace_par")) && (isPlayer (_this select 0 getVariable "R3F_LOG_est_deplace_par"))) || !(isNull (_this select 0 getVariable "R3F_LOG_est_transporte_par"))) then
{
(_this select 2) action ["GetOut", _this select 0];
(_this select 2) action ["Eject", _this select 0];
if (player == _this select 2) then {hintC format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> (typeOf (_this select 0)) >> "displayName")];};
};
};
};
};
// Actions à faire quand le joueur est apparu
0 spawn
{
waitUntil {!isNull player};
// Ajout d'un event handler "WeaponDisassembled" pour gérer le cas où une arme est démontée alors qu'elle est en cours de transport
player addEventHandler ["WeaponDisassembled",
{
private ["_objet"];
// Récupération de l'arme démontée avec cursorTarget au lieu de _this (http://feedback.arma3.com/view.php?id=18090)
_objet = cursorTarget;
if (!isNull _objet && {!isNull (_objet getVariable ["R3F_LOG_est_deplace_par", objNull])}) then
{
_objet setVariable ["R3F_LOG_est_deplace_par", objNull, true];
};
}];
};
/** Variable publique passer à true pour informer le script surveiller_nouveaux_objets.sqf de la création d'un objet */
R3F_LOG_PUBVAR_nouvel_objet_a_initialiser = false;
/* Vérification permanente des conditions donnant accès aux addAction */
execVM "R3F_LOG\surveiller_conditions_actions_menu.sqf";
/* Auto-détection permanente des objets sur le jeu */
execVM "R3F_LOG\surveiller_nouveaux_objets.sqf";
/*
* Système assurant la protection contre les blessures lors du déplacement d'objets
* On choisit de ne pas faire tourner le système sur un serveur dédié par économie de ressources.
* Seuls les joueurs et les IA commandées par les joueurs (locales) seront protégés.
* Les IA n'étant pas commandées par un joueur ne seront pas protégées, ce qui est un moindre mal.
*/
execVM "R3F_LOG\systeme_protection_blessures.sqf";
};
R3F_LOG_active = true;
#else
// Pour les actions du PC d'arti
R3F_LOG_joueur_deplace_objet = objNull;
R3F_LOG_active = false;
#endif

View File

@ -0,0 +1,29 @@
/**
* Défini le propriétaire (side/faction/player) du verrou d'un objet
*
* @param 0 l'objet pour lequel définir le propriétaire du verrou
* @param 1 l'unité pour laquelle définir le verrou
*
* Copyright (C) 2014 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/>.
*/
private ["_objet", "_unite"];
_objet = _this select 0;
_unite = _this select 1;
// Si le verrou de l'objet ne correspond pas à l'unité, on redéfini sa valeur pour lui correspondre
if (isNil {_objet getVariable "R3F_LOG_proprietaire_verrou"} || {[_objet, _unite] call R3F_LOG_FNCT_objet_est_verrouille}) then
{
switch (R3F_LOG_CFG_lock_objects_mode) do
{
case "side": {_objet setVariable ["R3F_LOG_proprietaire_verrou", side group _unite, true];};
case "faction": {_objet setVariable ["R3F_LOG_proprietaire_verrou", faction _unite, true];};
case "player": {_objet setVariable ["R3F_LOG_proprietaire_verrou", name _unite, true];};
case "unit": {_objet setVariable ["R3F_LOG_proprietaire_verrou", _unite, true];};
};
};

View File

@ -0,0 +1,90 @@
/**
* Gestion du déverrouillage d'un objet et du compte-à-rebours
*
* @param 0 l'objet à déverrouiller
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_objet", "_duree", "_ctrl_titre", "_ctrl_fond", "_ctrl_jauge", "_time_debut", "_attente_valide", "_cursorTarget_distance"];
_objet = _this select 0;
_duree = R3F_LOG_CFG_unlock_objects_timer;
#define _JAUGE_Y 0.7
#define _JAUGE_W 0.4
#define _JAUGE_H 0.025
disableSerialization;
// Création du titre du compte-à-rebours dans le display du jeu
_ctrl_titre = (findDisplay 46) ctrlCreate ["RscText", -1];
_ctrl_titre ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y - 1.5*_JAUGE_H, _JAUGE_W, 1.5*_JAUGE_H];
_ctrl_titre ctrlSetFontHeight 1.5*_JAUGE_H;
_ctrl_titre ctrlSetText format [STR_R3F_LOG_deverrouillage_en_cours, _duree];
_ctrl_titre ctrlCommit 0;
// Création de l'arrière-plan de la jauge dans le display du jeu
_ctrl_fond = (findDisplay 46) ctrlCreate ["RscText", -1];
_ctrl_fond ctrlSetBackgroundColor [0, 0, 0, 0.4];
_ctrl_fond ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y, _JAUGE_W, _JAUGE_H];
_ctrl_fond ctrlCommit 0;
// Création d'une jauge à 0% dans le display du jeu
_ctrl_jauge = (findDisplay 46) ctrlCreate ["RscText", -1];
_ctrl_jauge ctrlSetBackgroundColor [0, 0.6, 0, 1];
_ctrl_jauge ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y, 0, _JAUGE_H];
_ctrl_jauge ctrlCommit 0;
// La jauge passe progressivement de 0% à 100%
_ctrl_jauge ctrlSetPosition [0.5 - 0.5*_JAUGE_W, _JAUGE_Y, _JAUGE_W, _JAUGE_H];
_ctrl_jauge ctrlCommit _duree;
_time_debut = time;
_attente_valide = true;
while {_attente_valide && time - _time_debut < _duree} do
{
_ctrl_titre ctrlSetText format [STR_R3F_LOG_deverrouillage_en_cours, ceil (_duree - (time - _time_debut))];
_cursorTarget_distance = call R3F_LOG_FNCT_3D_cursorTarget_distance_bbox;
// Pour valider le déverrouillage, il faut maintenir la visée l'objet pendant le compte-à-rebours
if (!alive player || _cursorTarget_distance select 0 != _objet || _cursorTarget_distance select 1 > 5) then
{
_attente_valide = false;
};
sleep 0.1;
};
ctrlDelete _ctrl_titre;
ctrlDelete _ctrl_fond;
ctrlDelete _ctrl_jauge;
if (_attente_valide) then
{
// Mise à jour du propriétaire du verrou
[_objet, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
systemChat STR_R3F_LOG_deverrouillage_succes_attente;
}
else
{
hintC STR_R3F_LOG_deverrouillage_echec_attente;
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,30 @@
/**
* Détermine si un objet est verrouillé ou non pour un joueur donné
*
* @param 0 l'objet pour lequel savoir s'il est verrouillé
* @param 1 l'unité pour laquelle savoir si l'objet est verrouillé
*
* @return true si l'objet est verrouillé, false sinon
*
* Copyright (C) 2014 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/>.
*/
private ["_objet", "_unite", "_objet_verrouille"];
_objet = _this select 0;
_unite = _this select 1;
_objet_verrouille = switch (R3F_LOG_CFG_lock_objects_mode) do
{
case "side": {_objet getVariable ["R3F_LOG_proprietaire_verrou", side group _unite] != side group _unite};
case "faction": {_objet getVariable ["R3F_LOG_proprietaire_verrou", faction _unite] != faction _unite};
case "player": {_objet getVariable ["R3F_LOG_proprietaire_verrou", name _unite] != name _unite};
case "unit": {_objet getVariable ["R3F_LOG_proprietaire_verrou", _unite] != _unite};
default {false};
};
_objet_verrouille

View File

@ -0,0 +1,119 @@
/**
* Initialise un objet déplaçable/héliportable/remorquable/transportable
*
* @param 0 l'objet
*
* Copyright (C) 2014 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/>.
*/
private ["_objet", "_config", "_nom", "_fonctionnalites"];
_objet = _this select 0;
_config = configFile >> "CfgVehicles" >> (typeOf _objet);
_nom = getText (_config >> "displayName");
// Définition locale de la variable si elle n'est pas définie sur le réseau
if (isNil {_objet getVariable "R3F_LOG_est_transporte_par"}) then
{
_objet setVariable ["R3F_LOG_est_transporte_par", objNull, false];
};
// Définition locale de la variable si elle n'est pas définie sur le réseau
if (isNil {_objet getVariable "R3F_LOG_est_deplace_par"}) then
{
_objet setVariable ["R3F_LOG_est_deplace_par", objNull, false];
};
// Définition locale de la variable si elle n'est pas définie sur le réseau
if (isNil {_objet getVariable "R3F_LOG_proprietaire_verrou"}) then
{
// En mode de lock side : uniquement si l'objet appartient initialement à une side militaire
if (R3F_LOG_CFG_lock_objects_mode == "side") then
{
switch (getNumber (_config >> "side")) do
{
case 0: {_objet setVariable ["R3F_LOG_proprietaire_verrou", east, false];};
case 1: {_objet setVariable ["R3F_LOG_proprietaire_verrou", west, false];};
case 2: {_objet setVariable ["R3F_LOG_proprietaire_verrou", independent, false];};
};
}
else
{
// En mode de lock faction : uniquement si l'objet appartient initialement à une side militaire
if (R3F_LOG_CFG_lock_objects_mode == "faction") then
{
switch (getNumber (_config >> "side")) do
{
case 0; case 1; case 2:
{_objet setVariable ["R3F_LOG_proprietaire_verrou", getText (_config >> "faction"), false];};
};
};
};
};
// Si on peut embarquer dans l'objet
if (isNumber (_config >> "preciseGetInOut")) then
{
// Ne pas monter dans un véhicule qui est en cours de transport
_objet addEventHandler ["GetIn", R3F_LOG_FNCT_EH_GetIn];
};
// Indices du tableau des fonctionnalités retourné par R3F_LOG_FNCT_determiner_fonctionnalites_logistique
#define __can_be_depl_heli_remorq_transp 0
#define __can_be_moved_by_player 1
#define __can_lift 2
#define __can_be_lifted 3
#define __can_tow 4
#define __can_be_towed 5
#define __can_transport_cargo 6
#define __can_transport_cargo_cout 7
#define __can_be_transported_cargo 8
#define __can_be_transported_cargo_cout 9
_fonctionnalites = _objet getVariable "R3F_LOG_fonctionnalites";
if (R3F_LOG_CFG_unlock_objects_timer != -1) then
{
_objet addAction [("<t color=""#ee0000"">" + format [STR_R3F_LOG_action_deverrouiller, _nom] + "</t>"), {_this call R3F_LOG_FNCT_deverrouiller_objet}, false, 11, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_deverrouiller_valide"];
}
else
{
_objet addAction [("<t color=""#ee0000"">" + STR_R3F_LOG_action_deverrouiller_impossible + "</t>"), {hintC STR_R3F_LOG_action_deverrouiller_impossible;}, false, 11, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_deverrouiller_valide"];
};
if (_fonctionnalites select __can_be_moved_by_player) then
{
_objet addAction [("<t color=""#00eeff"">" + format [STR_R3F_LOG_action_deplacer_objet, _nom] + "</t>"), {_this call R3F_LOG_FNCT_objet_deplacer}, false, 5, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_deplacer_objet_valide"];
};
if (_fonctionnalites select __can_be_towed) then
{
if (_fonctionnalites select __can_be_moved_by_player) then
{
_objet addAction [("<t color=""#00dd00"">" + STR_R3F_LOG_action_remorquer_deplace + "</t>"), {_this call R3F_LOG_FNCT_remorqueur_remorquer_deplace}, nil, 6, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_joueur_deplace_objet == _target && R3F_LOG_action_remorquer_deplace_valide"];
};
_objet addAction [("<t color=""#00dd00"">" + format [STR_R3F_LOG_action_remorquer_direct, _nom] + "</t>"), {_this call R3F_LOG_FNCT_remorqueur_remorquer_direct}, nil, 5, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_remorquer_direct_valide"];
_objet addAction [("<t color=""#00dd00"">" + STR_R3F_LOG_action_detacher + "</t>"), {_this call R3F_LOG_FNCT_remorqueur_detacher}, nil, 6, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_detacher_valide"];
};
if (_fonctionnalites select __can_be_transported_cargo) then
{
if (_fonctionnalites select __can_be_moved_by_player) then
{
_objet addAction [("<t color=""#dddd00"">" + STR_R3F_LOG_action_charger_deplace + "</t>"), {_this call R3F_LOG_FNCT_transporteur_charger_deplace}, nil, 8, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_joueur_deplace_objet == _target && R3F_LOG_action_charger_deplace_valide"];
};
_objet addAction [("<t color=""#dddd00"">" + format [STR_R3F_LOG_action_selectionner_objet_charge, _nom] + "</t>"), {_this call R3F_LOG_FNCT_transporteur_selectionner_objet}, nil, 5, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_selectionner_objet_charge_valide"];
};
if (_fonctionnalites select __can_be_moved_by_player) then
{
_objet addAction [("<t color=""#ff9600"">" + STR_R3F_LOG_action_revendre_usine_deplace + "</t>"), {_this call R3F_LOG_FNCT_usine_revendre_deplace}, nil, 7, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_revendre_usine_deplace_valide"];
};

View File

@ -0,0 +1,498 @@
/**
* Fait déplacer un objet par le joueur. Il garde l'objet tant qu'il ne le relâche pas ou ne meurt pas.
* L'objet est relaché quand la variable R3F_LOG_joueur_deplace_objet passe à objNull ce qui terminera le script
*
* @param 0 l'objet à déplacer
* @param 3 true si l'objet est chargé dans un véhicule
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
R3F_LOG_objet_selectionne = objNull;
private ["_objet", "_decharger", "_joueur", "_dir_joueur", "_arme_courante", "_muzzle_courant", "_mode_muzzle_courant", "_restaurer_arme"];
private ["_vec_dir_rel", "_vec_dir_up", "_dernier_vec_dir_up", "_avant_dernier_vec_dir_up", "_normale_surface"];
private ["_pos_rel_objet_initial", "_pos_rel_objet", "_dernier_pos_rel_objet", "_avant_dernier_pos_rel_objet"];
private ["_elev_cam_initial", "_elev_cam", "_offset_hauteur_cam", "_offset_bounding_center", "_offset_hauteur_terrain"];
private ["_offset_hauteur", "_dernier_offset_hauteur", "_avant_dernier_offset_hauteur"];
private ["_hauteur_terrain_min_max_objet", "_offset_hauteur_terrain_min", "_offset_hauteur_terrain_max"];
private ["_action_relacher", "_action_aligner_pente", "_action_aligner_sol", "_action_aligner_horizon", "_action_tourner", "_action_rapprocher"];
private ["_idx_eh_fired", "_idx_eh_keyDown", "_idx_eh_keyUp", "_time_derniere_rotation", "_time_derniere_translation"];
_objet = _this select 0;
_decharger = if (count _this >= 4) then {_this select 3} else {false};
_joueur = player;
_dir_joueur = getDir _joueur;
if (isNull (_objet getVariable ["R3F_LOG_est_transporte_par", objNull]) && (isNull (_objet getVariable ["R3F_LOG_est_deplace_par", objNull]) || (!alive (_objet getVariable ["R3F_LOG_est_deplace_par", objNull])) || (!isPlayer (_objet getVariable ["R3F_LOG_est_deplace_par", objNull])))) then
{
if (isNull (_objet getVariable ["R3F_LOG_remorque", objNull])) then
{
if (count crew _objet == 0 || getNumber (configFile >> "CfgVehicles" >> (typeOf _objet) >> "isUav") == 1) then
{
[_objet, _joueur] call R3F_LOG_FNCT_definir_proprietaire_verrou;
_objet setVariable ["R3F_LOG_est_deplace_par", _joueur, true];
_joueur forceWalk true;
R3F_LOG_joueur_deplace_objet = _objet;
if (_decharger) then
{
// Orienter l'objet en fonction de son profil
if (((boundingBoxReal _objet select 1 select 1) - (boundingBoxReal _objet select 0 select 1)) != 0 && // Div par 0
{
((boundingBoxReal _objet select 1 select 0) - (boundingBoxReal _objet select 0 select 0)) > 3.2 &&
((boundingBoxReal _objet select 1 select 0) - (boundingBoxReal _objet select 0 select 0)) /
((boundingBoxReal _objet select 1 select 1) - (boundingBoxReal _objet select 0 select 1)) > 1.25
}
) then
{R3F_LOG_deplace_dir_rel_objet = 90;} else {R3F_LOG_deplace_dir_rel_objet = 0;};
// Calcul de la position relative, de sorte à éloigner l'objet suffisamment pour garder un bon champ de vision
_pos_rel_objet_initial = [
(boundingCenter _objet select 0) * cos R3F_LOG_deplace_dir_rel_objet - (boundingCenter _objet select 1) * sin R3F_LOG_deplace_dir_rel_objet,
((-(boundingBoxReal _objet select 0 select 0) * sin R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 0) * sin R3F_LOG_deplace_dir_rel_objet)) +
((-(boundingBoxReal _objet select 0 select 1) * cos R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 1) * cos R3F_LOG_deplace_dir_rel_objet)) +
2 + 0.3 * (
((boundingBoxReal _objet select 1 select 1)-(boundingBoxReal _objet select 0 select 1)) * abs sin R3F_LOG_deplace_dir_rel_objet +
((boundingBoxReal _objet select 1 select 0)-(boundingBoxReal _objet select 0 select 0)) * abs cos R3F_LOG_deplace_dir_rel_objet
),
-(boundingBoxReal _objet select 0 select 2)
];
_elev_cam_initial = acos ((ATLtoASL positionCameraToWorld [0, 0, 1] select 2) - (ATLtoASL positionCameraToWorld [0, 0, 0] select 2));
_pos_rel_objet_initial set [2, 0.1 + (_joueur selectionPosition "head" select 2) + (_pos_rel_objet_initial select 1) * tan (89 min (-89 max (90-_elev_cam_initial)))];
}
else
{
R3F_LOG_deplace_dir_rel_objet = (getDir _objet) - _dir_joueur;
_pos_rel_objet_initial = _joueur worldToModel (_objet modelToWorld [0,0,0]);
// Calcul de la position relative de l'objet, basée sur la position initiale, et sécurisée pour ne pas que l'objet rentre dans le joueur lors de la rotation
// L'ajout de ce calcul a également rendu inutile le test avec la fonction R3F_LOG_FNCT_unite_marche_dessus lors de la prise de l'objet
_pos_rel_objet_initial = [
_pos_rel_objet_initial select 0,
(_pos_rel_objet_initial select 1) max
(
((-(boundingBoxReal _objet select 0 select 0) * sin R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 0) * sin R3F_LOG_deplace_dir_rel_objet)) +
((-(boundingBoxReal _objet select 0 select 1) * cos R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 1) * cos R3F_LOG_deplace_dir_rel_objet)) +
1.2
),
_pos_rel_objet_initial select 2
];
_elev_cam_initial = acos ((ATLtoASL positionCameraToWorld [0, 0, 1] select 2) - (ATLtoASL positionCameraToWorld [0, 0, 0] select 2));
};
R3F_LOG_deplace_distance_rel_objet = _pos_rel_objet_initial select 1;
// Détermination du mode d'alignement initial en fonction du type d'objet, de ses dimensions, ...
R3F_LOG_deplace_mode_alignement = switch (true) do
{
case !(_objet isKindOf "Static"): {"sol"};
// Objet statique allongé
case (
((boundingBoxReal _objet select 1 select 1) - (boundingBoxReal _objet select 0 select 1)) != 0 && // Div par 0
{
((boundingBoxReal _objet select 1 select 0) - (boundingBoxReal _objet select 0 select 0)) /
((boundingBoxReal _objet select 1 select 1) - (boundingBoxReal _objet select 0 select 1)) > 1.75
}
): {"pente"};
// Objet statique carré ou peu allongé
default {"horizon"};
};
// On demande à ce que l'objet soit local au joueur pour réduire les latences (setDir, attachTo périodique)
if (!local _objet) then
{
private ["_time_demande_setOwner"];
_time_demande_setOwner = time;
[_objet, "setOwnerTo", _joueur] call R3F_LOG_FNCT_exec_commande_MP;
waitUntil {local _objet || time > _time_demande_setOwner + 1.5};
};
// On prévient tout le monde qu'un nouveau objet va être déplace pour ingorer les éventuelles blessures
R3F_LOG_PV_nouvel_objet_en_deplacement = _objet;
publicVariable "R3F_LOG_PV_nouvel_objet_en_deplacement";
["R3F_LOG_PV_nouvel_objet_en_deplacement", R3F_LOG_PV_nouvel_objet_en_deplacement] call R3F_LOG_FNCT_PVEH_nouvel_objet_en_deplacement;
// Mémorisation de l'arme courante et de son mode de tir
_arme_courante = currentWeapon _joueur;
_muzzle_courant = currentMuzzle _joueur;
_mode_muzzle_courant = currentWeaponMode _joueur;
// Sous l'eau on n'a pas le choix de l'arme
if (!surfaceIsWater getPos _joueur) then
{
// Prise du PA si le joueur en a un
if (handgunWeapon _joueur != "") then
{
_restaurer_arme = false;
for [{_idx_muzzle = 0}, {currentWeapon _joueur != handgunWeapon _joueur}, {_idx_muzzle = _idx_muzzle+1}] do
{
_joueur action ["SWITCHWEAPON", _joueur, _joueur, _idx_muzzle];
};
}
// Sinon pas d'arme dans les mains
else
{
_restaurer_arme = true;
_joueur action ["SWITCHWEAPON", _joueur, _joueur, 99999];
};
} else {_restaurer_arme = false;};
sleep 0.5;
// Vérification qu'on ai bien obtenu la main (conflit d'accès simultanés)
if (_objet getVariable "R3F_LOG_est_deplace_par" == _joueur && isNull (_objet getVariable ["R3F_LOG_est_transporte_par", objNull])) then
{
R3F_LOG_deplace_force_setVector = false; // Mettre à true pour forcer la ré-otientation de l'objet, en forçant les filtres anti-flood
R3F_LOG_deplace_force_attachTo = false; // Mettre à true pour forcer le repositionnement de l'objet, en forçant les filtres anti-flood
// Ajout des actions de gestion de l'orientation
_action_relacher = _joueur addAction [("<t color=""#ee0000"">" + format [STR_R3F_LOG_action_relacher_objet, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")] + "</t>"), {_this call R3F_LOG_FNCT_objet_relacher}, nil, 10, true, true];
_action_aligner_pente = _joueur addAction [("<t color=""#00eeff"">" + STR_R3F_LOG_action_aligner_pente + "</t>"), {R3F_LOG_deplace_mode_alignement = "pente"; R3F_LOG_deplace_force_setVector = true;}, nil, 6, false, true, "", "R3F_LOG_deplace_mode_alignement != ""pente"""];
_action_aligner_sol = _joueur addAction [("<t color=""#00eeff"">" + STR_R3F_LOG_action_aligner_sol + "</t>"), {R3F_LOG_deplace_mode_alignement = "sol"; R3F_LOG_deplace_force_setVector = true;}, nil, 6, false, true, "", "R3F_LOG_deplace_mode_alignement != ""sol"""];
_action_aligner_horizon = _joueur addAction [("<t color=""#00eeff"">" + STR_R3F_LOG_action_aligner_horizon + "</t>"), {R3F_LOG_deplace_mode_alignement = "horizon"; R3F_LOG_deplace_force_setVector = true;}, nil, 6, false, true, "", "R3F_LOG_deplace_mode_alignement != ""horizon"""];
_action_tourner = _joueur addAction [("<t color=""#00eeff"">" + STR_R3F_LOG_action_tourner + "</t>"), {R3F_LOG_deplace_dir_rel_objet = R3F_LOG_deplace_dir_rel_objet + 12; R3F_LOG_deplace_force_setVector = true;}, nil, 6, false, false];
_action_rapprocher = _joueur addAction [("<t color=""#00eeff"">" + STR_R3F_LOG_action_rapprocher + "</t>"), {R3F_LOG_deplace_distance_rel_objet = R3F_LOG_deplace_distance_rel_objet - 0.4; R3F_LOG_deplace_force_attachTo = true;}, nil, 6, false, false];
// Relâcher l'objet dès que le joueur tire. Le detach sert à rendre l'objet solide pour ne pas tirer au travers.
_idx_eh_fired = _joueur addEventHandler ["Fired", {if (!surfaceIsWater getPos player) then {detach R3F_LOG_joueur_deplace_objet; R3F_LOG_joueur_deplace_objet = objNull;};}];
// Gestion des évènements KeyDown et KeyUp pour faire tourner l'objet avec les touches X/C
R3F_LOG_joueur_deplace_key_rotation = "";
R3F_LOG_joueur_deplace_key_translation = "";
_time_derniere_rotation = 0;
_time_derniere_translation = 0;
_idx_eh_keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown",
{
switch (_this select 1) do
{
case 45: {R3F_LOG_joueur_deplace_key_rotation = "X"; true};
case 46: {R3F_LOG_joueur_deplace_key_rotation = "C"; true};
case 33: {R3F_LOG_joueur_deplace_key_translation = "F"; true};
case 19: {R3F_LOG_joueur_deplace_key_translation = "R"; true};
default {false};
}
}];
_idx_eh_keyUp = (findDisplay 46) displayAddEventHandler ["KeyUp",
{
switch (_this select 1) do
{
case 45: {R3F_LOG_joueur_deplace_key_rotation = ""; true};
case 46: {R3F_LOG_joueur_deplace_key_rotation = ""; true};
case 33: {R3F_LOG_joueur_deplace_key_translation = ""; true};
case 19: {R3F_LOG_joueur_deplace_key_translation = ""; true};
default {false};
}
}];
// Initialisation de l'historique anti-flood
_offset_hauteur = _pos_rel_objet_initial select 2;
_dernier_offset_hauteur = _offset_hauteur + 100;
_avant_dernier_offset_hauteur = _dernier_offset_hauteur + 100;
_dernier_pos_rel_objet = _pos_rel_objet_initial;
_avant_dernier_pos_rel_objet = _dernier_pos_rel_objet;
_vec_dir_rel = [sin R3F_LOG_deplace_dir_rel_objet, cos R3F_LOG_deplace_dir_rel_objet, 0];
_vec_dir_up = [_vec_dir_rel, [0, 0, 1]];
_dernier_vec_dir_up = [[0,0,0] vectorDiff (_vec_dir_up select 0), _vec_dir_up select 1];
_avant_dernier_vec_dir_up = [_dernier_vec_dir_up select 0, [0,0,0] vectorDiff (_dernier_vec_dir_up select 1)];
_objet attachTo [_joueur, _pos_rel_objet_initial];
// Si échec transfert local, mode dégradé : on conserve la direction de l'objet par rapport au joueur
if (!local _objet) then {[_objet, "setDir", R3F_LOG_deplace_dir_rel_objet] call R3F_LOG_FNCT_exec_commande_MP;};
R3F_LOG_mutex_local_verrou = false;
// Boucle de gestion des évènements et du positionnement pendant le déplacement
while {!isNull R3F_LOG_joueur_deplace_objet && _objet getVariable "R3F_LOG_est_deplace_par" == _joueur && alive _joueur} do
{
// Gestion de l'orientation de l'objet en fonction du terrain
if (local _objet) then
{
// En fonction de la touche appuyée (X/C), on fait pivoter l'objet
if (R3F_LOG_joueur_deplace_key_rotation == "X" || R3F_LOG_joueur_deplace_key_rotation == "C") then
{
// Un cycle sur deux maxi (flood) on modifie de l'angle
if (time - _time_derniere_rotation > 0.045) then
{
if (R3F_LOG_joueur_deplace_key_rotation == "X") then {R3F_LOG_deplace_dir_rel_objet = R3F_LOG_deplace_dir_rel_objet + 4;};
if (R3F_LOG_joueur_deplace_key_rotation == "C") then {R3F_LOG_deplace_dir_rel_objet = R3F_LOG_deplace_dir_rel_objet - 4;};
R3F_LOG_deplace_force_setVector = true;
_time_derniere_rotation = time;
};
} else {_time_derniere_rotation = 0;};
_vec_dir_rel = [sin R3F_LOG_deplace_dir_rel_objet, cos R3F_LOG_deplace_dir_rel_objet, 0];
// Conversion de la normale du sol dans le repère du joueur car l'objet est attachTo
_normale_surface = surfaceNormal getPos _objet;
_normale_surface = (player worldToModel ASLtoATL (_normale_surface vectorAdd getPosASL player)) vectorDiff (player worldToModel ASLtoATL (getPosASL player));
// Redéfinir l'orientation en fonction du terrain et du mode d'alignement
_vec_dir_up = switch (R3F_LOG_deplace_mode_alignement) do
{
case "sol": {[[-cos R3F_LOG_deplace_dir_rel_objet, sin R3F_LOG_deplace_dir_rel_objet, 0] vectorCrossProduct _normale_surface, _normale_surface]};
case "pente": {[_vec_dir_rel, _normale_surface]};
default {[_vec_dir_rel, [0, 0, 1]]};
};
// On ré-oriente l'objet, lorsque nécessaire (pas de flood)
if (R3F_LOG_deplace_force_setVector ||
(
// Vecteur dir suffisamment différent du dernier
(_vec_dir_up select 0) vectorCos (_dernier_vec_dir_up select 0) < 0.999 &&
// et différent de l'avant dernier (pas d'oscillations sans fin)
vectorMagnitude ((_vec_dir_up select 0) vectorDiff (_avant_dernier_vec_dir_up select 0)) > 1E-9
) ||
(
// Vecteur up suffisamment différent du dernier
(_vec_dir_up select 1) vectorCos (_dernier_vec_dir_up select 1) < 0.999 &&
// et différent de l'avant dernier (pas d'oscillations sans fin)
vectorMagnitude ((_vec_dir_up select 1) vectorDiff (_avant_dernier_vec_dir_up select 1)) > 1E-9
)
) then
{
_objet setVectorDirAndUp _vec_dir_up;
_avant_dernier_vec_dir_up = _dernier_vec_dir_up;
_dernier_vec_dir_up = _vec_dir_up;
R3F_LOG_deplace_force_setVector = false;
};
};
sleep 0.015;
// En fonction de la touche appuyée (F/R), on fait avancer ou reculer l'objet
if (R3F_LOG_joueur_deplace_key_translation == "F" || R3F_LOG_joueur_deplace_key_translation == "R") then
{
// Un cycle sur deux maxi (flood) on modifie de l'angle
if (time - _time_derniere_translation > 0.045) then
{
if (R3F_LOG_joueur_deplace_key_translation == "F") then
{
R3F_LOG_deplace_distance_rel_objet = R3F_LOG_deplace_distance_rel_objet - 0.075;
}
else
{
R3F_LOG_deplace_distance_rel_objet = R3F_LOG_deplace_distance_rel_objet + 0.075;
};
// Borne min-max de la distance
R3F_LOG_deplace_distance_rel_objet = R3F_LOG_deplace_distance_rel_objet min (
(
vectorMagnitude [
(-(boundingBoxReal _objet select 0 select 0)) max (boundingBoxReal _objet select 1 select 0),
(-(boundingBoxReal _objet select 0 select 1)) max (boundingBoxReal _objet select 1 select 1),
0
] + 2
) max (_pos_rel_objet_initial select 1)
) max (
(
((-(boundingBoxReal _objet select 0 select 0) * sin R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 0) * sin R3F_LOG_deplace_dir_rel_objet)) +
((-(boundingBoxReal _objet select 0 select 1) * cos R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 1) * cos R3F_LOG_deplace_dir_rel_objet)) +
1.2
)
);
R3F_LOG_deplace_force_attachTo = true;
_time_derniere_translation = time;
};
} else {_time_derniere_translation = 0;};
// Calcul de la position relative de l'objet, basée sur la position initiale, et sécurisée pour ne pas que l'objet rentre dans le joueur lors de la rotation
// L'ajout de ce calcul a également rendu inutile le test avec la fonction R3F_LOG_FNCT_unite_marche_dessus lors de la prise de l'objet
_pos_rel_objet = [
_pos_rel_objet_initial select 0,
R3F_LOG_deplace_distance_rel_objet max
(
((-(boundingBoxReal _objet select 0 select 0) * sin R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 0) * sin R3F_LOG_deplace_dir_rel_objet)) +
((-(boundingBoxReal _objet select 0 select 1) * cos R3F_LOG_deplace_dir_rel_objet) max (-(boundingBoxReal _objet select 1 select 1) * cos R3F_LOG_deplace_dir_rel_objet)) +
1.2
),
_pos_rel_objet_initial select 2
];
_elev_cam = acos ((ATLtoASL positionCameraToWorld [0, 0, 1] select 2) - (ATLtoASL positionCameraToWorld [0, 0, 0] select 2));
_offset_hauteur_cam = (vectorMagnitude [_pos_rel_objet select 0, _pos_rel_objet select 1, 0]) * tan (89 min (-89 max (_elev_cam_initial - _elev_cam)));
_offset_bounding_center = ((_objet modelToWorld boundingCenter _objet) select 2) - ((_objet modelToWorld [0,0,0]) select 2);
// Calcul de la hauteur de l'objet en fonction de l'élévation de la caméra et du terrain
if (_objet isKindOf "Static") then
{
// En mode horizontal, la plage d'offset terrain est calculée de sorte à conserver au moins un des quatre coins inférieurs en contact avec le sol
if (R3F_LOG_deplace_mode_alignement == "horizon") then
{
_hauteur_terrain_min_max_objet = [_objet] call R3F_LOG_FNCT_3D_get_hauteur_terrain_min_max_objet;
_offset_hauteur_terrain_min = (_hauteur_terrain_min_max_objet select 0) - (getPosASL _joueur select 2) + _offset_bounding_center;
_offset_hauteur_terrain_max = (_hauteur_terrain_min_max_objet select 1) - (getPosASL _joueur select 2) + _offset_bounding_center;
// On autorise un léger enterrement jusqu'à 40% de la hauteur de l'objet
_offset_hauteur_terrain_min = _offset_hauteur_terrain_min min (_offset_hauteur_terrain_max - 0.4 * ((boundingBoxReal _objet select 1 select 2) - (boundingBoxReal _objet select 0 select 2)) / (_dernier_vec_dir_up select 1 select 2));
}
// Dans les autres modes d'alignement, on autorise un léger enterrement jusqu'à 40% de la hauteur de l'objet
else
{
_offset_hauteur_terrain_max = getTerrainHeightASL (getPos _objet) - (getPosASL _joueur select 2) + _offset_bounding_center;
_offset_hauteur_terrain_min = _offset_hauteur_terrain_max - 0.4 * ((boundingBoxReal _objet select 1 select 2) - (boundingBoxReal _objet select 0 select 2)) / (_dernier_vec_dir_up select 1 select 2);
};
if (R3F_LOG_CFG_no_gravity_objects_can_be_set_in_height_over_ground) then
{
_offset_hauteur = _offset_hauteur_terrain_min max ((-1.4 + _offset_bounding_center) max ((2.75 + _offset_bounding_center) min ((_pos_rel_objet select 2) + _offset_hauteur_cam)));
}
else
{
_offset_hauteur = _offset_hauteur_terrain_min max (_offset_hauteur_terrain_max min ((_pos_rel_objet select 2) + _offset_hauteur_cam)) + (getPosATL _joueur select 2);
};
}
else
{
_offset_hauteur_terrain = getTerrainHeightASL (getPos _objet) - (getPosASL _joueur select 2) + _offset_bounding_center;
_offset_hauteur = _offset_hauteur_terrain max ((-1.4 + _offset_bounding_center) max ((2.75 + _offset_bounding_center) min ((_pos_rel_objet select 2) + _offset_hauteur_cam)));
};
// On repositionne l'objet par rapport au joueur, lorsque nécessaire (pas de flood)
if (R3F_LOG_deplace_force_attachTo ||
(
// Positionnement en hauteur suffisamment différent
abs (_offset_hauteur - _dernier_offset_hauteur) > 0.025 &&
// et différent de l'avant dernier (pas d'oscillations sans fin)
abs (_offset_hauteur - _avant_dernier_offset_hauteur) > 1E-9
) ||
(
// Position relative suffisamment différente
vectorMagnitude (_pos_rel_objet vectorDiff _dernier_pos_rel_objet) > 0.025 &&
// et différente de l'avant dernier (pas d'oscillations sans fin)
vectorMagnitude (_pos_rel_objet vectorDiff _avant_dernier_pos_rel_objet) > 1E-9
)
) then
{
_objet attachTo [_joueur, [
_pos_rel_objet select 0,
_pos_rel_objet select 1,
_offset_hauteur
]];
_avant_dernier_offset_hauteur = _dernier_offset_hauteur;
_dernier_offset_hauteur = _offset_hauteur;
_avant_dernier_pos_rel_objet = _dernier_pos_rel_objet;
_dernier_pos_rel_objet = _pos_rel_objet;
R3F_LOG_deplace_force_attachTo = false;
};
// On interdit de monter dans un véhicule tant que l'objet est porté
if (vehicle _joueur != _joueur) then
{
systemChat STR_R3F_LOG_ne_pas_monter_dans_vehicule;
_joueur action ["GetOut", vehicle _joueur];
_joueur action ["Eject", vehicle _joueur];
sleep 1;
};
// Le joueur change d'arme, on stoppe le déplacement et on ne reprendra pas l'arme initiale
if (currentWeapon _joueur != "" && currentWeapon _joueur != handgunWeapon _joueur && !surfaceIsWater getPos _joueur) then
{
R3F_LOG_joueur_deplace_objet = objNull;
_restaurer_arme = false;
};
sleep 0.015;
};
// Si l'objet est relaché (et donc pas chargé dans un véhicule)
if (isNull (_objet getVariable ["R3F_LOG_est_transporte_par", objNull])) then
{
// L'objet n'est plus porté, on le repose. Le léger setVelocity vers le haut sert à defreezer les objets qui pourraient flotter.
// TODO gestion collision, en particulier si le joueur meurt
[_objet, "detachSetVelocity", [0, 0, 0.1]] call R3F_LOG_FNCT_exec_commande_MP;
};
_joueur removeEventHandler ["Fired", _idx_eh_fired];
(findDisplay 46) displayRemoveEventHandler ["KeyDown", _idx_eh_keyDown];
(findDisplay 46) displayRemoveEventHandler ["KeyUp", _idx_eh_keyUp];
_joueur removeAction _action_relacher;
_joueur removeAction _action_aligner_pente;
_joueur removeAction _action_aligner_sol;
_joueur removeAction _action_aligner_horizon;
_joueur removeAction _action_tourner;
_joueur removeAction _action_rapprocher;
_objet setVariable ["R3F_LOG_est_deplace_par", objNull, true];
}
// Echec d'obtention de l'objet
else
{
_objet setVariable ["R3F_LOG_est_deplace_par", objNull, true];
R3F_LOG_mutex_local_verrou = false;
};
_joueur forceWalk false;
R3F_LOG_joueur_deplace_objet = objNull;
// Reprise de l'arme et restauration de son mode de tir, si nécessaire
if (alive _joueur && !surfaceIsWater getPos _joueur && _restaurer_arme) then
{
for [{_idx_muzzle = 0},
{currentWeapon _joueur != _arme_courante ||
currentMuzzle _joueur != _muzzle_courant ||
currentWeaponMode _joueur != _mode_muzzle_courant},
{_idx_muzzle = _idx_muzzle+1}] do
{
_joueur action ["SWITCHWEAPON", _joueur, _joueur, _idx_muzzle];
};
};
sleep 5; // Délai de 5 secondes pour attendre la chute/stabilisation
if (!isNull _objet) then
{
if (isNull (_objet getVariable ["R3F_LOG_est_deplace_par", objNull]) ||
{(!alive (_objet getVariable "R3F_LOG_est_deplace_par")) || (!isPlayer (_objet getVariable "R3F_LOG_est_deplace_par"))}
) then
{
R3F_LOG_PV_fin_deplacement_objet = _objet;
publicVariable "R3F_LOG_PV_fin_deplacement_objet";
["R3F_LOG_PV_fin_deplacement_objet", R3F_LOG_PV_fin_deplacement_objet] call R3F_LOG_FNCT_PVEH_fin_deplacement_objet;
};
};
}
else
{
hintC format [STR_R3F_LOG_joueur_dans_objet, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
R3F_LOG_mutex_local_verrou = false;
};
}
else
{
hintC format [STR_R3F_LOG_objet_remorque_en_cours, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
R3F_LOG_mutex_local_verrou = false;
};
}
else
{
hintC format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
R3F_LOG_mutex_local_verrou = false;
};
};

View File

@ -0,0 +1,17 @@
/**
* Passe la variable R3F_LOG_joueur_deplace_objet à objNull pour informer le script "deplacer" d'arrêter de déplacer l'objet
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
R3F_LOG_joueur_deplace_objet = objNull;
sleep 0.25;
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,9 @@
/*
* Add a double-slash ( // ) at the begining of the #include line to disable the logistics system.
* To enable the logistics system, write #define R3F_LOG_enable withouth the double-slash.
*
* Ajoutez deux barres obliques ( // ) au début de la ligne #include pour désactiver le système logistique.
* Pour activer le système logistique, écrivez #define R3F_LOG_enable sans les deux barres obliques.
*/
#define R3F_LOG_enable

View File

@ -0,0 +1,72 @@
/**
* Détacher un objet d'un véhicule
*
* @param 0 l'objet à détacher
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_remorqueur", "_objet"];
_objet = _this select 0;
_remorqueur = _objet getVariable "R3F_LOG_est_transporte_par";
// Ne pas permettre de décrocher un objet s'il est en fait héliporté
if (_remorqueur getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_tow) then
{
[_objet, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
_remorqueur setVariable ["R3F_LOG_remorque", objNull, true];
_objet setVariable ["R3F_LOG_est_transporte_par", objNull, true];
// Le léger setVelocity vers le haut sert à defreezer les objets qui pourraient flotter.
[_objet, "detachSetVelocity", [0, 0, 0.1]] call R3F_LOG_FNCT_exec_commande_MP;
player playMove format ["AinvPknlMstpSlay%1Dnon_medic", switch (currentWeapon player) do
{
case "": {"Wnon"};
case primaryWeapon player: {"Wrfl"};
case secondaryWeapon player: {"Wlnr"};
case handgunWeapon player: {"Wpst"};
default {"Wrfl"};
}];
sleep 7;
if (alive player) then
{
if (_objet getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_be_moved_by_player) then
{
// Si personne n'a touché à l'objet pendant le sleep 7
if (isNull (_remorqueur getVariable "R3F_LOG_remorque") &&
(isNull (_objet getVariable "R3F_LOG_est_transporte_par")) &&
(isNull (_objet getVariable "R3F_LOG_est_deplace_par"))
) then
{
[_objet, player, 0, true] spawn R3F_LOG_FNCT_objet_deplacer;
};
}
else
{
systemChat STR_R3F_LOG_action_detacher_fait;
};
};
}
else
{
hintC STR_R3F_LOG_action_detacher_impossible_pour_ce_vehicule;
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,102 @@
/**
* Remorque l'objet déplacé par le joueur avec un remorqueur
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_objet", "_remorqueur", "_offset_attach_y"];
_objet = R3F_LOG_joueur_deplace_objet;
_remorqueur = [_objet, 5] call R3F_LOG_FNCT_3D_cursorTarget_virtuel;
if (!isNull _remorqueur && {
_remorqueur getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select R3F_LOG_IDX_can_tow &&
alive _remorqueur && isNull (_remorqueur getVariable "R3F_LOG_remorque") && (vectorMagnitude velocity _remorqueur < 6) && !(_remorqueur getVariable "R3F_LOG_disabled")
}) then
{
[_remorqueur, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
_remorqueur setVariable ["R3F_LOG_remorque", _objet, true];
_objet setVariable ["R3F_LOG_est_transporte_par", _remorqueur, true];
// On place le joueur sur le côté du véhicule en fonction qu'il se trouve à sa gauche ou droite
if ((_remorqueur worldToModel (player modelToWorld [0,0,0])) select 0 > 0) then
{
player attachTo [_remorqueur, [
(boundingBoxReal _remorqueur select 1 select 0) + 0.5,
(boundingBoxReal _remorqueur select 0 select 1),
(boundingBoxReal _remorqueur select 0 select 2) - (boundingBoxReal player select 0 select 2)
]];
player setDir 270;
}
else
{
player attachTo [_remorqueur, [
(boundingBoxReal _remorqueur select 0 select 0) - 0.5,
(boundingBoxReal _remorqueur select 0 select 1),
(boundingBoxReal _remorqueur select 0 select 2) - (boundingBoxReal player select 0 select 2)
]];
player setDir 90;
};
// Faire relacher l'objet au joueur
R3F_LOG_joueur_deplace_objet = objNull;
player playMove format ["AinvPknlMstpSlay%1Dnon_medic", switch (currentWeapon player) do
{
case "": {"Wnon"};
case primaryWeapon player: {"Wrfl"};
case secondaryWeapon player: {"Wlnr"};
case handgunWeapon player: {"Wpst"};
default {"Wrfl"};
}];
sleep 2;
// Quelques corrections visuelles pour des classes spécifiques
if (typeOf _remorqueur == "B_Truck_01_mover_F") then {_offset_attach_y = 1.0;}
else {_offset_attach_y = 0.2;};
// Attacher à l'arrière du véhicule au ras du sol
_objet attachTo [_remorqueur, [
(boundingCenter _objet select 0),
(boundingBoxReal _remorqueur select 0 select 1) + (boundingBoxReal _objet select 0 select 1) + _offset_attach_y,
(boundingBoxReal _remorqueur select 0 select 2) - (boundingBoxReal _objet select 0 select 2)
]];
detach player;
// Si l'objet est une arme statique, on corrige l'orientation en fonction de la direction du canon
if (_objet isKindOf "StaticWeapon") then
{
private ["_azimut_canon"];
_azimut_canon = ((_objet weaponDirection (weapons _objet select 0)) select 0) atan2 ((_objet weaponDirection (weapons _objet select 0)) select 1);
// Seul le D30 a le canon pointant vers le véhicule
if !(_objet isKindOf "D30_Base") then // All in Arma
{
_azimut_canon = _azimut_canon + 180;
};
[_objet, "setDir", (getDir _objet)-_azimut_canon] call R3F_LOG_FNCT_exec_commande_MP;
};
sleep 7;
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,140 @@
/**
* Remorque l'objet pointé au véhicule remorqueur valide le plus proche
*
* @param 0 l'objet à remorquer
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_objet", "_remorqueur", "_offset_attach_y"];
_objet = _this select 0;
// Recherche du remorqueur valide le plus proche
_remorqueur = objNull;
{
if (
_x != _objet && (_x getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select R3F_LOG_IDX_can_tow) &&
alive _x && isNull (_x getVariable "R3F_LOG_est_transporte_par") &&
isNull (_x getVariable "R3F_LOG_remorque") && (vectorMagnitude velocity _x < 6) &&
!([_x, player] call R3F_LOG_FNCT_objet_est_verrouille) && !(_x getVariable "R3F_LOG_disabled") &&
{
private ["_delta_pos"];
_delta_pos =
(
_objet modelToWorld
[
boundingCenter _objet select 0,
boundingBoxReal _objet select 1 select 1,
boundingBoxReal _objet select 0 select 2
]
) vectorDiff (
_x modelToWorld
[
boundingCenter _x select 0,
boundingBoxReal _x select 0 select 1,
boundingBoxReal _x select 0 select 2
]
);
// L'arrière du remorqueur est proche de l'avant de l'objet pointé
abs (_delta_pos select 0) < 3 && abs (_delta_pos select 1) < 5
}
) exitWith {_remorqueur = _x;};
} forEach (nearestObjects [_objet, ["All"], 30]);
if (!isNull _remorqueur) then
{
if (isNull (_objet getVariable "R3F_LOG_est_transporte_par") && (isNull (_objet getVariable "R3F_LOG_est_deplace_par") || (!alive (_objet getVariable "R3F_LOG_est_deplace_par")) || (!isPlayer (_objet getVariable "R3F_LOG_est_deplace_par")))) then
{
[_remorqueur, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
_remorqueur setVariable ["R3F_LOG_remorque", _objet, true];
_objet setVariable ["R3F_LOG_est_transporte_par", _remorqueur, true];
// On place le joueur sur le côté du véhicule en fonction qu'il se trouve à sa gauche ou droite
if ((_remorqueur worldToModel (player modelToWorld [0,0,0])) select 0 > 0) then
{
player attachTo [_remorqueur, [
(boundingBoxReal _remorqueur select 1 select 0) + 0.5,
(boundingBoxReal _remorqueur select 0 select 1),
(boundingBoxReal _remorqueur select 0 select 2) - (boundingBoxReal player select 0 select 2)
]];
player setDir 270;
}
else
{
player attachTo [_remorqueur, [
(boundingBoxReal _remorqueur select 0 select 0) - 0.5,
(boundingBoxReal _remorqueur select 0 select 1),
(boundingBoxReal _remorqueur select 0 select 2) - (boundingBoxReal player select 0 select 2)
]];
player setDir 90;
};
player playMove format ["AinvPknlMstpSlay%1Dnon_medic", switch (currentWeapon player) do
{
case "": {"Wnon"};
case primaryWeapon player: {"Wrfl"};
case secondaryWeapon player: {"Wlnr"};
case handgunWeapon player: {"Wpst"};
default {"Wrfl"};
}];
sleep 2;
// Quelques corrections visuelles pour des classes spécifiques
if (typeOf _remorqueur == "B_Truck_01_mover_F") then {_offset_attach_y = 1.0;}
else {_offset_attach_y = 0.2;};
// Attacher à l'arrière du véhicule au ras du sol
_objet attachTo [_remorqueur, [
(boundingCenter _objet select 0),
(boundingBoxReal _remorqueur select 0 select 1) + (boundingBoxReal _objet select 0 select 1) + _offset_attach_y,
(boundingBoxReal _remorqueur select 0 select 2) - (boundingBoxReal _objet select 0 select 2)
]];
R3F_LOG_objet_selectionne = objNull;
detach player;
// Si l'objet est une arme statique, on corrige l'orientation en fonction de la direction du canon
if (_objet isKindOf "StaticWeapon") then
{
private ["_azimut_canon"];
_azimut_canon = ((_objet weaponDirection (weapons _objet select 0)) select 0) atan2 ((_objet weaponDirection (weapons _objet select 0)) select 1);
// Seul le D30 a le canon pointant vers le véhicule
if !(_objet isKindOf "D30_Base") then // All in Arma
{
_azimut_canon = _azimut_canon + 180;
};
[_objet, "setDir", (getDir _objet)-_azimut_canon] call R3F_LOG_FNCT_exec_commande_MP;
};
sleep 7;
}
else
{
hintC format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,17 @@
/**
* Initialise un véhicule remorqueur
*
* @param 0 le remorqueur
*/
private ["_remorqueur"];
_remorqueur = _this select 0;
// Définition locale de la variable si elle n'est pas définie sur le réseau
if (isNil {_remorqueur getVariable "R3F_LOG_remorque"}) then
{
_remorqueur setVariable ["R3F_LOG_remorque", objNull, false];
};
_remorqueur addAction [("<t color=""#00dd00"">" + STR_R3F_LOG_action_remorquer_deplace + "</t>"), {_this call R3F_LOG_FNCT_remorqueur_remorquer_deplace}, nil, 7, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_joueur_deplace_objet != _target && R3F_LOG_action_remorquer_deplace_valide"];

View File

@ -0,0 +1,291 @@
/**
* Evalue régulièrement les conditions à vérifier pour autoriser les actions logistiques
* Permet de diminuer la fréquence des vérifications des conditions normalement faites
* dans les addAction (~60Hz) et donc de limiter la consommation CPU.
*
* Copyright (C) 2014 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/>.
*/
private ["_joueur", "_vehicule_joueur", "_cursorTarget_distance", "_objet_pointe", "_objet_pas_en_cours_de_deplacement", "_fonctionnalites", "_pas_de_hook"];
private ["_objet_deverrouille", "_objet_pointe_autre_que_deplace", "_objet_pointe_autre_que_deplace_deverrouille", "_isUav", "_usine_autorisee_client"];
// Indices du tableau des fonctionnalités retourné par R3F_LOG_FNCT_determiner_fonctionnalites_logistique
#define __can_be_depl_heli_remorq_transp 0
#define __can_be_moved_by_player 1
#define __can_lift 2
#define __can_be_lifted 3
#define __can_tow 4
#define __can_be_towed 5
#define __can_transport_cargo 6
#define __can_transport_cargo_cout 7
#define __can_be_transported_cargo 8
#define __can_be_transported_cargo_cout 9
sleep 2;
while {true} do
{
_joueur = player;
_vehicule_joueur = vehicle _joueur;
_cursorTarget_distance = call R3F_LOG_FNCT_3D_cursorTarget_distance_bbox;
_objet_pointe = _cursorTarget_distance select 0;
if (call compile R3F_LOG_CFG_string_condition_allow_logistics_on_this_client &&
!R3F_LOG_mutex_local_verrou && _vehicule_joueur == _joueur && !isNull _objet_pointe && _cursorTarget_distance select 1 < 3.75
) then
{
R3F_LOG_objet_addAction = _objet_pointe;
_fonctionnalites = _objet_pointe getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log];
_objet_pas_en_cours_de_deplacement = (isNull (_objet_pointe getVariable ["R3F_LOG_est_deplace_par", objNull]) ||
{(!alive (_objet_pointe getVariable "R3F_LOG_est_deplace_par")) || (!isPlayer (_objet_pointe getVariable "R3F_LOG_est_deplace_par"))});
_isUav = (getNumber (configFile >> "CfgVehicles" >> (typeOf _objet_pointe) >> "isUav") == 1);
_usine_autorisee_client = call compile R3F_LOG_CFG_string_condition_allow_creation_factory_on_this_client;
// L'objet est-il déverrouillé
_objet_deverrouille = !([_objet_pointe, _joueur] call R3F_LOG_FNCT_objet_est_verrouille);
// Trouver l'objet pointé qui se trouve derrière l'objet en cours de déplacement
_objet_pointe_autre_que_deplace = [R3F_LOG_joueur_deplace_objet, 3.75] call R3F_LOG_FNCT_3D_cursorTarget_virtuel;
if (!isNull _objet_pointe_autre_que_deplace) then
{
// L'objet (pointé qui se trouve derrière l'objet en cours de déplacement) est-il déverrouillé
_objet_pointe_autre_que_deplace_deverrouille = !([_objet_pointe_autre_que_deplace, _joueur] call R3F_LOG_FNCT_objet_est_verrouille);
};
// Si l'objet est un objet déplaçable
if (_fonctionnalites select __can_be_moved_by_player) then
{
// Condition action deplacer_objet
R3F_LOG_action_deplacer_objet_valide = (count crew _objet_pointe == 0 || _isUav) && (isNull R3F_LOG_joueur_deplace_objet) &&
_objet_pas_en_cours_de_deplacement && isNull (_objet_pointe getVariable "R3F_LOG_est_transporte_par") &&
_objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
// Condition action revendre_usine_deplace
R3F_LOG_action_revendre_usine_deplace_valide = _usine_autorisee_client && R3F_LOG_CFG_CF_sell_back_bargain_rate != -1 &&
_objet_pointe getVariable ["R3F_LOG_CF_depuis_usine", false] && (count crew _objet_pointe == 0 || _isUav) &&
(R3F_LOG_joueur_deplace_objet == _objet_pointe) && !(_objet_pointe getVariable "R3F_LOG_disabled") && !isNull _objet_pointe_autre_que_deplace &&
{
!(_objet_pointe_autre_que_deplace getVariable ["R3F_LOG_CF_disabled", true]) &&
_objet_pointe_autre_que_deplace getVariable ["R3F_LOG_CF_side_addAction", side group _joueur] == side group _joueur &&
(abs ((getPosASL _objet_pointe_autre_que_deplace select 2) - (getPosASL player select 2)) < 2.5) &&
alive _objet_pointe_autre_que_deplace && (vectorMagnitude velocity _objet_pointe_autre_que_deplace < 6)
};
};
// Si l'objet est un objet remorquable
if (_fonctionnalites select __can_be_towed) then
{
// Et qu'il est déplaçable
if (_fonctionnalites select __can_be_moved_by_player) then
{
// Condition action remorquer_deplace
R3F_LOG_action_remorquer_deplace_valide = !(_objet_pointe getVariable "R3F_LOG_disabled") && (count crew _objet_pointe == 0 || _isUav) &&
(R3F_LOG_joueur_deplace_objet == _objet_pointe) && !isNull _objet_pointe_autre_que_deplace &&
{
(_objet_pointe_autre_que_deplace getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_tow) && alive _objet_pointe_autre_que_deplace &&
isNull (_objet_pointe_autre_que_deplace getVariable "R3F_LOG_est_transporte_par") && isNull (_objet_pointe_autre_que_deplace getVariable "R3F_LOG_remorque") &&
(vectorMagnitude velocity _objet_pointe_autre_que_deplace < 6) &&
_objet_pointe_autre_que_deplace_deverrouille && !(_objet_pointe_autre_que_deplace getVariable "R3F_LOG_disabled")
};
};
// Condition action selectionner_objet_remorque
R3F_LOG_action_remorquer_direct_valide = (count crew _objet_pointe == 0 || _isUav) && isNull R3F_LOG_joueur_deplace_objet &&
isNull (_objet_pointe getVariable "R3F_LOG_est_transporte_par") && isNull (_objet_pointe getVariable ["R3F_LOG_remorque", objNull]) &&
_objet_pas_en_cours_de_deplacement && _objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled") &&
{
{
_x != _objet_pointe && (_x getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_tow) &&
alive _x && isNull (_x getVariable "R3F_LOG_est_transporte_par") &&
isNull (_x getVariable "R3F_LOG_remorque") && (vectorMagnitude velocity _x < 6) &&
!([_x, _joueur] call R3F_LOG_FNCT_objet_est_verrouille) && !(_x getVariable "R3F_LOG_disabled") &&
{
private ["_delta_pos"];
_delta_pos =
(
_objet_pointe modelToWorld
[
boundingCenter _objet_pointe select 0,
boundingBoxReal _objet_pointe select 1 select 1,
boundingBoxReal _objet_pointe select 0 select 2
]
) vectorDiff (
_x modelToWorld
[
boundingCenter _x select 0,
boundingBoxReal _x select 0 select 1,
boundingBoxReal _x select 0 select 2
]
);
// L'arrière du remorqueur est proche de l'avant de l'objet pointé
abs (_delta_pos select 0) < 3 && abs (_delta_pos select 1) < 5
}
} count (nearestObjects [_objet_pointe, ["All"], 30]) != 0
};
// Condition action detacher
R3F_LOG_action_detacher_valide = (isNull R3F_LOG_joueur_deplace_objet) &&
!isNull (_objet_pointe getVariable "R3F_LOG_est_transporte_par") && _objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
};
// Si l'objet est un objet transportable
if (_fonctionnalites select __can_be_transported_cargo) then
{
// Et qu'il est déplaçable
if (_fonctionnalites select __can_be_moved_by_player) then
{
// Condition action charger_deplace
R3F_LOG_action_charger_deplace_valide = (count crew _objet_pointe == 0 || _isUav) && (R3F_LOG_joueur_deplace_objet == _objet_pointe) &&
!(_objet_pointe getVariable "R3F_LOG_disabled") && !isNull _objet_pointe_autre_que_deplace &&
{
(_objet_pointe_autre_que_deplace getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_transport_cargo) &&
(abs ((getPosASL _objet_pointe_autre_que_deplace select 2) - (getPosASL player select 2)) < 2.5) &&
alive _objet_pointe_autre_que_deplace && (vectorMagnitude velocity _objet_pointe_autre_que_deplace < 6) &&
_objet_pointe_autre_que_deplace_deverrouille && !(_objet_pointe_autre_que_deplace getVariable "R3F_LOG_disabled")
};
};
// Condition action selectionner_objet_charge
R3F_LOG_action_selectionner_objet_charge_valide = (count crew _objet_pointe == 0 || _isUav) && isNull R3F_LOG_joueur_deplace_objet &&
isNull (_objet_pointe getVariable "R3F_LOG_est_transporte_par") &&
_objet_pas_en_cours_de_deplacement && _objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
};
// Si l'objet est un véhicule remorqueur
if (_fonctionnalites select __can_tow) then
{
// Condition action remorquer_deplace
R3F_LOG_action_remorquer_deplace_valide = (alive _objet_pointe) && (!isNull R3F_LOG_joueur_deplace_objet) &&
!(R3F_LOG_joueur_deplace_objet getVariable "R3F_LOG_disabled") && (R3F_LOG_joueur_deplace_objet != _objet_pointe) &&
(R3F_LOG_joueur_deplace_objet getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_be_towed) &&
isNull (_objet_pointe getVariable "R3F_LOG_est_transporte_par") &&
isNull (_objet_pointe getVariable "R3F_LOG_remorque") && (vectorMagnitude velocity _objet_pointe < 6) &&
_objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
};
// Si l'objet est un véhicule transporteur
if (_fonctionnalites select __can_transport_cargo) then
{
// Condition action charger_deplace
R3F_LOG_action_charger_deplace_valide = alive _objet_pointe && (!isNull R3F_LOG_joueur_deplace_objet) &&
!(R3F_LOG_joueur_deplace_objet getVariable "R3F_LOG_disabled") && (R3F_LOG_joueur_deplace_objet != _objet_pointe) &&
(R3F_LOG_joueur_deplace_objet getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_be_transported_cargo) &&
(vectorMagnitude velocity _objet_pointe < 6) && _objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
// Condition action charger_selection
R3F_LOG_action_charger_selection_valide = alive _objet_pointe && (isNull R3F_LOG_joueur_deplace_objet) &&
(!isNull R3F_LOG_objet_selectionne) && (R3F_LOG_objet_selectionne != _objet_pointe) &&
!(R3F_LOG_objet_selectionne getVariable "R3F_LOG_disabled") &&
(R3F_LOG_objet_selectionne getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_be_transported_cargo) &&
(vectorMagnitude velocity _objet_pointe < 6) && _objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
// Condition action contenu_vehicule
R3F_LOG_action_contenu_vehicule_valide = alive _objet_pointe && (isNull R3F_LOG_joueur_deplace_objet) &&
(vectorMagnitude velocity _objet_pointe < 6) && _objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
};
// Condition action ouvrir_usine
R3F_LOG_action_ouvrir_usine_valide = _usine_autorisee_client && isNull R3F_LOG_joueur_deplace_objet &&
!(_objet_pointe getVariable "R3F_LOG_CF_disabled") && alive _objet_pointe &&
_objet_pointe getVariable ["R3F_LOG_CF_side_addAction", side group _joueur] == side group _joueur;
// Condition action revendre_usine_deplace
R3F_LOG_action_revendre_usine_deplace_valide = _usine_autorisee_client && R3F_LOG_CFG_CF_sell_back_bargain_rate != -1 && alive _objet_pointe &&
(!isNull R3F_LOG_joueur_deplace_objet) && R3F_LOG_joueur_deplace_objet getVariable ["R3F_LOG_CF_depuis_usine", false] &&
!(R3F_LOG_joueur_deplace_objet getVariable "R3F_LOG_disabled") && (R3F_LOG_joueur_deplace_objet != _objet_pointe) &&
(vectorMagnitude velocity _objet_pointe < 6) && !(_objet_pointe getVariable "R3F_LOG_CF_disabled") &&
_objet_pointe getVariable ["R3F_LOG_CF_side_addAction", side group _joueur] == side group _joueur;
// Condition action revendre_usine_selection
R3F_LOG_action_revendre_usine_selection_valide = _usine_autorisee_client && R3F_LOG_CFG_CF_sell_back_bargain_rate != -1 && alive _objet_pointe &&
(isNull R3F_LOG_joueur_deplace_objet) && R3F_LOG_objet_selectionne getVariable ["R3F_LOG_CF_depuis_usine", false] &&
(!isNull R3F_LOG_objet_selectionne) && (R3F_LOG_objet_selectionne != _objet_pointe) && !(R3F_LOG_objet_selectionne getVariable "R3F_LOG_disabled") &&
(vectorMagnitude velocity _objet_pointe < 6) && !(_objet_pointe getVariable "R3F_LOG_CF_disabled") &&
_objet_pointe getVariable ["R3F_LOG_CF_side_addAction", side group _joueur] == side group _joueur;
// Condition action revendre_usine_direct
R3F_LOG_action_revendre_usine_direct_valide = _usine_autorisee_client && R3F_LOG_CFG_CF_sell_back_bargain_rate != -1 &&
_objet_pointe getVariable ["R3F_LOG_CF_depuis_usine", false] && (count crew _objet_pointe == 0 || _isUav) &&
isNull R3F_LOG_joueur_deplace_objet && isNull (_objet_pointe getVariable ["R3F_LOG_est_transporte_par", objNull]) &&
_objet_pas_en_cours_de_deplacement &&
{
_objet_pointe distance _x < 20 && !(_x getVariable "R3F_LOG_CF_disabled") &&
_x getVariable ["R3F_LOG_CF_side_addAction", side group _joueur] == side group _joueur
} count R3F_LOG_CF_liste_usines != 0;
// Condition déverrouiller objet
R3F_LOG_action_deverrouiller_valide = _objet_pas_en_cours_de_deplacement && !_objet_deverrouille && !(_objet_pointe getVariable "R3F_LOG_disabled");
}
else
{
R3F_LOG_action_deplacer_objet_valide = false;
R3F_LOG_action_remorquer_direct_valide = false;
R3F_LOG_action_detacher_valide = false;
R3F_LOG_action_selectionner_objet_charge_valide = false;
R3F_LOG_action_remorquer_deplace_valide = false;
R3F_LOG_action_charger_deplace_valide = false;
R3F_LOG_action_charger_selection_valide = false;
R3F_LOG_action_contenu_vehicule_valide = false;
R3F_LOG_action_ouvrir_usine_valide = false;
R3F_LOG_action_selectionner_objet_revendre_usine_valide = false;
R3F_LOG_action_revendre_usine_direct_valide = false;
R3F_LOG_action_revendre_usine_deplace_valide = false;
R3F_LOG_action_revendre_usine_selection_valide = false;
R3F_LOG_action_deverrouiller_valide = false;
};
// Si le joueur est pilote dans un héliporteur
if (call compile R3F_LOG_CFG_string_condition_allow_logistics_on_this_client &&
!R3F_LOG_mutex_local_verrou && _vehicule_joueur != _joueur && driver _vehicule_joueur == _joueur && {_vehicule_joueur getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_lift}
) then
{
R3F_LOG_objet_addAction = _vehicule_joueur;
// Note : pas de restriction liée à R3F_LOG_proprietaire_verrou pour l'héliportage
// A partir des versions > 1.32, on interdit le lift si le hook de BIS est utilisé
if (productVersion select 2 > 132) then
{
// Call compile car la commande getSlingLoad n'existe pas en 1.32
_pas_de_hook = _vehicule_joueur call compile format ["isNull getSlingLoad _this"];
}
else
{
_pas_de_hook = true;
};
// Condition action heliporter
R3F_LOG_action_heliporter_valide = !(_vehicule_joueur getVariable "R3F_LOG_disabled") && _pas_de_hook &&
isNull (_vehicule_joueur getVariable "R3F_LOG_heliporte") && (vectorMagnitude velocity _vehicule_joueur < 6) &&
{
{
(_x getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select __can_be_lifted) &&
_x != _vehicule_joueur && !(_x getVariable "R3F_LOG_disabled") &&
((getPosASL _vehicule_joueur select 2) - (getPosASL _x select 2) > 2 && (getPosASL _vehicule_joueur select 2) - (getPosASL _x select 2) < 15)
} count (nearestObjects [_vehicule_joueur, ["All"], 15]) != 0
};
// Condition action heliport_larguer
R3F_LOG_action_heliport_larguer_valide = !isNull (_vehicule_joueur getVariable "R3F_LOG_heliporte") && !(_vehicule_joueur getVariable "R3F_LOG_disabled") &&
(vectorMagnitude velocity _vehicule_joueur < 25) && ((getPosASL _vehicule_joueur select 2) - (0 max getTerrainHeightASL getPos _vehicule_joueur) < 40);
}
else
{
R3F_LOG_action_heliporter_valide = false;
R3F_LOG_action_heliport_larguer_valide = false;
};
sleep 0.4;
};

View File

@ -0,0 +1,187 @@
/**
* Recherche périodiquement les nouveaux objets pour leur ajouter les fonctionnalités de logistique si besoin
* Script à faire tourner dans un fil d'exécution dédié
*
* Copyright (C) 2014 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/>.
*/
sleep 4;
private
[
"_compteur_cyclique", "_liste_nouveaux_objets", "_liste_vehicules_connus", "_liste_statiques", "_liste_nouveaux_statiques",
"_liste_statiques_connus", "_liste_statiques_cycle_precedent", "_count_liste_objets", "_i", "_objet", "_fonctionnalites",
"_liste_purge", "_seuil_nb_statiques_avant_purge", "_seuil_nb_vehicules_avant_purge"
];
// Contiendra la liste des objets déjà parcourus récupérés avec la commande "vehicles"
_liste_vehicules_connus = [];
// Contiendra la liste des objets dérivant de "Static" (caisse de mun, drapeau, ...) déjà parcourus récupérés avec la commande "nearestObjects"
_liste_statiques_connus = [];
// Contiendra la liste des objets "Static" récupérés lors du tour de boucle précécent (optimisation des opérations sur les tableaux)
_liste_statiques_cycle_precedent = [];
// Indices du tableau des fonctionnalités retourné par R3F_LOG_FNCT_determiner_fonctionnalites_logistique
#define __can_be_depl_heli_remorq_transp 0
#define __can_be_moved_by_player 1
#define __can_lift 2
#define __can_be_lifted 3
#define __can_tow 4
#define __can_be_towed 5
#define __can_transport_cargo 6
#define __can_transport_cargo_cout 7
#define __can_be_transported_cargo 8
#define __can_be_transported_cargo_cout 9
// Période de recherche des objets dérivant de "Static"
#define __tempo 3
// Utiliser la commande vehicles une fois tout les X cycles de période __tempo
#define __nb_cycles_commande_vehicles 4
_compteur_cyclique = 0;
_seuil_nb_statiques_avant_purge = 150;
_seuil_nb_vehicules_avant_purge = 150;
while {true} do
{
if (!isNull player) then
{
// Tout les __nb_cycles_commande_vehicles ou sur ordre, on récupère les nouveaux véhicules du jeu
if (_compteur_cyclique == 0 || R3F_LOG_PUBVAR_nouvel_objet_a_initialiser) then
{
R3F_LOG_PUBVAR_nouvel_objet_a_initialiser = false; // Acquittement local
// Purge de _liste_vehicules_connus quand nécessaire
if (count _liste_vehicules_connus > _seuil_nb_vehicules_avant_purge) then
{
_liste_purge = [];
{
if (!isNull _x) then
{
_liste_purge pushBack _x;
};
} forEach _liste_vehicules_connus;
_liste_vehicules_connus = _liste_purge;
_seuil_nb_vehicules_avant_purge = count _liste_vehicules_connus + 75;
};
// Purge de _liste_statiques_connus quand nécessaire
if (count _liste_statiques_connus > _seuil_nb_statiques_avant_purge) then
{
_liste_purge = [];
{
if (!isNull _x &&
{
!isNil {_x getVariable "R3F_LOG_fonctionnalites"} ||
(_x getVariable ["R3F_LOG_CF_depuis_usine", false])
}
) then
{
_liste_purge pushBack _x;
};
} forEach _liste_statiques_connus;
_liste_statiques_connus = _liste_purge;
_seuil_nb_statiques_avant_purge = count _liste_statiques_connus + 150;
};
// Récupération des nouveaux véhicules
_liste_nouveaux_objets = vehicles - _liste_vehicules_connus;
_liste_vehicules_connus = _liste_vehicules_connus + _liste_nouveaux_objets;
}
else
{
_liste_nouveaux_objets = [];
};
_compteur_cyclique = (_compteur_cyclique + 1) mod __nb_cycles_commande_vehicles;
// En plus des nouveaux véhicules, on récupère les statiques (caisse de mun, drapeau, ...) proches du joueur non connus
// Optimisation "_liste_statiques_cycle_precedent" : et qui n'étaient pas proches du joueur au cycle précédent
_liste_statiques = nearestObjects [player, ["Static"], 25];
if (count _liste_statiques != 0) then
{
_liste_nouveaux_statiques = _liste_statiques - _liste_statiques_cycle_precedent - _liste_statiques_connus;
_liste_statiques_connus = _liste_statiques_connus + _liste_nouveaux_statiques;
_liste_statiques_cycle_precedent = _liste_statiques;
}
else
{
_liste_nouveaux_statiques = [];
_liste_statiques_cycle_precedent = [];
};
_liste_nouveaux_objets = _liste_nouveaux_objets + _liste_nouveaux_statiques;
_count_liste_objets = count _liste_nouveaux_objets;
if (_count_liste_objets > 0) then
{
// On parcoure tous les nouveaux objets en __tempo secondes
for [{_i = 0}, {_i < _count_liste_objets}, {_i = _i + 1}] do
{
_objet = _liste_nouveaux_objets select _i;
_fonctionnalites = [typeOf _objet] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique;
// Si au moins une fonctionnalité
if (
_fonctionnalites select __can_be_depl_heli_remorq_transp ||
_fonctionnalites select __can_lift ||
_fonctionnalites select __can_tow ||
_fonctionnalites select __can_transport_cargo
) then
{
_objet setVariable ["R3F_LOG_fonctionnalites", _fonctionnalites, false];
if (isNil {_objet getVariable "R3F_LOG_disabled"}) then
{
_objet setVariable ["R3F_LOG_disabled", R3F_LOG_CFG_disabled_by_default, false];
};
// Si l'objet est un objet déplaçable/héliportable/remorquable/transportable
if (_fonctionnalites select __can_be_depl_heli_remorq_transp) then
{
[_objet] call R3F_LOG_FNCT_objet_init;
};
// Si l'objet est un véhicule héliporteur
if (_fonctionnalites select __can_lift) then
{
[_objet] call R3F_LOG_FNCT_heliporteur_init;
};
// Si l'objet est un véhicule remorqueur
if (_fonctionnalites select __can_tow) then
{
[_objet] call R3F_LOG_FNCT_remorqueur_init;
};
// Si l'objet est un véhicule transporteur
if (_fonctionnalites select __can_transport_cargo) then
{
[_objet] call R3F_LOG_FNCT_transporteur_init;
};
};
// Si l'objet a été créé depuis une usine, on ajoute la possibilité de revendre à l'usine, quelque soit ses fonctionnalités logistiques
if (_objet getVariable ["R3F_LOG_CF_depuis_usine", false]) then
{
_objet addAction [("<t color=""#ff9600"">" + format [STR_R3F_LOG_action_revendre_usine_direct, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")] + "</t>"), {_this call R3F_LOG_FNCT_usine_revendre_direct}, nil, 5, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_revendre_usine_direct_valide"];
};
sleep (0.07 max (__tempo / _count_liste_objets));
};
}
else
{
sleep __tempo;
};
}
else
{
sleep 2;
};
};

View File

@ -0,0 +1,93 @@
/**
* Vérifie périodiquement que les objets à protéger et ne pas perdre aient besoin d'être déchargés/téléportés.
* Script à faire tourner dans un fil d'exécution dédié sur le serveur.
*
* Copyright (C) 2014 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/>.
*/
while {true} do
{
// Pour chaque objet à protéger
{
private ["_objet", "_bbox_dim", "_pos_respawn", "_pos_degagee", "_rayon"];
_objet = _x;
if (!isNull _objet) then
{
// Si l'objet est transporté/héliporté/remorqué
if !(isNull (_objet getVariable ["R3F_LOG_est_transporte_par", objNull])) then
{
// Mais que le transporteur est détruit/héliporté/remorqué
if !(alive (_objet getVariable "R3F_LOG_est_transporte_par")) then
{
// Récupération de la position de respawn en accord avec le paramètre passé dans "do_not_lose_it"
if (typeName (_objet getVariable "R3F_LOG_pos_respawn") == "ARRAY") then
{
_pos_respawn = _objet getVariable "R3F_LOG_pos_respawn";
}
else
{
if (_objet getVariable "R3F_LOG_pos_respawn" == "cargo_pos") then
{
_pos_respawn = getPos (_objet getVariable "R3F_LOG_est_transporte_par");
}
else
{
_pos_respawn = getMarkerPos (_objet getVariable "R3F_LOG_pos_respawn");
};
};
_bbox_dim = (vectorMagnitude (boundingBoxReal _objet select 0)) max (vectorMagnitude (boundingBoxReal _objet select 1));
// Si mode de respawn != "exact_spawn_pos"
if (isNil {_objet getVariable "R3F_LOG_dir_respawn"}) then
{
// Recherche d'une position dégagée (on augmente progressivement le rayon jusqu'à trouver une position)
for [{_rayon = 5 max (2*_bbox_dim); _pos_degagee = [];}, {count _pos_degagee == 0 && _rayon <= 100 + (8*_bbox_dim)}, {_rayon = _rayon + 20 + (5*_bbox_dim)}] do
{
_pos_degagee = [
_bbox_dim,
_pos_respawn,
_rayon,
100 min (5 + _rayon^1.2)
] call R3F_LOG_FNCT_3D_tirer_position_degagee_sol;
};
// En cas d'échec de la recherche de position dégagée
if (count _pos_degagee == 0) then {_pos_degagee = _pos_respawn;};
// On ramène l'objet sur la position
detach _objet;
_objet setPos _pos_degagee;
}
else
{
// On ramène l'objet sur la position
detach _objet;
_objet setPosASL _pos_respawn;
_objet setDir (_objet getVariable "R3F_LOG_dir_respawn");
};
// On retire l'objet du contenu du véhicule (s'il est dedans)
_objets_charges = (_objet getVariable "R3F_LOG_est_transporte_par") getVariable ["R3F_LOG_objets_charges", []];
if (_objet in _objets_charges) then
{
_objets_charges = _objets_charges - [_objet];
(_objet getVariable "R3F_LOG_est_transporte_par") setVariable ["R3F_LOG_objets_charges", _objets_charges, true];
};
_objet setVariable ["R3F_LOG_est_transporte_par", objNull, true];
sleep 4;
};
};
};
} forEach R3F_LOG_liste_objets_a_proteger;
sleep 90;
};

View File

@ -0,0 +1,171 @@
/**
* Système assurant la protection contre les blessures des unités locales lors du déplacement manuels d'objets
* Les objets en cours de transport/heliport/remorquage ne sont pas concernés.
*
* Copyright (C) 2014 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/>.
*/
/** Contient la liste de tous les objets en cours de déplacements manuels */
R3F_LOG_liste_objets_en_deplacement = [];
/**
* Fonction PVEH ajoutant les nouveaux objets en cours de déplacement dans la liste
* @param 1 le nouvel objet en cours de déplacement
*/
R3F_LOG_FNCT_PVEH_nouvel_objet_en_deplacement =
{
private ["_objet"];
_objet = _this select 1;
R3F_LOG_liste_objets_en_deplacement = R3F_LOG_liste_objets_en_deplacement - [_objet];
R3F_LOG_liste_objets_en_deplacement pushBack _objet;
_objet allowDamage false;
};
"R3F_LOG_PV_nouvel_objet_en_deplacement" addPublicVariableEventHandler R3F_LOG_FNCT_PVEH_nouvel_objet_en_deplacement;
/**
* Fonction PVEH retirant de la liste les objets dont le déplacement est terminé
* @param 1 l'objet dont le déplacement est terminé
*/
R3F_LOG_FNCT_PVEH_fin_deplacement_objet =
{
private ["_objet"];
_objet = _this select 1;
R3F_LOG_liste_objets_en_deplacement = R3F_LOG_liste_objets_en_deplacement - [_this select 1];
// Limitation : si l'objet a été "allowDamage false" par ailleurs, il ne le sera plus. Voir http://feedback.arma3.com/view.php?id=19211
_objet allowDamage true;
};
"R3F_LOG_PV_fin_deplacement_objet" addPublicVariableEventHandler R3F_LOG_FNCT_PVEH_fin_deplacement_objet;
/**
* Fonction traitant les event handler HandleDamage des unités locales,
* si la blessure provient d'un objet en déplacement, la blessure est ignorée
* @param voir https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage
* @return niveau de blessure inchangé si due au déplacement d'un objet, sinon rien pour laisser A3 gérer la blessure
* @note implémentation de la commande getHit manquante ( http://feedback.arma3.com/view.php?id=18261 )
*/
R3F_LOG_FNCT_EH_HandleDamage =
{
private ["_unite", "_selection", "_blessure", "_source"];
_unite = _this select 0;
_selection = _this select 1;
_blessure = _this select 2;
_source = _this select 3;
if (
// Filtre sur les blessures de type choc/collision
_this select 4 == "" && {(isNull _source || _source == _unite || _source in R3F_LOG_liste_objets_en_deplacement)
&& {
// Si l'unité est potentiellement en collision avec un objet en cours de déplacement
{
!isNull _x &&
{
// Calcul de collision possible unité-objet
[
_x worldToModel (_unite modelToWorld [0,0,0]), // position de l'unité dans le repère de l'objet en déplacement
(boundingBoxReal _x select 0) vectorDiff [12, 12, 12], // bbox min élargie (zone de sûreté)
(boundingBoxReal _x select 1) vectorAdd [12, 12, 12] // bbox max élargie (zone de sûreté)
] call R3F_LOG_FNCT_3D_pos_est_dans_bbox
}
} count R3F_LOG_liste_objets_en_deplacement != 0
}
}) then
{
// Retourner la valeur de blessure précédente de l'unité
if (_selection == "") then
{
damage _unite
}
else
{
_unite getHit _selection
};
};
};
sleep 5;
while {true} do
{
private ["_idx_objet"];
// Vérifier que les unités locales à la machine sont gérées, et ne plus gérées celles qui ne sont plus locales
// Par chaque unité
{
// Unité non gérée
if (isNil {_x getVariable "R3F_LOG_idx_EH_HandleDamage"}) then
{
// Et qui est locale
if (local _x) then
{
// Event handler de à chaque blessure, vérifiant si elle est due à un objet en déplacement
_x setVariable ["R3F_LOG_idx_EH_HandleDamage", _x addEventHandler ["HandleDamage", {_this call R3F_LOG_FNCT_EH_HandleDamage}]];
};
}
// Unité déjà gérée
else
{
// Mais qui n'est plus locale
if (!local _x) then
{
// Suppresion des event handler de gestion des blessures
_x removeEventHandler ["HandleDamage", _x getVariable "R3F_LOG_idx_EH_HandleDamage"];
_x setVariable ["R3F_LOG_idx_EH_HandleDamage", nil];
};
};
} forEach call {// Calcul du paramètre du forEach
/*
* Sur un serveur non-dédié, on ne protège que le joueur et son groupe (économie de ressources)
* Les IA non commandées par des joueurs ne seront donc pas protégées, ce qui est un moindre mal.
*/
if (isServer && !isDedicated) then {if (!isNull player) then {units group player} else {[]}}
/*
* Chez un joueur (ou un serveur dédié), on protège toutes les unités locales.
* Dans la pratique un serveur dédié n'appelle pas ce script, par choix, pour économiser les ressources.
*/
else {allUnits}
};
// Vérifier l'intégrité de la liste des objets en cours de déplacements, et la nettoyer si besoin
for [{_idx_objet = 0}, {_idx_objet < count R3F_LOG_liste_objets_en_deplacement}, {;}] do
{
private ["_objet"];
_objet = R3F_LOG_liste_objets_en_deplacement select _idx_objet;
if (isNull _objet) then
{
R3F_LOG_liste_objets_en_deplacement = R3F_LOG_liste_objets_en_deplacement - [objNull];
// On recommence la validation de la liste
_idx_objet = 0;
}
else
{
// Si l'objet n'est plus déplacé par une unité valide
if !(isNull (_objet getVariable ["R3F_LOG_est_deplace_par", objNull]) ||
{alive (_objet getVariable "R3F_LOG_est_deplace_par") && isPlayer (_objet getVariable "R3F_LOG_est_deplace_par")}
) then
{
["R3F_LOG_PV_fin_deplacement_objet", _objet] call R3F_LOG_FNCT_PVEH_fin_deplacement_objet;
// On recommence la validation de la liste
_idx_objet = 0;
}
// Si l'objet est toujours en déplacement, on poursuit le parcours de la liste
else {_idx_objet = _idx_objet+1;};
};
};
sleep 90;
};

View File

@ -0,0 +1,6 @@
- Simulation of pitch/yaw rotation between towing vehicle and towed object
- Parachute drop of objects loaded in aircraft's cargo
- Add visual ropes on airlifted and towed objects (waiting progress of ropeCreate)
- Add a way to define custom categories in the creation factory
- Deny to fire with the turret of airlifted vehicles (waiting for enablePersonTurret)
- Implement a network-mutex on setVariable

View File

@ -0,0 +1,45 @@
/**
* Retourne le chargement actuel et la capacité maximale d'un véhicule
*
* @param 0 le transporteur pour lequel calculer le chargement
*
* @return tableau content le chargement actuel et la capacité d'un véhicule
*
* Copyright (C) 2014 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/>.
*/
private ["_transporteur", "_objets_charges", "_chargement_actuel", "_chargement_maxi"];
_transporteur = _this select 0;
_objets_charges = _transporteur getVariable ["R3F_LOG_objets_charges", []];
// Calcul du chargement actuel
_chargement_actuel = 0;
{
if (isNil {_x getVariable "R3F_LOG_fonctionnalites"}) then
{
_chargement_actuel = _chargement_actuel + (([typeOf _x] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique) select R3F_LOG_IDX_can_be_transported_cargo_cout);
}
else
{
_chargement_actuel = _chargement_actuel + (_x getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_be_transported_cargo_cout);
};
} forEach _objets_charges;
// Recherche de la capacité maximale du transporteur
if (isNil {_transporteur getVariable "R3F_LOG_fonctionnalites"}) then
{
_chargement_maxi = ([typeOf _transporteur] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique) select R3F_LOG_IDX_can_transport_cargo_cout;
}
else
{
_chargement_maxi = _transporteur getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_transport_cargo_cout;
};
[_chargement_actuel, _chargement_maxi]

View File

@ -0,0 +1,181 @@
/**
* Charger automatiquement un ou plusieurs objets/noms de classe dans un transporteur
*
* @param 0 le transporteur
* @param 1 tableau d'objets et/ou noms de classe, pouvant être un mélange des formats suivants :
* objet
* nom de classe, dans ce cas, l'objet sera créé avant d'être chargé
* tableau ["nom de classe", quantité] à créer avant d'être chargé
*
* Copyright (C) 2014 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/>.
*/
// Attendre le mutex
waitUntil
{
if (R3F_LOG_mutex_local_verrou) then
{
false
}
else
{
R3F_LOG_mutex_local_verrou = true;
true
}
};
private ["_transporteur", "_liste_a_charger", "_chargement", "_chargement_actuel", "_chargement_maxi", "_objets_charges", "_cout_chargement_objet"];
private ["_objet_ou_classe", "_quantite", "_objet", "_classe", "_bbox", "_bbox_dim", "_pos_degagee", "_fonctionnalites", "_i"];
_transporteur = _this select 0;
_liste_a_charger = _this select 1;
_chargement = [_transporteur] call R3F_LOG_FNCT_calculer_chargement_vehicule;
_chargement_actuel = _chargement select 0;
_chargement_maxi = _chargement select 1;
_objets_charges = _transporteur getVariable ["R3F_LOG_objets_charges", []];
// Pour chaque élément de la liste à charger
{
if (typeName _x == "ARRAY" && {count _x > 0}) then
{
_objet_ou_classe = _x select 0;
if (typeName _objet_ou_classe == "STRING" && count _x > 1) then
{
_quantite = _x select 1;
}
else
{
_quantite = 1;
};
}
else
{
_objet_ou_classe = _x;
_quantite = 1;
};
if (typeName _objet_ou_classe == "STRING") then
{
_classe = _objet_ou_classe;
_bbox = [_classe] call R3F_LOG_FNCT_3D_get_bounding_box_depuis_classname;
_bbox_dim = (vectorMagnitude (_bbox select 0)) max (vectorMagnitude (_bbox select 1));
// Recherche d'une position dégagée. Les véhicules doivent être créé au niveau du sol sinon ils ne peuvent être utilisés.
if (_classe isKindOf "AllVehicles") then
{
_pos_degagee = [_bbox_dim, getPos _transporteur, 200, 50] call R3F_LOG_FNCT_3D_tirer_position_degagee_sol;
}
else
{
_pos_degagee = [] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel;
};
if (count _pos_degagee == 0) then {_pos_degagee = getPosATL _transporteur;};
}
else
{
_classe = typeOf _objet_ou_classe;
};
_fonctionnalites = [_classe] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique;
_cout_chargement_objet = _fonctionnalites select R3F_LOG_IDX_can_be_transported_cargo_cout;
// S'assurer que le type d'objet à charger est transportable
if !(_fonctionnalites select R3F_LOG_IDX_can_be_transported_cargo) then
{
diag_log format ["[Auto-load ""%1"" in ""%2""] : %3",
getText (configFile >> "CfgVehicles" >> _classe >> "displayName"),
getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName"),
"The object is not a transporable class."];
systemChat format ["[Auto-load ""%1"" in ""%2""] : %3",
getText (configFile >> "CfgVehicles" >> _classe >> "displayName"),
getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName"),
"The object is not a transporable class."];
}
else
{
for [{_i = 0}, {_i < _quantite}, {_i = _i+1}] do
{
// Si l'objet à charger est donné en tant que nom de classe, on le crée
if (typeName _objet_ou_classe == "STRING") then
{
// Recherche d'une position dégagée. Les véhicules doivent être créé au niveau du sol sinon ils ne peuvent être utilisés.
if (_classe isKindOf "AllVehicles") then
{
_objet = _classe createVehicle _pos_degagee;
_objet setVectorDirAndUp [[-cos getDir _transporteur, sin getDir _transporteur, 0] vectorCrossProduct surfaceNormal _pos_degagee, surfaceNormal _pos_degagee];
_objet setVelocity [0, 0, 0];
}
else
{
_objet = _classe createVehicle _pos_degagee;
};
}
else
{
_objet = _objet_ou_classe;
};
if (!isNull _objet) then
{
// Vérifier qu'il n'est pas déjà transporté
if (isNull (_objet getVariable ["R3F_LOG_est_transporte_par", objNull]) &&
(isNull (_objet getVariable ["R3F_LOG_est_deplace_par", objNull]) || (!alive (_objet getVariable ["R3F_LOG_est_deplace_par", objNull])) || (!isPlayer (_objet getVariable ["R3F_LOG_est_deplace_par", objNull])))
) then
{
if (isNull (_objet getVariable ["R3F_LOG_remorque", objNull])) then
{
// Si l'objet loge dans le véhicule
if (_chargement_actuel + _cout_chargement_objet <= _chargement_maxi) then
{
_chargement_actuel = _chargement_actuel + _cout_chargement_objet;
_objets_charges pushBack _objet;
_objet setVariable ["R3F_LOG_est_transporte_par", _transporteur, true];
_objet attachTo [R3F_LOG_PUBVAR_point_attache, [] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel];
}
else
{
diag_log format ["[Auto-load ""%1"" in ""%2""] : %3",
getText (configFile >> "CfgVehicles" >> _classe >> "displayName"),
getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName"),
STR_R3F_LOG_action_charger_pas_assez_de_place];
systemChat format ["[Auto-load ""%1"" in ""%2""] : %3",
getText (configFile >> "CfgVehicles" >> _classe >> "displayName"),
getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName"),
STR_R3F_LOG_action_charger_pas_assez_de_place];
if (typeName _objet_ou_classe == "STRING") then
{
deleteVehicle _objet;
};
};
}
else
{
diag_log format [STR_R3F_LOG_objet_remorque_en_cours, getText (configFile >> "CfgVehicles" >> _classe >> "displayName")];
systemChat format [STR_R3F_LOG_objet_remorque_en_cours, getText (configFile >> "CfgVehicles" >> _classe >> "displayName")];
};
}
else
{
diag_log format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> _classe >> "displayName")];
systemChat format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> _classe >> "displayName")];
};
};
};
};
} forEach _liste_a_charger;
// On mémorise sur le réseau le nouveau contenu du véhicule
_transporteur setVariable ["R3F_LOG_objets_charges", _objets_charges, true];
R3F_LOG_mutex_local_verrou = false;

View File

@ -0,0 +1,71 @@
/**
* Charger l'objet déplacé par le joueur dans un transporteur
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_objet", "_transporteur"];
_objet = R3F_LOG_joueur_deplace_objet;
_transporteur = [_objet, 5] call R3F_LOG_FNCT_3D_cursorTarget_virtuel;
if (!isNull _transporteur && {
_transporteur getVariable ["R3F_LOG_fonctionnalites", R3F_LOG_CST_zero_log] select R3F_LOG_IDX_can_transport_cargo &&
alive _transporteur && (vectorMagnitude velocity _transporteur < 6) && !(_transporteur getVariable "R3F_LOG_disabled") &&
(abs ((getPosASL _transporteur select 2) - (getPosASL player select 2)) < 2.5)
}) then
{
if (isNull (_objet getVariable ["R3F_LOG_remorque", objNull])) then
{
private ["_objets_charges", "_chargement", "_cout_chargement_objet"];
_chargement = [_transporteur] call R3F_LOG_FNCT_calculer_chargement_vehicule;
_cout_chargement_objet = _objet getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_be_transported_cargo_cout;
// Si l'objet loge dans le véhicule
if ((_chargement select 0) + _cout_chargement_objet <= (_chargement select 1)) then
{
[_transporteur, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
// On mémorise sur le réseau le nouveau contenu du véhicule
_objets_charges = _transporteur getVariable ["R3F_LOG_objets_charges", []];
_objets_charges = _objets_charges + [_objet];
_transporteur setVariable ["R3F_LOG_objets_charges", _objets_charges, true];
_objet setVariable ["R3F_LOG_est_transporte_par", _transporteur, true];
// Faire relacher l'objet au joueur
R3F_LOG_joueur_deplace_objet = objNull;
waitUntil {_objet getVariable "R3F_LOG_est_deplace_par" != player};
_objet attachTo [R3F_LOG_PUBVAR_point_attache, [] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel];
systemChat format [STR_R3F_LOG_action_charger_fait,
getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName"),
getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName")];
}
else
{
hintC STR_R3F_LOG_action_charger_pas_assez_de_place;
};
}
else
{
hintC format [STR_R3F_LOG_objet_remorque_en_cours, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,101 @@
/**
* Charger l'objet sélectionné (R3F_LOG_objet_selectionne) dans un transporteur
*
* @param 0 le transporteur
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
private ["_objet", "_transporteur"];
_objet = R3F_LOG_objet_selectionne;
_transporteur = _this select 0;
if (!(isNull _objet) && !(_objet getVariable "R3F_LOG_disabled")) then
{
if (isNull (_objet getVariable "R3F_LOG_est_transporte_par") && (isNull (_objet getVariable "R3F_LOG_est_deplace_par") || (!alive (_objet getVariable "R3F_LOG_est_deplace_par")) || (!isPlayer (_objet getVariable "R3F_LOG_est_deplace_par")))) then
{
if (isNull (_objet getVariable ["R3F_LOG_remorque", objNull])) then
{
if (count crew _objet == 0 || getNumber (configFile >> "CfgVehicles" >> (typeOf _objet) >> "isUav") == 1) then
{
private ["_objets_charges", "_chargement", "_cout_chargement_objet"];
_chargement = [_transporteur] call R3F_LOG_FNCT_calculer_chargement_vehicule;
_cout_chargement_objet = _objet getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_be_transported_cargo_cout;
// Si l'objet loge dans le véhicule
if ((_chargement select 0) + _cout_chargement_objet <= (_chargement select 1)) then
{
if (_objet distance _transporteur <= 30) then
{
[_transporteur, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
// On mémorise sur le réseau le nouveau contenu du véhicule
_objets_charges = _transporteur getVariable ["R3F_LOG_objets_charges", []];
_objets_charges = _objets_charges + [_objet];
_transporteur setVariable ["R3F_LOG_objets_charges", _objets_charges, true];
_objet setVariable ["R3F_LOG_est_transporte_par", _transporteur, true];
systemChat STR_R3F_LOG_action_charger_en_cours;
sleep 2;
// Gestion conflit d'accès
if (_objet getVariable "R3F_LOG_est_transporte_par" == _transporteur && _objet in (_transporteur getVariable "R3F_LOG_objets_charges")) then
{
_objet attachTo [R3F_LOG_PUBVAR_point_attache, [] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel];
systemChat format [STR_R3F_LOG_action_charger_fait,
getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName"),
getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName")];
}
else
{
_objet setVariable ["R3F_LOG_est_transporte_par", objNull, true];
hintC format ["ERROR : " + STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
}
else
{
hintC format [STR_R3F_LOG_trop_loin, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
}
else
{
hintC STR_R3F_LOG_action_charger_pas_assez_de_place;
};
}
else
{
hintC format [STR_R3F_LOG_joueur_dans_objet, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
}
else
{
hintC format [STR_R3F_LOG_objet_remorque_en_cours, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
}
else
{
hintC format [STR_R3F_LOG_objet_en_cours_transport, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
};
R3F_LOG_objet_selectionne = objNull;
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,142 @@
/**
* Décharger un objet d'un transporteur - appelé deuis l'interface listant le contenu du transporteur
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
#include "dlg_constantes.h"
private ["_transporteur", "_objets_charges", "_type_objet_a_decharger", "_objet_a_decharger", "_action_confirmee", "_est_deplacable"];
_transporteur = uiNamespace getVariable "R3F_LOG_dlg_CV_transporteur";
_objets_charges = _transporteur getVariable ["R3F_LOG_objets_charges", []];
if (lbCurSel R3F_LOG_IDC_dlg_CV_liste_contenu == -1) exitWith {R3F_LOG_mutex_local_verrou = false;};
_type_objet_a_decharger = lbData [R3F_LOG_IDC_dlg_CV_liste_contenu, lbCurSel R3F_LOG_IDC_dlg_CV_liste_contenu];
_est_deplacable = ([_type_objet_a_decharger] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique) select R3F_LOG_IDX_can_be_moved_by_player;
if (!(_type_objet_a_decharger isKindOf "AllVehicles") && !_est_deplacable) then
{
_action_confirmee = [STR_R3F_LOG_action_decharger_deplacable_exceptionnel, "Warning", true, true] call BIS_fnc_GUImessage;
}
else
{
_action_confirmee = true;
};
if (_action_confirmee) then
{
closeDialog 0;
// Recherche d'un objet du type demandé
_objet_a_decharger = objNull;
{
if (typeOf _x == _type_objet_a_decharger) exitWith
{
_objet_a_decharger = _x;
};
} forEach _objets_charges;
if !(isNull _objet_a_decharger) then
{
[_objet_a_decharger, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
// On mémorise sur le réseau le nouveau contenu du transporteur (càd avec cet objet en moins)
_objets_charges = _transporteur getVariable ["R3F_LOG_objets_charges", []];
_objets_charges = _objets_charges - [_objet_a_decharger];
_transporteur setVariable ["R3F_LOG_objets_charges", _objets_charges, true];
_objet_a_decharger setVariable ["R3F_LOG_est_transporte_par", objNull, true];
// Prise en compte de l'objet dans l'environnement du joueur (accélérer le retour des addActions)
_objet_a_decharger spawn
{
sleep 4;
R3F_LOG_PUBVAR_reveler_au_joueur = _this;
publicVariable "R3F_LOG_PUBVAR_reveler_au_joueur";
["R3F_LOG_PUBVAR_reveler_au_joueur", R3F_LOG_PUBVAR_reveler_au_joueur] spawn R3F_LOG_FNCT_PUBVAR_reveler_au_joueur;
};
if (!(_objet_a_decharger isKindOf "AllVehicles") || _est_deplacable) then
{
R3F_LOG_mutex_local_verrou = false;
[_objet_a_decharger, player, 0, true] spawn R3F_LOG_FNCT_objet_deplacer;
}
else
{
private ["_bbox_dim", "_pos_degagee", "_rayon"];
systemChat STR_R3F_LOG_action_decharger_en_cours;
_bbox_dim = (vectorMagnitude (boundingBoxReal _objet_a_decharger select 0)) max (vectorMagnitude (boundingBoxReal _objet_a_decharger select 1));
sleep 1;
// Recherche d'une position dégagée (on augmente progressivement le rayon jusqu'à trouver une position)
for [{_rayon = 5 max (2*_bbox_dim); _pos_degagee = [];}, {count _pos_degagee == 0 && _rayon <= 30 + (8*_bbox_dim)}, {_rayon = _rayon + 10 + (2*_bbox_dim)}] do
{
_pos_degagee = [
_bbox_dim,
_transporteur modelToWorld [0, if (_transporteur isKindOf "AllVehicles") then {(boundingBoxReal _transporteur select 0 select 1) - 2 - 0.3*_rayon} else {0}, 0],
_rayon,
100 min (5 + _rayon^1.2)
] call R3F_LOG_FNCT_3D_tirer_position_degagee_sol;
};
if (count _pos_degagee > 0) then
{
detach _objet_a_decharger;
_objet_a_decharger setPos _pos_degagee;
_objet_a_decharger setVectorDirAndUp [[-cos getDir _transporteur, sin getDir _transporteur, 0] vectorCrossProduct surfaceNormal _pos_degagee, surfaceNormal _pos_degagee];
_objet_a_decharger setVelocity [0, 0, 0];
sleep 0.4; // Car la nouvelle position n'est pas prise en compte instantannément
// Si l'objet a été créé assez loin, on indique sa position relative
if (_objet_a_decharger distance _transporteur > 40) then
{
systemChat format [STR_R3F_LOG_action_decharger_fait + " (%2)",
getText (configFile >> "CfgVehicles" >> (typeOf _objet_a_decharger) >> "displayName"),
format ["%1m %2deg", round (_objet_a_decharger distance _transporteur), round ([_transporteur, _objet_a_decharger] call BIS_fnc_dirTo)]
];
}
else
{
systemChat format [STR_R3F_LOG_action_decharger_fait, getText (configFile >> "CfgVehicles" >> (typeOf _objet_a_decharger) >> "displayName")];
};
R3F_LOG_mutex_local_verrou = false;
}
// Si échec recherche position dégagée, on décharge l'objet comme un déplaçable
else
{
systemChat "WARNING : no free position found.";
R3F_LOG_mutex_local_verrou = false;
[_objet_a_decharger, player, 0, true] spawn R3F_LOG_FNCT_objet_deplacer;
};
};
}
else
{
hintC STR_R3F_LOG_action_decharger_deja_fait;
R3F_LOG_mutex_local_verrou = false;
};
}
else
{
R3F_LOG_mutex_local_verrou = false;
};
};

View File

@ -0,0 +1,94 @@
/**
* Constantes pour rendre les définitions des boîtes de dialogue plus lisible et maintenable
*/
#define R3F_LOG_ID_transporteur_START 65430
#define R3F_LOG_IDD_dlg_contenu_vehicule (R3F_LOG_ID_transporteur_START + 1)
#define R3F_LOG_IDC_dlg_CV_capacite_vehicule (R3F_LOG_ID_transporteur_START + 2)
#define R3F_LOG_IDC_dlg_CV_liste_contenu (R3F_LOG_ID_transporteur_START + 3)
#define R3F_LOG_IDC_dlg_CV_btn_decharger (R3F_LOG_ID_transporteur_START + 4)
#define R3F_LOG_IDC_dlg_CV_titre (R3F_LOG_ID_transporteur_START + 10)
#define R3F_LOG_IDC_dlg_CV_credits (R3F_LOG_ID_transporteur_START + 11)
#define R3F_LOG_IDC_dlg_CV_btn_fermer (R3F_LOG_ID_transporteur_START + 12)
#define R3F_LOG_IDC_dlg_CV_jauge_chargement (R3F_LOG_ID_transporteur_START + 13)
// Control types
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUT_BUTTON 16 // Arma 2 - textured button
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_List_N_Box 102 // Arma 2 - N columns list box
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20

View File

@ -0,0 +1,265 @@
/**
* Interface d'affichage du contenu du véhicule
*
* Copyright (C) 2014 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/>.
*/
#include "dlg_constantes.h"
#define R3F_LOG_dlg_CV_jauge_chargement_h 0.027
class R3F_LOG_dlg_contenu_vehicule
{
idd = R3F_LOG_IDD_dlg_contenu_vehicule;
name = "R3F_LOG_dlg_contenu_vehicule";
movingEnable = false;
controlsBackground[] =
{
R3F_LOG_dlg_CV_titre_fond,
R3F_LOG_dlg_CV_fond_noir
};
objects[] = {};
controls[] =
{
R3F_LOG_dlg_CV_titre,
R3F_LOG_dlg_CV_capacite_vehicule,
R3F_LOG_dlg_CV_jauge_chargement,
R3F_LOG_dlg_CV_liste_contenu,
R3F_LOG_dlg_CV_credits,
R3F_LOG_dlg_CV_btn_decharger,
R3F_LOG_dlg_CV_btn_fermer
};
// Définition des classes de base
class R3F_LOG_dlg_CV_texte
{
idc = -1;
type = CT_STATIC;
style = ST_LEFT;
x = 0.0; w = 0.3;
y = 0.0; h = 0.03;
sizeEx = 0.023;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
font = "PuristaMedium";
text = "";
};
class R3F_LOG_dlg_CV_btn
{
idc = -1;
type = 16;
style = 0;
text = "btn";
action = "";
x = 0; w = 0.17;
y = 0; h = 0.045;
font = "PuristaLight";
size = 0.038;
sizeEx = 0.038;
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,0.5)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";
colorBackground[] = {0,0,0,0.8};
colorBackground2[] = {1,1,1,0.5};
colorBackgroundFocused[] = {1,1,1,0.5};
color[] = {1,1,1,1};
color2[] = {1,1,1,1};
colorText[] = {1,1,1,1};
colorFocused[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.25};
period = 0.6;
periodFocus = 0.6;
periodOver = 0.6;
shadow = 0;
class HitZone
{
left = 0.000;
top = 0.000;
right = 0.000;
bottom = 0.000;
};
class ShortcutPos
{
left = 0.000;
top = 0.000;
w = 0.023;
h = 0.050;
};
class TextPos
{
left = 0.010;
top = 0.000;
right = 0.000;
bottom = 0.000;
};
soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1};
soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1};
class Attributes
{
font = "PuristaLight";
color = "#E5E5E5";
align = "left";
shadow = "false";
};
class AttributesImage
{
font = "PuristaLight";
color = "#E5E5E5";
align = "left";
};
};
class R3F_LOG_dlg_CV_liste
{
type = CT_LISTBOX;
style = ST_MULTI;
idc = -1;
text = "";
w = 0.275;
h = 0.04;
wholeHeight = 0.45;
rowHeight = 0.06;
font = "PuristaSemibold";
sizeEx = 0.035;
soundSelect[] = {"",0.1,1};
soundExpand[] = {"",0.1,1};
soundCollapse[] = {"",0.1,1};
maxHistoryDelay = 1;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
shadow = 0;
colorShadow[] = {0,0,0,0.5};
color[] = {1,1,1,1};
colorText[] = {1,1,1,1.0};
colorDisabled[] = {1,1,1,0.25};
colorScrollbar[] = {1,0,0,0};
colorSelect[] = {0,0,0,1};
colorSelect2[] = {0,0,0,1};
colorSelectBackground[] = {0.95,0.95,0.95,1};
colorSelectBackground2[] = {1,1,1,0.5};
colorBackground[] = {0,0,0,0};
period = 1.2;
class ListScrollBar
{
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
};
};
// FIN Définition des classes de base
class R3F_LOG_dlg_CV_titre_fond : R3F_LOG_dlg_CV_texte
{
x = 0.26; w = 0.45;
y = 0.145 - R3F_LOG_dlg_CV_jauge_chargement_h-0.005; h = 0.07;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"};
};
class R3F_LOG_dlg_CV_titre : R3F_LOG_dlg_CV_texte
{
idc = R3F_LOG_IDC_dlg_CV_titre;
x = 0.26; w = 0.45;
y = 0.145 - R3F_LOG_dlg_CV_jauge_chargement_h-0.005; h = 0.04;
sizeEx = 0.05;
text = "";
};
class R3F_LOG_dlg_CV_capacite_vehicule : R3F_LOG_dlg_CV_texte
{
idc = R3F_LOG_IDC_dlg_CV_capacite_vehicule;
x = 0.255; w = 0.4;
y = 0.185 - R3F_LOG_dlg_CV_jauge_chargement_h-0.005; h = 0.03;
sizeEx = 0.03;
text = "";
};
class R3F_LOG_dlg_CV_fond_noir : R3F_LOG_dlg_CV_texte
{
x = 0.26; w = 0.45;
y = 0.220 - R3F_LOG_dlg_CV_jauge_chargement_h-0.005; h = R3F_LOG_dlg_CV_jauge_chargement_h + 0.010 + 0.54 - 0.005;
colorBackground[] = {0,0,0,0.5};
};
class R3F_LOG_dlg_CV_jauge_chargement
{
idc = R3F_LOG_IDC_dlg_CV_jauge_chargement;
type = CT_PROGRESS;
style = ST_LEFT;
x = 0.26 + 0.0035; w = 0.45 - 0.007;
y = 0.220 - R3F_LOG_dlg_CV_jauge_chargement_h-0.005 + 0.0035; h = R3F_LOG_dlg_CV_jauge_chargement_h;
shadow = 2;
colorBar[] = {0.9,0.9,0.9,0.9};
colorExtBar[] = {1,1,1,1};
colorFrame[] = {1,1,1,1};
texture = "";
textureExt = "";
};
class R3F_LOG_dlg_CV_liste_contenu : R3F_LOG_dlg_CV_liste
{
idc = R3F_LOG_IDC_dlg_CV_liste_contenu;
x = 0.26; w = 0.45;
y = 0.22 + 0.005; h = 0.54 - 0.005;
onLBDblClick = "0 spawn R3F_LOG_FNCT_transporteur_decharger;";
onLBSelChanged = "uiNamespace setVariable [""R3F_LOG_dlg_CV_lbCurSel_data"", (_this select 0) lbData (_this select 1)];";
};
class R3F_LOG_dlg_CV_credits : R3F_LOG_dlg_CV_texte
{
idc = R3F_LOG_IDC_dlg_CV_credits;
x = 0.255; w = 0.19;
y = 0.813; h = 0.02;
colorText[] = {0.5,0.5,0.5,0.75};
font = "PuristaLight";
sizeEx = 0.02;
text = "";
};
class R3F_LOG_dlg_CV_btn_decharger : R3F_LOG_dlg_CV_btn
{
idc = R3F_LOG_IDC_dlg_CV_btn_decharger;
x = 0.365; y = 0.765;
sizeEx = 0.02;
text = "";
action = "0 spawn R3F_LOG_FNCT_transporteur_decharger;";
};
class R3F_LOG_dlg_CV_btn_fermer : R3F_LOG_dlg_CV_btn
{
idc = R3F_LOG_IDC_dlg_CV_btn_fermer;
x = 0.54; y = 0.765;
text = "";
action = "closeDialog 0;";
};
};

View File

@ -0,0 +1,42 @@
/**
* Sélectionne un objet à charger dans un transporteur
*
* @param 0 l'objet à sélectionner
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
R3F_LOG_objet_selectionne = _this select 0;
systemChat format [STR_R3F_LOG_action_selectionner_objet_fait, getText (configFile >> "CfgVehicles" >> (typeOf R3F_LOG_objet_selectionne) >> "displayName")];
[R3F_LOG_objet_selectionne, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
// Déselectionner l'objet si le joueur n'en fait rien
[] spawn
{
while {!isNull R3F_LOG_objet_selectionne} do
{
if (!alive player) then
{
R3F_LOG_objet_selectionne = objNull;
}
else
{
if (vehicle player != player || (player distance R3F_LOG_objet_selectionne > 40) || !isNull R3F_LOG_joueur_deplace_objet) then
{
R3F_LOG_objet_selectionne = objNull;
};
};
sleep 0.2;
};
};
R3F_LOG_mutex_local_verrou = false;
};

View File

@ -0,0 +1,21 @@
/**
* Initialise un véhicule transporteur
*
* @param 0 le transporteur
*/
private ["_transporteur"];
_transporteur = _this select 0;
// Définition locale de la variable si elle n'est pas définie sur le réseau
if (isNil {_transporteur getVariable "R3F_LOG_objets_charges"}) then
{
_transporteur setVariable ["R3F_LOG_objets_charges", [], false];
};
_transporteur addAction [("<t color=""#dddd00"">" + STR_R3F_LOG_action_charger_deplace + "</t>"), {_this call R3F_LOG_FNCT_transporteur_charger_deplace}, nil, 8, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_joueur_deplace_objet != _target && R3F_LOG_action_charger_deplace_valide"];
_transporteur addAction [("<t color=""#dddd00"">" + format [STR_R3F_LOG_action_charger_selection, getText (configFile >> "CfgVehicles" >> (typeOf _transporteur) >> "displayName")] + "</t>"), {_this call R3F_LOG_FNCT_transporteur_charger_selection}, nil, 7, true, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_charger_selection_valide"];
_transporteur addAction [("<t color=""#dddd00"">" + STR_R3F_LOG_action_contenu_vehicule + "</t>"), {_this call R3F_LOG_FNCT_transporteur_voir_contenu_vehicule}, nil, 4, false, true, "", "!R3F_LOG_mutex_local_verrou && R3F_LOG_objet_addAction == _target && R3F_LOG_action_contenu_vehicule_valide"];

View File

@ -0,0 +1,155 @@
/**
* Ouvre la boîte de dialogue du contenu du véhicule et la prérempli en fonction de véhicule
*
* @param 0 le véhicule dont il faut afficher le contenu
*
* Copyright (C) 2014 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/>.
*/
#include "dlg_constantes.h"
disableSerialization; // A cause des displayCtrl
private ["_transporteur", "_chargement", "_chargement_precedent", "_contenu"];
private ["_tab_objets", "_tab_quantite", "_i", "_dlg_contenu_vehicule", "_ctrl_liste"];
R3F_LOG_objet_selectionne = objNull;
_transporteur = _this select 0;
uiNamespace setVariable ["R3F_LOG_dlg_CV_transporteur", _transporteur];
[_transporteur, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
createDialog "R3F_LOG_dlg_contenu_vehicule";
waitUntil (uiNamespace getVariable "R3F_LOG_dlg_contenu_vehicule");
_dlg_contenu_vehicule = findDisplay R3F_LOG_IDD_dlg_contenu_vehicule;
/**** DEBUT des traductions des labels ****/
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_titre) ctrlSetText STR_R3F_LOG_dlg_CV_titre;
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_credits) ctrlSetText "[R3F] Logistics";
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_btn_decharger) ctrlSetText STR_R3F_LOG_dlg_CV_btn_decharger;
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_btn_fermer) ctrlSetText STR_R3F_LOG_dlg_CV_btn_fermer;
/**** FIN des traductions des labels ****/
_ctrl_liste = _dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_liste_contenu;
_chargement_precedent = [];
while {!isNull _dlg_contenu_vehicule} do
{
_chargement = [_transporteur] call R3F_LOG_FNCT_calculer_chargement_vehicule;
// Si le contenu a changé, on rafraichit l'interface
if !([_chargement, _chargement_precedent] call BIS_fnc_areEqual) then
{
_chargement_precedent = +_chargement;
_contenu = _transporteur getVariable ["R3F_LOG_objets_charges", []];
/** Liste des noms de classe des objets contenu dans le véhicule, sans doublon */
_tab_objets = [];
/** Quantité associé (par l'index) aux noms de classe dans _tab_objets */
_tab_quantite = [];
/** Coût de chargement associé (par l'index) aux noms de classe dans _tab_objets */
_tab_cout_chargement = [];
// Préparation de la liste du contenu et des quantités associées aux objets
for [{_i = 0}, {_i < count _contenu}, {_i = _i + 1}] do
{
private ["_objet"];
_objet = _contenu select _i;
if !((typeOf _objet) in _tab_objets) then
{
_tab_objets pushBack (typeOf _objet);
_tab_quantite pushBack 1;
if (!isNil {_objet getVariable "R3F_LOG_fonctionnalites"}) then
{
_tab_cout_chargement pushBack (_objet getVariable "R3F_LOG_fonctionnalites" select R3F_LOG_IDX_can_be_transported_cargo_cout);
}
else
{
_tab_cout_chargement pushBack (([typeOf _objet] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique) select R3F_LOG_IDX_can_be_transported_cargo_cout);
};
}
else
{
private ["_idx_objet"];
_idx_objet = _tab_objets find (typeOf _objet);
_tab_quantite set [_idx_objet, ((_tab_quantite select _idx_objet) + 1)];
};
};
lbClear _ctrl_liste;
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_capacite_vehicule) ctrlSetText (format [STR_R3F_LOG_dlg_CV_capacite_vehicule+" pl.", _chargement select 0, _chargement select 1]);
if (_chargement select 1 != 0) then {(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_jauge_chargement) progressSetPosition ((_chargement select 0) / (_chargement select 1));};
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_jauge_chargement) ctrlShow ((_chargement select 0) != 0);
if (count _tab_objets == 0) then
{
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_btn_decharger) ctrlEnable false;
}
else
{
// Insertion de chaque type d'objets dans la liste
for [{_i = 0}, {_i < count _tab_objets}, {_i = _i + 1}] do
{
private ["_classe", "_quantite", "_icone", "_tab_icone", "_index"];
_classe = _tab_objets select _i;
_quantite = _tab_quantite select _i;
_cout_chargement = _tab_cout_chargement select _i;
_icone = getText (configFile >> "CfgVehicles" >> _classe >> "icon");
// Icône par défaut
if (_icone == "") then
{
_icone = "\A3\ui_f\data\map\VehicleIcons\iconObject_ca.paa";
};
// Si le chemin commence par A3\ ou a3\, on rajoute un \ au début
_tab_icone = toArray toLower _icone;
if (count _tab_icone >= 3 &&
{
_tab_icone select 0 == (toArray "a" select 0) &&
_tab_icone select 1 == (toArray "3" select 0) &&
_tab_icone select 2 == (toArray "\" select 0)
}) then
{
_icone = "\" + _icone;
};
// Si icône par défaut, on rajoute le chemin de base par défaut
_tab_icone = toArray _icone;
if (_tab_icone select 0 != (toArray "\" select 0)) then
{
_icone = format ["\A3\ui_f\data\map\VehicleIcons\%1_ca.paa", _icone];
};
// Si pas d'extension de fichier, on rajoute ".paa"
_tab_icone = toArray _icone;
if (count _tab_icone >= 4 && {_tab_icone select (count _tab_icone - 4) != (toArray "." select 0)}) then
{
_icone = _icone + ".paa";
};
_index = _ctrl_liste lbAdd (getText (configFile >> "CfgVehicles" >> _classe >> "displayName") + format [" (%1x %2pl.)", _quantite, _cout_chargement]);
_ctrl_liste lbSetPicture [_index, _icone];
_ctrl_liste lbSetData [_index, _classe];
if (uiNamespace getVariable ["R3F_LOG_dlg_CV_lbCurSel_data", ""] == _classe) then
{
_ctrl_liste lbSetCurSel _index;
};
};
(_dlg_contenu_vehicule displayCtrl R3F_LOG_IDC_dlg_CV_btn_decharger) ctrlEnable true;
};
};
sleep 0.15;
};

View File

@ -0,0 +1,33 @@
/**
* Load automatically and instantly a list of sereval objects and/or class names into a vehicle/cargo.
*
* @param 0 the vehicle or cargo to be loaded
* @param 1 the array of objects and/or class name to load in, which can be a mix of these elements :
* object's name set in the editor or object's script variable
* class name as a string, if so an object of this class name will be spawned, then loaded
* an array ["class_name", quantity] to spawn then load several objects of the same type
*
* @usage The following command loads my_object1 and my_object2 into my_vehicle
* @usage nul = [my_vehicle, [my_object1, my_object2] ] execVM "R3F_LOG\USER_FUNCT\auto_load_in_vehicle.sqf";
*
* @usage The following command spawns and loads one "Box_IND_Ammo_F" and one "Box_IND_Grenades_F" into my_vehicle
* @usage nul = [my_vehicle, ["Box_IND_Ammo_F", "Box_IND_Grenades_F"] ] execVM "R3F_LOG\USER_FUNCT\auto_load_in_vehicle.sqf";
*
* @usage The following command spawns and loads two "Box_IND_Ammo_F" and one "Box_IND_Grenades_F" into my_vehicle
* @usage nul = [my_vehicle, [ ["Box_IND_Ammo_F", 2], "Box_IND_Grenades_F" ] ] execVM "R3F_LOG\USER_FUNCT\auto_load_in_vehicle.sqf";
*
* @usage The following command loads my_object1, two "Box_IND_Ammo_F" and one "Box_IND_Grenades_F" into my_vehicle
* @usage nul = [my_vehicle, [ my_object1, ["Box_IND_Ammo_F", 2], "Box_IND_Grenades_F" ] ] execVM "R3F_LOG\USER_FUNCT\auto_load_in_vehicle.sqf";
*
* @usage You can replace "my_vehicle" by "this" if you put the line in the initialization line in the mission editor.
*/
if (isServer) then
{
waitUntil {!isNil "R3F_LOG_active"};
if (R3F_LOG_active) then
{
_this call R3F_LOG_FNCT_transporteur_charger_auto;
};
};

View File

@ -0,0 +1,76 @@
/**
* Execute this script to prevent the object to be lost during the mission.
* Useful for mandatory objects like a flag pole with addAction.
* It must be executed from the initialisation line or at any other time on the server and all clients.
*
* The script does :
* It makes the object indestructible (from any kind of damage).
* It denies the ability to send/sell back the object to any creation factory (if applicable).
* If the object is loaded in a vehicle/cargo which has been destroyed, it will be unloaded/teleported to a given position.
* If the object was lifted to a crashed helicopter, it will be detached/teleported to a given position.
* If the object was towed to a destroyed vehicle, it will be untowed/teleported to a given position.
*
* @param 0 the object to protect and to not lose
* @param 1 (optional) choose where to restore the object if destroyed in transport cargo (default : "spawn_pos")
* set to "spawn_pos" to teleport the object on its initial spawn position
* set to "exact_spawn_pos" to teleport the object on its exact initial spawn position and direction (no collision check)
* set to "cargo_pos" to unload the object around the destroyed cargo
* set to any marker name to teleport the object to the marker position
*
* @usage nul = [my_object] execVM "R3F_LOG\USER_FUNCT\do_not_lose_it.sqf";
* @usage nul = [my_object, "spawn_pos"] execVM "R3F_LOG\USER_FUNCT\do_not_lose_it.sqf";
* @usage nul = [my_object, "cargo_pos"] execVM "R3F_LOG\USER_FUNCT\do_not_lose_it.sqf";
* @usage nul = [my_object, "<marker name>"] execVM "R3F_LOG\USER_FUNCT\do_not_lose_it.sqf";
*
* @usage You can replace "my_object" by "this" if you put the line in the initialization line in the mission editor.
*/
private ["_objet", "_pos_respawn"];
_objet = _this select 0;
_pos_respawn = if (count _this > 1) then {_this select 1} else {"spawn_pos"};
if (!isNull _objet) then
{
waitUntil {!isNil "R3F_LOG_active"};
if (R3F_LOG_active) then
{
_objet addEventHandler ["HandleDamage", {0}];
if (isServer) then
{
// Attendre le mutex
waitUntil
{
if (R3F_LOG_mutex_local_verrou) then
{
false
}
else
{
R3F_LOG_mutex_local_verrou = true;
true
}
};
R3F_LOG_liste_objets_a_proteger pushBack _objet;
R3F_LOG_mutex_local_verrou = false;
if (_pos_respawn == "spawn_pos" || _pos_respawn == "exact_spawn_pos") then
{
_objet setVariable ["R3F_LOG_pos_respawn", getPosASL _objet, false];
if (_pos_respawn == "exact_spawn_pos") then
{
_objet setVariable ["R3F_LOG_dir_respawn", getDir _objet, false];
};
}
else
{
_objet setVariable ["R3F_LOG_pos_respawn", _pos_respawn, false];
};
};
};
};

View File

@ -0,0 +1,68 @@
/**
* Dump to the RPT file the list of all existing categories that can be allowed/denied to a creation factory.
* This is a helper function to define your own white/black list for a creation factory.
* See USER_FUNCT\init_creation_factory.sqf and the PDF documentation for more information.
* Note : the RPT file is located here : C:\Users\<profile>\AppData\Local\Arma 3\. See https://community.bistudio.com/wiki/RPT
*
* @param 0 (optional) true to also dump the display name and number of entries as a comment, false to hide (default : true)
* @param 1 (optional) true to dump the empty categories (i.e. categories with no entry in CfgVehicles) (default : false)
*
* @usage execute the following line in the BIS' debug console or the init line of the player
* @usage nul = [] execVM "R3F_LOG\USER_FUNCT\dump_creation_factory_categories.sqf";
*
* @usage to not dump the comments after the class names, set the optional param 0 to false
* @usage nul = [false] execVM "R3F_LOG\USER_FUNCT\dump_creation_factory_categories.sqf";
*
* @usage to dump all categories, including empty ones, set param 1 to true
* @usage nul = [true, true] execVM "R3F_LOG\USER_FUNCT\dump_creation_factory_categories.sqf";
*/
waitUntil {!isNil "R3F_LOG_active"};
private ["_comment", "_montrer_categories_vides", "_retour_liste_cfgVehicles_par_categories", "_cfgVehicles_categories", "_cfgVehicles_par_categories", "_nb_categories", "_idx_categorie", "_align_comma", "_x"];
_comment = if (count _this > 0) then {_this select 0} else {true};
_montrer_categories_vides = if (count _this > 1) then {_this select 1} else {false};
_retour_liste_cfgVehicles_par_categories = [objNull, _montrer_categories_vides] call R3F_LOG_FNCT_recuperer_liste_cfgVehicles_par_categories;
_cfgVehicles_categories = _retour_liste_cfgVehicles_par_categories select 0;
_cfgVehicles_par_categories = _retour_liste_cfgVehicles_par_categories select 1;
diag_log text "R3F_LOG_CFG_CF_your_own_categories_list =";
diag_log text "[";
_nb_categories = count _cfgVehicles_categories;
for [{_idx_categorie = 0}, {_idx_categorie < _nb_categories}, {_idx_categorie = _idx_categorie+1}] do
{
if (_comment) then
{
// Formatage du tableau sans virgule pour le dernier élément + alignement des commentaires
_align_comma = if (_idx_categorie != _nb_categories-1) then {","} else {" "};
for "_x" from 1 to (32 - count toArray (_cfgVehicles_categories select _idx_categorie)) do {_align_comma = _align_comma + " ";};
// Dump des infos de la catégorie
diag_log text format
[
" ""%1""%2 // %3 (%4 entries)",
_cfgVehicles_categories select _idx_categorie,
_align_comma,
getText (configFile >> "CfgVehicleClasses" >> (_cfgVehicles_categories select _idx_categorie) >> "displayName"),
count (_cfgVehicles_par_categories select _idx_categorie)
];
}
else
{
_align_comma = if (_idx_categorie != _nb_categories-1) then {","} else {""};
// Dump des infos de la catégorie
diag_log text format
[
" ""%1""%2",
_cfgVehicles_categories select _idx_categorie,
_align_comma
];
};
};
diag_log text "];";

View File

@ -0,0 +1,32 @@
/**
* Initialize a vehicle or an object to be a creation factory (object spawning system)
*
* @param 0 the creation factory, can be a mobile vehicle or any object
* @param 1 (optional) creation credits limitation, -1 for unlimited credits (default : -1)
* @param 2 (optional) side to allow accessing to the factory (default : all sides allowed)
* @param 3 (optional) list of class names of allowed categories (white list)
* if param not set, all the categories are allowed, except those in the black list defined in config_creation_factory.sqf
* if string "FULL", use the white list R3F_LOG_CFG_CF_whitelist_full_categories (config_creation_factory.sqf)
* if string "MEDIUM", use the white list R3F_LOG_CFG_CF_whitelist_medium_categories (config_creation_factory.sqf)
* if string "LIGHT", use the white list R3F_LOG_CFG_CF_whitelist_light_categories (config_creation_factory.sqf)
* if array of CfgVehicleClasses entries (class names, e.g. : ["Furniture", "Fortifications"]), use this array as white list
*
* @usage nul = [my_factory] execVM "R3F_LOG\USER_FUNCT\init_creation_factory.sqf"; // Unlimited credits, all sides allowed, all categories except black list in config_creation_factory.sqf
* @usage nul = [my_factory, 10000] execVM "R3F_LOG\USER_FUNCT\init_creation_factory.sqf"; // 10000 credits, all sides allowed, all categories except black list in config_creation_factory.sqf
* @usage nul = [my_factory, -1, independent] execVM "R3F_LOG\USER_FUNCT\init_creation_factory.sqf"; // Unlimited credits, allow to GUER side, all categories except black list
* @usage nul = [my_factory, -1, nil, "MEDIUM"] execVM "R3F_LOG\USER_FUNCT\init_creation_factory.sqf"; // All sides allowed, use white list MEDIUM in config_creation_factory.sqf
* @usage nul = [my_factory, -1, nil, ["Car", "Armored"]] execVM "R3F_LOG\USER_FUNCT\init_creation_factory.sqf"; // Allow only categories "Car" and "Armored"
* @usage You can replace "my_factory" by "this" if you put the line in the initialization line in the mission editor.
*
* @note the categories are the same as in the mission editor. Class names can be found in the BIS' config viewer in the config file CfgVehicleClasses.
*/
if (!isDedicated) then
{
waitUntil {!isNil "R3F_LOG_active"};
if (R3F_LOG_active) then
{
_this call R3F_LOG_FNCT_usine_init;
};
};

View File

@ -0,0 +1,7 @@
/**
* THIS SCRIPT HAS BEEN REMOVED. PLEASE USE "R3F_LOG\USER_FUNCT\do_not_lose_it.sqf".
*/
sleep 1;
systemChat "ERROR : The logistics script ""USER_FUNCT\watch_objects_to_not_lose.sqf"" has been removed. Please use ""USER_FUNCT\do_not_lose_it.sqf"".";
diag_log "ERROR : The logistics script ""USER_FUNCT\watch_objects_to_not_lose.sqf"" has been removed. Please use ""USER_FUNCT\do_not_lose_it.sqf"".";

View File

@ -0,0 +1,171 @@
/**
* Créer un objet - appelé deuis l'interface de l'usine de création
*
* Copyright (C) 2014 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/>.
*/
if (R3F_LOG_mutex_local_verrou) then
{
hintC STR_R3F_LOG_mutex_action_en_cours;
}
else
{
R3F_LOG_mutex_local_verrou = true;
disableSerialization; // A cause des displayCtrl
#include "dlg_constantes.h"
private ["_usine", "_classe", "_cout", "_objet", "_pos_degagee", "_action_confirmee", "_est_deplacable"];
_usine = uiNamespace getVariable "R3F_LOG_dlg_LO_usine";
if (lbCurSel R3F_LOG_IDC_dlg_LO_liste_objets == -1) exitWith {R3F_LOG_mutex_local_verrou = false;};
_classe = lbData [R3F_LOG_IDC_dlg_LO_liste_objets, lbCurSel R3F_LOG_IDC_dlg_LO_liste_objets];
if (_classe != "") then
{
_cout = [_classe] call R3F_LOG_FNCT_determiner_cout_creation;
_est_deplacable = ([_classe] call R3F_LOG_FNCT_determiner_fonctionnalites_logistique) select R3F_LOG_IDX_can_be_moved_by_player;
// L'usine a-t-elle assez de crédits ?
if (_usine getVariable "R3F_LOG_CF_credits" == -1 || _usine getVariable "R3F_LOG_CF_credits" >= _cout) then
{
// Recherche d'une position dégagée. Les véhicules doivent être créé au niveau du sol sinon ils ne peuvent être utilisés.
if (_classe isKindOf "AllVehicles") then
{
private ["_rayon", "_bbox", "_bbox_dim"];
systemChat STR_R3F_LOG_action_creer_en_cours;
sleep 0.5;
_bbox = [_classe] call R3F_LOG_FNCT_3D_get_bounding_box_depuis_classname;
_bbox_dim = (vectorMagnitude (_bbox select 0)) max (vectorMagnitude (_bbox select 1));
// Recherche d'une position dégagée (on augmente progressivement le rayon jusqu'à trouver une position)
for [{_rayon = 5 max (2*_bbox_dim); _pos_degagee = [];}, {count _pos_degagee == 0 && _rayon <= 30 + (8*_bbox_dim)}, {_rayon = _rayon + 10 + (2*_bbox_dim)}] do
{
_pos_degagee = [
_bbox_dim,
_usine modelToWorld [0, if (_usine isKindOf "AllVehicles") then {(boundingBoxReal _usine select 0 select 1) - 2 - 0.3*_rayon} else {0}, 0],
_rayon,
100 min (5 + _rayon^1.2)
] call R3F_LOG_FNCT_3D_tirer_position_degagee_sol;
};
}
else
{
_pos_degagee = [] call R3F_LOG_FNCT_3D_tirer_position_degagee_ciel;
};
if (count _pos_degagee > 0) then
{
// Si l'objet n'est ni un véhicule, ni déplaçable manuellement, on demande confirmation de création
if (!(_classe isKindOf "AllVehicles") && !_est_deplacable) then
{
_action_confirmee = [STR_R3F_LOG_action_decharger_deplacable_exceptionnel, "Warning", true, true] call BIS_fnc_GUImessage;
}
else
{
_action_confirmee = true;
};
if (_action_confirmee) then
{
// Déduction des crédits (si limité)
if (_usine getVariable "R3F_LOG_CF_credits" != -1) then
{
_usine setVariable ["R3F_LOG_CF_credits", 0 max ((_usine getVariable "R3F_LOG_CF_credits") - _cout), true];
};
_objet = _classe createVehicle _pos_degagee;
_objet setPos _pos_degagee;
_objet setVectorDirAndUp [[-cos getDir _usine, sin getDir _usine, 0] vectorCrossProduct surfaceNormal _pos_degagee, surfaceNormal _pos_degagee];
_objet setVelocity [0, 0, 0];
if !(isNull _objet) then
{
// Désactivation du bouton fermer car la création est engagée
(findDisplay R3F_LOG_IDD_dlg_liste_objets displayCtrl R3F_LOG_IDC_dlg_LO_btn_fermer) ctrlEnable false;
// Mémoriser que cet objet a été créé depuis une usine
_objet setVariable ["R3F_LOG_CF_depuis_usine", true, true];
[_objet, player] call R3F_LOG_FNCT_definir_proprietaire_verrou;
sleep 0.5;
// Informer tout le monde qu'il y a un nouvel objet
R3F_LOG_PUBVAR_nouvel_objet_a_initialiser = true;
publicVariable "R3F_LOG_PUBVAR_nouvel_objet_a_initialiser";
// Prise en compte de l'objet dans l'environnement du joueur (accélérer le retour des addActions)
_objet spawn
{
sleep 4;
R3F_LOG_PUBVAR_reveler_au_joueur = _this;
publicVariable "R3F_LOG_PUBVAR_reveler_au_joueur";
["R3F_LOG_PUBVAR_reveler_au_joueur", R3F_LOG_PUBVAR_reveler_au_joueur] spawn R3F_LOG_FNCT_PUBVAR_reveler_au_joueur;
};
// Si l'objet créé est un drone, on y place des IA en équipage
if (getNumber (configFile >> "CfgVehicles" >> (typeOf _objet) >> "isUav") == 1) then
{
createVehicleCrew _objet;
sleep 0.5;
};
if (!(_objet isKindOf "AllVehicles") || _est_deplacable) then
{
R3F_LOG_mutex_local_verrou = false;
[_objet, player, 0, true] spawn R3F_LOG_FNCT_objet_deplacer;
}
else
{
sleep 0.4; // Car la prise en compte n'est pas instantannée
// Si l'objet a été créé assez loin, on indique sa position relative
if (_objet distance _usine > 40) then
{
systemChat format [STR_R3F_LOG_action_creer_fait + " (%2)",
getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName"),
format ["%1m %2deg", round (_objet distance _usine), round ([_usine, _objet] call BIS_fnc_dirTo)]
];
}
else
{
systemChat format [STR_R3F_LOG_action_creer_fait, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
};
R3F_LOG_mutex_local_verrou = false;
};
closeDialog 0;
}
else
{
hintC format ["ERROR : ""%1"" is not an instanciable objet.", _classe];
R3F_LOG_mutex_local_verrou = false;
};
}
else
{
R3F_LOG_mutex_local_verrou = false;
};
}
else
{
hintC format ["ERROR : no empty position found around. Creation canceled. Move out objects around the factory and try again."];
R3F_LOG_mutex_local_verrou = false;
};
}
else
{
hintC STR_R3F_LOG_action_creer_pas_assez_credits;
R3F_LOG_mutex_local_verrou = false;
};
}
else {R3F_LOG_mutex_local_verrou = false;};
};

Some files were not shown because too many files have changed in this diff Show More