﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	phab_field
893	Unit spawning should respect passability class	historic_bruno	historic_bruno	"Unit spawning is broken because it only considers unit obstructions, meaning both trained and ungarrisoned units can be spawned on terrain that violates their passability class. This is one of the causes of ""land ships"", #771 and #818. I'm working on a fix for #804 which should also fix this (using the PassabilityClass defined in pathfinder.xml).

A few considerations:
 * The current behavior is bad, when spawning fails it just places the unit in the middle of the building which in the case of docks can expose a subtlety of the pathfinder: units on impassable border tiles (as between land and water) can move to other impassable tiles but not actually cross the boundary - meaning they get stuck as land ships if they move onto land.
 * Expand the search outward when spawning units, boats are large and docks have limited space to spawn units.
 * If a unit fails to spawn after training, it could be left blocking the training queue until it finds space or is cancelled. This will require some changes to the queue design and notification of the user.
 * If a unit fails to ungarrison, it could be left garrisoned unless the ejection is forced (e.g. a unit changes ownership while garrisoned)"	defect	new	Should Have	Alpha 7	UI & Simulation				
