@@ -46,6 +46,8 @@ public TeamTypesWindow(WindowManager windowManager, Map map) : base(windowManage
4646 private EditorNumberTextBox tbPriority ;
4747 private EditorNumberTextBox tbMax ;
4848 private EditorNumberTextBox tbTechLevel ;
49+ private XNADropDown ddMindControlDecision ;
50+ private EditorNumberTextBox tbTransportWaypoint ;
4951 private EditorNumberTextBox tbGroup ;
5052 private EditorNumberTextBox tbWaypoint ;
5153 private EditorPopUpSelector selTaskForce ;
@@ -71,6 +73,8 @@ public override void Initialize()
7173 tbPriority = FindChild < EditorNumberTextBox > ( nameof ( tbPriority ) ) ;
7274 tbMax = FindChild < EditorNumberTextBox > ( nameof ( tbMax ) ) ;
7375 tbTechLevel = FindChild < EditorNumberTextBox > ( nameof ( tbTechLevel ) ) ;
76+ ddMindControlDecision = FindChild < XNADropDown > ( nameof ( ddMindControlDecision ) ) ;
77+ tbTransportWaypoint = FindChild < EditorNumberTextBox > ( nameof ( tbTransportWaypoint ) ) ;
7478 tbGroup = FindChild < EditorNumberTextBox > ( nameof ( tbGroup ) ) ;
7579 tbWaypoint = FindChild < EditorNumberTextBox > ( nameof ( tbWaypoint ) ) ;
7680 selTaskForce = FindChild < EditorPopUpSelector > ( nameof ( selTaskForce ) ) ;
@@ -80,10 +84,6 @@ public override void Initialize()
8084 var panelBooleans = FindChild < EditorPanel > ( "panelBooleans" ) ;
8185 AddBooleanProperties ( panelBooleans ) ;
8286
83- ddVeteranLevel . AddItem ( "Regular" ) ;
84- ddVeteranLevel . AddItem ( "Veteran" ) ;
85- ddVeteranLevel . AddItem ( "Elite" ) ;
86-
8787 lbTeamTypes . SelectedIndexChanged += LbTeamTypes_SelectedIndexChanged ;
8888
8989 FindChild < EditorButton > ( "btnNewTeamType" ) . LeftClick += BtnNewTeamType_LeftClick ;
@@ -288,8 +288,10 @@ private void EditTeamType(TeamType teamType)
288288 tbPriority . TextChanged -= TbPriority_TextChanged ;
289289 tbMax . TextChanged -= TbMax_TextChanged ;
290290 tbTechLevel . TextChanged -= TbTechLevel_TextChanged ;
291+ ddMindControlDecision . SelectedIndexChanged -= DdMindControlDecision_SelectedIndexChanged ;
291292 tbGroup . TextChanged -= TbGroup_TextChanged ;
292293 tbWaypoint . TextChanged -= TbWaypoint_TextChanged ;
294+ tbTransportWaypoint . TextChanged -= TbTransportWaypoint_TextChanged ;
293295 checkBoxes . ForEach ( chk => chk . CheckedChanged -= FlagCheckBox_CheckedChanged ) ;
294296
295297 editedTeamType = teamType ;
@@ -302,8 +304,11 @@ private void EditTeamType(TeamType teamType)
302304 tbPriority . Text = string . Empty ;
303305 tbMax . Text = string . Empty ;
304306 tbTechLevel . Text = string . Empty ;
307+ ddMindControlDecision . SelectedIndex = - 1 ;
308+
305309 tbGroup . Text = string . Empty ;
306310 tbWaypoint . Text = string . Empty ;
311+ tbTransportWaypoint . Text = string . Empty ;
307312
308313 selTaskForce . Text = string . Empty ;
309314 selTaskForce . Tag = null ;
@@ -328,6 +333,12 @@ private void EditTeamType(TeamType teamType)
328333 tbGroup . Value = editedTeamType . Group ;
329334 tbWaypoint . Value = Helpers . GetWaypointNumberFromAlphabeticalString ( editedTeamType . Waypoint ) ;
330335
336+ if ( Constants . UseCountries )
337+ {
338+ ddMindControlDecision . SelectedIndex = editedTeamType . MindControlDecision ?? - 1 ;
339+ tbTransportWaypoint . Value = Helpers . GetWaypointNumberFromAlphabeticalString ( editedTeamType . TransportWaypoint ) ;
340+ }
341+
331342 if ( editedTeamType . TaskForce != null )
332343 selTaskForce . Text = editedTeamType . TaskForce . Name + " (" + editedTeamType . TaskForce . ININame + ")" ;
333344 else
@@ -351,8 +362,10 @@ private void EditTeamType(TeamType teamType)
351362 tbPriority . TextChanged += TbPriority_TextChanged ;
352363 tbMax . TextChanged += TbMax_TextChanged ;
353364 tbTechLevel . TextChanged += TbTechLevel_TextChanged ;
365+ ddMindControlDecision . SelectedIndexChanged += DdMindControlDecision_SelectedIndexChanged ;
354366 tbGroup . TextChanged += TbGroup_TextChanged ;
355367 tbWaypoint . TextChanged += TbWaypoint_TextChanged ;
368+ tbTransportWaypoint . TextChanged += TbTransportWaypoint_TextChanged ;
356369 checkBoxes . ForEach ( chk => chk . CheckedChanged += FlagCheckBox_CheckedChanged ) ;
357370 }
358371
@@ -370,6 +383,14 @@ private void TbWaypoint_TextChanged(object sender, EventArgs e)
370383 editedTeamType . Waypoint = Helpers . WaypointNumberToAlphabeticalString ( tbWaypoint . Value ) ;
371384 }
372385
386+ private void TbTransportWaypoint_TextChanged ( object sender , EventArgs e )
387+ {
388+ if ( Constants . UseCountries )
389+ {
390+ editedTeamType . TransportWaypoint = Helpers . WaypointNumberToAlphabeticalString ( tbTransportWaypoint . Value ) ;
391+ }
392+ }
393+
373394 private void TbGroup_TextChanged ( object sender , EventArgs e )
374395 {
375396 editedTeamType . Group = tbGroup . Value ;
@@ -401,6 +422,14 @@ private void DdVeteranLevel_SelectedIndexChanged(object sender, EventArgs e)
401422 editedTeamType . VeteranLevel = ddVeteranLevel . SelectedIndex + 1 ;
402423 }
403424
425+ private void DdMindControlDecision_SelectedIndexChanged ( object sender , EventArgs e )
426+ {
427+ if ( Constants . UseCountries )
428+ {
429+ editedTeamType . MindControlDecision = ddMindControlDecision . SelectedIndex ;
430+ }
431+ }
432+
404433 private void TbName_TextChanged ( object sender , EventArgs e )
405434 {
406435 editedTeamType . Name = tbName . Text ;
0 commit comments