Service Point / Rearm Config tweak

This commit is contained in:
He-Man 2020-07-30 18:42:03 +02:00
parent a851910103
commit 1877f46c09
2 changed files with 32 additions and 17 deletions

View File

@ -18,10 +18,7 @@ private ["_Ignatz_SP_Array","_AmmoConfig","_VehiclesWithAmmo","_VehicleAmmo","_a
//[[[end]]]
Ignatz_Refuel = nil;
Ignatz_Repair = nil;
Ignatz_Rearm0 = nil;
Ignatz_Rearm1 = nil;
Ignatz_Rearm2 = nil;
Ignatz_Rearm3 = nil;
Ignatz_Rearm = [];
params ["_myturret"];
@ -106,8 +103,5 @@ if (player == driver _vehicle) then {
_actionTitle = [format['Repair %1',getText (configFile >> 'Cfgvehicles' >> typeOf _vehicle >> 'displayName')], _costs] call _fnc_actionTitle;
Ignatz_Repair = [_actionTitle,[_vehicle,[_costs, _repairTime]]];
};
if (count _Ignatz_SP_Array > 0) then {Ignatz_Rearm0 = _Ignatz_SP_Array select 0;};
if (count _Ignatz_SP_Array > 1) then {Ignatz_Rearm1 = _Ignatz_SP_Array select 1;};
if (count _Ignatz_SP_Array > 2) then {Ignatz_Rearm2 = _Ignatz_SP_Array select 2;};
if (count _Ignatz_SP_Array > 3) then {Ignatz_Rearm3 = _Ignatz_SP_Array select 3;};
Ignatz_Rearm = _Ignatz_SP_Array;
true

View File

@ -150,24 +150,45 @@ class ServicePoint
};
class Rearm0
{
condition = "!isnil 'Ignatz_Rearm0'";
action = "(Ignatz_Rearm0 select 1) call EPOCH_SP_Rearm";
condition = "count Ignatz_Rearm > 0";
action = "(Ignatz_Rearm select 0 select 1) call EPOCH_SP_Rearm";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Rearm.paa";
tooltipcode = "Ignatz_Rearm0 select 0";
tooltipcode = "Ignatz_Rearm select 0 select 0";
};
class Rearm1
{
condition = "!isnil 'Ignatz_Rearm1'";
action = "(Ignatz_Rearm1 select 1) call EPOCH_SP_Rearm";
condition = "count Ignatz_Rearm > 1";
action = "(Ignatz_Rearm select 1 select 1) call EPOCH_SP_Rearm";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Rearm.paa";
tooltipcode = "Ignatz_Rearm1 select 0";
tooltipcode = "Ignatz_Rearm select 1 select 0";
};
class Rearm2
{
condition = "!isnil 'Ignatz_Rearm2'";
action = "(Ignatz_Rearm2 select 1) call EPOCH_SP_Rearm";
condition = "count Ignatz_Rearm > 2";
action = "(Ignatz_Rearm select 2 select 1) call EPOCH_SP_Rearm";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Rearm.paa";
tooltipcode = "Ignatz_Rearm2 select 0";
tooltipcode = "Ignatz_Rearm select 2 select 0";
};
class Rearm3
{
condition = "count Ignatz_Rearm > 3";
action = "(Ignatz_Rearm select 3 select 1) call EPOCH_SP_Rearm";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Rearm.paa";
tooltipcode = "Ignatz_Rearm select 3 select 0";
};
class Rearm4
{
condition = "count Ignatz_Rearm > 4";
action = "(Ignatz_Rearm select 4 select 1) call EPOCH_SP_Rearm";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Rearm.paa";
tooltipcode = "Ignatz_Rearm select 4 select 0";
};
class Rearm5
{
condition = "count Ignatz_Rearm > 5";
action = "(Ignatz_Rearm select 5 select 1) call EPOCH_SP_Rearm";
icon = "x\addons\a3_epoch_code\Data\UI\buttons\Rearm.paa";
tooltipcode = "Ignatz_Rearm select 5 select 0";
};
};
class veh_Rearm1