Last active
December 21, 2015 23:38
-
-
Save duk3luk3/6383640 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_unit = _this select 0; | |
// Arty actions | |
_magazines = [ | |
[ | |
"M119", | |
[ | |
[ | |
"HE", | |
["ace_arty_105mm_m1_m782_pd_chg1", "ace_arty_105mm_m1_m782_pd_chg2", "ace_arty_105mm_m1_m782_pd_chg3", "ace_arty_105mm_m1_m782_pd_chg4", "ace_arty_105mm_m1_m782_pd_chg5", "ace_arty_105mm_m1_m782_pd_chg6", "ace_arty_105mm_m1_m782_pd_chg7", "ace_arty_105mm_m1_m782_pd_chg8"] | |
], | |
[ | |
"Illum", | |
["ace_arty_105mm_m314a3_m782_time_chg1", "ace_arty_105mm_m314a3_m782_time_chg2", "ace_arty_105mm_m314a3_m782_time_chg3", "ace_arty_105mm_m314a3_m782_time_chg4", "ace_arty_105mm_m314a3_m782_time_chg5", "ace_arty_105mm_m314a3_m782_time_chg6", "ace_arty_105mm_m314a3_m782_time_chg7"] | |
], | |
[ | |
"HC Smoke", | |
["ace_arty_105mm_m84a1_m782_time_chg1", "ace_arty_105mm_m84a1_m782_time_chg2", "ace_arty_105mm_m84a1_m782_time_chg3", "ace_arty_105mm_m84a1_m782_time_chg4", "ace_arty_105mm_m84a1_m782_time_chg5", "ace_arty_105mm_m84a1_m782_time_chg6", "ace_arty_105mm_m84a1_m782_time_chg7"] | |
], | |
[ | |
"DPICM", | |
["ace_arty_105mm_m916_m782_time_chg1", "ace_arty_105mm_m916_m782_time_chg2", "ace_arty_105mm_m916_m782_time_chg3", "ace_arty_105mm_m916_m782_time_chg4", "ace_arty_105mm_m916_m782_time_chg5", "ace_arty_105mm_m916_m782_time_chg6", "ace_arty_105mm_m916_m782_time_chg7", "ace_arty_105mm_m916_m782_time_chg8"]], ["WP",["ace_arty_105mm_m60a2_m782_pd_chg1", "ace_arty_105mm_m60a2_m782_pd_chg2", "ace_arty_105mm_m60a2_m782_pd_chg3", "ace_arty_105mm_m60a2_m782_pd_chg4", "ace_arty_105mm_m60a2_m782_pd_chg5", "ace_arty_105mm_m60a2_m782_pd_chg6", "ace_arty_105mm_m60a2_m782_pd_chg7"] | |
] | |
], | |
[ | |
-5.0, | |
69.0 | |
] | |
], | |
[ | |
"Tampella 120mm", | |
[ | |
[ | |
"HE", | |
["ace_arty_120mm_dm11a5_dm111a1_pd_chg0", "ace_arty_120mm_dm11a5_dm111a1_pd_chg1", "ace_arty_120mm_dm11a5_dm111a1_pd_chg2", "ace_arty_120mm_dm11a5_dm111a1_pd_chg3", "ace_arty_120mm_dm11a5_dm111a1_pd_chg4"] | |
], | |
[ | |
"Illum", | |
["ace_arty_120mm_dm26_dm93_time_chg0", "ace_arty_120mm_dm26_dm93_time_chg1", "ace_arty_120mm_dm26_dm93_time_chg2", "ace_arty_120mm_dm26_dm93_time_chg3", "ace_arty_120mm_dm26_dm93_time_chg4"] | |
], | |
[ | |
"HC Smoke", | |
["ace_arty_120mm_dm35_dm93_time_chg0", "ace_arty_120mm_dm35_dm93_time_chg1", "ace_arty_120mm_dm35_dm93_time_chg2", "ace_arty_120mm_dm35_dm93_time_chg3", "ace_arty_120mm_dm35_dm93_time_chg4"] | |
] | |
], | |
[ | |
45.0, | |
85.0 | |
] | |
], | |
[ | |
"M225 60mm", | |
[ | |
[ | |
"All", | |
["ace_arty_60mm_m720a1_m734_pd_chg0", "ace_arty_60mm_m720a1_m734_pd_chg1", "ace_arty_60mm_m720a1_m734_pd_chg2", "ace_arty_60mm_m720a1_m734_pd_chg3", "ace_arty_60mm_m720a1_m734_pd_chg4"] | |
] | |
], | |
[ | |
45.0, | |
85.0 | |
] | |
], | |
[ | |
"M252 81mm", | |
[ | |
[ | |
"All", | |
["ace_arty_81mm_m821a2_m734_pd_chg0", "ace_arty_81mm_m821a2_m734_pd_chg1", "ace_arty_81mm_m821a2_m734_pd_chg2","ace_arty_81mm_m821a2_m734_pd_chg3", "ace_arty_81mm_m821a2_m734_pd_chg4"] | |
] | |
], | |
[ | |
45.0, | |
85.0 | |
] | |
], | |
[ | |
"2b14 82mm", | |
[ | |
[ | |
"HE", | |
["ace_arty_82mm_he_pd_chg0", "ace_arty_82mm_he_pd_chg1", "ace_arty_82mm_he_pd_chg2", "ace_arty_82mm_he_pd_chg3", "ace_arty_82mm_he_pd_chg4", "ace_arty_82mm_he_pd_chg5", "ace_arty_82mm_he_pd_chg6"] | |
], | |
[ | |
"Illum", | |
["ace_arty_82mm_illum_time_chg0", "ace_arty_82mm_illum_time_chg1", "ace_arty_82mm_illum_time_chg2", "ace_arty_82mm_illum_time_chg3"] | |
], | |
[ | |
"WP", | |
["ace_arty_82mm_wp_pd_chg0", "ace_arty_82mm_wp_pd_chg1", "ace_arty_82mm_wp_pd_chg2", "ace_arty_82mm_wp_pd_chg3"] | |
] | |
], | |
[ | |
45.0, | |
85.0 | |
] | |
] | |
]; | |
_elevStep = 2.0; | |
_heightMin = -500.0; | |
_heightMax = +500.0; | |
_heightStep = 50.0; | |
_calc_action = { | |
_magazine = _this select 0; | |
_elevMin = _this select 1; | |
_elevMax = _this select 2; | |
_elevStep = _this select 3; | |
_heightMin = _this select 4; | |
_heightMax = _this select 5; | |
_heightStep = _this select 6; | |
[_magazine, _elevMin, _elevMax, _elevStep, _heightMin, _heightMax, _heightStep] call ace_sys_arty_computers_gyk37_fnc_formattedBTab; | |
}; | |
//add the fucking actions | |
for [{_wepi=0},{_wepi < count _magazines},{_wepi = _wepi+1}] do | |
{ | |
_wep = _magazines select _wepi; | |
_wepname = _wep select 0; | |
_munitions = _wep select 1; | |
_elev = _wep select 2; | |
for [{_muni = 0},{_muni < count _munitions},{_muni = _muni + 1}] do | |
{ | |
_mun = _munitions select _muni; | |
_munname = _mun select 0; | |
_charges = _mun select 1; | |
for[{_chgi=0},{_chgi < count _charges},{_chgi = _chgi + 1}] do | |
{ | |
_chgname = _charges select _chgi; | |
_args = [_chgname, _elev select 0, _elev select 1, _elevStep, _heightMin, _heightMax, _heightStep]; | |
_title = "Rangetable for "+str _wepname+" "+str _munname+" Charge "+str _chgi; | |
_unit addAction [_title, _calc_action, _args, 0, false, false, ""]; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment