﻿#################################################################
#####				TRADE ROUTE GRAPHICS					#####
#################################################################

#################################################################
#####				PASSANGER TRAIN							#####
#################################################################
passenger_train = {
	valid_spline_styles = { "railroad" }

	speed = 1.0
	min_caravan_distance = 15.0
	routes_to_caravans_ratio = 0.2
	max_count = 0
	max_path_length = 5

	possible = {
		gfx_passanger_train_trigger = yes
	}

	tags = {
		experimental_or_steam = {
			trigger = {
				OR = {
					gfx_experimental_locomotive_trigger = yes
					gfx_steam_locomotive_trigger = yes
				}
			}
		}
		electrical = {
			trigger = {
				gfx_electrical_locomotive_trigger = yes
			}
		}
		diesel = {
			trigger = {
				gfx_diesel_locomotive_trigger = yes
			}
		}
	}

	route_entities = {
		steam_locomotive_01 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_01_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_02 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_02_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_03 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_03_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_04 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_04_entity"
			position = 0
			entity_length = 2
		}

		steam_locomotive_05 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_05_entity"
			position = 0
			entity_length = 2
		}

		electric_locomotive_01 = {
			tags = { electrical }
			entity = "train_electric_01_entity"
			position = 0
			entity_length = 1.85
		}

		diesel_locomotive_01 = {
			tags = { diesel }
			entity = "train_diesel_01_entity"
			position = 0
			entity_length = 2.1
		}



		passenger_wagon_1 = {
			entity = "european_train_passenger_wagon_01_entity"
			position = 1
			
			entity_length = 1.74
			
			count = {
				scope:state = {
					market = {
						mg:transportation = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 6
			}
		}
		passenger_wagon_2 = {
			entity = "european_train_passenger_wagon_02_entity"
			position = 1
			
			entity_length = 1.74
			
			count = {
				scope:state = {
					market = {
						mg:transportation = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 6
			}
		}
		passenger_wagon_3 = {
			entity = "european_train_passenger_wagon_03_entity"
			position = 1
			
			entity_length = 1.74
			
			count = {
				scope:state = {
					market = {
						mg:transportation = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 6
			}
		}
	}
}


#################################################################
#####				MINING TRAIN							#####
#################################################################
mining_train = {
	valid_spline_styles = { "railroad" }

	speed = 1.0
	min_caravan_distance = 15.0
	routes_to_caravans_ratio = 0.2
	max_count = 0
	max_path_length = 5

	possible = {
		gfx_mining_train_trigger = yes
	}

	tags = {
		experimental_or_steam = {
			trigger = {
				OR = {
					gfx_experimental_locomotive_trigger = yes
					gfx_steam_locomotive_trigger = yes
				}
			}
		}
		electrical = {
			trigger = {
				gfx_electrical_locomotive_trigger = yes
			}
		}
		diesel = {
			trigger = {
				gfx_diesel_locomotive_trigger = yes
			}
		}

		coal = {
			trigger = {
				scope:state = {
					has_building = building_coal_mine
				}
			}
		}
		iron = {
			trigger = {
				scope:state = {
					has_building = building_iron_mine
				}
			}
		}
		steel = {
			trigger = {
				scope:state = {
					has_building = building_steel_mill
				}
			}
		}
		sulfur = {
			trigger = {
				scope:state = {
					has_building = building_sulfur_mine
				}
			}
		}
	}

	route_entities = {
		steam_locomotive_01 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_01_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_02 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_02_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_03 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_03_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_04 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_04_entity"
			position = 0
			entity_length = 2
		}

		steam_locomotive_05 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_05_entity"
			position = 0
			entity_length = 2
		}

		electric_locomotive_01 = {
			tags = { electrical }
			entity = "train_electric_01_entity"
			position = 0
			entity_length = 1.85
		}

		diesel_locomotive_01 = {
			tags = { diesel }
			entity = "train_diesel_01_entity"
			position = 0
			entity_length = 2.1
		}



		cargo_coal_wagon_1 = {
			tags = { coal }
			entity = "train_cargo_coal_01_entity"
			position = 1
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:coal = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_coal_wagon_2 = {
			tags = { coal }
			entity = "train_cargo_coal_02_entity"
			position = 1
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:coal = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_coal_wagon_3 = {
			tags = { coal }
			entity = "train_cargo_coal_03_entity"
			position = 1
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:coal = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}


		
		cargo_iron_wagon_1 = {
			tags = { iron }
			entity = "train_cargo_iron_01_entity"
			position = 2
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:iron = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_iron_wagon_2 = {
			tags = { iron }
			entity = "train_cargo_iron_02_entity"
			position = 2
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:iron = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_iron_wagon_3 = {
			tags = { iron }
			entity = "train_cargo_iron_03_entity"
			position = 2
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:iron = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}



		cargo_steel_wagon_1 = {
			tags = { steel }
			entity = "train_cargo_steel_01_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:steel = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_steel_wagon_2 = {
			tags = { steel }
			entity = "train_cargo_steel_02_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:steel = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_steel_wagon_3 = {
			tags = { steel }
			entity = "train_cargo_steel_03_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:steel = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_steel_wagon_4 = {
			tags = { steel }
			entity = "train_cargo_steel_04_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:steel = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}



		cargo_sulfur_wagon_1 = {
			tags = { sulfur }
			entity = "train_cargo_sulfur_01_entity"
			position = 3
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:sulfur = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 4
			}
		}
		cargo_sulfur_wagon_2 = {
			tags = { sulfur }
			entity = "train_cargo_sulfur_02_entity"
			position = 3
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:sulfur = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 4
			}
		}
		cargo_sulfur_wagon_3 = {
			tags = { sulfur }
			entity = "train_cargo_sulfur_03_entity"
			position = 3
			entity_length = 1.05
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:sulfur = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 4
			}
		}



	}
}



#################################################################
#####				FORESTRY TRAIN							#####
#################################################################
forestry_train = {
	valid_spline_styles = { "railroad" }

	speed = 1.0
	min_caravan_distance = 15.0
	routes_to_caravans_ratio = 0.2
	max_count = 0
	max_path_length = 5

	possible = {
		gfx_forestry_train_trigger = yes
	}

	tags = {
		experimental_or_steam = {
			trigger = {
				OR = {
					gfx_experimental_locomotive_trigger = yes
					gfx_steam_locomotive_trigger = yes
				}
			}
		}
		electrical = {
			trigger = {
				gfx_electrical_locomotive_trigger = yes
			}
		}
		diesel = {
			trigger = {
				gfx_diesel_locomotive_trigger = yes
			}
		}

		log = {
			trigger = {
				scope:state = {
					has_building = building_logging_camp
					any_scope_building = {
						has_active_production_method = pm_no_hardwood
					}
				}
			}
		}
		hardwood = {
			trigger = {
				scope:state = {
					has_building = building_logging_camp
					NOT = {
						any_scope_building = {
							has_active_production_method = pm_no_hardwood
						}
					}
				}
			}
		}
	}

	route_entities = {
		steam_locomotive_01 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_01_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_02 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_02_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_03 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_03_entity"
			position = 0
			entity_length = 2
		}
		
		steam_locomotive_04 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_04_entity"
			position = 0
			entity_length = 2
		}

		steam_locomotive_05 = {
			tags = { experimental_or_steam }
			entity = "european_train_locomotive_05_entity"
			position = 0
			entity_length = 2
		}

		electric_locomotive_01 = {
			tags = { electrical }
			entity = "train_electric_01_entity"
			position = 0
			entity_length = 1.85
		}

		diesel_locomotive_01 = {
			tags = { diesel }
			entity = "train_diesel_01_entity"
			position = 0
			entity_length = 2.1
		}



		cargo_log_wagon_1 = {
			tags = { log }
			entity = "train_cargo_log_01_entity"
			position = 1
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:wood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_log_wagon_2 = {
			tags = { log }
			entity = "train_cargo_log_02_entity"
			position = 1
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:wood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_log_wagon_3 = {
			tags = { log }
			entity = "train_cargo_log_03_entity"
			position = 1
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:wood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_log_wagon_4 = {
			tags = { log }
			entity = "train_cargo_log_04_entity"
			position = 1
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:wood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}



		cargo_hardwood_wagon_1 = {
			tags = { hardwood }
			entity = "train_cargo_hardwood_01_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:hardwood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_hardwood_wagon_2 = {
			tags = { hardwood }
			entity = "train_cargo_hardwood_02_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:hardwood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_hardwood_wagon_3 = {
			tags = { hardwood }
			entity = "train_cargo_hardwood_03_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:hardwood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
		cargo_hardwood_wagon_4 = {
			tags = { hardwood }
			entity = "train_cargo_hardwood_04_entity"
			position = 2
			entity_length = 1.6
			
			count = {
				value = 0
				scope:state = {
					market = {
						mg:hardwood = {
							add = market_goods_sell_orders
						}
					}
				}
				divide = 1000
				add = 1
				max = 5
			}
		}
	}
}

#################################################################
#####				TRADE ROUTE GRAPHICS END				#####
#################################################################





#################################################################
#####				MILITARY MOBILIZATION					#####
#################################################################

military_mobilization_railroad = {
	valid_spline_styles = { "railroad" }

	speed = 1.0
	min_caravan_distance = 15.0
	routes_to_caravans_ratio = 0.2
	max_count = 0
	max_path_length = 5

	possible = {
		is_at_war = yes
		any_military_formation = {
			is_mobilized = yes
		}
	}

	tags = {
		artillery = {
			trigger = {
				market = {
					mg:artillery = {
						market_goods_sell_orders > 5
					}
				}
			}
		}
		more_artillery = {
			trigger = {
				market = {
					mg:artillery = {
						market_goods_sell_orders > 20
					}
				}
			}
		}
	}
	
	route_entities = {
		front_turret_01 = {
			tags = { artillery }
			entity = "military_transport_railroad_armoredcart_generic_entity"
			position = 0
			entity_length = 1.4
			
			count = {
				integer_range = {
					min = 0
					max = 1
				}
			}
		}

		military_locomotive_01 = {
			entity = "military_transport_railroad_armoredlocomotive_generic_entity"
			position = 1
			entity_length = 2
		}
		
		infantry_wagon_01 = {
			entity = "military_transport_railroad_infantrycart_generic_entity"
			position = 2
			entity_length = 1.4
			
			count = {
				market = {
					mg:small_arms = {
						add = market_goods_sell_orders
					}
				}
				divide = 500
				add = 1
				max = 6
			}
		}

		artillery_transport_01 = {
			tags = { more_artillery }
			entity = "military_transport_railroad_artillery_shrapnel_generic_entity"
			position = 3
			entity_length = 1.4
			
			count = {
				market = {
					mg:artillery = {
						add = market_goods_sell_orders
					}
				}

				divide = 200
				add = 1
				max = 3
			}
		}
	}
}
#################################################################
#####			MILITARY MOBILIZATION END					#####
#################################################################
