DIS-Wolv / ODD

Operations Dynamique de la DIS
3 stars 0 forks source link

Garrage update #51

Closed DIS-Wolv closed 11 months ago

DIS-Wolv commented 1 year ago

faire en sorte que les listes du garrage soit mise a jours automatiquement il faut potentiellement faire des fonctions d'update réfléchire ce que l'on utilise :

DIS-Wolv commented 1 year ago

Update la présence des vls

template_functions/WOLV_Garage/fn_init.sqf :

WolvGarage_var_Range = 100;
//[...]
private _pos = pos WolvGarage_var_OBJ; // position du garrage
private _radGar = WolvGarage_var_Range ; // raduis du garrage

private _garTrigger createTrigger ["EmptyDetector", _pos];  //crée le trigger
_garTrigger setTriggerArea [_radGar, _radGar, 0, false];        //definie la taille
_garTrigger setTriggerActivation ["VEHICLE", "PRESENT", true];  //activation a la présence d'un vl
_garTrigger setTriggerStatements ["this", 
    "[] remoteexec ['WolvGarage_fnc_garUpdateVlProx', -2];",
    "[] remoteexec ['WolvGarage_fnc_garUpdateVlProx', -2];"];

WolvGarage_var_OBJ setVariable ["_var_updateTrigger", _garTrigger, True];

template_functions/WOLV_Garage/fn_garUpdateVlProx.sqf

ajouté

if (!isNull(findDisplay WolvGarage_var_IddDisplayGarage)) then {
    //le code ici
};

template_functions/WOLV_Garage/fn_garVlProx.sqf

_listVL = nearestObjects [WolvGarage_var_pos, ["car", "tank", "plane", "ship", "helicopter", "ReammoBox_F", "StaticWeapon"], WolvGarage_var_Range];

modifier : https://github.com/DIS-Wolv/ODD/blob/7ac1079c61aa4b669c7301e67a250b0e2b263225/template_functions/WOLV_Garage/fn_garVlProx.sqf#L2

Update l'inventaire

template_functions/WOLV_Garage/fn_invUpdate.sqf

ajouté

if (!isNull(findDisplay WolvGarage_var_IddDisplayInv)) then {
    //le code ici
};

template_functions/WOLV_Garage/fn_invAddItem.sqf

[] remoteexec ["WolvGarage_fnc_invUpdate", -2];

https://github.com/DIS-Wolv/ODD/blob/7ac1079c61aa4b669c7301e67a250b0e2b263225/template_functions/WOLV_Garage/fn_invAddItem.sqf#L58

template_functions/WOLV_Garage/fn_invRemoveItem.sqf

[] remoteexec ["WolvGarage_fnc_invUpdate", -2];

https://github.com/DIS-Wolv/ODD/blob/7ac1079c61aa4b669c7301e67a250b0e2b263225/template_functions/WOLV_Garage/fn_invRemoveItem.sqf#L71

Update inv Ace

template_functions/WOLV_Garage/fn_aceInvUpdate.sqf

ajouté

if (!isNull(findDisplay WolvGarage_var_IddDisplayInvAce)) then {
    //le code ici
};

template_functions/WOLV_Garage/fn_aceInvAddItem.sqf

[] remoteexec ["WolvGarage_fnc_aceInvUpdate", -2];

https://github.com/DIS-Wolv/ODD/blob/7ac1079c61aa4b669c7301e67a250b0e2b263225/template_functions/WOLV_Garage/fn_aceInvAddItem.sqf#L25

template_functions/WOLV_Garage/fn_aceInvRemoveItem.sqf

[] remoteexec ["WolvGarage_fnc_aceInvUpdate", -2];

https://github.com/DIS-Wolv/ODD/blob/7ac1079c61aa4b669c7301e67a250b0e2b263225/template_functions/WOLV_Garage/fn_aceInvRemoveItem.sqf#L30