scripted_gui = {
	
	bst_main = {
	
		context_type = selected_state_context
		
		window_name = "bst_main_container"
		
		visible = {
			ROOT = {
				is_ai = no
				has_global_flag = bst_enabled
				OR = {
					has_country_flag = tp_is_host
					NOT = {
						has_global_flag = tp_is_multiplayer
					}
				}
			}
		}
		properties = {
			bst_background_1 = {
				y = var:global.bst_position_1
			}
			bst_priority_up_btn_1 = {
				y = var:global.bst_position_1
			}
			bst_building_icon_1 = {
				y = var:global.bst_position_1
			}
			bst_priority_down_btn_1 = {
				y = var:global.bst_position_1_2
			}
			bst_min_button_1 = {
				y = var:global.bst_position_1_3
			}
			bst_remove_buildings_1 = {
				y = var:global.bst_position_1_3
			}
			bst_buildings_amount_1 = {
				y = var:global.bst_position_1_3
			}
			bst_add_buildings_1 = {
				y = var:global.bst_position_1_3
			}
			bst_max_button_1 = {
				y = var:global.bst_position_1_3
			}
			bst_background_2 = {
				y = var:global.bst_position_2
			}
			bst_priority_up_btn_2 = {
				y = var:global.bst_position_2
			}
			bst_building_icon_2 = {
				y = var:global.bst_position_2
			}
			bst_priority_down_btn_2 = {
				y = var:global.bst_position_2_2
			}
			bst_min_button_2 = {
				y = var:global.bst_position_2_3
			}
			bst_remove_buildings_2 = {
				y = var:global.bst_position_2_3
			}
			bst_buildings_amount_2 = {
				y = var:global.bst_position_2_3
			}
			bst_add_buildings_2 = {
				y = var:global.bst_position_2_3
			}
			bst_max_button_2 = {
				y = var:global.bst_position_2_3
			}
			bst_background_3 = {
				y = var:global.bst_position_3
			}
			bst_priority_up_btn_3 = {
				y = var:global.bst_position_3
			}
			bst_building_icon_3 = {
				y = var:global.bst_position_3
			}
			bst_priority_down_btn_3 = {
				y = var:global.bst_position_3_2
			}
			bst_min_button_3 = {
				y = var:global.bst_position_3_3
			}
			bst_remove_buildings_3 = {
				y = var:global.bst_position_3_3
			}
			bst_buildings_amount_3 = {
				y = var:global.bst_position_3_3
			}
			bst_add_buildings_3 = {
				y = var:global.bst_position_3_3
			}
			bst_max_button_3 = {
				y = var:global.bst_position_3_3
			}
			bst_background_4 = {
				y = var:global.bst_position_4
			}
			bst_priority_up_btn_4 = {
				y = var:global.bst_position_4
			}
			bst_building_icon_4 = {
				y = var:global.bst_position_4
			}
			bst_priority_down_btn_4 = {
				y = var:global.bst_position_4_2
			}
			bst_min_button_4 = {
				y = var:global.bst_position_4_3
			}
			bst_remove_buildings_4 = {
				y = var:global.bst_position_4_3
			}
			bst_buildings_amount_4 = {
				y = var:global.bst_position_4_3
			}
			bst_add_buildings_4 = {
				y = var:global.bst_position_4_3
			}
			bst_max_button_4 = {
				y = var:global.bst_position_4_3
			}
			bst_background_5 = {
				y = var:global.bst_position_5
			}
			bst_priority_up_btn_5 = {
				y = var:global.bst_position_5
			}
			bst_building_icon_5 = {
				y = var:global.bst_position_5
			}
			bst_priority_down_btn_5 = {
				y = var:global.bst_position_5_2
			}
			bst_min_button_5 = {
				y = var:global.bst_position_5_3
			}
			bst_remove_buildings_5 = {
				y = var:global.bst_position_5_3
			}
			bst_buildings_amount_5 = {
				y = var:global.bst_position_5_3
			}
			bst_add_buildings_5 = {
				y = var:global.bst_position_5_3
			}
			bst_max_button_5 = {
				y = var:global.bst_position_5_3
			}
			bst_background_6 = {
				y = var:global.bst_position_6
			}
			bst_priority_up_btn_6 = {
				y = var:global.bst_position_6
			}
			bst_building_icon_6 = {
				y = var:global.bst_position_6
			}
			bst_priority_down_btn_6 = {
				y = var:global.bst_position_6_2
			}
			bst_min_button_6 = {
				y = var:global.bst_position_6_3
			}
			bst_remove_buildings_6 = {
				y = var:global.bst_position_6_3
			}
			bst_buildings_amount_6 = {
				y = var:global.bst_position_6_3
			}
			bst_add_buildings_6 = {
				y = var:global.bst_position_6_3
			}
			bst_max_button_6 = {
				y = var:global.bst_position_6_3
			}
			bst_background_7 = {
				y = var:global.bst_position_7
			}
			bst_priority_up_btn_7 = {
				y = var:global.bst_position_7
			}
			bst_building_icon_7 = {
				y = var:global.bst_position_7
			}
			bst_priority_down_btn_7 = {
				y = var:global.bst_position_7_2
			}
			bst_min_button_7 = {
				y = var:global.bst_position_7_3
			}
			bst_remove_buildings_7 = {
				y = var:global.bst_position_7_3
			}
			bst_buildings_amount_7 = {
				y = var:global.bst_position_7_3
			}
			bst_add_buildings_7 = {
				y = var:global.bst_position_7_3
			}
			bst_max_button_7 = {
				y = var:global.bst_position_7_3
			}
			bst_add_technology_button_7 = {
				y = var:global.bst_position_7_4
			}
			bst_background_8 = {
				y = var:global.bst_position_8
			}
			bst_priority_up_btn_8 = {
				y = var:global.bst_position_8
			}
			bst_building_icon_8 = {
				y = var:global.bst_position_8
			}
			bst_priority_down_btn_8 = {
				y = var:global.bst_position_8_2
			}
			bst_min_button_8 = {
				y = var:global.bst_position_8_3
			}
			bst_remove_buildings_8 = {
				y = var:global.bst_position_8_3
			}
			bst_buildings_amount_8 = {
				y = var:global.bst_position_8_3
			}
			bst_add_buildings_8 = {
				y = var:global.bst_position_8_3
			}
			bst_max_button_8 = {
				y = var:global.bst_position_8_3
			}
			bst_add_technology_button_8 = {
				y = var:global.bst_position_8_4
			}
			bst_background_9 = {
				y = var:global.bst_position_9
			}
			bst_priority_up_btn_9 = {
				y = var:global.bst_position_9
			}
			bst_building_icon_9 = {
				y = var:global.bst_position_9
			}
			bst_priority_down_btn_9 = {
				y = var:global.bst_position_9_2
			}
			bst_min_button_9 = {
				y = var:global.bst_position_9_3
			}
			bst_remove_buildings_9 = {
				y = var:global.bst_position_9_3
			}
			bst_buildings_amount_9 = {
				y = var:global.bst_position_9_3
			}
			bst_add_buildings_9 = {
				y = var:global.bst_position_9_3
			}
			bst_max_button_9 = {
				y = var:global.bst_position_9_3
			}
			bst_add_technology_button_9 = {
				y = var:global.bst_position_9_4
			}
			bst_background_10 = {
				y = var:global.bst_position_10
			}
			bst_priority_up_btn_10 = {
				y = var:global.bst_position_10
			}
			bst_building_icon_10 = {
				y = var:global.bst_position_10
			}
			bst_priority_down_btn_10 = {
				y = var:global.bst_position_10_2
			}
			bst_min_button_10 = {
				y = var:global.bst_position_10_3
			}
			bst_remove_buildings_10 = {
				y = var:global.bst_position_10_3
			}
			bst_buildings_amount_10 = {
				y = var:global.bst_position_10_3
			}
			bst_add_buildings_10 = {
				y = var:global.bst_position_10_3
			}
			bst_max_button_10 = {
				y = var:global.bst_position_10_3
			}
			bst_add_technology_button_10 = {
				y = var:global.bst_position_10_4
			}
			bst_background_11 = {
				y = var:global.bst_position_11
			}
			bst_priority_up_btn_11 = {
				y = var:global.bst_position_11
			}
			bst_building_icon_11 = {
				y = var:global.bst_position_11
			}
			bst_priority_down_btn_11 = {
				y = var:global.bst_position_11_2
			}
			bst_min_button_11 = {
				y = var:global.bst_position_11_3
			}
			bst_remove_buildings_11 = {
				y = var:global.bst_position_11_3
			}
			bst_buildings_amount_11 = {
				y = var:global.bst_position_11_3
			}
			bst_add_buildings_11 = {
				y = var:global.bst_position_11_3
			}
			bst_max_button_11 = {
				y = var:global.bst_position_11_3
			}
			bst_limit_border_11 = {
				y = var:global.bst_position_11_3
			}
			bst_glow_11 = {
				y = var:global.bst_position_11
			}
			bst_background_12 = {
				y = var:global.bst_position_12
			}
			bst_priority_up_btn_12 = {
				y = var:global.bst_position_12
			}
			bst_building_icon_12 = {
				y = var:global.bst_position_12
			}
			bst_priority_down_btn_12 = {
				y = var:global.bst_position_12_2
			}
			bst_min_button_12 = {
				y = var:global.bst_position_12_3
			}
			bst_remove_buildings_12 = {
				y = var:global.bst_position_12_3
			}
			bst_buildings_amount_12 = {
				y = var:global.bst_position_12_3
			}
			bst_add_buildings_12 = {
				y = var:global.bst_position_12_3
			}
			bst_max_button_12 = {
				y = var:global.bst_position_12_3
			}
			bst_limit_base_12 = {
				y = var:global.bst_position_12_3
			}
			bst_glow_12 = {
				y = var:global.bst_position_12
			}
			bst_background_13 = {
				y = var:global.bst_position_13
			}
			bst_priority_up_btn_13 = {
				y = var:global.bst_position_13
			}
			bst_building_icon_13 = {
				y = var:global.bst_position_13
			}
			bst_priority_down_btn_13 = {
				y = var:global.bst_position_13_2
			}
			bst_min_button_13 = {
				y = var:global.bst_position_13_3
			}
			bst_remove_buildings_13 = {
				y = var:global.bst_position_13_3
			}
			bst_buildings_amount_13 = {
				y = var:global.bst_position_13_3
			}
			bst_add_buildings_13 = {
				y = var:global.bst_position_13_3
			}
			bst_max_button_13 = {
				y = var:global.bst_position_13_3
			}
			bst_limit_base_13 = {
				y = var:global.bst_position_13_3
			}
			bst_glow_13 = {
				y = var:global.bst_position_13
			}
			bst_background_14 = {
				y = var:global.bst_position_14
			}
			bst_priority_up_btn_14 = {
				y = var:global.bst_position_14
			}
			bst_building_icon_14 = {
				y = var:global.bst_position_14
			}
			bst_priority_down_btn_14 = {
				y = var:global.bst_position_14_2
			}
			bst_min_button_14 = {
				y = var:global.bst_position_14_3
			}
			bst_remove_buildings_14 = {
				y = var:global.bst_position_14_3
			}
			bst_buildings_amount_14 = {
				y = var:global.bst_position_14_3
			}
			bst_add_buildings_14 = {
				y = var:global.bst_position_14_3
			}
			bst_max_button_14 = {
				y = var:global.bst_position_14_3
			}
			bst_add_technology_button_14 = {
				y = var:global.bst_position_14_4
			}
			bst_background_15 = {
				y = var:global.bst_position_15
			}
			bst_priority_up_btn_15 = {
				y = var:global.bst_position_15
			}
			bst_building_icon_15 = {
				y = var:global.bst_position_15
			}
			bst_priority_down_btn_15 = {
				y = var:global.bst_position_15_2
			}
			bst_min_button_15 = {
				y = var:global.bst_position_15_3
			}
			bst_remove_buildings_15 = {
				y = var:global.bst_position_15_3
			}
			bst_buildings_amount_15 = {
				y = var:global.bst_position_15_3
			}
			bst_add_buildings_15 = {
				y = var:global.bst_position_15_3
			}
			bst_max_button_15 = {
				y = var:global.bst_position_15_3
			}
		}
		effects = {
			bst_mark_button_click = {
				FROM.FROM = { 
					set_state_flag = bst_marked
				}
			}
			bst_unmark_button_click = {
				FROM.FROM = { 
					clr_state_flag = bst_marked 
				}
			}
			bst_mark_all_click = {
				FROM.OWNER = {
					every_owned_state = {
						set_state_flag = bst_marked
					}
				}
			}
			bst_mark_cores_click  = {
				FROM.OWNER = {
					every_owned_state = {
						limit = {
							is_core_of = PREV
							NOT = { has_state_flag = bst_marked }
						}
						set_state_flag = bst_marked
					}
				}
			}
			bst_mark_colonies_click  = {
				FROM.OWNER = {
					every_owned_state = {
						limit = {
							NOT = { is_core_of = PREV }
							NOT = { has_state_flag = bst_marked }
						}
						set_state_flag = bst_marked
					}
				}
			}
			bst_unmark_all_click = {
				every_state = {
					clr_state_flag = bst_marked
				}
			}
			bst_collapse_window2_button_click  = {
				if = {
					limit = {
						NOT = { has_global_flag = bst_window2_closed }
					}
					set_global_flag = bst_window2_closed
				}
				else = {
					clr_global_flag = bst_window2_closed
				}
				bst_count_buildings = yes
			}
			bst_priority_up_btn_1_click = {
				bst_move_up_section_position_1 = yes
			}
			bst_priority_down_btn_1_click = {
				bst_move_down_section_position_1 = yes
			}
			bst_priority_up_btn_2_click = {
				bst_move_up_section_position_2 = yes
			}
			bst_priority_down_btn_2_click = {
				bst_move_down_section_position_2 = yes
			}
			bst_priority_up_btn_3_click = {
				bst_move_up_section_position_3 = yes
			}
			bst_priority_down_btn_3_click = {
				bst_move_down_section_position_3 = yes
			}
			bst_priority_up_btn_4_click = {
				bst_move_up_section_position_4 = yes
			}
			bst_priority_down_btn_4_click = {
				bst_move_down_section_position_4 = yes
			}
			bst_priority_up_btn_5_click = {
				bst_move_up_section_position_5 = yes
			}
			bst_priority_down_btn_5_click = {
				bst_move_down_section_position_5 = yes
			}
			bst_priority_up_btn_6_click = {
				bst_move_up_section_position_6 = yes
			}
			bst_priority_down_btn_6_click = {
				bst_move_down_section_position_6 = yes
			}
			bst_priority_up_btn_7_click = {
				bst_move_up_section_position_7 = yes
			}
			bst_priority_down_btn_7_click = {
				bst_move_down_section_position_7= yes
			}
			bst_priority_up_btn_8_click = {
				bst_move_up_section_position_8 = yes
			}
			bst_priority_down_btn_8_click = {
				bst_move_down_section_position_8 = yes
			}
			bst_priority_up_btn_9_click = {
				bst_move_up_section_position_9 = yes
			}
			bst_priority_down_btn_9_click = {
				bst_move_down_section_position_9 = yes
			}
			bst_priority_up_btn_10_click = {
				bst_move_up_section_position_10 = yes
			}
			bst_priority_down_btn_10_click = {
				bst_move_down_section_position_10 = yes
			}
			bst_priority_up_btn_11_click = {
				bst_move_up_section_position_11 = yes
			}
			bst_priority_down_btn_11_click = {
				bst_move_down_section_position_11 = yes
			}
			bst_priority_up_btn_12_click = {
				bst_move_up_section_position_12 = yes
			}
			bst_priority_down_btn_12_click = {
				bst_move_down_section_position_12 = yes
			}
			bst_priority_up_btn_13_click = {
				bst_move_up_section_position_13 = yes
			}
			bst_priority_down_btn_13_click = {
				bst_move_down_section_position_13 = yes
			}
			bst_priority_up_btn_14_click = {
				bst_move_up_section_position_14 = yes
			}
			bst_priority_down_btn_14_click = {
				bst_move_down_section_position_14= yes
			}
			bst_priority_up_btn_15_click = {
				bst_move_up_section_position_15 = yes
			}
			bst_priority_down_btn_15_click = {
				bst_move_down_section_position_15= yes
			}
			bst_min_button_1_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = industrial_complex
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = industrial_complex
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_1_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = industrial_complex
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = industrial_complex
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_1_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = industrial_complex
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = industrial_complex
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_1_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = industrial_complex
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = industrial_complex
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_2_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = arms_factory
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = arms_factory
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_2_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = arms_factory
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = arms_factory
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_2_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = arms_factory
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = arms_factory
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_2_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = arms_factory
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = arms_factory
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_3_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = dockyard
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = dockyard
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_3_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = dockyard
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = dockyard
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_3_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = dockyard
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = dockyard
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_3_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = dockyard
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = dockyard
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_4_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = infrastructure
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = infrastructure
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_4_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = infrastructure
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = infrastructure
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_4_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = infrastructure
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = infrastructure
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_4_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = infrastructure
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = infrastructure
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_5_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = air_base
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = air_base
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_5_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = air_base
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = air_base
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_5_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = air_base
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = air_base
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_5_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = air_base
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = air_base
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_6_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = anti_air_building
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = anti_air_building
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_6_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = anti_air_building
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = anti_air_building
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_6_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = anti_air_building
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = anti_air_building
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_6_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = anti_air_building
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = anti_air_building
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_7_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = radar_station
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = radar_station
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_7_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = radar_station
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = radar_station
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_7_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = radar_station
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = radar_station
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_7_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = radar_station
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = radar_station
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_add_technology_button_7_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					OWNER = {
						set_technology = {
							radio_detection = 1
							cavity_magnatron = 1
							centimetric_radar = 1
							phased_array = 1
							monopulse_radar = 1
						}
					}
				}
				if = {
					limit = {
						any_state = {
							has_state_flag = bst_marked
						}
					}
					every_state = {
						limit = {
							has_state_flag = bst_marked
						}
						OWNER = {
							set_technology = {
								radio_detection = 1
								cavity_magnatron = 1
								centimetric_radar = 1
								phased_array = 1
								monopulse_radar = 1
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_8_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = synthetic_refinery
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = synthetic_refinery
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_8_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = synthetic_refinery
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = synthetic_refinery
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_8_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = synthetic_refinery
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = synthetic_refinery
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_8_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = synthetic_refinery
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = synthetic_refinery
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_add_technology_button_8_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					OWNER = {
						set_technology = {
							synth_oil_experiments = 1
							# oil_processing = 1
							# improved_oil_processing = 1
							# advanced_oil_processing = 1
							# modern_oil_processing = 1
							# rubber_processing = 1
							# improved_rubber_processing = 1
							# advanced_rubber_processing = 1
							# modern_rubber_processing = 1
						}
					}
				}
				if = {
					limit = {
						any_state = {
							has_state_flag = bst_marked
						}
					}
					every_state = {
						limit = {
							has_state_flag = bst_marked
						}
						OWNER = {
							set_technology = {
								synth_oil_experiments = 1
								# oil_processing = 1
								# improved_oil_processing = 1
								# advanced_oil_processing = 1
								# modern_oil_processing = 1
								# rubber_processing = 1
								# improved_rubber_processing = 1
								# advanced_rubber_processing = 1
								# modern_rubber_processing = 1
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_9_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = rocket_site
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = rocket_site
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_9_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = rocket_site
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = rocket_site
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_9_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = rocket_site
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = rocket_site
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_9_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = rocket_site
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = rocket_site
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_add_technology_button_9_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					OWNER = {
						set_technology = {
							experimental_rockets = 1
							rocket_engines = 1
							improved_rocket_engines = 1
							advanced_rocket_engines = 1
						}
					}
				}
				if = {
					limit = {
						any_state = {
							has_state_flag = bst_marked
						}
					}
					every_state = {
						limit = {
							has_state_flag = bst_marked
						}
						OWNER = {
							set_technology = {
								experimental_rockets = 1
								rocket_engines = 1
								improved_rocket_engines = 1
								advanced_rocket_engines = 1
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_10_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = nuclear_reactor
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = nuclear_reactor
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_10_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = nuclear_reactor
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = nuclear_reactor
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_10_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
    					type = nuclear_reactor
    					level = 1
    					instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = nuclear_reactor
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_10_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = nuclear_reactor
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = nuclear_reactor
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_add_technology_button_10_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					OWNER = {
						set_technology = {
							nukes = 1
							nuclear_reactor = 1
						}
					}
				}
				if = {
					limit = {
						any_state = {
							has_state_flag = bst_marked
						}
					}
					every_state = {
						limit = {
							has_state_flag = bst_marked
						}
						OWNER = {
							set_technology = {
								nukes = 1
								nuclear_reactor = 1
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_min_button_11_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_border_11 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = bunker
							level = 0
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_border = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = bunker
								level = 0
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_border = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_border_11 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = bunker
							level = 0
							instant_build = yes
							province = {
								all_provinces = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = bunker
								level = 0
								instant_build = yes
								province = {
									all_provinces = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_11_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_border_11 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
    						type = bunker
    						level = 1
    						instant_build = yes
							province = {
								all_provinces = yes
								limit_to_border = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							add_building_construction = {
    							type = bunker
    							level = 1
    							instant_build = yes
								province = {
									all_provinces = yes
									limit_to_border = yes
								}
							}
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_border_11 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
    						type = bunker
    						level = 1
    						instant_build = yes
							province = {
								all_provinces = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							add_building_construction = {
								type = bunker
								level = 1
								instant_build = yes
								province = {
									all_provinces = yes
								}
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_11_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_border_11 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = bunker
							level = 1000
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_border = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = bunker
								level = 1000
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_border = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_border_11 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = bunker
							level = 1000
							instant_build = yes
							province = {
								all_provinces = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = bunker
								level = 1000
								instant_build = yes
								province = {
									all_provinces = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_limit_border_11_click = {
				if = {
					limit = {
						has_global_flag = bst_limit_to_border_11
					}
					clr_global_flag = bst_limit_to_border_11
					else = {
						set_global_flag = bst_limit_to_border_11
					}
				}
			}
			bst_min_button_12_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_base_12 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = coastal_bunker
							level = 0
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_naval_base = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = coastal_bunker
								level = 0
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_naval_base = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_base_12 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = coastal_bunker
							level = 0
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_coastal = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = coastal_bunker
								level = 0
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_coastal = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_12_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_base_12 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
    						type = coastal_bunker
    						level = 1
    						instant_build = yes
							province = {
								all_provinces = yes
								limit_to_naval_base = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							add_building_construction = {
    							type = coastal_bunker
    							level = 1
    							instant_build = yes
								province = {
									all_provinces = yes
									limit_to_naval_base = yes
								}
							}
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_base_12 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
    						type = coastal_bunker
    						level = 1
    						instant_build = yes
							province = {
								all_provinces = yes
								limit_to_coastal = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							add_building_construction = {
    							type = coastal_bunker
    							level = 1
    							instant_build = yes
								province = {
									all_provinces = yes
									limit_to_coastal = yes
								}
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_12_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_base_12 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = coastal_bunker
							level = 1000
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_naval_base = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = coastal_bunker
								level = 1000
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_naval_base = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_base_12 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = coastal_bunker
							level = 1000
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_coastal = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = coastal_bunker
								level = 1000
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_coastal = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_limit_base_12_click = {
				if = {
					limit = {
						has_global_flag = bst_limit_to_base_12
					}
					clr_global_flag = bst_limit_to_base_12
					else = {
						set_global_flag = bst_limit_to_base_12
					}
				}
			}
			bst_min_button_13_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_base_13 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = naval_base
							level = 0
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_naval_base = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = naval_base
								level = 0
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_naval_base = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_base_13 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = naval_base
							level = 0
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_coastal = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = naval_base
								level = 0
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_coastal = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_13_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_base_13 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
    						type = naval_base
    						level = 1
    						instant_build = yes
							province = {
								all_provinces = yes
								limit_to_naval_base = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							add_building_construction = {
    							type = naval_base
    							level = 1
    							instant_build = yes
								province = {
									all_provinces = yes
									limit_to_naval_base = yes
								}
							}
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_base_13 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
    						type = naval_base
    						level = 1
    						instant_build = yes
							province = {
								all_provinces = yes
								limit_to_coastal = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							add_building_construction = {
    							type = naval_base
    							level = 1
    							instant_build = yes
								province = {
									all_provinces = yes
									limit_to_coastal = yes
								}
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_13_click = {
				if = {
					limit = { has_global_flag = bst_limit_to_base_13 }
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = naval_base
							level = 1000
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_naval_base = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = naval_base
								level = 1000
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_naval_base = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				if = {
					limit = { 
						NOT = { has_global_flag = bst_limit_to_base_13 }
					}
					if = {
						limit = {
							all_state = {
								NOT = { has_state_flag = bst_marked }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = naval_base
							level = 1000
							instant_build = yes
							province = {
								all_provinces = yes
								limit_to_coastal = yes
							}
						}
					}
					if = {
						limit = {
							any_state = { has_state_flag = bst_marked }
						}
						every_state = {
							limit = { has_state_flag = bst_marked }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 14 }
							set_building_level = {
								type = naval_base
								level = 1000
								instant_build = yes
								province = {
									all_provinces = yes
									limit_to_coastal = yes
								}
							}
							clr_state_flag = bst_marked
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_limit_base_13_click = {
				if = {
					limit = {
						has_global_flag = bst_limit_to_base_13
					}
					clr_global_flag = bst_limit_to_base_13
					else = {
						set_global_flag = bst_limit_to_base_13
					}
				}
			}
			bst_min_button_14_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = fuel_silo
						level = 0
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = fuel_silo
							level = 0
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_remove_buildings_14_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					remove_building = {
    					type = fuel_silo
    					level = 1
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						remove_building = {
							type = fuel_silo
							level = 1
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_14_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					add_building_construction = {
						type = fuel_silo
						level = 1
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						add_building_construction = {
							type = fuel_silo
							level = 1
							instant_build = yes
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_max_button_14_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 14 }
					set_building_level = {
						type = fuel_silo
						level = 1000
						instant_build = yes
					}
				}
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 14 }
						set_building_level = {
							type = fuel_silo
							level = 1000
							instant_build = yes
						}
						clr_state_flag = bst_marked
					}
				}
				bst_count_buildings = yes
			}
			bst_add_technology_button_14_click = {
				if = {
					limit = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
					}
					OWNER = {
						set_technology = {
							fuel_silos = 1
						}
					}
				}
				if = {
					limit = {
						any_state = {
							has_state_flag = bst_marked
						}
					}
					every_state = {
						limit = {
							has_state_flag = bst_marked
						}
						OWNER = {
							set_technology = {
								fuel_silos = 1
							}
						}
					}
				}
				bst_count_buildings = yes
			}
			bst_add_buildings_15_click = {
				toolpack_cycle_action_log_variables = yes
				add_to_array = { global.toolpack_mp_action_array_targets = THIS }
				add_to_array = { global.toolpack_mp_action_array = 14 }
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						every_state = {
							limit = {
								has_state_flag = bst_marked
								NOT = {
									state = PREV
								}
							}
							build_railway = {
								level = 1
								build_only_on_allied = no
								#fallback = yes
								start_state = THIS
								target_state = PREV
							}
						}
					}
				}
			}
			bst_max_button_15_click = {
				toolpack_cycle_action_log_variables = yes
				add_to_array = { global.toolpack_mp_action_array_targets = THIS }
				add_to_array = { global.toolpack_mp_action_array = 14 }
				if = {
					limit = {
						any_state = { has_state_flag = bst_marked }
					}
					every_state = {
						limit = { has_state_flag = bst_marked }
						every_state = {
							limit = {
								has_state_flag = bst_marked
								NOT = {
									state = PREV
								}
							}
							build_railway = {
								level = 5
								build_only_on_allied = no
								#fallback = yes
								start_state = THIS
								target_state = PREV
							}
						}
					}
				}
			}
		}
		
		triggers = {
			bst_mark_button_visible = {
				NOT = { has_state_flag = bst_marked }
			}
			bst_unmark_button_visible = {
				has_state_flag = bst_marked
			}
			bst_mark_all_click_enabled = {
				FROM.OWNER = {
					any_owned_state = {
						NOT = { has_state_flag = bst_marked }
					}
				}
			}
			bst_mark_cores_click_enabled = {
				FROM.OWNER = {
					any_owned_state = {
						NOT = { has_state_flag = bst_marked }
						is_core_of = this
					}
				}
			}
			bst_mark_colonies_click_enabled = {
				FROM.OWNER = {
					any_owned_state = {
						NOT = { has_state_flag = bst_marked }
						NOT = { is_core_of = this }
					}
				}
			}
			bst_unmark_all_click_enabled = {
				any_state = { has_state_flag = bst_marked }
			}
			bst_collapse_window2_glow_visible = {
				NOT = { has_global_flag = bst_window2_closed }
			}
			bst_min_button_1_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						industrial_complex > 0
					}
					any_state = {
						has_state_flag = bst_marked
						industrial_complex > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_1_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						industrial_complex > 0
					}
					any_state = {
						has_state_flag = bst_marked
						industrial_complex > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_1_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_1_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						free_building_slots = {
							building = industrial_complex
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_min_button_2_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						arms_factory > 0
					}
					any_state = {
						has_state_flag = bst_marked
						arms_factory > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_2_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						arms_factory > 0
					}
					any_state = {
						has_state_flag = bst_marked
						arms_factory > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_2_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_2_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_min_button_3_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						dockyard > 0
					}
					any_state = {
						has_state_flag = bst_marked
						dockyard > 0
					}
					has_global_flag = bst_suspend_limits
				}
				is_coastal = yes
			}
			bst_remove_buildings_3_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						dockyard > 0
					}
					any_state = {
						has_state_flag = bst_marked
						dockyard > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_3_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						is_coastal = yes
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						is_coastal = yes
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_3_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						is_coastal = yes
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						is_coastal = yes
						free_building_slots = {
							building = dockyard
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_min_button_4_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						infrastructure > 0
					}
					any_state = {
						has_state_flag = bst_marked
						infrastructure > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_4_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						infrastructure > 0
					}
					any_state = {
						has_state_flag = bst_marked
						infrastructure > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_4_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						infrastructure < 10
					}
					any_state = {
						has_state_flag = bst_marked
						infrastructure < 10
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_4_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						infrastructure < 10
					}
					any_state = {
						has_state_flag = bst_marked
						infrastructure < 10
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_min_button_5_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						air_base > 0
					}
					any_state = {
						has_state_flag = bst_marked
						air_base > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_5_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						air_base > 0
					}
					any_state = {
						has_state_flag = bst_marked
						air_base > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_5_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						air_base < 10
					}
					any_state = {
						has_state_flag = bst_marked
						air_base < 10
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_5_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						air_base < 10
					}
					any_state = {
						has_state_flag = bst_marked
						air_base < 10
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_min_button_6_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						anti_air_building > 0
					}
					any_state = {
						has_state_flag = bst_marked
						anti_air_building > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_6_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						anti_air_building > 0
					}
					any_state = {
						has_state_flag = bst_marked
						anti_air_building > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_6_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						anti_air_building < 5
					}
					any_state = {
						has_state_flag = bst_marked
						anti_air_building < 5
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_6_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						anti_air_building < 5
					}
					any_state = {
						has_state_flag = bst_marked
						anti_air_building < 5
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_min_button_7_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						radar_station > 0
					}
					any_state = {
						has_state_flag = bst_marked
						radar_station > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_7_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						radar_station > 0
					}
					any_state = {
						has_state_flag = bst_marked
						radar_station > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_7_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						radar_station < 6
					}
					any_state = {
						has_state_flag = bst_marked
						radar_station < 6
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_7_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						radar_station < 6
					}
					any_state = {
						has_state_flag = bst_marked
						radar_station < 6
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_technology_button_7_visible = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						OWNER = {
							NOT = {
								has_tech = radio_detection
								has_tech = cavity_magnatron
								has_tech = centimetric_radar
								has_tech = phased_array
								has_tech = monopulse_radar
							}
						}
					}
					any_state = {
						has_state_flag = bst_marked
						OWNER = {
							NOT = {
								has_tech = radio_detection
								has_tech = cavity_magnatron
								has_tech = centimetric_radar
								has_tech = phased_array
								has_tech = monopulse_radar
							}
						}
					}
				}
			}
			bst_min_button_8_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						synthetic_refinery > 0
					}
					any_state = {
						has_state_flag = bst_marked
						synthetic_refinery > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_8_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						synthetic_refinery > 0
					}
					any_state = {
						has_state_flag = bst_marked
						synthetic_refinery > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_8_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						free_building_slots = {
							building = synthetic_refinery
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						free_building_slots = {
							building = synthetic_refinery
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_8_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						free_building_slots = {
							building = synthetic_refinery
							size > 0
							include_locked = yes
						}
					}
					any_state = {
						has_state_flag = bst_marked
						free_building_slots = {
							building = synthetic_refinery
							size > 0
							include_locked = yes
						}
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_technology_button_8_visible = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						OWNER = {
							NOT = {
								has_tech = synth_oil_experiments
								# has_tech = oil_processing
								# has_tech = improved_oil_processing
								# has_tech = advanced_oil_processing
								# has_tech = modern_oil_processing
								# has_tech = rubber_processing
								# has_tech = improved_rubber_processing
								# has_tech = advanced_rubber_processing
								# has_tech = modern_rubber_processing
							}
						}
					}
					any_state = {
						has_state_flag = bst_marked
						OWNER = {
							NOT = {
								has_tech = synth_oil_experiments
								# has_tech = oil_processing
								# has_tech = improved_oil_processing
								# has_tech = advanced_oil_processing
								# has_tech = modern_oil_processing
								# has_tech = rubber_processing
								# has_tech = improved_rubber_processing
								# has_tech = advanced_rubber_processing
								# has_tech = modern_rubber_processing
							}
						}
					}
				}
			}
			bst_min_button_9_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						rocket_site > 0
					}
					any_state = {
						has_state_flag = bst_marked
						rocket_site > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_9_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						rocket_site > 0
					}
					any_state = {
						has_state_flag = bst_marked
						rocket_site > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_9_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						rocket_site < 2
					}
					any_state = {
						has_state_flag = bst_marked
						rocket_site < 2
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_9_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						rocket_site < 2
					}
					any_state = {
						has_state_flag = bst_marked
						rocket_site < 2
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_technology_button_9_visible = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						OWNER = {
							NOT = {
								has_tech = experimental_rockets
								has_tech = rocket_engines
								has_tech = improved_rocket_engines
								has_tech = advanced_rocket_engines
							}
						}
					}
					any_state = {
						has_state_flag = bst_marked
						OWNER = {
							NOT = {
								has_tech = experimental_rockets
								has_tech = rocket_engines
								has_tech = improved_rocket_engines
								has_tech = advanced_rocket_engines
							}
						}
					}
				}
			}
			bst_min_button_10_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						nuclear_reactor > 0
					}
					any_state = {
						has_state_flag = bst_marked
						nuclear_reactor > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_10_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						nuclear_reactor > 0
					}
					any_state = {
						has_state_flag = bst_marked
						nuclear_reactor > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_10_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						nuclear_reactor < 1
					}
					any_state = {
						has_state_flag = bst_marked
						nuclear_reactor < 1
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_10_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						nuclear_reactor < 1
					}
					any_state = {
						has_state_flag = bst_marked
						nuclear_reactor < 1
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_technology_button_10_visible = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						OWNER = {
							NOT = {
								has_tech = nukes
								has_tech = nuclear_reactor
							}
						}
					}
					any_state = {
						has_state_flag = bst_marked
						OWNER = {
							NOT = {
								has_tech = nukes
								has_tech = nuclear_reactor
							}
						}
					}
				}
			}
			bst_min_button_14_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						fuel_silo > 0
					}
					any_state = {
						has_state_flag = bst_marked
						fuel_silo > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_remove_buildings_14_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						fuel_silo > 0
					}
					any_state = {
						has_state_flag = bst_marked
						fuel_silo > 0
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_buildings_14_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						fuel_silo < 3
					}
					any_state = {
						has_state_flag = bst_marked
						fuel_silo < 3
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_max_button_14_click_enabled = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						fuel_silo < 3
					}
					any_state = {
						has_state_flag = bst_marked
						fuel_silo < 3
					}
					has_global_flag = bst_suspend_limits
				}
			}
			bst_add_technology_button_14_visible = {
				OR = {
					AND = {
						all_state = {
							NOT = { has_state_flag = bst_marked }
						}
						OWNER = {
							NOT = {
								has_tech = fuel_silos
							}
						}
					}
					any_state = {
						has_state_flag = bst_marked
						OWNER = {
							NOT = {
								has_tech = fuel_silos
							}
						}
					}
				}
			}
			bst_add_buildings_15_click_enabled = {
				any_state = {
					has_state_flag = bst_marked
					any_state = {
						NOT = {
							state = PREV
						}
						has_state_flag = bst_marked
					}
				}
			}
			bst_max_button_15_click_enabled = {
				any_state = {
					has_state_flag = bst_marked
					any_state = {
						NOT = {
							state = PREV
						}
						has_state_flag = bst_marked
					}
				}
			}
			bst_min_button_11_click_enabled = {
				always = yes
			}
			bst_remove_buildings_11_click_enabled = {
				always = no
			}
			bst_add_buildings_11_click_enabled = {
				always = yes
			}
			bst_max_button_11_click_enabled = {
				always = yes
			}
			bst_glow_11_visible = {
				has_global_flag = bst_limit_to_border_11
			}
			bst_min_button_12_click_enabled = {
				is_coastal = yes
			}
			bst_remove_buildings_12_click_enabled = {
				always = no
			}
			bst_add_buildings_12_click_enabled = {
				is_coastal = yes
			}
			bst_max_button_12_click_enabled = {
				is_coastal = yes
			}
			bst_glow_12_visible = {
				has_global_flag = bst_limit_to_base_12
			}
			bst_min_button_13_click_enabled = {
				is_coastal = yes
			}
			bst_remove_buildings_13_click_enabled = {
				always = no
			}
			bst_add_buildings_13_click_enabled = {
				is_coastal = yes
			}
			bst_max_button_13_click_enabled = {
				is_coastal = yes
			}
			bst_glow_13_visible = {
				has_global_flag = bst_limit_to_base_13
			}
			bst_priority_up_btn_1_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_1 = 0
					}
				}
			}
			bst_priority_up_btn_2_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_2 = 0
					}
				}
			}
			bst_priority_up_btn_3_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_3 = 0
					}
				}
			}
			bst_priority_up_btn_4_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_4 = 0
					}
				}
			}
			bst_priority_up_btn_5_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_5 = 0
					}
				}
			}
			bst_priority_up_btn_6_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_6 = 0
					}
				}
			}
			bst_priority_up_btn_7_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_7 = 0
					}
				}
			}
			bst_priority_up_btn_8_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_8 = 0
					}
				}
			}
			bst_priority_up_btn_9_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_9 = 0
					}
				}
			}
			bst_priority_up_btn_10_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_10 = 0
					}
				}
			}
			bst_priority_up_btn_11_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_11 = 0
					}
				}
			}
			bst_priority_up_btn_12_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_12 = 0
					}
				}
			}
			bst_priority_up_btn_13_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_13 = 0
					}
				}
			}
			bst_priority_up_btn_14_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_14 = 0
					}
				}
			}
			bst_priority_up_btn_15_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_15 = 0
					}
				}
			}
			bst_priority_down_btn_1_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_1 = 462
					}
				}
			}
			bst_priority_down_btn_2_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_2 = 462
					}
				}
			}
			bst_priority_down_btn_3_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_3 = 462
					}
				}
			}
			bst_priority_down_btn_4_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_4 = 462
					}
				}
			}
			bst_priority_down_btn_5_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_5 = 462
					}
				}
			}
			bst_priority_down_btn_6_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_6 = 462
					}
				}
			}
			bst_priority_down_btn_7_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_7 = 462
					}
				}
			}
			bst_priority_down_btn_8_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_8 = 462
					}
				}
			}
			bst_priority_down_btn_9_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_9 = 462
					}
				}
			}
			bst_priority_down_btn_10_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_10 = 462
					}
				}
			}
			bst_priority_down_btn_11_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_11 = 462
					}
				}
			}
			bst_priority_down_btn_12_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_12 = 462
					}
				}
			}
			bst_priority_down_btn_13_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_13 = 462
					}
				}
			}
			bst_priority_down_btn_14_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_14 = 462
					}
				}
			}
			bst_priority_down_btn_15_click_enabled = {
				NOT = {
					check_variable = {
						global.bst_position_15 = 462
					}
				}
			}
		}
	}
	bst_window2 = {
	
		context_type = selected_country_context
		
		window_name = "bst_window2"
		
		visible = {
			ROOT = {
				is_ai = no
				has_global_flag = bst_enabled
				NOT = { has_global_flag = bst_window2_closed }
				OR = {
					has_country_flag = tp_is_host
					NOT = {
						has_global_flag = tp_is_multiplayer
					}
				}
			}
		}
		effects = {
			bst_window2_reload_button_click = {
				bst_count_buildings = yes
			}
		}
		triggers = {
			bst_controlled_states_amount_visible = {
				OR = {
					check_variable = { This.num_controlled_states > This.num_owned_states }
					check_variable = { This.num_controlled_states < This.num_owned_states }
				}
			}
		}
	}
}