condition = "entreprise_X";
switch (typeOf _x) do {
case "Land_Workbench_01_F" : {
[_x,2] remoteExecCall ["max_entreprise_fnc_entrepriseAddAction",player];
};
condition = "entreprise_X";
switch (typeOf _x) do {
case "Land_Workbench_01_F" : {
[_x,2] remoteExecCall ["max_entreprise_fnc_entrepriseAddAction",player];
};
switch (typeOf _x) do {
case "Land_Workbench_01_F" : {
[_x,2] remoteExecCall ["max_entreprise_fnc_entrepriseAddAction",player];
};
switch (typeof maxence_placing_object) do {
case "Land_Workbench_01_F" : {
maxence_placing_object setVariable ["required_license",_requiredLicense,true];
{
_curCheck = _x;
{
if ((getPlayerUID _curCheck) isEqualTo (_x select 0)) then {
[maxence_placing_object,2] remoteExecCall ["max_entreprise_fnc_entrepriseAddAction",_curCheck];
};
} forEach _members;
} forEach playableUnits;
hint "Vous avez placé un établi pour l'entreprise !";
};
switch (_type) do {
case 2 : {
_object addAction [(["STR_OPEN_WORKBENCH","Max_Settings_Craft","Craft_Localization"] call theprogrammer_core_fnc_localize),{
_obj = cursorObject; if (isNull _obj) exitWith {};
_requiredLicense = _obj getVariable ["required_license",""]; if (_requiredLicense == "") exitWith {};
if !(missionNamespace getVariable [_requiredLicense,false]) exitWith {hint (["STR_YOU_ARE_NOT_ALLOWED","Max_Settings_Entreprise","Entreprise_Localization"] call theprogrammer_core_fnc_localize);};
[] spawn max_craft_fnc_openWorkBench;
},"",0,false,false,"",'(isNull (cursorObject getVariable ["workbench_in_use_by",objNull]))'];
};