Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2106 lines
74 KiB
Plaintext
2106 lines
74 KiB
Plaintext
// Mechwarrior: Vengeance
|
|
// Copyright © 1999-2000
|
|
// Mechbay_main.script
|
|
// Paolo Malabuyo
|
|
// July 12, 2000
|
|
|
|
#include "Content\\ShellScripts\\stddefs.h"
|
|
|
|
weapons
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int labelx = 22
|
|
int labely = 64
|
|
int boxx = 145
|
|
int boxy = 140 - 64
|
|
int noneditx = 331
|
|
int nonedity = 160
|
|
|
|
int mech_id
|
|
int showinfo
|
|
int sel_weapon
|
|
|
|
int ids[100]
|
|
int slots[100]
|
|
int slot_size[100]
|
|
float ton[100]
|
|
float damage[100]
|
|
float range[100]
|
|
float heat[100]
|
|
float weapon_recycle[100]
|
|
int inventory_count[100]
|
|
int num_weap
|
|
|
|
int la_unique_id[10]
|
|
int ra_unique_id[10]
|
|
int ll_unique_id[10]
|
|
int rl_unique_id[10]
|
|
int lt_unique_id[10]
|
|
int rt_unique_id[10]
|
|
int ct_unique_id[10]
|
|
int h_unique_id[10]
|
|
int s1_unique_id[10]
|
|
int s2_unique_id[10]
|
|
|
|
int la_ids[10]
|
|
int la_slots[10]
|
|
int la_slot_size[10]
|
|
float la_ton[10]
|
|
float la_damage[10]
|
|
float la_range[10]
|
|
float la_heat[10]
|
|
float la_recycle[10]
|
|
int la_num_weap
|
|
int ra_ids[10]
|
|
int ra_slots[10]
|
|
int ra_slot_size[10]
|
|
float ra_ton[10]
|
|
float ra_damage[10]
|
|
float ra_range[10]
|
|
float ra_heat[10]
|
|
float ra_recycle[10]
|
|
int ra_num_weap
|
|
int ll_ids[10]
|
|
int ll_slots[10]
|
|
int ll_slot_size[10]
|
|
float ll_ton[10]
|
|
float ll_damage[10]
|
|
float ll_range[10]
|
|
float ll_heat[10]
|
|
float ll_recycle[10]
|
|
int ll_num_weap
|
|
int rl_ids[10]
|
|
int rl_slots[10]
|
|
int rl_slot_size[10]
|
|
float rl_ton[10]
|
|
float rl_damage[10]
|
|
float rl_range[10]
|
|
float rl_heat[10]
|
|
float rl_recycle[10]
|
|
int rl_num_weap
|
|
int lt_ids[10]
|
|
int lt_slots[10]
|
|
int lt_slot_size[10]
|
|
float lt_ton[10]
|
|
float lt_damage[10]
|
|
float lt_range[10]
|
|
float lt_heat[10]
|
|
float lt_recycle[10]
|
|
int lt_num_weap
|
|
int rt_ids[10]
|
|
int rt_slots[10]
|
|
int rt_slot_size[10]
|
|
float rt_ton[10]
|
|
float rt_damage[10]
|
|
float rt_range[10]
|
|
float rt_heat[10]
|
|
float rt_recycle[10]
|
|
int rt_num_weap
|
|
int ct_ids[10]
|
|
int ct_slots[10]
|
|
int ct_slot_size[10]
|
|
float ct_ton[10]
|
|
float ct_damage[10]
|
|
float ct_range[10]
|
|
float ct_heat[10]
|
|
float ct_recycle[10]
|
|
int ct_num_weap
|
|
int h_ids[10]
|
|
int h_slots[10]
|
|
int h_slot_size[10]
|
|
float h_ton[10]
|
|
float h_damage[10]
|
|
float h_range[10]
|
|
float h_heat[10]
|
|
float h_recycle[10]
|
|
int h_num_weap
|
|
int s1_ids[10]
|
|
int s1_slots[10]
|
|
int s1_slot_size[10]
|
|
float s1_ton[10]
|
|
float s1_damage[10]
|
|
float s1_range[10]
|
|
float s1_heat[10]
|
|
float s1_recycle[10]
|
|
int s1_num_weap
|
|
int s2_ids[20]
|
|
int s2_slots[20]
|
|
int s2_slot_size[20]
|
|
float s2_ton[20]
|
|
float s2_damage[20]
|
|
float s2_range[20]
|
|
float s2_heat[20]
|
|
float s2_recycle[10]
|
|
int s2_num_weap
|
|
|
|
string weapon_names[150]
|
|
|
|
// let everyone use these....
|
|
|
|
sound btnRolloverSound = SPATH "sfx_button7.wav"
|
|
sound btnPressedSound = SPATH "sfx_button5.wav"
|
|
sound btnTriggeredSound = SPATH "sfx_button5.wav"
|
|
sound addWeapon = SPATH "sfx_add_weapon.wav"
|
|
sound notAllowed = SPATH "sfx_wrongbutton.wav"
|
|
|
|
weapon_names[0] = localize$(DNL_SMLAS)
|
|
weapon_names[1] = localize$(DNL_MDLAS)
|
|
weapon_names[2] = localize$(DNL_LGLAS)
|
|
weapon_names[3] = localize$(DNL_SMPLS)
|
|
weapon_names[4] = localize$(DNL_MDPLS)
|
|
weapon_names[5] = localize$(DNL_LGPLS)
|
|
weapon_names[6] = localize$(DNL_ERSML_SHORT)
|
|
weapon_names[7] = localize$(DNL_ERMDL_SHORT)
|
|
weapon_names[8] = localize$(DNL_ERLGL_SHORT)
|
|
weapon_names[9] = localize$(DNL_SMXPLS)
|
|
weapon_names[10] = localize$(DNL_MDXPLS)
|
|
weapon_names[11] = localize$(DNL_LGXPLS)
|
|
weapon_names[12] = localize$(DNL_CSMPLS_SHORT)
|
|
weapon_names[13] = localize$(DNL_CMDPLS_SHORT)
|
|
weapon_names[14] = localize$(DNL_CLGPLS_SHORT)
|
|
weapon_names[15] = localize$(DNL_CERSML_SHORT)
|
|
weapon_names[16] = localize$(DNL_CERMDL_SHORT)
|
|
weapon_names[17] = localize$(DNL_CERLGL_SHORT)
|
|
weapon_names[18] = localize$(DNL_PPC_SHORT)
|
|
weapon_names[19] = localize$(DNL_ERPPC_SHORT)
|
|
weapon_names[20] = localize$(DNL_CERPPC_SHORT)
|
|
weapon_names[21] = localize$(DNL_FLAMER)
|
|
weapon_names[22] = localize$(DNL_CFLAMER)
|
|
weapon_names[23] = localize$(DNL_BMBLAS)
|
|
weapon_names[51] = localize$(DNL_SRM2_SHORT)
|
|
weapon_names[52] = localize$(DNL_SRM4_SHORT)
|
|
weapon_names[53] = localize$(DNL_SRM6_SHORT)
|
|
weapon_names[54] = localize$(DNL_CSRM2_SHORT)
|
|
weapon_names[55] = localize$(DNL_CSRM4_SHORT)
|
|
weapon_names[56] = localize$(DNL_CSRM6_SHORT)
|
|
weapon_names[57] = localize$(DNL_ISSSRM2_SHORT)
|
|
weapon_names[58] = localize$(DNL_ISSSRM4_SHORT)
|
|
weapon_names[59] = localize$(DNL_ISSSRM6_SHORT)
|
|
weapon_names[60] = localize$(DNL_CSSRM2_SHORT)
|
|
weapon_names[61] = localize$(DNL_CSSRM4_SHORT)
|
|
weapon_names[62] = localize$(DNL_CSSRM6_SHORT)
|
|
weapon_names[63] = localize$(DNL_MRM10_SHORT)
|
|
weapon_names[64] = localize$(DNL_MRM20_SHORT)
|
|
weapon_names[65] = localize$(DNL_MRM30_SHORT)
|
|
weapon_names[66] = localize$(DNL_MRM40_SHORT)
|
|
weapon_names[67] = localize$(DNL_SMRM10_SHORT)
|
|
weapon_names[68] = localize$(DNL_SMRM20_SHORT)
|
|
weapon_names[69] = localize$(DNL_SMRM30_SHORT)
|
|
weapon_names[70] = localize$(DNL_SMRM40_SHORT)
|
|
weapon_names[71] = localize$(DNL_CSMRM10_SHORT)
|
|
weapon_names[72] = localize$(DNL_CSMRM20_SHORT)
|
|
weapon_names[73] = localize$(DNL_CSMRM30_SHORT)
|
|
weapon_names[74] = localize$(DNL_CSMRM40_SHORT)
|
|
weapon_names[75] = localize$(DNL_LRM5_SHORT)
|
|
weapon_names[76] = localize$(DNL_LRM10_SHORT)
|
|
weapon_names[77] = localize$(DNL_LRM15_SHORT)
|
|
weapon_names[78] = localize$(DNL_LRM20_SHORT)
|
|
weapon_names[79] = localize$(DNL_CLRM5_SHORT)
|
|
weapon_names[80] = localize$(DNL_CLRM10_SHORT)
|
|
weapon_names[81] = localize$(DNL_CLRM15_SHORT)
|
|
weapon_names[82] = localize$(DNL_CLRM20_SHORT)
|
|
weapon_names[83] = localize$(DNL_THNDRBLT)
|
|
weapon_names[84] = localize$(DNL_NARC)
|
|
weapon_names[85] = localize$(DNL_CNARC)
|
|
weapon_names[86] = localize$(DNL_FLARE)
|
|
weapon_names[87] = localize$(DNL_HIGHEXPLOSIVE)
|
|
weapon_names[88] = localize$(DNL_ARTILLERY)
|
|
weapon_names[100] = localize$(DNL_AC2_SHORT)
|
|
weapon_names[101] = localize$(DNL_AC5_SHORT)
|
|
weapon_names[102] = localize$(DNL_AC10_SHORT)
|
|
weapon_names[103] = localize$(DNL_AC20_SHORT)
|
|
weapon_names[104] = localize$(DNL_LBXAC10_SHORT)
|
|
weapon_names[105] = localize$(DNL_LBXAC20_SHORT)
|
|
weapon_names[106] = localize$(DNL_CLBXAC10_SHORT)
|
|
weapon_names[107] = localize$(DNL_CLBXAC20_SHORT)
|
|
weapon_names[108] = localize$(DNL_UAC2_SHORT)
|
|
weapon_names[109] = localize$(DNL_UAC5_SHORT)
|
|
weapon_names[110] = localize$(DNL_UAC10_SHORT)
|
|
weapon_names[111] = localize$(DNL_UAC20_SHORT)
|
|
weapon_names[112] = localize$(DNL_CUAC2_SHORT)
|
|
weapon_names[113] = localize$(DNL_CUAC5_SHORT)
|
|
weapon_names[114] = localize$(DNL_CUAC10_SHORT)
|
|
weapon_names[115] = localize$(DNL_CUAC20_SHORT)
|
|
weapon_names[116] = localize$(DNL_LGAUSS)
|
|
weapon_names[117] = localize$(DNL_GAUSS)
|
|
weapon_names[118] = localize$(DNL_HGAUSS)
|
|
weapon_names[119] = localize$(DNL_CGAUSS)
|
|
weapon_names[120] = localize$(DNL_MG)
|
|
weapon_names[121] = localize$(DNL_CMG)
|
|
weapon_names[122] = localize$(DNL_LONGTOM)
|
|
|
|
|
|
int CurrentList
|
|
object o_weaponsdroplistbox = s_droplistbox
|
|
o_weaponsdroplistbox.boxFont3d = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponsdroplistbox.itemHeight = 20
|
|
o_weaponsdroplistbox.max_displayed = 8
|
|
o_weaponsdroplistbox.labelFont3d = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponsdroplistbox.offsetLabel = 0,-15
|
|
o_weaponsdroplistbox.arrowHeight = 15
|
|
o_weaponsdroplistbox.location = 22, 92, 20
|
|
o_weaponsdroplistbox.list_size = 4
|
|
o_weaponsdroplistbox.label = localize$(IDS_ML_WP_LIST)
|
|
o_weaponsdroplistbox.offsetLabel = -1, -17
|
|
o_weaponsdroplistbox.itemWidth = 269
|
|
o_weaponsdroplistbox.max_displayed = 4
|
|
o_weaponsdroplistbox.id = 226
|
|
|
|
o_weaponsdroplistbox.list_item[0] = localize$(IDS_ML_WP_LISTALL)
|
|
o_weaponsdroplistbox.list_item[1] = localize$(IDS_ML_WP_LISTBEAM)
|
|
o_weaponsdroplistbox.list_item[2] = localize$(IDS_ML_WP_LISTBALLISTIC)
|
|
o_weaponsdroplistbox.list_item[3] = localize$(IDS_ML_WP_LISTMISSILE)
|
|
|
|
initialize(o_weaponsdroplistbox)
|
|
deactivate(o_weaponsdroplistbox)
|
|
|
|
// begin multicolumn listbox
|
|
//Create our STANDARD listbox///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
callback($$ML_CallbackHandler$$, MLDataSetupAllWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
|
|
object o_weaponslistbox = s_mc_listbox_weapon
|
|
o_weaponslistbox.id = 244
|
|
o_weaponslistbox.location = 22, 124, 10
|
|
|
|
o_weaponslistbox.boxFont3d = FPATH localize$(IDS_F_ML_LABEL) //MUST BE INITIALIZED
|
|
o_weaponslistbox.itemWidth = 268 //MUST BE INITIALIZED
|
|
o_weaponslistbox.itemHeight = 1
|
|
o_weaponslistbox.itemHeight_padding = 5
|
|
o_weaponslistbox.list_size = num_weap //11
|
|
o_weaponslistbox.NUM_OF_COLUMNS = 4 //MUST BE INITIALIZED
|
|
o_weaponslistbox.column_header_height = 20
|
|
o_weaponslistbox.arrowheight = 20
|
|
o_weaponslistbox.max_displayed = 331
|
|
o_weaponslistbox.uniform_item_height = 0
|
|
|
|
o_weaponslistbox.labelFont3d = FPATH localize$(IDS_F_ML_LABEL) //CAN BE INITIALIZED
|
|
o_weaponslistbox.offsetLabel = 0,-18 //CAN BE INITIALIZED offsetLabel of text from button = 0,-25
|
|
o_weaponslistbox.buttonwidth = 16 //CAN BE INITIALIZED
|
|
|
|
o_weaponslistbox.first_delay = 10 //time delay value n/60; for the buttons
|
|
o_weaponslistbox.second_delay = 3 //time delay value n/60; for the buttons
|
|
|
|
o_weaponslistbox.column[0].location.x = 5
|
|
o_weaponslistbox.column[1].location.x = 65
|
|
o_weaponslistbox.column[2].location.x = 190
|
|
o_weaponslistbox.column[3].location.x = 235
|
|
|
|
o_weaponslistbox.column[0].fontcolor = packcolor(255,0,0,255)
|
|
o_weaponslistbox.column[1].fontcolor = packcolor(255,255,255,255)
|
|
o_weaponslistbox.column[2].fontcolor = packcolor(255,255,255,255)
|
|
o_weaponslistbox.column[3].fontcolor = packcolor(255,255,255,255)
|
|
|
|
o_weaponslistbox.offsetx[1] = 5
|
|
|
|
o_weaponslistbox.column[0].icondisplays = true
|
|
|
|
o_weaponslistbox.column[0].numeric = true
|
|
o_weaponslistbox.column[2].numeric = true
|
|
o_weaponslistbox.column[3].numeric = true
|
|
|
|
o_weaponslistbox.column[0].fontAlignment = just_left
|
|
o_weaponslistbox.column[1].fontAlignment = just_left
|
|
o_weaponslistbox.column[2].fontAlignment = just_right
|
|
o_weaponslistbox.column[3].fontAlignment = just_center
|
|
|
|
float ton_times_ten = 0.f
|
|
int ton_int_times_ten = 0
|
|
int ton_decimal_times_ten = 0
|
|
int counter = 0
|
|
int w
|
|
for w = 0; w < num_weap; w++
|
|
{
|
|
if ids[w] > -1
|
|
{
|
|
o_weaponslistbox.column[0].list_item[counter] = conv$(ids[w])
|
|
o_weaponslistbox.column[1].list_item[counter] = weapon_names[ids[w]]
|
|
ton_times_ten = ton[w] * 10.0
|
|
ton_int_times_ten = ton[w] * 10
|
|
ton_decimal_times_ten = ton_times_ten - ton_int_times_ten
|
|
o_weaponslistbox.column[2].list_item[counter] = conv$(ton[w]) "." conv$(ton_decimal_times_ten)
|
|
o_weaponslistbox.column[3].list_item[counter] = conv$(inventory_count[w])
|
|
o_weaponslistbox.list_order[counter] = counter
|
|
counter++
|
|
}
|
|
else
|
|
{
|
|
o_weaponslistbox.list_size--
|
|
}
|
|
}
|
|
|
|
int greatest_x
|
|
int greatest_y
|
|
for w = 0; w < o_weaponslistbox.list_size; w++
|
|
{
|
|
o_weaponslistbox.column[0].list_icon[w] = MB_GPATH "weapon_" o_weaponslistbox.column[0].list_item[w] ".tga",1,volatile
|
|
// o_weaponslistbox.column[0].list_icon[w] = MB_GPATH "weapon_" conv$(ids[w]) ".tga",1,volatile
|
|
alphamode(o_weaponslistbox.column[0].list_icon[w]) = am_alpha_alphainvalpha
|
|
|
|
if exists(o_weaponslistbox.column[0].list_icon[w])
|
|
{
|
|
if getwidth(o_weaponslistbox.column[0].list_icon[w]) > greatest_x
|
|
greatest_x = getwidth(o_weaponslistbox.column[0].list_icon[w])
|
|
|
|
if getheight(o_weaponslistbox.column[0].list_icon[w]) > greatest_y
|
|
greatest_y = getheight(o_weaponslistbox.column[0].list_icon[w])
|
|
}
|
|
|
|
}
|
|
if greatest_x > 0 && greatest_y > 0
|
|
bitmap_create black = greatest_x,greatest_y //comment out if you don't have any images
|
|
else
|
|
bitmap_create black = 20,20 //makes something for now
|
|
|
|
initialize(o_weaponslistbox)
|
|
|
|
o_weaponslistbox.column[0].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[1].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[2].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[3].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
|
|
o_weaponslistbox.column[0].o_header.s_text = localize$(IDS_ML_WP_SLOTS)
|
|
o_weaponslistbox.column[1].o_header.s_text = localize$(IDS_ML_WP_NAME)
|
|
o_weaponslistbox.column[2].o_header.s_text = localize$(IDS_ML_WP_TONS)
|
|
o_weaponslistbox.column[3].o_header.s_text = "#"
|
|
|
|
object o_groupweaponsbutton = s_multistatepane
|
|
o_groupweaponsbutton.file = WPATH "button_reg_138x36m_4state.tga"
|
|
o_groupweaponsbutton.total_states = 4
|
|
o_groupweaponsbutton.text = localize$(IDS_ML_WP_GROUP)
|
|
o_groupweaponsbutton.location = 20, 466, 10
|
|
o_groupweaponsbutton.gFont3d = FPATH localize$(IDS_F_ML_BUTTON)
|
|
o_groupweaponsbutton.id = 227
|
|
initialize(o_groupweaponsbutton)
|
|
deactivate(o_groupweaponsbutton)
|
|
|
|
// object o_overlay = overlay
|
|
// o_overlay.location = 0, 0, 60
|
|
// initialize(o_overlay)
|
|
// deactivate(o_overlay)
|
|
|
|
object o_stripweaponsbutton = s_multistatepane
|
|
o_stripweaponsbutton.file = WPATH "button_reg_138x36m_4state.tga"
|
|
o_stripweaponsbutton.total_states = 4
|
|
o_stripweaponsbutton.text = localize$(IDS_ML_WP_STRIP)
|
|
o_stripweaponsbutton.location = 20 + 148, 466, 10
|
|
o_stripweaponsbutton.gFont3d = FPATH localize$(IDS_F_ML_BUTTON)
|
|
o_stripweaponsbutton.id = 228
|
|
initialize(o_stripweaponsbutton)
|
|
deactivate(o_stripweaponsbutton)
|
|
|
|
///////////////////////////////////////////////////////
|
|
|
|
// MSL ADD MECH
|
|
|
|
int mech_num = 54
|
|
position head_location[mech_num]
|
|
head_location[0] = 540,55,50 // Arcticwolf
|
|
head_location[1] = 540,190,50 // Ares
|
|
head_location[2] = 540,55,50 // Argus
|
|
head_location[3] = 540,55,50 // Atlas
|
|
head_location[4] = 540,55,50 // Awesome
|
|
head_location[5] = 540,55,50 // Black Knight
|
|
head_location[6] = 540,55,50 // Black Lanner
|
|
head_location[7] = 540,55,50 // Brigand
|
|
head_location[8] = 540,55,50 // Bushwacker
|
|
head_location[9] = 540,55,50 // Catapult
|
|
head_location[10] = 540,55,50 // Cauldronborn
|
|
head_location[11] = 540,55,50 // Chimera
|
|
head_location[12] = 540,55,50 // Commando
|
|
head_location[13] = 540,55,50 // Cougar
|
|
head_location[14] = 540,55,50 // Cyclops
|
|
head_location[15] = 540,55,50 // Daishi
|
|
// head_location[16] = 540,55,50 // Dasher
|
|
head_location[16] = 540,55,50 // Deimos
|
|
head_location[17] = 540,55,50 // Dragon
|
|
head_location[18] = 540,55,50 // Fafnir
|
|
head_location[19] = 540,55,50 // Flea
|
|
head_location[20] = 540,55,50 // Gladiator
|
|
head_location[21] = 540,55,50 // Grizzly
|
|
head_location[22] = 540,55,50 // Hauptmann
|
|
head_location[23] = 540,55,50 // Hellhound
|
|
head_location[24] = 540,55,50 // Hellspawn
|
|
head_location[25] = 540,55,50 // Highlander
|
|
head_location[26] = 540,55,50 // Hollander II
|
|
head_location[27] = 540,55,50 // Hunchback
|
|
head_location[28] = 540,55,50 // Kodiak
|
|
head_location[29] = 540,55,50 // Loki
|
|
head_location[30] = 540,55,50 // Longbow
|
|
head_location[31] = 540,55,50 // Madcat
|
|
head_location[32] = 540,55,50 // Madcat Mk II
|
|
head_location[33] = 540,55,50 // Masakari
|
|
head_location[34] = 540,55,50 // Mauler
|
|
head_location[35] = 540,55,50 // Novacat
|
|
head_location[36] = 540,55,50 // Osiris
|
|
head_location[37] = 540,55,50 // Owens
|
|
head_location[38] = 540,55,50 // Puma
|
|
head_location[39] = 540,55,50 // Raven
|
|
// head_location[41] = 540,55,50 // Rifleman
|
|
head_location[40] = 540,55,50 // Ryoken
|
|
head_location[41] = 540,55,50 // Shadowcat
|
|
head_location[42] = 540,55,50 // Solitaire
|
|
head_location[43] = 540,55,50 // Sunder
|
|
head_location[44] = 540,55,50 // Templar
|
|
head_location[45] = 540,55,50 // Thanatos
|
|
head_location[46] = 540,55,50 // Thor
|
|
head_location[47] = 540,55,50 // Uller
|
|
head_location[48] = 540,55,50 // Uziel
|
|
head_location[49] = 540,55,50 // Victor
|
|
head_location[50] = 540,55,50 // Vulture
|
|
head_location[51] = 540,55,50 // Wolfhound
|
|
head_location[52] = 540,55,50 // Zeus
|
|
head_location[53] = 0,0,50 // nothing
|
|
|
|
position lefttorso_location[mech_num]
|
|
lefttorso_location[0] = 605,240,50 // Arcticwolf
|
|
lefttorso_location[1] = 605,240,50 // Ares
|
|
lefttorso_location[2] = 605,100,50 // Argus
|
|
lefttorso_location[3] = 605,100,50 // Atlas
|
|
lefttorso_location[4] = 605,100,50 // Awesome
|
|
lefttorso_location[5] = 605,100,50 // Black Knight
|
|
lefttorso_location[6] = 605,240,50 // Black Lanner
|
|
lefttorso_location[7] = 605,240,50 // Brigand
|
|
lefttorso_location[8] = 605,240,50 // Bushwacker
|
|
lefttorso_location[9] = 605,100,50 // Catapult
|
|
lefttorso_location[10] = 605,240,50 // Cauldronborn
|
|
lefttorso_location[11] = 605,100,50 // Chimera
|
|
lefttorso_location[12] = 605,100,50 // Commando
|
|
lefttorso_location[13] = 605,100,50 // Cougar
|
|
lefttorso_location[14] = 605,100,50 // Cyclops
|
|
lefttorso_location[15] = 605,190,50 // Daishi
|
|
// lefttorso_location[16] = 605,100,50 // Dasher
|
|
lefttorso_location[16] = 605,240,50 // Deimos
|
|
lefttorso_location[17] = 605,100,50 // Dragon
|
|
lefttorso_location[18] = 605,100,50 // Fafnir
|
|
lefttorso_location[19] = 605,100,50 // Flea
|
|
lefttorso_location[20] = 605,100,50 // Gladiator
|
|
lefttorso_location[21] = 605,100,50 // Grizzly
|
|
lefttorso_location[22] = 605,100,50 // Hauptmann
|
|
lefttorso_location[23] = 605,100,50 // Hellhound
|
|
lefttorso_location[24] = 605,190,50 // Hellspawn
|
|
lefttorso_location[25] = 605,100,50 // Highlander
|
|
lefttorso_location[26] = 605,100,50 // Hollander II
|
|
lefttorso_location[27] = 605,100,50 // Hunchback
|
|
lefttorso_location[28] = 605,100,50 // Kodiak
|
|
lefttorso_location[29] = 605,100,50
|
|
lefttorso_location[30] = 605,100,50 // Longbow
|
|
lefttorso_location[31] = 605,240,50
|
|
lefttorso_location[32] = 605,240,50
|
|
lefttorso_location[33] = 605,100,50 // Masakari
|
|
lefttorso_location[34] = 605,100,50
|
|
lefttorso_location[35] = 605,100,50
|
|
lefttorso_location[36] = 605,100,50
|
|
lefttorso_location[37] = 605,100,50 // Owens
|
|
lefttorso_location[38] = 605,100,50 // Puma
|
|
lefttorso_location[39] = 605,100,50
|
|
// lefttorso_location[41] = 605,240,50 // Rifleman
|
|
lefttorso_location[40] = 605,100,50 // Ryoken
|
|
lefttorso_location[41] = 605,100,50
|
|
lefttorso_location[42] = 605,100,50 // Solitaire
|
|
lefttorso_location[43] = 605,100,50 // Sunder
|
|
lefttorso_location[44] = 605,100,50 // Templar
|
|
lefttorso_location[45] = 605,100,50
|
|
lefttorso_location[46] = 605,190,50
|
|
lefttorso_location[47] = 605,100,50 // Uller
|
|
lefttorso_location[48] = 605,100,50 // Uziel
|
|
lefttorso_location[49] = 605,100,50 // Victor
|
|
lefttorso_location[50] = 605,100,50 // Vulture
|
|
lefttorso_location[51] = 605,100,50 // Wolfhound
|
|
lefttorso_location[52] = 605,100,50 // Zeus
|
|
lefttorso_location[53] = 0,0,50
|
|
|
|
position centertorso_location[mech_num]
|
|
centertorso_location[0] = 540,190,50 // Arcticwolf
|
|
centertorso_location[1] = 0,0,50 // Ares
|
|
centertorso_location[2] = 540,190,50 // Argus
|
|
centertorso_location[3] = 540,190,50 // Atlas
|
|
centertorso_location[4] = 540,190,50 // Awesome
|
|
centertorso_location[5] = 540,190,50 // Black Knight
|
|
centertorso_location[6] = 540,190,50 // Black Lanner
|
|
centertorso_location[7] = 540,190,50 // Brigand
|
|
centertorso_location[8] = 540,190,50 // Bushwacker
|
|
centertorso_location[9] = 540,190,50 // Catapult
|
|
centertorso_location[10] = 540,190,50 // Cauldronborn
|
|
centertorso_location[11] = 540,190,50 // Chimera
|
|
centertorso_location[12] = 540,190,50 // Commando
|
|
centertorso_location[13] = 540,190,50 // Cougar
|
|
centertorso_location[14] = 540,190,50 // Cyclops
|
|
centertorso_location[15] = 540,190,50 // Daishi
|
|
// centertorso_location[16] = 540,190,50 // Dasher
|
|
centertorso_location[16] = 540,190,50 // Deimos
|
|
centertorso_location[17] = 540,190,50 // Dragon
|
|
centertorso_location[18] = 540,190,50 // Fafnir
|
|
centertorso_location[19] = 540,190,50 // Flea
|
|
centertorso_location[20] = 540,190,50 // Gladiator
|
|
centertorso_location[21] = 540,190,50 // Grizzly
|
|
centertorso_location[22] = 540,190,50 // Hauptmann
|
|
centertorso_location[23] = 540,190,50 // Hellhound
|
|
centertorso_location[24] = 540,190,50
|
|
centertorso_location[25] = 540,190,50 // Highlander
|
|
centertorso_location[26] = 540,190,50 // Hollander II
|
|
centertorso_location[27] = 540,190,50 // Hunchback
|
|
centertorso_location[28] = 540,190,50 // Kodiak
|
|
centertorso_location[29] = 540,190,50
|
|
centertorso_location[30] = 540,190,50 // Longbow
|
|
centertorso_location[31] = 540,190,50 // Madcat
|
|
centertorso_location[32] = 540,190,50
|
|
centertorso_location[33] = 540,190,50 // Masakari
|
|
centertorso_location[34] = 540,190,50
|
|
centertorso_location[35] = 540,190,50
|
|
centertorso_location[36] = 0,0,50
|
|
centertorso_location[37] = 540,190,50 // Owens
|
|
centertorso_location[38] = 540,190,50 // Puma
|
|
centertorso_location[39] = 540,190,50 // Raven
|
|
// centertorso_location[41] = 0,0,50 // Rifleman
|
|
centertorso_location[40] = 540,190,50 // Ryoken
|
|
centertorso_location[41] = 540,190,50
|
|
centertorso_location[42] = 540,190,50 // Solitaire
|
|
centertorso_location[43] = 540,190,50 // Sunder
|
|
centertorso_location[44] = 540,190,50 // Templar
|
|
centertorso_location[45] = 540,190,50
|
|
centertorso_location[46] = 540,190,50
|
|
centertorso_location[47] = 540,190,50 // Uller
|
|
centertorso_location[48] = 0,0,50 // Uziel
|
|
centertorso_location[49] = 540,190,50 // Victor
|
|
centertorso_location[50] = 0,0,50 // Vulture
|
|
centertorso_location[51] = 540,190,50 // Wolfhound
|
|
centertorso_location[52] = 540,190,50 // Zeus
|
|
centertorso_location[53] = 0,0,50
|
|
|
|
position righttorso_location[mech_num]
|
|
righttorso_location[0] = 475,240,50 // Arcticwolf
|
|
righttorso_location[1] = 475,240,50 // Ares
|
|
righttorso_location[2] = 475,100,50 // Argus
|
|
righttorso_location[3] = 475,100,50 // Atlas
|
|
righttorso_location[4] = 475,100,50 // Awesome
|
|
righttorso_location[5] = 475,100,50 // Black Knight
|
|
righttorso_location[6] = 475,100,50 // Black Lanner
|
|
righttorso_location[7] = 475,100,50 // Brigand
|
|
righttorso_location[8] = 475,100,50 // Bushwacker
|
|
righttorso_location[9] = 475,100,50 // Catapult
|
|
righttorso_location[10] = 475,240,50 // Cauldronborn
|
|
righttorso_location[11] = 475,100,50 // Chimera
|
|
righttorso_location[12] = 475,100,50 // Commando
|
|
righttorso_location[13] = 475,100,50 // Cougar
|
|
righttorso_location[14] = 475,240,50 // Cyclops
|
|
righttorso_location[15] = 475,100,50 // Daishi
|
|
// righttorso_location[16] = 475,100,50 // Dasher
|
|
righttorso_location[16] = 475,240,50 // Deimos
|
|
righttorso_location[17] = 475,100,50 // Dragon
|
|
righttorso_location[18] = 475,100,50 // Fafnir
|
|
righttorso_location[19] = 475,100,50 // Flea
|
|
righttorso_location[20] = 475,100,50 // Gladiator
|
|
righttorso_location[21] = 475,100,50 // Grizzly
|
|
righttorso_location[22] = 475,240,50 // Hauptmann
|
|
righttorso_location[23] = 475,100,50 // Hellhound
|
|
righttorso_location[24] = 475,190,50
|
|
righttorso_location[25] = 475,100,50 // Highlander
|
|
righttorso_location[26] = 475,100,50 // Hollander II
|
|
righttorso_location[27] = 475,190,50 // Hunchback
|
|
righttorso_location[28] = 475,100,50 // Kodiak
|
|
righttorso_location[29] = 475,190,50
|
|
righttorso_location[30] = 475,100,50 // Longbow
|
|
righttorso_location[31] = 475,240,50 // Madcat
|
|
righttorso_location[32] = 475,240,50
|
|
righttorso_location[33] = 475,100,50 // Masakari
|
|
righttorso_location[34] = 475,100,50
|
|
righttorso_location[35] = 475,100,50
|
|
righttorso_location[36] = 475,100,50
|
|
righttorso_location[37] = 475,100,50 // Owens
|
|
righttorso_location[38] = 475,100,50 // Puma
|
|
righttorso_location[39] = 475,100,50
|
|
// righttorso_location[41] = 475,240,50 // Rifleman
|
|
righttorso_location[40] = 475,100,50 // Ryoken
|
|
righttorso_location[41] = 475,100,50
|
|
righttorso_location[42] = 475,240,50 // Solitaire
|
|
righttorso_location[43] = 475,100,50 // Sunder
|
|
righttorso_location[44] = 475,100,50 // Templar
|
|
righttorso_location[45] = 475,100,50
|
|
righttorso_location[46] = 475,100,50 // Thor
|
|
righttorso_location[47] = 475,100,50 // Uller
|
|
righttorso_location[48] = 475,100,50 // Uziel
|
|
righttorso_location[49] = 475,100,50 // Victor
|
|
righttorso_location[50] = 475,100,50 // Vulture
|
|
righttorso_location[51] = 475,100,50 // Wolfhound
|
|
righttorso_location[52] = 475,100,50 // Zeus
|
|
righttorso_location[53] = 0,0,50
|
|
|
|
position leftarm_location[mech_num]
|
|
leftarm_location[0] = 700,190,50 // Arcticwolf
|
|
leftarm_location[1] = 700,190,50 // Ares
|
|
leftarm_location[2] = 700,190,50 // Argus
|
|
leftarm_location[3] = 700,190,50 // Atlas
|
|
leftarm_location[4] = 700,190,50 // Awesome
|
|
leftarm_location[5] = 700,190,50 // Black Knight
|
|
leftarm_location[6] = 700,190,50 // Black Lanner
|
|
leftarm_location[7] = 700,190,50 // Brigand
|
|
leftarm_location[8] = 700,190,50 // Bushwacker
|
|
leftarm_location[9] = 700,190,50 // Catapult
|
|
leftarm_location[10] = 700,190,50 // Cauldronborn
|
|
leftarm_location[11] = 700,190,50 // Chimera
|
|
leftarm_location[12] = 700,190,50 // Commando
|
|
leftarm_location[13] = 700,190,50 // Cougar
|
|
leftarm_location[14] = 700,190,50 // Cyclops
|
|
leftarm_location[15] = 700,190,50 // Daishi
|
|
// leftarm_location[16] = 700,190,50 // Dasher
|
|
leftarm_location[16] = 700,190,50 // Deimos
|
|
leftarm_location[17] = 700,190,50 // Dragon
|
|
leftarm_location[18] = 700,190,50 // Fafnir
|
|
leftarm_location[19] = 700,190,50 // Flea
|
|
leftarm_location[20] = 700,190,50 // Gladiator
|
|
leftarm_location[21] = 700,190,50 // Grizzly
|
|
leftarm_location[22] = 700,190,50 // Hauptmann
|
|
leftarm_location[23] = 700,190,50 // Hellhound
|
|
leftarm_location[24] = 700,190,50
|
|
leftarm_location[25] = 700,190,50 // Highlander
|
|
leftarm_location[26] = 700,190,50 // Hollander
|
|
leftarm_location[27] = 700,190,50 // Hunchback
|
|
leftarm_location[28] = 700,190,50 // Kodiak
|
|
leftarm_location[29] = 700,190,50
|
|
leftarm_location[30] = 700,190,50 // Longbow
|
|
leftarm_location[31] = 700,190,50 // Madcat
|
|
leftarm_location[32] = 700,190,50
|
|
leftarm_location[33] = 700,190,50 // Masakari
|
|
leftarm_location[34] = 700,190,50
|
|
leftarm_location[35] = 700,190,50
|
|
leftarm_location[36] = 700,190,50
|
|
leftarm_location[37] = 700,190,50 // Owens
|
|
leftarm_location[38] = 700,190,50 // Puma
|
|
leftarm_location[39] = 700,190,50
|
|
// leftarm_location[41] = 700,190,50 // Rifleman
|
|
leftarm_location[40] = 700,190,50 // Ryoken
|
|
leftarm_location[41] = 700,190,50
|
|
leftarm_location[42] = 700,190,50 // Solitaire
|
|
leftarm_location[43] = 700,190,50 // Sunder
|
|
leftarm_location[44] = 700,190,50 // Templar
|
|
leftarm_location[45] = 700,190,50
|
|
leftarm_location[46] = 700,190,50 // Thor
|
|
leftarm_location[47] = 700,190,50 // Uller
|
|
leftarm_location[48] = 700,190,50 // Uziel
|
|
leftarm_location[49] = 700,190,50 // Victor
|
|
leftarm_location[50] = 700,190,50 // Vulture
|
|
leftarm_location[51] = 700,190,50 // Wolfhound
|
|
leftarm_location[52] = 700,190,50 // Zeus
|
|
leftarm_location[53] = 0,0,50
|
|
|
|
position rightarm_location[mech_num]
|
|
rightarm_location[0] = 370,190,50 // Arcticwolf
|
|
rightarm_location[1] = 370,190,50 // Ares
|
|
rightarm_location[2] = 370,190,50 // Argus
|
|
rightarm_location[3] = 370,190,50 // Atlas
|
|
rightarm_location[4] = 370,190,50 // Awesome
|
|
rightarm_location[5] = 370,190,50 // Black Knight
|
|
rightarm_location[6] = 370,190,50 // Black Lanner
|
|
rightarm_location[7] = 370,190,50 // Brigand
|
|
rightarm_location[8] = 370,190,50 // Bushwacker
|
|
rightarm_location[9] = 370,190,50 // Catapult
|
|
rightarm_location[10] = 370,190,50 // Cauldronborn
|
|
rightarm_location[11] = 370,190,50 // Chimera
|
|
rightarm_location[12] = 370,190,50 // Commando
|
|
rightarm_location[13] = 370,190,50 // Cougar
|
|
rightarm_location[14] = 370,190,50 // Cyclops
|
|
rightarm_location[15] = 370,190,50 // Daishi
|
|
// rightarm_location[16] = 370,190,50 // Dasher
|
|
rightarm_location[16] = 370,190,50 // Deimos
|
|
rightarm_location[17] = 370,190,50 // Dragon
|
|
rightarm_location[18] = 370,190,50 // Fafnir
|
|
rightarm_location[19] = 370,190,50 // Flea
|
|
rightarm_location[20] = 370,190,50 // Gladiator
|
|
rightarm_location[21] = 370,190,50 // Grizzly
|
|
rightarm_location[22] = 370,190,50 // Hauptmann
|
|
rightarm_location[23] = 370,190,50 // Hellhound
|
|
rightarm_location[24] = 370,190,50
|
|
rightarm_location[25] = 370,190,50 // Highlander
|
|
rightarm_location[26] = 370,190,50 // Hollander
|
|
rightarm_location[27] = 370,190,50 // Hunchback
|
|
rightarm_location[28] = 370,190,50 // Kodiak
|
|
rightarm_location[29] = 370,190,50
|
|
rightarm_location[30] = 370,190,50 // Longbow
|
|
rightarm_location[31] = 370,190,50 // Madcat
|
|
rightarm_location[32] = 370,190,50
|
|
rightarm_location[33] = 370,190,50 // Masakari
|
|
rightarm_location[34] = 370,190,50
|
|
rightarm_location[35] = 370,190,50
|
|
rightarm_location[36] = 370,190,50
|
|
rightarm_location[37] = 370,190,50 // Owens
|
|
rightarm_location[38] = 370,190,50 // Puma
|
|
rightarm_location[39] = 370,190,50
|
|
// rightarm_location[41] = 370,190,50 // Rifleman
|
|
rightarm_location[40] = 370,190,50 // Ryoken
|
|
rightarm_location[41] = 370,190,50
|
|
rightarm_location[42] = 370,190,50 // Solitaire
|
|
rightarm_location[43] = 370,190,50 // Sunder
|
|
rightarm_location[44] = 370,190,50 // Templar
|
|
rightarm_location[45] = 370,190,50 // Thanatos
|
|
rightarm_location[46] = 370,190,50 // Thor
|
|
rightarm_location[47] = 370,190,50 // Uller
|
|
rightarm_location[48] = 370,190,50 // Uziel
|
|
rightarm_location[49] = 370,190,50 // Victor
|
|
rightarm_location[50] = 370,190,50 // Vulture
|
|
rightarm_location[51] = 370,190,50 // Wolfhound
|
|
rightarm_location[52] = 370,190,50 // Zeus
|
|
rightarm_location[53] = 0,0,50
|
|
|
|
position special1_location[mech_num]
|
|
special1_location[0] = 605,100,50 // Arcticwolf
|
|
special1_location[1] = 540,290,50 // Ares
|
|
special1_location[2] = 0,0,50 // Argus
|
|
special1_location[3] = 475,350,50 // Atlas
|
|
special1_location[4] = 0,0,50 // Awesome
|
|
special1_location[5] = 0,0,50 // Black Knight
|
|
special1_location[6] = 605,100,50 // Black Lanner
|
|
special1_location[7] = 605,100,50 // Brigand
|
|
special1_location[8] = 605,100,50 // Bushwacker
|
|
special1_location[9] = 0,0,50 // Catapult
|
|
special1_location[10] = 605,100,50 // Cauldronborn
|
|
special1_location[11] = 0,0,50 // Chimera
|
|
special1_location[12] = 0,0,50 // Commando
|
|
special1_location[13] = 0,0,50 // Cougar
|
|
special1_location[14] = 475,100,50 // Cyclops
|
|
special1_location[15] = 605,100,50 // Daishi
|
|
// special1_location[16] = 0,0,50 // Dasher
|
|
special1_location[16] = 605,100,50 // Deimos
|
|
special1_location[17] = 0,0,50 // Dragon
|
|
special1_location[18] = 0,0,50 // Fafnir
|
|
special1_location[19] = 0,0,50 // Flea
|
|
special1_location[20] = 0,0,50 // Gladiator
|
|
special1_location[21] = 605,100,50 // Grizzly
|
|
special1_location[22] = 475,100,50 // Hauptmann
|
|
special1_location[23] = 0,0,50 // Hellhound
|
|
special1_location[24] = 475,100,50
|
|
special1_location[25] = 0,0,50 // Highlander
|
|
special1_location[26] = 475,100,50 // Hollander II
|
|
special1_location[27] = 475,100,50 // Hunchback
|
|
special1_location[28] = 0,0,50 // Kodiak
|
|
special1_location[29] = 475,100,50
|
|
special1_location[30] = 0,0,50 // Longbow
|
|
special1_location[31] = 605,100,50 // Madcat
|
|
special1_location[32] = 605,100,50
|
|
special1_location[33] = 0,0,50 // Masakari
|
|
special1_location[34] = 0,0,50
|
|
special1_location[35] = 0,0,50
|
|
special1_location[36] = 540,190,50
|
|
special1_location[37] = 0,0,50 // Owens
|
|
special1_location[38] = 0,0,50 // Puma
|
|
special1_location[39] = 0,0,50
|
|
// special1_location[41] = 540,190,50 // Rifleman
|
|
special1_location[40] = 0,0,50 // Ryoken
|
|
special1_location[41] = 0,0,50
|
|
special1_location[42] = 475,100,50 // Solitaire
|
|
special1_location[43] = 0,0,50 // Sunder
|
|
special1_location[44] = 0,0,50 // Templar
|
|
special1_location[45] = 0,0,50
|
|
special1_location[46] = 605,100,50 // Thor
|
|
special1_location[47] = 0,0,50 // Uller
|
|
special1_location[48] = 540,100,50 // Uziel
|
|
special1_location[49] = 0,0,50 // Victor
|
|
special1_location[50] = 540,190,50 // Vulture
|
|
special1_location[51] = 0,0,50 // Wolfhound
|
|
special1_location[52] = 0,0,50 // Zeus
|
|
special1_location[53] = 0,0,50
|
|
|
|
position special2_location[mech_num]
|
|
special2_location[0] = 475,100,50 // Arcticwolf
|
|
special2_location[1] = 540,80,50 // Ares
|
|
special2_location[2] = 0,0,50 // Argus
|
|
special2_location[3] = 605,410,50 // Atlas
|
|
special2_location[4] = 0,0,50 // Awesome
|
|
special2_location[5] = 0,0,50 // Black Knight
|
|
special2_location[6] = 475,100,50 // Black Lanner
|
|
special2_location[7] = 475,100,50 // Brigand
|
|
special2_location[8] = 0,0,50 // Bushwacker
|
|
special2_location[9] = 0,0,50 // Catapult
|
|
special2_location[10] = 475,100,50 // Cauldronborn
|
|
special2_location[11] = 0,0,50 // Chimera
|
|
special2_location[12] = 0,0,50 // Commando
|
|
special2_location[13] = 0,0,50 // Cougar
|
|
special2_location[14] = 0,0,50 // Cyclops
|
|
special2_location[15] = 0,0,50 // Daishi
|
|
// special2_location[16] = 0,0,50 // Dasher
|
|
special2_location[16] = 475,100,50 // Deimos
|
|
special2_location[17] = 0,0,50 // Dragon
|
|
special2_location[18] = 0,0,50 // Fafnir
|
|
special2_location[19] = 0,0,50 // Flea
|
|
special2_location[20] = 0,0,50 // Gladiator
|
|
special2_location[21] = 475,100,50 // Grizzly
|
|
special2_location[22] = 0,0,50 // Hauptmann
|
|
special2_location[23] = 0,0,50 // Hellhound
|
|
special2_location[24] = 0,0,50
|
|
special2_location[25] = 0,0,50 // Highlander
|
|
special2_location[26] = 540,190,50 // Hollander II
|
|
special2_location[27] = 0,0,50 // Hunchback
|
|
special2_location[28] = 0,0,50 // Kodiak
|
|
special2_location[29] = 0,0,50
|
|
special2_location[30] = 0,0,50 // Longbow
|
|
special2_location[31] = 475,100,50 // Madcat
|
|
special2_location[32] = 475,100,50
|
|
special2_location[33] = 0,0,50 // Masakari
|
|
special2_location[34] = 0,0,50
|
|
special2_location[35] = 0,0,50
|
|
special2_location[36] = 540,260,50
|
|
special2_location[37] = 0,0,50 // Owens
|
|
special2_location[38] = 0,0,50 // Puma
|
|
special2_location[39] = 0,0,50
|
|
// special2_location[41] = 0,0,50 // Rifleman
|
|
special2_location[40] = 0,0,50 // Ryoken
|
|
special2_location[41] = 0,0,50
|
|
special2_location[42] = 0,0,50 // Solitaire
|
|
special2_location[43] = 0,0,50 // Sunder
|
|
special2_location[44] = 0,0,50 // Templar
|
|
special2_location[45] = 0,0,50
|
|
special2_location[46] = 0,0,50 // Thor
|
|
special2_location[47] = 0,0,50 // Uller
|
|
special2_location[48] = 0,0,50 // Uziel
|
|
special2_location[49] = 0,0,50 // Victor
|
|
special2_location[50] = 0,0,50 // Vulture
|
|
special2_location[51] = 0,0,50 // Wolfhound
|
|
special2_location[52] = 0,0,50 // Zeus
|
|
special2_location[53] = 0,0,50
|
|
|
|
string location_label[8]
|
|
location_label[0] = ""
|
|
location_label[1] = ""
|
|
location_label[2] = localize$(IDS_ML_WP_LARM)
|
|
location_label[3] = localize$(IDS_ML_WP_RARM)
|
|
location_label[4] = localize$(IDS_ML_WP_RTORSO)
|
|
location_label[5] = localize$(IDS_ML_WP_LTORSO)
|
|
location_label[6] = localize$(IDS_ML_WP_CTORSO)
|
|
location_label[7] = localize$(IDS_ML_WP_HEAD)
|
|
|
|
string special1_label[mech_num]
|
|
special1_label[0] = localize$(IDS_ML_WP_MISSILERACK) // Arcticwolf
|
|
special1_label[1] = localize$(IDS_ML_WP_OMNIRACK) // Ares
|
|
special1_label[3] = localize$(IDS_ML_WP_GUNRACK) // Atlas
|
|
special1_label[6] = localize$(IDS_ML_WP_MISSILERACK) // Black Lanner
|
|
special1_label[7] = localize$(IDS_ML_WP_MISSILERACK) // Brigand
|
|
special1_label[8] = localize$(IDS_ML_WP_MISSILERACK) // Bushwacker
|
|
special1_label[10] = localize$(IDS_ML_WP_MISSILERACK) // cauldron-born
|
|
special1_label[14] = localize$(IDS_ML_WP_OMNIRACK) // Cyclops
|
|
special1_label[15] = localize$(IDS_ML_WP_MISSILERACK) // Daishi
|
|
special1_label[16] = localize$(IDS_ML_WP_MISSILERACK) // Deimos
|
|
special1_label[22] = localize$(IDS_ML_WP_GUNRACK) // Hauptmann
|
|
special1_label[24] = localize$(IDS_ML_WP_MISSILERACK) // Hellspawn
|
|
special1_label[26] = localize$(IDS_ML_WP_GUNRACK) // Hollander II
|
|
special1_label[27] = localize$(IDS_ML_WP_GUNRACK) // Hunchback
|
|
special1_label[29] = localize$(IDS_ML_WP_MISSILERACK) // Loki
|
|
special1_label[31] = localize$(IDS_ML_WP_MISSILERACK) // Madcat
|
|
special1_label[32] = localize$(IDS_ML_WP_MISSILERACK) // Madcat MK II
|
|
special1_label[36] = localize$(IDS_ML_WP_GUNRACK) // Osiris
|
|
// special1_label[41] = localize$(IDS_ML_WP_OMNIRACK) // Rifleman
|
|
special1_label[42] = localize$(IDS_ML_WP_GUNRACK) // Solitaire
|
|
special1_label[46] = localize$(IDS_ML_WP_MISSILERACK) // Thor
|
|
special1_label[48] = localize$(IDS_ML_WP_MISSILERACK) // Uziel
|
|
special1_label[50] = localize$(IDS_ML_WP_OMNIRACK) // Vulture
|
|
|
|
string special2_label[mech_num]
|
|
special2_label[0] = localize$(IDS_ML_WP_MISSILERACK) // Arcticwolf
|
|
special2_label[1] = localize$(IDS_ML_WP_MISSILERACK) // Ares
|
|
special2_label[3] = localize$(IDS_ML_WP_MISSILERACK) // Atlas
|
|
special2_label[6] = localize$(IDS_ML_WP_MISSILERACK) // Black Lanner
|
|
special2_label[7] = localize$(IDS_ML_WP_MISSILERACK) // Brigand
|
|
special2_label[10] = localize$(IDS_ML_WP_MISSILERACK) // cauldron-born
|
|
special2_label[16] = localize$(IDS_ML_WP_MISSILERACK) // Deimos
|
|
special2_label[26] = localize$(IDS_ML_WP_BEAMRACK) // Hollander II
|
|
special2_label[31] = localize$(IDS_ML_WP_MISSILERACK) // Madcat
|
|
special2_label[32] = localize$(IDS_ML_WP_MISSILERACK) // Madcat MK II
|
|
special2_label[36] = localize$(IDS_ML_WP_BEAMRACK) // Osiris
|
|
|
|
object headweapons = s_weapon_slot
|
|
headweapons.label = location_label[7]
|
|
headweapons.id = 230
|
|
|
|
object lefttorsoweapons = s_weapon_slot
|
|
lefttorsoweapons.label = location_label[5]
|
|
lefttorsoweapons.id = 231
|
|
|
|
object centertorsoweapons = s_weapon_slot
|
|
centertorsoweapons.label = location_label[6]
|
|
centertorsoweapons.id = 232
|
|
|
|
object righttorsoweapons = s_weapon_slot
|
|
righttorsoweapons.label = location_label[4]
|
|
righttorsoweapons.id = 233
|
|
|
|
object leftarmweapons = s_weapon_slot
|
|
leftarmweapons.label = location_label[2]
|
|
leftarmweapons.id = 234
|
|
|
|
object rightarmweapons = s_weapon_slot
|
|
rightarmweapons.label = location_label[3]
|
|
rightarmweapons.id = 235
|
|
|
|
object special1weapons = s_weapon_slot
|
|
special1weapons.id = 236
|
|
|
|
object special2weapons = s_weapon_slot
|
|
special2weapons.id = 237
|
|
|
|
//////////////////////////////////////////////////////
|
|
|
|
// Icon display for selected weapon
|
|
object o_weapon_pointer = weapon_pointer
|
|
o_weapon_pointer.location = 0, 0, 200
|
|
deactivate(o_weapon_pointer)
|
|
|
|
object o_weapon_mask = weapon_mask
|
|
o_weapon_mask.location = 0, 0, 40
|
|
o_weapon_mask.region = 0,0 to 0,0
|
|
deactivate(o_weapon_mask)
|
|
|
|
// SUPPORT FOR DEACTIVATING GROUP & STRIP BUTTONS WHEN THERE ARE NO MOUNTED WEAPONS
|
|
|
|
int grp_array_size = 30
|
|
int grp_typearray[grp_array_size]
|
|
int grp_id_array[grp_array_size]
|
|
int grp_loc_array[grp_array_size]
|
|
int grp_group1_array[grp_array_size]
|
|
int grp_group2_array[grp_array_size]
|
|
int grp_group3_array[grp_array_size]
|
|
int grp_group4_array[grp_array_size]
|
|
int grp_group5_array[grp_array_size]
|
|
int grp_group6_array[grp_array_size]
|
|
int grp_num_weapons
|
|
callback($$ML_CallbackHandler$$, MLDataGetWeaponGroups, grp_typearray[], grp_id_array[], grp_loc_array[], grp_group1_array[], grp_group2_array[], grp_group3_array[], grp_group4_array[], grp_group5_array[], grp_group6_array[], grp_num_weapons, grp_array_size)
|
|
|
|
// SUPPORT FOR KEEPING THE LIST WHERE IT SHOULD BE WHEN ACTIVATING
|
|
int top_of_list
|
|
|
|
framerate = 5
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if CurrentList != o_weaponsdroplistbox.nselected
|
|
{
|
|
// Kill all list box buttons
|
|
for w = 0; w < o_weaponslistbox.list_size; w++
|
|
{
|
|
kill o_weaponslistbox.list_button[w]
|
|
}
|
|
|
|
if o_weaponsdroplistbox.nselected == 0
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupAllWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 1
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupBeamWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 2
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupProjectileWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 3
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupMissileWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
|
|
initialize(this)
|
|
|
|
CurrentList = o_weaponsdroplistbox.nselected
|
|
}
|
|
}
|
|
|
|
GUI_INIT
|
|
{
|
|
mech_id = parent.mech_id
|
|
|
|
callback($$ML_CallbackHandler$$, MLDataSetupLeftArm, la_ids[], la_unique_id[], la_slots[], la_slot_size[], la_ton[], la_damage[], la_range[], la_heat[], la_recycle[], la_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupRightArm, ra_ids[], ra_unique_id[], ra_slots[], ra_slot_size[], ra_ton[], ra_damage[], ra_range[], ra_heat[], ra_recycle[], ra_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupLeftLeg, ll_ids[], ll_unique_id[], ll_slots[], ll_slot_size[], ll_ton[], ll_damage[], ll_range[], ll_heat[], ll_recycle[], ll_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupRightLeg, rl_ids[], rl_unique_id[], rl_slots[], rl_slot_size[], rl_ton[], rl_damage[], rl_range[], rl_heat[], rl_recycle[], rl_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupLeftTorso, lt_ids[], lt_unique_id[], lt_slots[], lt_slot_size[], lt_ton[], lt_damage[], lt_range[], lt_heat[], lt_recycle[], lt_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupRightTorso, rt_ids[], rt_unique_id[], rt_slots[], rt_slot_size[], rt_ton[], rt_damage[], rt_range[], rt_heat[], rt_recycle[], rt_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupCenterTorso, ct_ids[], ct_unique_id[], ct_slots[], ct_slot_size[], ct_ton[], ct_damage[], ct_range[], ct_heat[], ct_recycle[], ct_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupHead, h_ids[], h_unique_id[], h_slots[], h_slot_size[], h_ton[], h_damage[], h_range[], h_heat[], h_recycle[], h_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupSpecial1, s1_ids[], s1_unique_id[], s1_slots[], s1_slot_size[], s1_ton[], s1_damage[], s1_range[], s1_heat[], s1_recycle[], s1_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupSpecial2, s2_ids[], s2_unique_id[], s2_slots[], s2_slot_size[], s2_ton[], s2_damage[], s2_range[], s2_heat[], s2_recycle[], s2_num_weap, 10)
|
|
|
|
if $$m_isCampaign$$ == 1
|
|
{
|
|
if o_weaponsdroplistbox.nselected == 0
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupAllWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 1
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupBeamWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 2
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupProjectileWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 3
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupMissileWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
}
|
|
|
|
if (num_weap == 0)
|
|
{
|
|
for (w = 0; w < o_weaponslistbox.list_size; w++)
|
|
{
|
|
kill o_weaponslistbox.list_button[w]
|
|
}
|
|
o_weaponslistbox.list_size = 0
|
|
}
|
|
else
|
|
{
|
|
o_weaponslistbox.list_size = num_weap
|
|
counter = 0
|
|
for w = 0; w < num_weap; w++
|
|
{
|
|
if ids[w] > -1
|
|
{
|
|
o_weaponslistbox.column[0].list_item[counter] = conv$(ids[w])
|
|
o_weaponslistbox.column[1].list_item[counter] = weapon_names[ids[w]]
|
|
ton_times_ten = ton[w] * 10.0
|
|
ton_int_times_ten = ton[w] * 10
|
|
ton_decimal_times_ten = ton_times_ten - ton_int_times_ten
|
|
o_weaponslistbox.column[2].list_item[counter] = conv$(ton[w]) "." conv$(ton_decimal_times_ten)
|
|
if inventory_count[w] > -1
|
|
{
|
|
o_weaponslistbox.column[3].list_item[counter] = conv$(inventory_count[w])
|
|
}
|
|
else
|
|
{
|
|
o_weaponslistbox.column[3].list_item[counter] = "-"
|
|
}
|
|
o_weaponslistbox.list_order[counter] = counter
|
|
counter++
|
|
}
|
|
else
|
|
{
|
|
o_weaponslistbox.list_size--
|
|
}
|
|
}
|
|
|
|
greatest_x = 0
|
|
greatest_y = 0
|
|
int k
|
|
for k = 0; k < o_weaponslistbox.list_size; k++
|
|
{
|
|
o_weaponslistbox.column[0].list_icon[k] = MB_GPATH "weapon_" o_weaponslistbox.column[0].list_item[k] ".tga",1,volatile
|
|
// o_weaponslistbox.column[0].list_icon[k] = MB_GPATH "weapon_" conv$(ids[k]) ".tga",1,volatile
|
|
alphamode(o_weaponslistbox.column[0].list_icon[k]) = am_alpha_alphainvalpha
|
|
|
|
if exists(o_weaponslistbox.column[0].list_icon[k])
|
|
{
|
|
if getwidth(o_weaponslistbox.column[0].list_icon[k]) > greatest_x
|
|
greatest_x = getwidth(o_weaponslistbox.column[0].list_icon[k])
|
|
|
|
if getheight(o_weaponslistbox.column[0].list_icon[k]) > greatest_y
|
|
greatest_y = getheight(o_weaponslistbox.column[0].list_icon[k])
|
|
}
|
|
|
|
}
|
|
if greatest_x > 0 && greatest_y > 0
|
|
bitmap_create black = greatest_x,greatest_y //comment out if you don't have any images
|
|
}
|
|
|
|
if parent.o_tabs.on_tab == 1
|
|
{
|
|
initialize(o_weaponslistbox)
|
|
}
|
|
|
|
o_weaponslistbox.column[0].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[1].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[2].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[3].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
|
|
o_weaponslistbox.column[0].o_header.s_text = localize$(IDS_ML_WP_SLOTS)
|
|
o_weaponslistbox.column[1].o_header.s_text = localize$(IDS_ML_WP_NAME)
|
|
o_weaponslistbox.column[2].o_header.s_text = localize$(IDS_ML_WP_TONS)
|
|
o_weaponslistbox.column[3].o_header.s_text = "#"
|
|
|
|
// Because the icons have been changed since our last
|
|
// initialize() call on o_weaponslistbox
|
|
// this mail message is to refresh the weapon list box to
|
|
// avoid the clipping problem at the bottom of the list box
|
|
mail(-1, o_weaponslistbox)
|
|
}
|
|
|
|
|
|
GUI_ACTIVATE
|
|
{
|
|
float mech_tonnage
|
|
float mech_max_tonnage
|
|
int battle_value
|
|
int armor_value
|
|
int speed_value
|
|
int heat_eff
|
|
|
|
if $$m_isCampaign$$ == 1
|
|
{
|
|
int top_before = top_of_list
|
|
|
|
if o_weaponsdroplistbox.nselected == 0
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupAllWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 1
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupBeamWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 2
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupProjectileWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if o_weaponsdroplistbox.nselected == 3
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLDataSetupMissileWeapons, ids[], slots[], slot_size[], ton[], damage[], range[], heat[], weapon_recycle[], inventory_count[], num_weap, 100)
|
|
}
|
|
if (num_weap == 0)
|
|
{
|
|
for (w = 0; w < o_weaponslistbox.list_size; w++)
|
|
{
|
|
kill o_weaponslistbox.list_button[w]
|
|
}
|
|
|
|
o_weaponslistbox.list_size = 0
|
|
}
|
|
else
|
|
{
|
|
o_weaponslistbox.list_size = num_weap
|
|
counter = 0
|
|
for w = 0; w < num_weap; w++
|
|
{
|
|
if ids[w] > -1
|
|
{
|
|
o_weaponslistbox.column[0].list_item[counter] = conv$(ids[w])
|
|
o_weaponslistbox.column[1].list_item[counter] = weapon_names[ids[w]]
|
|
ton_times_ten = ton[w] * 10.0
|
|
ton_int_times_ten = ton[w] * 10
|
|
ton_decimal_times_ten = ton_times_ten - ton_int_times_ten
|
|
o_weaponslistbox.column[2].list_item[counter] = conv$(ton[w]) "." conv$(ton_decimal_times_ten)
|
|
o_weaponslistbox.column[3].list_item[counter] = conv$(inventory_count[w])
|
|
o_weaponslistbox.list_order[counter] = counter
|
|
counter++
|
|
}
|
|
else
|
|
{
|
|
o_weaponslistbox.list_size--
|
|
}
|
|
}
|
|
|
|
greatest_x = 0
|
|
greatest_y = 0
|
|
int k
|
|
for k = 0; k < o_weaponslistbox.list_size; k++
|
|
{
|
|
o_weaponslistbox.column[0].list_icon[k] = MB_GPATH "weapon_" o_weaponslistbox.column[0].list_item[k] ".tga",1,volatile
|
|
// o_weaponslistbox.column[0].list_icon[k] = MB_GPATH "weapon_" conv$(ids[k]) ".tga",1,volatile
|
|
alphamode(o_weaponslistbox.column[0].list_icon[k]) = am_alpha_alphainvalpha
|
|
|
|
if exists(o_weaponslistbox.column[0].list_icon[k])
|
|
{
|
|
if getwidth(o_weaponslistbox.column[0].list_icon[k]) > greatest_x
|
|
greatest_x = getwidth(o_weaponslistbox.column[0].list_icon[k])
|
|
|
|
if getheight(o_weaponslistbox.column[0].list_icon[k]) > greatest_y
|
|
greatest_y = getheight(o_weaponslistbox.column[0].list_icon[k])
|
|
}
|
|
|
|
}
|
|
if greatest_x > 0 && greatest_y > 0
|
|
bitmap_create black = greatest_x,greatest_y //comment out if you don't have any images
|
|
}
|
|
|
|
initialize(o_weaponslistbox)
|
|
|
|
if parent.o_tabs.on_tab == 1
|
|
{
|
|
if (num_weap != 0)
|
|
{
|
|
if num_weap < top_before
|
|
{
|
|
mail(-4, num_weap, o_weaponslistbox)
|
|
}
|
|
else
|
|
{
|
|
mail(-4, top_before, o_weaponslistbox)
|
|
}
|
|
}
|
|
}
|
|
|
|
o_weaponslistbox.column[0].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[1].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[2].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
o_weaponslistbox.column[3].o_header.f_font = FPATH localize$(IDS_F_ML_LABEL)
|
|
|
|
o_weaponslistbox.column[0].o_header.s_text = localize$(IDS_ML_WP_SLOTS)
|
|
o_weaponslistbox.column[1].o_header.s_text = localize$(IDS_ML_WP_NAME)
|
|
o_weaponslistbox.column[2].o_header.s_text = localize$(IDS_ML_WP_TONS)
|
|
o_weaponslistbox.column[3].o_header.s_text = "#"
|
|
|
|
// Because the icons have been changed since our last
|
|
// initialize() call on o_weaponslistbox
|
|
// this mail message is to refresh the weapon list box to
|
|
// avoid the clipping problem at the bottom of the list box
|
|
mail(-1, o_weaponslistbox)
|
|
}
|
|
|
|
|
|
callback($$ML_CallbackHandler$$, MLDataSetupGetMechData, mech_id, mech_tonnage, mech_max_tonnage, battle_value, heat_eff, speed_value, armor_value)
|
|
|
|
callback($$ML_CallbackHandler$$, MLDataSetupLeftArm, la_ids[], la_unique_id[], la_slots[], la_slot_size[], la_ton[], la_damage[], la_range[], la_heat[], la_recycle[], la_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupRightArm, ra_ids[], ra_unique_id[], ra_slots[], ra_slot_size[], ra_ton[], ra_damage[], ra_range[], ra_heat[], ra_recycle[], ra_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupLeftLeg, ll_ids[], ll_unique_id[], ll_slots[], ll_slot_size[], ll_ton[], ll_damage[], ll_range[], ll_heat[], ll_recycle[], ll_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupRightLeg, rl_ids[], rl_unique_id[], rl_slots[], rl_slot_size[], rl_ton[], rl_damage[], rl_range[], rl_heat[], rl_recycle[], rl_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupLeftTorso, lt_ids[], lt_unique_id[], lt_slots[], lt_slot_size[], lt_ton[], lt_damage[], lt_range[], lt_heat[], lt_recycle[], lt_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupRightTorso, rt_ids[], rt_unique_id[], rt_slots[], rt_slot_size[], rt_ton[], rt_damage[], rt_range[], rt_heat[], rt_recycle[], rt_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupCenterTorso, ct_ids[], ct_unique_id[], ct_slots[], ct_slot_size[], ct_ton[], ct_damage[], ct_range[], ct_heat[], ct_recycle[], ct_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupHead, h_ids[], h_unique_id[], h_slots[], h_slot_size[], h_ton[], h_damage[], h_range[], h_heat[], h_recycle[], h_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupSpecial1, s1_ids[], s1_unique_id[], s1_slots[], s1_slot_size[], s1_ton[], s1_damage[], s1_range[], s1_heat[], s1_recycle[], s1_num_weap, 10)
|
|
callback($$ML_CallbackHandler$$, MLDataSetupSpecial2, s2_ids[], s2_unique_id[], s2_slots[], s2_slot_size[], s2_ton[], s2_damage[], s2_range[], s2_heat[], s2_recycle[], s2_num_weap, 10)
|
|
|
|
|
|
leftarmweapons.num_of_weapons = la_num_weap
|
|
leftarmweapons.location = leftarm_location[mech_id]
|
|
|
|
for int law = 0; law < la_num_weap; law++
|
|
{
|
|
leftarmweapons.slot_value[law] = la_ids[law]
|
|
leftarmweapons.num_of_slots[law] = la_slot_size[law]
|
|
leftarmweapons.slot_type[law] = la_slots[law]
|
|
leftarmweapons.unique_id[law] = la_unique_id[law]
|
|
leftarmweapons.range[law] = la_range[law]
|
|
leftarmweapons.damage[law] = la_damage[law]
|
|
leftarmweapons.heat[law] = la_heat[law]
|
|
leftarmweapons.recycle[law] = la_recycle[law]
|
|
leftarmweapons.zone = 2
|
|
}
|
|
initialize(leftarmweapons)
|
|
|
|
rightarmweapons.num_of_weapons = ra_num_weap
|
|
rightarmweapons.location = rightarm_location[mech_id]
|
|
|
|
for int raw = 0; raw < ra_num_weap; raw++
|
|
{
|
|
rightarmweapons.slot_value[raw] = ra_ids[raw]
|
|
rightarmweapons.num_of_slots[raw] = ra_slot_size[raw]
|
|
rightarmweapons.slot_type[raw] = ra_slots[raw]
|
|
rightarmweapons.unique_id[raw] = ra_unique_id[raw]
|
|
rightarmweapons.range[raw] = ra_range[raw]
|
|
rightarmweapons.damage[raw] = ra_damage[raw]
|
|
rightarmweapons.heat[raw] = ra_heat[raw]
|
|
rightarmweapons.recycle[raw] = ra_recycle[raw]
|
|
rightarmweapons.zone = 3
|
|
}
|
|
initialize(rightarmweapons)
|
|
|
|
lefttorsoweapons.num_of_weapons = lt_num_weap
|
|
lefttorsoweapons.location = lefttorso_location[mech_id]
|
|
|
|
for int ltw = 0; ltw < lt_num_weap; ltw++
|
|
{
|
|
lefttorsoweapons.slot_value[ltw] = lt_ids[ltw]
|
|
lefttorsoweapons.num_of_slots[ltw] = lt_slot_size[ltw]
|
|
lefttorsoweapons.slot_type[ltw] = lt_slots[ltw]
|
|
lefttorsoweapons.unique_id[ltw] = lt_unique_id[ltw]
|
|
lefttorsoweapons.range[ltw] = lt_range[ltw]
|
|
lefttorsoweapons.damage[ltw] = lt_damage[ltw]
|
|
lefttorsoweapons.heat[ltw] = lt_heat[ltw]
|
|
lefttorsoweapons.recycle[ltw] = lt_recycle[ltw]
|
|
lefttorsoweapons.zone = 5
|
|
}
|
|
initialize(lefttorsoweapons)
|
|
|
|
centertorsoweapons.num_of_weapons = ct_num_weap
|
|
centertorsoweapons.location = centertorso_location[mech_id]
|
|
|
|
for int ctw = 0; ctw < ct_num_weap; ctw++
|
|
{
|
|
centertorsoweapons.slot_value[ctw] = ct_ids[ctw]
|
|
centertorsoweapons.num_of_slots[ctw]= ct_slot_size[ctw]
|
|
centertorsoweapons.slot_type[ctw] = ct_slots[ctw]
|
|
centertorsoweapons.unique_id[ctw] = ct_unique_id[ctw]
|
|
centertorsoweapons.range[ctw] = ct_range[ctw]
|
|
centertorsoweapons.damage[ctw] = ct_damage[ctw]
|
|
centertorsoweapons.heat[ctw] = ct_heat[ctw]
|
|
centertorsoweapons.recycle[ctw] = ct_recycle[ctw]
|
|
centertorsoweapons.zone = 6
|
|
}
|
|
initialize(centertorsoweapons)
|
|
|
|
righttorsoweapons.num_of_weapons = rt_num_weap
|
|
righttorsoweapons.location = righttorso_location[mech_id]
|
|
|
|
for int rtw = 0; rtw < rt_num_weap; rtw++
|
|
{
|
|
righttorsoweapons.slot_value[rtw] = rt_ids[rtw]
|
|
righttorsoweapons.num_of_slots[rtw] = rt_slot_size[rtw]
|
|
righttorsoweapons.slot_type[rtw] = rt_slots[rtw]
|
|
righttorsoweapons.unique_id[rtw] = rt_unique_id[rtw]
|
|
righttorsoweapons.range[rtw] = rt_range[rtw]
|
|
righttorsoweapons.damage[rtw] = rt_damage[rtw]
|
|
righttorsoweapons.heat[rtw] = rt_heat[rtw]
|
|
righttorsoweapons.recycle[rtw] = rt_recycle[rtw]
|
|
righttorsoweapons.zone = 4
|
|
}
|
|
initialize(righttorsoweapons)
|
|
|
|
headweapons.num_of_weapons = h_num_weap
|
|
headweapons.location = head_location[mech_id]
|
|
|
|
for int hw = 0; hw < h_num_weap; hw++
|
|
{
|
|
headweapons.slot_value[hw] = h_ids[hw]
|
|
headweapons.num_of_slots[hw] = h_slot_size[hw]
|
|
headweapons.slot_type[hw] = h_slots[hw]
|
|
headweapons.unique_id[hw] = h_unique_id[hw]
|
|
headweapons.range[hw] = h_range[hw]
|
|
headweapons.damage[hw] = h_damage[hw]
|
|
headweapons.heat[hw] = h_heat[hw]
|
|
headweapons.recycle[hw] = h_recycle[hw]
|
|
headweapons.zone = 8
|
|
}
|
|
initialize(headweapons)
|
|
|
|
special1weapons.num_of_weapons = s1_num_weap
|
|
special1weapons.location = special1_location[mech_id]
|
|
special1weapons.label = special1_label[mech_id]
|
|
|
|
for int s1w = 0; s1w < s1_num_weap; s1w++
|
|
{
|
|
special1weapons.slot_value[s1w] = s1_ids[s1w]
|
|
special1weapons.num_of_slots[s1w] = s1_slot_size[s1w]
|
|
special1weapons.slot_type[s1w] = s1_slots[s1w]
|
|
special1weapons.unique_id[s1w] = s1_unique_id[s1w]
|
|
special1weapons.range[s1w] = s1_range[s1w]
|
|
special1weapons.damage[s1w] = s1_damage[s1w]
|
|
special1weapons.heat[s1w] = s1_heat[s1w]
|
|
special1weapons.recycle[s1w] = s1_recycle[s1w]
|
|
special1weapons.zone = 9
|
|
}
|
|
initialize(special1weapons)
|
|
|
|
special2weapons.num_of_weapons = s2_num_weap
|
|
special2weapons.location = special2_location[mech_id]
|
|
special2weapons.label = special2_label[mech_id]
|
|
|
|
for int s2w = 0; s2w < s2_num_weap; s2w++
|
|
{
|
|
special2weapons.slot_value[s2w] = s2_ids[s2w]
|
|
special2weapons.num_of_slots[s2w] = s2_slot_size[s2w]
|
|
special2weapons.slot_type[s2w] = s2_slots[s2w]
|
|
special2weapons.unique_id[s2w] = s2_unique_id[s2w]
|
|
special2weapons.range[s2w] = s2_range[s2w]
|
|
special2weapons.damage[s2w] = s2_damage[s2w]
|
|
special2weapons.heat[s2w] = s2_heat[s2w]
|
|
special2weapons.recycle[s2w] = s2_recycle[s2w]
|
|
special2weapons.zone = 10
|
|
}
|
|
initialize(special2weapons)
|
|
|
|
activate(o_weaponsdroplistbox)
|
|
activate(o_groupweaponsbutton)
|
|
activate(o_stripweaponsbutton)
|
|
activate(o_weaponslistbox)
|
|
activate(headweapons)
|
|
activate(lefttorsoweapons)
|
|
activate(centertorsoweapons)
|
|
activate(righttorsoweapons)
|
|
activate(leftarmweapons)
|
|
activate(rightarmweapons)
|
|
activate(special1weapons)
|
|
activate(special2weapons)
|
|
activate(o_weapon_pointer)
|
|
activate(o_weapon_mask)
|
|
|
|
mail(1)
|
|
|
|
// TURNS OFF GROUP & STRIP BUTTONS WHEN NO WEAPONS ARE MOUNTED
|
|
callback($$ML_CallbackHandler$$, MLDataGetWeaponGroups, grp_typearray[], grp_id_array[], grp_loc_array[], grp_group1_array[], grp_group2_array[], grp_group3_array[], grp_group4_array[], grp_group5_array[], grp_group6_array[], grp_num_weapons, grp_array_size)
|
|
if grp_num_weapons > 0
|
|
{
|
|
o_groupweaponsbutton.state = 0
|
|
o_stripweaponsbutton.state = 0
|
|
}
|
|
else
|
|
{
|
|
o_groupweaponsbutton.state = 3
|
|
o_stripweaponsbutton.state = 3
|
|
}
|
|
initialize(o_groupweaponsbutton)
|
|
initialize(o_stripweaponsbutton)
|
|
|
|
// IF WEAPON LOADOUT CHANGES, THEY WILL BE ASKED TO GROUP THEIR WEAPONS WHEN THEY SAVE OR EXIT
|
|
parent.grouped = 0
|
|
}
|
|
|
|
GUI_DEACTIVATE
|
|
{
|
|
deactivate(o_weaponsdroplistbox)
|
|
deactivate(o_groupweaponsbutton)
|
|
deactivate(o_stripweaponsbutton)
|
|
deactivate(o_weaponslistbox)
|
|
deactivate(headweapons)
|
|
deactivate(lefttorsoweapons)
|
|
deactivate(centertorsoweapons)
|
|
deactivate(righttorsoweapons)
|
|
deactivate(leftarmweapons)
|
|
deactivate(rightarmweapons)
|
|
deactivate(special1weapons)
|
|
deactivate(special2weapons)
|
|
deactivate(o_weapon_pointer)
|
|
deactivate(o_weapon_mask)
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
setpencolor(0xffffffff)
|
|
// drawframe 27, 172 to 312, 420
|
|
|
|
print3d_attributes = regfont, 0xffffffff, 1, 1, 1, 0, 0
|
|
print3d_margins = noneditx + 20, nonedity to 780, 500
|
|
print3d_position = noneditx + 20, 425
|
|
print3d localize$(IDS_ML_WP_BEAM)
|
|
print3d_position = noneditx + 20, 445
|
|
print3d localize$(IDS_ML_WP_BALLISTIC)
|
|
print3d_position = noneditx + 20, 465
|
|
print3d localize$(IDS_ML_WP_MISSILE)
|
|
print3d_position = noneditx + 20, 485
|
|
print3d localize$(IDS_ML_W_OMNI)
|
|
|
|
setpencolor(0xff000000)
|
|
drawrect noneditx, 426 to noneditx + 15, 436
|
|
drawrect noneditx, 446 to noneditx + 15, 456
|
|
drawrect noneditx, 466 to noneditx + 15, 476
|
|
drawrect noneditx, 486 to noneditx + 15, 496
|
|
|
|
setpencolor(0xffff0000)
|
|
drawframe noneditx, 411 + 15 to noneditx + 15, 421 + 15
|
|
setpencolor(0xffffff00)
|
|
drawframe noneditx, 431 + 15 to noneditx + 15, 441 + 15
|
|
setpencolor(0xff00ff00)
|
|
drawframe noneditx, 451 + 15 to noneditx + 15, 461 + 15
|
|
setpencolor(0xffaaaaaa)
|
|
drawframe noneditx, 471 + 15 to noneditx + 15, 481 + 15
|
|
|
|
// WEAPON INFO STUFF
|
|
if showinfo == true
|
|
{
|
|
setpencolor(0xaaffffff)
|
|
drawline 175, 535 to 175, 581
|
|
|
|
print3d_attributes = regfont, 0xffff7200, 1, 1, 1, 0, 0, just_right
|
|
print3d_margins = 100, 526 to 170, 587
|
|
print3d_position = 100, 529
|
|
print3d range[sel_weapon]
|
|
print3d_position = 100, 545
|
|
print3d damage[sel_weapon]
|
|
print3d_position = 100, 559
|
|
print3d heat[sel_weapon]
|
|
print3d_position = 100, 573
|
|
print3d weapon_recycle[sel_weapon]
|
|
print3d_attributes = regfont, 0xffff7200, 1, 1, 1, 0, 0
|
|
print3d_margins = 15, 524 to 150, 585
|
|
print3d_position = 15, 529
|
|
print3d localize$(IDS_ML_WEAPONRANGE_INFO)
|
|
print3d_position = 15, 545
|
|
print3d localize$(IDS_ML_WEAPONDAMAGE_INFO)
|
|
print3d_position = 15, 559
|
|
print3d localize$(IDS_ML_WEAPONHEAT_INFO)
|
|
print3d_position = 15, 573
|
|
print3d localize$(IDS_ML_WEAPONRECYCLE_INFO)
|
|
}
|
|
}
|
|
|
|
GUI_MAILBOX
|
|
{
|
|
if sender == o_groupweaponsbutton
|
|
{
|
|
play o_weapons.btnTriggeredSound,1
|
|
activate(parent.o_overlay)
|
|
initialize(parent.o_groupweapons)
|
|
activate(parent.o_groupweapons)
|
|
|
|
parent.just_saved = false
|
|
|
|
parent.o_restorebutton.state = 0
|
|
parent.o_savebutton.state = 0
|
|
initialize(parent.o_restorebutton)
|
|
initialize(parent.o_savebutton)
|
|
}
|
|
|
|
if sender == o_stripweaponsbutton
|
|
{
|
|
play o_weapons.btnTriggeredSound,1
|
|
callback($$ML_CallbackHandler$$, MLRemoveAllSubsystems)
|
|
activate(this)
|
|
|
|
parent.just_saved = false
|
|
|
|
parent.o_restorebutton.state = 0
|
|
parent.o_savebutton.state = 0
|
|
initialize(parent.o_restorebutton)
|
|
initialize(parent.o_savebutton)
|
|
}
|
|
|
|
if sender == o_weaponslistbox
|
|
{
|
|
top_of_list = getmessage()
|
|
}
|
|
|
|
mail(1)
|
|
}
|
|
}
|
|
|
|
s_weapon_slot
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
font3d weaponfont = FPATH localize$(IDS_F_ML_BODYPART)
|
|
int num_of_weapons
|
|
int slot_value[15]
|
|
int num_of_slots[15]
|
|
int slot_type[15]
|
|
float range[15]
|
|
float damage[15]
|
|
float heat[15]
|
|
float recycle[15]
|
|
int zone
|
|
int render_posy
|
|
string label
|
|
|
|
int id = 0
|
|
int unique_id[15]
|
|
|
|
object slots[10]
|
|
}
|
|
|
|
GUI_INIT
|
|
{
|
|
render_posy = 0
|
|
|
|
int i
|
|
int k
|
|
for k = 0; k < num_of_weapons; k++
|
|
{
|
|
slots[k] = s_slots
|
|
slots[k].location = location.x,location.y+render_posy, location.z
|
|
slots[k].id = k
|
|
slots[k].zone_id = zone
|
|
slots[k].range = range[k]
|
|
slots[k].damage = damage[k]
|
|
slots[k].heat = heat[k]
|
|
slots[k].recycle = recycle[k]
|
|
|
|
if slot_value[k] > 50
|
|
{
|
|
slots[k].ammo_slots = true
|
|
}
|
|
|
|
if slot_value[k] != -1 // check to see if it's a valid weapon
|
|
{
|
|
slots[k].weapon_pic = MB_GPATH "installed\\weapon_" conv$(slot_value[k]) ".tga",1
|
|
|
|
if k == 0
|
|
{
|
|
i = 0
|
|
}
|
|
|
|
// set the weapon's correct ID
|
|
slots[k].unique_id = unique_id[k]
|
|
i++
|
|
|
|
render_posy += getheight(slots[k].weapon_pic)
|
|
|
|
if slot_value[k] == 84
|
|
{
|
|
slots[k].highexplosive = true
|
|
}
|
|
}
|
|
if slot_value[k] == -1 // check to see if it's an empty slot
|
|
{
|
|
if num_of_slots[k] <= 6
|
|
{
|
|
slots[k].weapon_pic = MB_GPATH "installed\\weapon_" conv$(slot_value[k]) "_" conv$(num_of_slots[k]) "_" conv$(slot_type[k]) ".tga",1
|
|
}
|
|
if num_of_slots[k] > 6
|
|
{
|
|
slots[k].weapon_pic = MB_GPATH "installed\\weapon_" conv$(slot_value[k]) "_6_" conv$(slot_type[k]) ".tga",1
|
|
}
|
|
|
|
render_posy += getheight(slots[k].weapon_pic) + 5
|
|
|
|
// unused slot have a unique id of -1 for now
|
|
slots[k].unique_id = -1
|
|
}
|
|
|
|
slots[k].region = 0, 0 to 56, getheight(slots[k].weapon_pic)
|
|
|
|
alphamode(slots[k].weapon_pic) = am_alpha_alphainvalpha
|
|
activate(slots[k])
|
|
}
|
|
for k = num_of_weapons; k < 10; k++
|
|
{
|
|
slots[k] = s_slots
|
|
deactivate(slots[k])
|
|
}
|
|
}
|
|
|
|
GUI_DEACTIVATE
|
|
{
|
|
int k
|
|
for k = 0; k < num_of_weapons; k++
|
|
{
|
|
deactivate(slots[k])
|
|
}
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
if num_of_weapons > 0
|
|
{
|
|
print3d_attributes = weaponfont, 0xff000000, 1, 0, 1, 0, 0
|
|
print3d_margins = location.x + 1, location.y - 16 to location.x + getprint3dwidth(label), location.y + 1
|
|
print3d_position = location.x + 1, location.y - 16
|
|
print3d label
|
|
|
|
print3d_attributes = weaponfont, 0xffffffff, 1, 0, 1, 0, 0
|
|
print3d_margins = location.x, location.y - 17 to location.x + getprint3dwidth(label), location.y
|
|
print3d_position = location.x, location.y - 17
|
|
print3d label
|
|
}
|
|
}
|
|
}
|
|
|
|
s_slots
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
pane weapon_pic
|
|
int id
|
|
int unique_id
|
|
int zone_id
|
|
float range
|
|
float damage
|
|
float heat
|
|
float recycle
|
|
|
|
int firsttime = false
|
|
|
|
dblclick(this, true)
|
|
int mouse_held = false
|
|
int held_delay = 0
|
|
|
|
int ammo_slots
|
|
object ammo_box
|
|
|
|
int installed_id = -1
|
|
|
|
framerate = 10
|
|
|
|
int highexplosive = false
|
|
|
|
int showinfo = false
|
|
}
|
|
|
|
GUI_INIT
|
|
{
|
|
if ammo_slots == true
|
|
{
|
|
int tons
|
|
int rounds_per_ton
|
|
callback($$ML_CallbackHandler$$, MLDataGetWeaponAmmo, zone_id, unique_id, tons, rounds_per_ton)
|
|
|
|
ammo_box = s_ammo_box
|
|
ammo_box.location = location.x + 59, location.y, location.z + 1
|
|
ammo_box.zone_id = zone_id
|
|
ammo_box.id = installed_id
|
|
ammo_box.unique_id = unique_id
|
|
ammo_box.tons = tons
|
|
ammo_box.rounds_per_ton = rounds_per_ton
|
|
}
|
|
}
|
|
|
|
GUI_ACTIVATE
|
|
{
|
|
if ammo_slots == true
|
|
{
|
|
initialize(this)
|
|
activate(ammo_box)
|
|
}
|
|
}
|
|
|
|
GUI_DEACTIVATE
|
|
{
|
|
if ammo_slots == true
|
|
{
|
|
deactivate(ammo_box)
|
|
}
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if (mouse_held)
|
|
held_delay++
|
|
|
|
// Value of held_delay can be changed if necessary
|
|
if (held_delay > 2)
|
|
{
|
|
int error = 0
|
|
parent.parent.o_weapon_pointer.selected_weapon_id = parent.slot_value[id]
|
|
parent.parent.o_weapon_mask.removeflag = 1
|
|
parent.parent.o_weapon_mask.unique_id = unique_id
|
|
parent.parent.o_weapon_mask.zone_id = zone_id
|
|
parent.parent.o_weapon_mask.error = error
|
|
mouse_held = false
|
|
held_delay = 0
|
|
}
|
|
}
|
|
|
|
LBUTTON_UPDATE
|
|
{
|
|
mouse_held = false
|
|
|
|
if mouse.x <= location.x + 58
|
|
{
|
|
if mouse.left == BUTTON_DCLICKED
|
|
{
|
|
play o_weapons.btnPressedSound, 1
|
|
|
|
int error
|
|
callback($$ML_CallbackHandler$$, MLRemoveSubsystem, unique_id, zone_id, error)
|
|
parent.parent.parent.just_saved = false
|
|
|
|
parent.parent.parent.o_restorebutton.state = 0
|
|
parent.parent.parent.o_savebutton.state = 0
|
|
initialize(parent.parent.parent.o_restorebutton)
|
|
initialize(parent.parent.parent.o_savebutton)
|
|
|
|
activate(parent.parent.parent.o_weapons)
|
|
mail(1, parent.parent.parent.parent.o_mainui)
|
|
|
|
if error == 0
|
|
{
|
|
play o_weapons.addWeapon, 1
|
|
}
|
|
if error != 0
|
|
{
|
|
play o_weapons.notAllowed, 1
|
|
}
|
|
}
|
|
|
|
if mouse.left == BUTTON_HELD && parent.parent.o_weapon_pointer.selected_weapon_id == -1
|
|
{
|
|
mouse_held = true
|
|
parent.parent.o_weapon_pointer.mounted_flag = true
|
|
}
|
|
|
|
if mouse.left == BUTTON_RELEASED
|
|
{
|
|
parent.parent.o_weapon_mask.removeflag = 0
|
|
|
|
if unique_id != -1
|
|
{
|
|
parent.parent.o_weapon_pointer.mounted_flag = false
|
|
}
|
|
if unique_id == -1 && parent.parent.o_weapon_pointer.mounted_flag == false
|
|
{
|
|
if parent.parent.o_weapon_pointer.selected_weapon_id != -1
|
|
{
|
|
int error
|
|
int selected_weapon = parent.parent.o_weapon_pointer.selected_weapon_id
|
|
callback($$ML_CallbackHandler$$, MLAddSubsystem, selected_weapon, zone_id, error)
|
|
parent.parent.parent.just_saved = false
|
|
|
|
parent.parent.parent.o_restorebutton.state = 0
|
|
parent.parent.parent.o_savebutton.state = 0
|
|
initialize(parent.parent.parent.o_restorebutton)
|
|
initialize(parent.parent.parent.o_savebutton)
|
|
|
|
activate(parent.parent.parent.o_weapons)
|
|
mail(1, parent.parent.parent.parent.o_mainui)
|
|
|
|
if error == 0
|
|
{
|
|
play o_weapons.notAllowed, 1
|
|
}
|
|
if error != 0
|
|
{
|
|
play o_weapons.addWeapon, 1
|
|
}
|
|
}
|
|
}
|
|
|
|
parent.parent.o_weapon_pointer.selected_weapon_id = -1
|
|
}
|
|
}
|
|
}
|
|
|
|
REGION_ENTERED
|
|
{
|
|
if parent.parent.o_weapon_pointer.selected_weapon_id == -1
|
|
{
|
|
if parent.slot_value[id] > -1
|
|
{
|
|
mail(parent.slot_value[id], @infobox@)
|
|
showinfo = true
|
|
parent.parent.showinfo = false
|
|
}
|
|
else
|
|
{
|
|
parent.parent.showinfo = false
|
|
|
|
if parent.slot_type[id] == 0
|
|
{
|
|
mail(240, @infobox@)
|
|
}
|
|
if parent.slot_type[id] == 1
|
|
{
|
|
mail(241, @infobox@)
|
|
}
|
|
if parent.slot_type[id] == 2
|
|
{
|
|
mail(242, @infobox@)
|
|
}
|
|
if parent.slot_type[id] == 3
|
|
{
|
|
mail(243, @infobox@)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
REGION_EXITED
|
|
{
|
|
showinfo = false
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
render weapon_pic, location
|
|
|
|
// WEAPON INFO STUFF
|
|
if showinfo == true
|
|
{
|
|
setpencolor(0xaaffffff)
|
|
drawline 175, 535 to 175, 581
|
|
|
|
print3d_attributes = regfont, 0xffff7200, 1, 1, 1, 0, 0, just_right
|
|
print3d_margins = 100, 526 to 170, 587
|
|
print3d_position = 100, 529
|
|
print3d range
|
|
print3d_position = 100, 545
|
|
print3d damage
|
|
print3d_position = 100, 559
|
|
print3d heat
|
|
print3d_position = 100, 573
|
|
print3d recycle
|
|
print3d_attributes = regfont, 0xffff7200, 1, 1, 1, 0, 0
|
|
print3d_margins = 15, 524 to 150, 585
|
|
print3d_position = 15, 529
|
|
print3d localize$(IDS_ML_WEAPONRANGE_INFO)
|
|
print3d_position = 15, 545
|
|
print3d localize$(IDS_ML_WEAPONDAMAGE_INFO)
|
|
print3d_position = 15, 559
|
|
print3d localize$(IDS_ML_WEAPONHEAT_INFO)
|
|
print3d_position = 15, 573
|
|
print3d localize$(IDS_ML_WEAPONRECYCLE_INFO)
|
|
}
|
|
}
|
|
}
|
|
|
|
s_ammo_box
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
font3d ammofont = FPATH localize$(IDS_F_ML_AMMO)
|
|
// MSL
|
|
int help_id = parent.parent.slot_value[parent.id] + 26
|
|
|
|
int zone_id
|
|
int id
|
|
int unique_id
|
|
int tons
|
|
int rounds_per_ton
|
|
int rounds
|
|
|
|
int textcolor
|
|
|
|
if (parent.parent.slot_value[parent.id] > -1) && (parent.parent.slot_value[parent.id]) < 51
|
|
{
|
|
textcolor = packcolor(255, 0, 0, 255)
|
|
}
|
|
if ((parent.parent.slot_value[parent.id] > 50) && (parent.parent.slot_value[parent.id]) < 100)
|
|
{
|
|
textcolor = packcolor(0, 255, 0, 255)
|
|
}
|
|
if (parent.parent.slot_value[parent.id] >= 100)
|
|
{
|
|
textcolor = packcolor(255, 255, 0, 255)
|
|
}
|
|
|
|
region = 2, 0 to 29, 24
|
|
}
|
|
|
|
REGION_ENTERED
|
|
{
|
|
parent.showinfo = true
|
|
parent.parent.parent.showinfo = false
|
|
mail(help_id, @infobox@)
|
|
}
|
|
|
|
REGION_EXITED
|
|
{
|
|
parent.showinfo = false
|
|
mail(-1, @infobox@)
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
rounds = tons * rounds_per_ton
|
|
}
|
|
|
|
LBUTTON_UPDATE
|
|
{
|
|
if (mouse.left == BUTTON_CLICKED)
|
|
{
|
|
if mouse.y > location.y + 12
|
|
{
|
|
if mouse.x < location.x + 15
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLRemoveWeaponAmmo, zone_id, unique_id)
|
|
callback($$ML_CallbackHandler$$, MLDataGetWeaponAmmo, zone_id, unique_id, tons, rounds_per_ton)
|
|
|
|
mail(1, parent.parent.parent.parent.parent.o_mainui)
|
|
}
|
|
|
|
if mouse.x > location.x + 15
|
|
{
|
|
callback($$ML_CallbackHandler$$, MLAddWeaponAmmo, zone_id, unique_id)
|
|
callback($$ML_CallbackHandler$$, MLDataGetWeaponAmmo, zone_id, unique_id, tons, rounds_per_ton)
|
|
|
|
mail(1, parent.parent.parent.parent.parent.o_mainui)
|
|
}
|
|
|
|
play o_weapons.btnPressedSound, 1
|
|
}
|
|
}
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
if parent.highexplosive == false
|
|
{
|
|
print3d_attributes = ammofont, textcolor, 1, 1, 1, 0, 0, just_center
|
|
print3d_margins = location.x + 1, location.y to location.x + 29, location.y + 12
|
|
print3d_position = location.x + 1, location.y + 3
|
|
print3d rounds
|
|
}
|
|
}
|
|
}
|
|
|
|
weapon_pointer
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int selected_weapon_id = -1
|
|
int prev_selected_id = -1
|
|
pane selected_weapon_icon
|
|
int draw = false
|
|
|
|
int mounted_flag = false
|
|
|
|
framerate = 5
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if selected_weapon_id != prev_selected_id
|
|
{
|
|
if selected_weapon_id != -1
|
|
{
|
|
selected_weapon_icon = MB_GPATH "weapon_" conv$(selected_weapon_id) ".tga",1
|
|
alphamode(selected_weapon_icon) = am_alpha_alphainvalpha
|
|
origin (selected_weapon_icon) = 10,10
|
|
color (selected_weapon_icon) = 255,255,255,160
|
|
prev_selected_id = selected_weapon_id
|
|
draw = true
|
|
}
|
|
}
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
if selected_weapon_id != -1 && selected_weapon_id == prev_selected_id && draw == true
|
|
{
|
|
location = mouse.x,mouse.y,70
|
|
render selected_weapon_icon, mouse.x, mouse.y
|
|
}
|
|
}
|
|
}
|
|
|
|
weapon_mask
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
int removeflag = 0
|
|
int unique_id = -1
|
|
int zone_id = -1
|
|
int error = -1
|
|
|
|
region = 0, 0 to 0,0
|
|
framerate = 10
|
|
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if parent.o_weapon_pointer.selected_weapon_id != -1
|
|
{
|
|
region = 0, 0 to getresx(), getresy()
|
|
}
|
|
else
|
|
{
|
|
region = 0, 0 to 0,0
|
|
}
|
|
}
|
|
|
|
LBUTTON_UPDATE
|
|
{
|
|
pass_on
|
|
if mouse.left == BUTTON_RELEASED
|
|
{
|
|
if removeflag == 1
|
|
{
|
|
parent.o_weapon_pointer.selected_weapon_id = -1
|
|
callback($$ML_CallbackHandler$$, MLRemoveSubsystem, unique_id, zone_id, error)
|
|
parent.parent.just_saved = false
|
|
|
|
parent.parent.o_restorebutton.state = 0
|
|
parent.parent.o_savebutton.state = 0
|
|
initialize(parent.parent.o_restorebutton)
|
|
initialize(parent.parent.o_savebutton)
|
|
|
|
activate(parent.parent.o_weapons)
|
|
mail(1, parent.parent.parent.o_mainui)
|
|
|
|
if error != 0
|
|
{
|
|
play o_weapons.notAllowed, 1
|
|
}
|
|
if error == 0
|
|
{
|
|
play o_weapons.addWeapon, 1
|
|
}
|
|
|
|
removeflag = 0
|
|
unique_id = -1
|
|
zone_id = -1
|
|
error = -1
|
|
}
|
|
if removeflag == 0
|
|
{
|
|
parent.o_weapon_pointer.selected_weapon_id = -1
|
|
}
|
|
|
|
parent.o_weapon_pointer.mounted_flag = false
|
|
}
|
|
}
|
|
}
|