@@ -27,57 +27,58 @@ function scr_ui_formation_bars() {
2727
2828 for (var ii = 1 ; ii <= 17 ; ii++) {
2929 if (ii == 1 ) and (bat_comm_for[_formatting] == bar) {
30- init_combat_bars (bar, ii, ui_formations_data, 2 , 0 , " HQ" );
30+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " HQ" , c_yellow );
3131 }
3232 else if (ii == 2 ) and (bat_hono_for[_formatting] == bar) {
33- init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " Hono " );
33+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " HG " , c_yellow );
3434 }
3535 else if (ii == 3 ) and (bat_libr_for[_formatting] == bar) {
36- init_combat_bars (bar, ii, ui_formations_data, 1 , 8 , " Lib " );
36+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " LIB " , c_aqua );
3737 }
3838 else if (ii == 4 ) and (bat_tech_for[_formatting] == bar) {
39- init_combat_bars (bar, ii, ui_formations_data, 1 , 9 , " Tech " );
39+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " TEC " , c_red );
4040 }
4141 else if (ii == 5 ) and (bat_term_for[_formatting] == bar) {
42- init_combat_bars (bar, ii, ui_formations_data, 1 , 10 , " Term " );
42+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " TER " , c_white );
4343 }
4444 else if (ii == 6 ) and (bat_vete_for[_formatting] == bar) {
45- init_combat_bars (bar, ii, ui_formations_data, 2 , 6 , " Veteran " );
45+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " VET " , c_white );
4646 }
4747 else if (ii == 7 ) and (bat_tact_for[_formatting] == bar) {
48- init_combat_bars (bar, ii, ui_formations_data, 6 , 3 , " Tactical " );
48+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " TAC " , c_navy );
4949 }
5050 else if (ii == 8 ) and (bat_deva_for[_formatting] == bar) {
51- init_combat_bars (bar, ii, ui_formations_data, 3 , 2 , " Devastator " );
51+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " DEV " , c_purple );
5252 }
5353 else if (ii == 9 ) and (bat_assa_for[_formatting] == bar) {
54- init_combat_bars (bar, ii, ui_formations_data, 3 , 5 , " Assault" );
55- }
56- else if (ii == 10 ) and (bat_scou_for[_formatting] == bar) {
57- init_combat_bars (bar, ii, ui_formations_data, 1 , 4 , " Sco" );
54+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " ASS" );
5855 }
5956 else if (ii == 11 ) and (bat_drea_for[_formatting] == bar) {
60- init_combat_bars (bar, ii, ui_formations_data, 2 , 11 , " Dread" );
61- }
62- else if (ii == 12 ) and (bat_hire_for[_formatting] == bar) {
63- init_combat_bars (bar, ii, ui_formations_data, 1 , 7 , " ???" );
64- }
65- else if (ii == 16 ) and (bat_landspee_for[_formatting] == bar) {
66- init_combat_bars (bar, ii, ui_formations_data, 2 , 14 , " Land Speeder" );
57+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " DRD" , c_orange);
6758 }
6859
60+
6961 if (bat_formation_type[_formatting] != 2 ) {
7062 if (ii == 13 ) and (bat_rhin_for[_formatting] == bar) {
71- init_combat_bars (bar, ii, ui_formations_data, 4 , 12 , " Rhino " );
63+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " RHN " );
7264 }
7365 else if (ii == 14 ) and (bat_pred_for[_formatting] == bar) {
74- init_combat_bars (bar, ii, ui_formations_data, 2 , 13 , " Predator " );
66+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " PRD " );
7567 }
7668 else if (ii == 15 ) and (bat_landraid_for[_formatting] == bar) {
77- init_combat_bars (bar, ii, ui_formations_data, 2 , 14 , " Land Raider" );
69+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " LND" );
70+ }
71+ else if (ii == 16 ) and (bat_landspee_for[_formatting] == bar) {
72+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " SPD" );
7873 }
7974 else if (ii == 17 ) and (bat_whirl_for[_formatting] == bar) {
80- init_combat_bars (bar, ii, ui_formations_data, 2 , 14 , " Whirlwind" );
75+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " WHR" );
76+ }
77+ else if (ii == 12 ) and (bat_hire_for[_formatting] == bar) {
78+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " AUX" );
79+ }
80+ else if (ii == 10 ) and (bat_scou_for[_formatting] == bar) {
81+ init_combat_bars (bar, ii, ui_formations_data, 1 , 1 , " SCU" , c_green);
8182 }
8283 }
8384
@@ -92,10 +93,10 @@ function scr_ui_formation_bars() {
9293 bat_vete_for[bar] = 2 ;
9394 bat_hire_for[bar] = 3 ;
9495 bat_libr_for[bar] = 3 ;
95- bat_comm_for[bar] = 3 ;
96- bat_tech_for[bar] = 3 ;
96+ bat_comm_for[bar] = 4 ;
97+ bat_tech_for[bar] = 4 ;
9798 bat_term_for[bar] = 3 ;
98- bat_hono_for[bar] = 3 ;
99+ bat_hono_for[bar] = 6 ;
99100 bat_drea_for[bar] = 5 ;
100101 bat_rhin_for[bar] = 6 ;
101102 bat_pred_for[bar] = 7 ;
@@ -112,7 +113,7 @@ function scr_ui_formation_bars() {
112113 }
113114}
114115
115- function init_combat_bars (bar, ii, formations_data, size, image_index, unit_type) {
116+ function init_combat_bars (bar, ii, formations_data, size, image_index, unit_type, color = c_gray ) {
116117 formations_data.nbar = instance_create (formations_data.x9 , formations_data.y9 + temp[formations_data.te ], obj_formation_bar);
117118 formations_data.nbar .size = size;
118119 formations_data.nbar .height = formations_data.nbar .size * 47 ;
@@ -122,6 +123,7 @@ function init_combat_bars(bar, ii, formations_data, size, image_index, unit_type
122123 temp[formations_data.te + 100 ] += formations_data.nbar .size ;
123124 formations_data.nbar .image_index = image_index;
124125 formations_data.nbar .unit_type = unit_type;
126+ formations_data.nbar .color = color;
125127 formations_data.nbar .unit_id = ii;
126128 formations_data.nbar .col_parent = bar;
127129}
0 commit comments