#####################

###  ##  #  # # #  ## 
 #  #  # ## # # # #   
 #  #### # ## ##   #  
 #  #  # #  # # #   # 
 #  #  # #  # # # ## 

 #################### 


FRA_renault_organization = {
	include = generic_infantry_tank_organization
	icon = GFX_idea_renault
 	allowed = {	
 		always = no
 	}

	visible = {
		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}	

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_FRA_renault_organization_flag
				}
			}
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_renault_mio_flag
				}
			}
		}
	}

	initial_trait = {
		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}
	}

	add_trait = { 
		token = FRA_mio_trait_automitrailleuses
		name = FRA_mio_trait_automitrailleuses
		icon = GFX_generic_mio_trait_icon_maximum_speed
		special_trait_background = yes
		
		position = { x=6 y=0 }  
		
		limit_to_equipment_type = { medium_tank_chassis }
		
		equipment_bonus = {
			maximum_speed = 0.1
			armor_value = -0.05
		} 

	}
	add_trait = {
		token = FRA_mio_trait_b1_bis_suspension
		name = FRA_mio_trait_b1_bis_suspension
		icon = GFX_generic_mio_trait_icon_breakthrough
		special_trait_background = yes
		
		position = { x=0 y=4 }  
		relative_position_id = generic_mio_trait_heavy_tank_improvements
		
		any_parent = { generic_mio_trait_heavy_tank_improvements }
		
		limit_to_equipment_type = { heavy_tank_chassis }
		
		equipment_bonus = {
			maximum_speed = 0.05
			breakthrough = 0.1 
		} 
	}
}

FRA_hotchkiss_organization = {
	include = generic_mobile_tank_organization
	icon = GFX_idea_generic_tank_manufacturer_3
 	allowed = {	
 		always = no
 	}
	add_trait = { 
		token = FRA_mio_trait_l_35
		name = FRA_mio_trait_l_35
		icon = GFX_generic_mio_department_icon_tank_general_weapons
		any_parent = { generic_mio_enlarged_breech }
		relative_position_id = generic_mio_enlarged_breech
		position = { x=1 y=2 }  
		equipment_bonus = {
			hard_attack = 0.05
			ap_attack = 0.05
		}  
	}

	override_trait = {
		token = generic_mio_gunner_sight_improvements
		position = { x=-1 y=2}
	}
}

FRA_apx_organization = {
	include = generic_medium_tank_organization
	icon = GFX_idea_FRA_atelier_puteaux
 	allowed = {	
 		always = no
 	}
}

#FRA_amx_organization = { # TODO set up correct from focus if needed
#	include = generic_mobile_tank_organization
#	icon = GFX_idea_generic_tank_manufacturer_2
#	allowed = {	
#		tag = FRA 
#	}
#}

#####################

 ## #  # ### ###   ## 
#   #  #  #  #  # #   
 #  ####  #  ###   #  
  # #  #  #  #      # 
##  #  # ### #    ##  
 
#####################

FRA_fcm_organization = {
	include = generic_escort_ship_organization
	icon = GFX_idea_fcm
 	allowed = {	
 		always = no
 	}
}

FRA_aeb_organization = {
	include = generic_task_force_ship_organization
	icon = GFX_idea_FRA_aeb
 	allowed = {	
 		always = no
 	}
}

FRA_acl_organization = {
	include = generic_battle_line_ship_organization
	icon = GFX_idea_FRA_acl
 	allowed = {	
 		always = no
 	}
}

FRA_acf_organization = {
	include = generic_raider_ship_organization
	icon = GFX_idea_FRA_acf
 	allowed = {	
 		always = no
 	}
	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_acf_mio_flag
				}
			}
		}
	}
}

###########################

###  #    ##  #  # ###  ## 
#  # #   #  # ## # #   #   
###  #   #### # ## ##   #  
#    #   #  # #  # #     # 
#    ### #  # #  # ### ##  

###########################

FRA_morane_saulnier_organization = {
	include = generic_light_aircraft_organization
	icon = GFX_idea_morane_saulnier
 	allowed = {	
 		always = no
 	}
}

FRA_bloch_organization = {
	include = generic_medium_aircraft_organization
	icon = GFX_idea_bloch
 	allowed = {	
 		always = no
 	}

	visible = {
		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_FRA_bloch_organization_flag
				}
			}
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_bloch_mio_flag
				}
			}
		}
	}
}

FRA_amiot_organization = {
	include = generic_heavy_aircraft_organization
	icon = GFX_idea_amiot
 	allowed = {	
 		always = no
 	}
}

FRA_levasseur_organization = {
	include = generic_naval_aircraft_organization
	icon = GFX_idea_levasseur
	 	allowed = {	
 		always = no
 	}
}

FRA_SNCAC_organization = {
	name = SNCAC
	include = generic_general_aircraft_organization
	icon = GFX_idea_FRA_sncac
	 	allowed = {	
 		always = no
 	}
	visible = {
		FROM = { has_country_flag = FRA_SNCAC_formed }
	}
}

################################### 

#   #  ##  ### ### ###  ### ### #   
## ## #  #  #  #   #  #  #  #   #   
# # # ####  #  ##  ###   #  ##  #   
#   # #  #  #  #   #  #  #  #   #   
#   # #  #  #  ### #  # ### ### ### 


###################################



FRA_panhard_organization = {
	include = generic_armored_car_organization
	icon = GFX_idea_FRA_panhard
	 	allowed = {	
 		always = no
 	}
}

FRA_somua_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_somua
	
 	allowed = {	
 		always = no
 	}

	visible = {
		IF = { 
			limit = {
				FROM = { tag = POL }
			}
			FROM = {
				has_country_flag = POL_somua_motors
			}
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}
	}
}

FRA_mas_organization = {
	include = generic_infantry_equipment_organization
	icon = GFX_idea_mas
	
 	allowed = {	
 		always = no
 	}
	
	visible = {
		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_FRA_mas_organization_flag
				}
			}
		}
	}
}

FRA_schneider_organization = {
	include = generic_artillery_organization
	icon = GFX_idea_schneider
 	allowed = {	
 		always = no
 	}
}