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

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

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

POL_pzinz_organization = {
	include = generic_infantry_tank_organization
	icon = GFX_idea_POL_pzinz
	
	allowed = {	
		OR = {
			AND = {
				tag = POL
				OR = {
					has_dlc = "Poland: United and Ready"
					has_dlc = "No Step Back"
				}
			}
			tag = ROM
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = POL } }
			}
			FROM = { NOT = { has_war_with = POL } }
		}
	}
	
	initial_trait = {
		name = POL_mio_trait_multi_role_tank_designer
		
		limit_to_equipment_type = { 
			armor
		}
		
		equipment_bonus = {
			armor_value = -0.05
			maximum_speed = -0.05
			reliability = 0.05
		}
	}
	
	override_trait = {
		token = generic_mio_trait_modular_construction
		any_parent = { POL_mio_trait_cruiser_tanks }
	}

	add_trait = {
		token = POL_mio_trait_cruiser_tanks
		name = POL_mio_trait_cruiser_tanks
		icon = GFX_generic_mio_department_icon_tank_general_engine
		
		position = { x=6 y=1 }  

		any_parent = { generic_mio_trait_medium_tank_improvements generic_mio_trait_heavy_tank_improvements }
		
		limit_to_equipment_type = { medium_tank_chassis heavy_tank_chassis }
		
		equipment_bonus = {
			maximum_speed = 0.1
			breakthrough = 0.05
		} 
	}
}

POL_bbtbp_organization = {
    include = generic_medium_tank_organization
    icon = GFX_idea_pol_bbtbp
    allowed = { 
        tag = POL
    }
}

POL_ksus_organization = {
    include = generic_heavy_tank_organization
    icon = GFX_idea_pol_ksus
    allowed = { 
        tag = POL
    }
}

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

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

POL_stocznia_gdynia_organization = {
	include = generic_escort_ship_organization
	icon = GFX_idea_POL_stocznia_gdynia
	allowed = {	
		tag = POL
		OR = {
			has_dlc = "Poland: United and Ready"
			has_dlc = "No Step Back"
		}
	}
}

POL_stocznia_gdanska_organization = {
	include = generic_raider_ship_organization
	icon = GFX_idea_pol_gdansk_shipyard
	allowed = {	
		tag = POL
	}
	available = {
		FROM = {
			controls_state = 85
			85 = {
				is_demilitarized_zone = no
			}
		}
	}
}


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

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

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

POL_pzl_organization = {
	include = generic_general_aircraft_organization
	icon = GFX_idea_POL_pzl
	allowed = {	
		tag = POL
		OR = {
			has_dlc = "Poland: United and Ready"
			has_dlc = "No Step Back"
		}
	}
	initial_trait = {
		production_bonus = {
			production_capacity_factor = 0.05
		}
	}
	trait = {
        token = POL_mio_trait_pulawski_wing
        name = POL_mio_trait_pulawski_wing
        icon = GFX_generic_mio_trait_icon_air_agility
        special_trait_background = yes
		any_parent = { generic_mio_trait_high_speed_design generic_mio_trait_agility_wing_design }
		
		limit_to_equipment_type = { mio_cat_eq_only_light_fighter_no_cv medium_plane_fighter_airframe medium_plane_scout_plane_airframe }

        position = { x=0 y=3 }
		
		equipment_bonus = {
			air_agility = 0.1
		}
    }
	trait = {
        token = POL_mio_trait_airfoil_shaped_fuselage
        name = POL_mio_trait_airfoil_shaped_fuselage
        icon = GFX_generic_mio_department_icon_plane_strategic_bomber_engine
        special_trait_background = yes
		any_parent = { generic_mio_trait_bomb_trucks generic_mio_trait_fast_bombers }
		
		limit_to_equipment_type = { small_plane_cas_airframe mio_cat_eq_only_tactical_bomber mio_cat_eq_only_strategic_bomber }

        position = { x=3 y=3 }
		
		equipment_bonus = {
			air_agility = 0.05
			air_range = 0.05
		}
    }
}

POL_pws_organization = {
	include = generic_light_aircraft_organization
	icon = GFX_idea_POL_pws
	allowed = {	
		tag = POL
		OR = {
			has_dlc = "Poland: United and Ready"
			has_dlc = "No Step Back"
		}
	}
}

POL_lws_organization = {
	include = generic_medium_aircraft_organization
	icon = GFX_idea_pol_lws
	allowed = {	
		tag = POL
	}
}

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

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


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

POL_fb_organization = {
	include = generic_infantry_equipment_organization
	icon = GFX_idea_POL_fb
	allowed = {	
		tag = POL
		OR = {
			has_dlc = "Poland: United and Ready"
			has_dlc = "No Step Back"
		}
	}
	trait = {
        token = POL_mio_trait_vis_35_pistol
        name = POL_mio_trait_vis_35_pistol
        icon = GFX_generic_mio_trait_icon_soft_attack
        special_trait_background = yes
		any_parent = { generic_mio_trait_reinforced_stocks }

        position = { x=5 y=1 }
		
		equipment_bonus = {
			defense = 0.03
			soft_attack = 0.05
		}
    }
	trait = {
        token = POL_wz_35_anti_tank_rifle
        name = POL_wz_35_anti_tank_rifle
        icon = GFX_generic_mio_trait_icon_ap_attack
        special_trait_background = yes
		any_parent = { generic_mio_trait_heavy_anti_armor_ammunition }

        position = { x=8 y=1 }
		
		equipment_bonus = {
			hard_attack = 0.2
		}
    }
}
POL_pfs_organization = {
	include = generic_support_equipment_organization
	icon = GFX_idea_pol_pfs
	allowed = {	
		tag = POL
	}
}
POL_polski_fiat_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_fiat
	allowed = {	
		tag = POL
	}
	available = {
		FROM = {
			NOT = { has_war_with = ITA }
		}
	}
	initial_trait = {
		production_bonus = {
			production_capacity_factor = 0.05
		}
	}
}
POL_lrl_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_POL_lrl
	allowed = {	
		tag = POL
		OR = {
			has_dlc = "Poland: United and Ready"
			has_dlc = "No Step Back"
		}
	}
}
POL_smpa_organization = {
	include = generic_artillery_organization
	icon = GFX_idea_POL_smpa
	allowed = {	
		tag = POL
		OR = {
			has_dlc = "Poland: United and Ready"
			has_dlc = "No Step Back"
		}
	}
}
POL_ursus_organization = {
	include = generic_armored_car_organization
	icon = GFX_idea_pol_ursus
	allowed = {	
		tag = POL
	}
}

### Foreign Subsidiaries

### POL_USA_ford_motor_company_organization - Polish Ford -> see USA_organizations.txt 

### POL_ENG_vauxhall_organization - Polish Vauxall -> see ENG_organizations.txt 

### POL_FRA_somua_organization - Polish SOMUA -> see FRA_organizations.txt 
