abstract class BaseSkillCheckContainer extends IScriptable
{
	protected persistent var m_hackingCheckSlot : HackingSkillCheck;
	protected persistent var m_engineeringCheckSlot : EngineeringSkillCheck;
	protected persistent var m_demolitionCheckSlot : DemolitionSkillCheck;
	protected persistent var m_isInitialized : Bool;

	public virtual function Initialize( container : BaseSkillCheckContainer )
	{
		if( m_isInitialized == false )
		{
			m_isInitialized = true;
		}
	}

	public final function InitializeBackdoor( difficulty : EGameplayChallengeLevel )
	{
		if( !( m_hackingCheckSlot ) )
		{
			m_hackingCheckSlot = new HackingSkillCheck;
		}
		if( !( m_hackingCheckSlot.IsPassed() ) )
		{
			m_hackingCheckSlot.SetAlternativeName( T"Interactions.ConnectPersonalLink" );
			m_hackingCheckSlot.SetDifficulty( difficulty );
			m_hackingCheckSlot.SetDuration( 1.0 );
			m_hackingCheckSlot.Initialize();
		}
	}

	public const function IsInitialized() : Bool
	{
		return m_isInitialized;
	}

	public const function GetEngineeringSlot() : EngineeringSkillCheck
	{
		return m_engineeringCheckSlot;
	}

	public const function GetDemolitionSlot() : DemolitionSkillCheck
	{
		return m_demolitionCheckSlot;
	}

	public const function GetHackingSlot() : HackingSkillCheck
	{
		return m_hackingCheckSlot;
	}

	protected function TryToInitialize( slotToInitialize : SkillCheckBase )
	{
		if( slotToInitialize != NULL )
		{
			slotToInitialize.Initialize();
		}
	}

}

class HackingContainer extends BaseSkillCheckContainer
{
	instanceeditable inlined var m_hackingCheck : HackingSkillCheck;

	public override function Initialize( container : BaseSkillCheckContainer )
	{
		var myContainer : HackingContainer;
		myContainer = ( ( HackingContainer )( container ) );
		if( myContainer == NULL )
		{
			return;
		}
		if( !( m_hackingCheckSlot ) || !( m_hackingCheckSlot.IsPassed() ) )
		{
			m_hackingCheckSlot = myContainer.m_hackingCheck;
			TryToInitialize( m_hackingCheckSlot );
		}
		super.Initialize( container );
	}

}

class EngineeringContainer extends BaseSkillCheckContainer
{
	instanceeditable inlined var m_engineeringCheck : EngineeringSkillCheck;

	public override function Initialize( container : BaseSkillCheckContainer )
	{
		var myContainer : EngineeringContainer;
		myContainer = ( ( EngineeringContainer )( container ) );
		if( myContainer == NULL )
		{
			return;
		}
		if( !( m_engineeringCheckSlot ) || !( m_engineeringCheckSlot.IsPassed() ) )
		{
			m_engineeringCheckSlot = myContainer.m_engineeringCheck;
			TryToInitialize( m_engineeringCheckSlot );
		}
		super.Initialize( container );
	}

}

class DemolitionContainer extends BaseSkillCheckContainer
{
	instanceeditable inlined var m_demolitionCheck : DemolitionSkillCheck;

	public override function Initialize( container : BaseSkillCheckContainer )
	{
		var myContainer : DemolitionContainer;
		myContainer = ( ( DemolitionContainer )( container ) );
		if( myContainer == NULL )
		{
			return;
		}
		if( !( m_demolitionCheckSlot ) || !( m_demolitionCheckSlot.IsPassed() ) )
		{
			m_demolitionCheckSlot = myContainer.m_demolitionCheck;
			TryToInitialize( m_demolitionCheckSlot );
		}
		super.Initialize( container );
	}

}

class EngDemoContainer extends BaseSkillCheckContainer
{
	instanceeditable inlined var m_engineeringCheck : EngineeringSkillCheck;
	instanceeditable inlined var m_demolitionCheck : DemolitionSkillCheck;

	public override function Initialize( container : BaseSkillCheckContainer )
	{
		var myContainer : EngDemoContainer;
		myContainer = ( ( EngDemoContainer )( container ) );
		if( myContainer == NULL )
		{
			return;
		}
		if( !( m_engineeringCheckSlot ) || !( m_engineeringCheckSlot.IsPassed() ) )
		{
			m_engineeringCheckSlot = myContainer.m_engineeringCheck;
			TryToInitialize( m_engineeringCheckSlot );
		}
		if( !( m_demolitionCheckSlot ) || !( m_demolitionCheckSlot.IsPassed() ) )
		{
			m_demolitionCheckSlot = myContainer.m_demolitionCheck;
			TryToInitialize( m_demolitionCheckSlot );
		}
		super.Initialize( container );
	}

}

class HackEngContainer extends BaseSkillCheckContainer
{
	instanceeditable inlined var m_hackingCheck : HackingSkillCheck;
	instanceeditable inlined var m_engineeringCheck : EngineeringSkillCheck;

	public override function Initialize( container : BaseSkillCheckContainer )
	{
		var myContainer : HackEngContainer;
		myContainer = ( ( HackEngContainer )( container ) );
		if( myContainer == NULL )
		{
			return;
		}
		if( !( m_hackingCheckSlot ) || !( m_hackingCheckSlot.IsPassed() ) )
		{
			m_hackingCheckSlot = myContainer.m_hackingCheck;
			TryToInitialize( m_hackingCheckSlot );
			if( m_hackingCheckSlot && ( m_hackingCheckSlot.GetDuration() == 0.0 ) )
			{
				m_hackingCheckSlot.SetDuration( 3.0 );
			}
		}
		if( !( m_engineeringCheckSlot ) || !( m_engineeringCheckSlot.IsPassed() ) )
		{
			m_engineeringCheckSlot = myContainer.m_engineeringCheck;
			TryToInitialize( m_engineeringCheckSlot );
		}
		super.Initialize( container );
	}

}

class GenericContainer extends BaseSkillCheckContainer
{
	instanceeditable inlined var m_hackingCheck : HackingSkillCheck;
	instanceeditable inlined var m_engineeringCheck : EngineeringSkillCheck;
	instanceeditable inlined var m_demolitionCheck : DemolitionSkillCheck;

	public override function Initialize( container : BaseSkillCheckContainer )
	{
		var myContainer : GenericContainer;
		myContainer = ( ( GenericContainer )( container ) );
		if( myContainer == NULL )
		{
			return;
		}
		if( !( m_hackingCheckSlot ) || !( m_hackingCheckSlot.IsPassed() ) )
		{
			m_hackingCheckSlot = myContainer.m_hackingCheck;
			TryToInitialize( m_hackingCheckSlot );
		}
		if( !( m_engineeringCheckSlot ) || !( m_engineeringCheckSlot.IsPassed() ) )
		{
			m_engineeringCheckSlot = myContainer.m_engineeringCheck;
			TryToInitialize( m_engineeringCheckSlot );
		}
		if( !( m_demolitionCheckSlot ) || !( m_demolitionCheckSlot.IsPassed() ) )
		{
			m_demolitionCheckSlot = myContainer.m_demolitionCheck;
			TryToInitialize( m_demolitionCheckSlot );
		}
		super.Initialize( container );
	}

}

