//==========================================//
//					    //
//	  Do not edit this file		    //
//					    //
//==========================================//


if (isNull player) exitwith {};

player removeaction action1;
player removeaction action2;
player removeaction action3;
player removeaction action4;
player removeaction action5;
player removeaction action6;
player removeaction action7;
player removeaction action8;
player removeaction action9;
player removeaction action10;
player removeaction action11;


if battery_1 then
{
	if (weapon1 == "mlrs") then
	{
		dyn_dur1 = count units battery_vehicle1;
		dyn_dur1 = dyn_dur1 * 6;

		if (dyn_dur1 > 15) then
		{
			dyn_dur1 = 15;
		};
		if (duration_b1_c < dyn_dur1) then
		{
			action1 = player addaction ["Add", "artillery_ssp\duration\duration_add.sqf", [], 1, false, false, "", ""];
		};
		if (duration_b1_c > 1) then
		{
			action2 = player addaction ["Subtract", "artillery_ssp\duration\duration_sub.sqf", [], 1, false, false, "", ""];
		};
		action3 = player addaction ["Max", "artillery_ssp\duration\duration_max.sqf", [], 1, false, false, "", ""];
		action4 = player addaction ["Reset", "artillery_ssp\duration\duration_reset.sqf", [], 1, false, false, "", ""];
	}
	else
	{
		if (mission_b1_c == "timed") then
		{
			if not (weapon1 == "mlrs") then
			{
				action1 = player addaction ["Short", "artillery_ssp\duration\duration_short.sqf", [], 1, false, false, "", ""];
				action2 = player addaction ["Medium", "artillery_ssp\duration\duration_medium.sqf", [], 1, false, false, "", ""];
				action3 = player addaction ["Long", "artillery_ssp\duration\duration_long.sqf", [], 1, false, false, "", ""];
				action4 = player addaction ["Very Long", "artillery_ssp\duration\duration_vlong.sqf", [], 1, false, false, "", ""];
			};
		}
		else
		{
			dyn_dur1 = 15;

			if (duration_b1_c < dyn_dur1) then
			{
				action1 = player addaction ["Add", "artillery_ssp\duration\duration_add.sqf", [], 1, false, false, "", ""];
			};
			if (duration_b1_c > 1) then
			{
				action2 = player addaction ["Subtract", "artillery_ssp\duration\duration_sub.sqf", [], 1, false, false, "", ""];
			};
			action3 = player addaction ["Max", "artillery_ssp\duration\duration_max.sqf", [], 1, false, false, "", ""];
			action4 = player addaction ["Reset", "artillery_ssp\duration\duration_reset.sqf", [], 1, false, false, "", ""];
		};
	};
};


if battery_2 then
{
	if (weapon2 == "mlrs") then
	{
		dyn_dur2 = count units battery_vehicle3;
		dyn_dur2 = dyn_dur2 * 6;

		if (dyn_dur2 > 15) then
		{
			dyn_dur2 = 15;
		};
		if (duration_b2_c < dyn_dur2) then
		{
			action1 = player addaction ["Add", "artillery_ssp\duration\duration_add.sqf", [], 1, false, false, "", ""];
		};
		if (duration_b2_c > 1) then
		{
			action2 = player addaction ["Subtract", "artillery_ssp\duration\duration_sub.sqf", [], 1, false, false, "", ""];
		};
		action3 = player addaction ["Max", "artillery_ssp\duration\duration_max.sqf", [], 1, false, false, "", ""];
		action4 = player addaction ["Reset", "artillery_ssp\duration\duration_reset.sqf", [], 1, false, false, "", ""];
	}
	else
	{
		if (mission_b2_c == "timed") then
		{
			if not (weapon2 == "mlrs") then
			{
				action1 = player addaction ["Short", "artillery_ssp\duration\duration_short.sqf", [], 1, false, false, "", ""];
				action2 = player addaction ["Medium", "artillery_ssp\duration\duration_medium.sqf", [], 1, false, false, "", ""];
				action3 = player addaction ["Long", "artillery_ssp\duration\duration_long.sqf", [], 1, false, false, "", ""];
				action4 = player addaction ["Very Long", "artillery_ssp\duration\duration_vlong.sqf", [], 1, false, false, "", ""];
			};
		}
		else
		{
			dyn_dur2 = 15;

			if (duration_b2_c < dyn_dur2) then
			{
				action1 = player addaction ["Add", "artillery_ssp\duration\duration_add.sqf", [], 1, false, false, "", ""];
			};
			if (duration_b2_c > 1) then
			{
				action2 = player addaction ["Subtract", "artillery_ssp\duration\duration_sub.sqf", [], 1, false, false, "", ""];
			};
			action3 = player addaction ["Max", "artillery_ssp\duration\duration_max.sqf", [], 1, false, false, "", ""];
			action4 = player addaction ["Reset", "artillery_ssp\duration\duration_reset.sqf", [], 1, false, false, "", ""];
		};
	};
};


if battery_3 then
{
	if (weapon3 == "mlrs") then
	{
		dyn_dur3 = count units battery_vehicle3;
		dyn_dur3 = dyn_dur3 * 6;

		if (dyn_dur3 > 15) then
		{
			dyn_dur3 = 15;
		};
		if (duration_b3_c < dyn_dur3) then
		{
			action1 = player addaction ["Add", "artillery_ssp\duration\duration_add.sqf", [], 1, false, false, "", ""];
		};
		if (duration_b3_c > 1) then
		{
			action2 = player addaction ["Subtract", "artillery_ssp\duration\duration_sub.sqf", [], 1, false, false, "", ""];
		};
		action3 = player addaction ["Max", "artillery_ssp\duration\duration_max.sqf", [], 1, false, false, "", ""];
		action4 = player addaction ["Reset", "artillery_ssp\duration\duration_reset.sqf", [], 1, false, false, "", ""];
	}
	else
	{
		if (mission_b3_c == "timed") then
		{
			if not (weapon3 == "mlrs") then
			{
				action1 = player addaction ["Short", "artillery_ssp\duration\duration_short.sqf", [], 1, false, false, "", ""];
				action2 = player addaction ["Medium", "artillery_ssp\duration\duration_medium.sqf", [], 1, false, false, "", ""];
				action3 = player addaction ["Long", "artillery_ssp\duration\duration_long.sqf", [], 1, false, false, "", ""];
				action4 = player addaction ["Very Long", "artillery_ssp\duration\duration_vlong.sqf", [], 1, false, false, "", ""];
			};
		}
		else
		{
			dyn_dur3 = 15;

			if (duration_b3_c < dyn_dur3) then
			{
				action1 = player addaction ["Add", "artillery_ssp\duration\duration_add.sqf", [], 1, false, false, "", ""];
			};
			if (duration_b3_c > 1) then
			{
				action2 = player addaction ["Subtract", "artillery_ssp\duration\duration_sub.sqf", [], 1, false, false, "", ""];
			};
			action3 = player addaction ["Max", "artillery_ssp\duration\duration_max.sqf", [], 1, false, false, "", ""];
			action4 = player addaction ["Reset", "artillery_ssp\duration\duration_reset.sqf", [], 1, false, false, "", ""];
		};
	};
};

action5 = player addaction ["Back", "artillery_ssp\menu\support.sqf", [], 1, false, false, "", ""];