import class gameuiInGameCharacterCustomizationGameController extends gameuiBaseMenuGameController
{

	protected event OnPuppetReady( sceneName : CName, puppet : gamePuppet )
	{
		var transactionSystem : TransactionSystem;
		var gender : CName;
		var item : ItemID;
		transactionSystem = GameInstance.GetTransactionSystem( puppet.GetGame() );
		gender = puppet.GetResolvedGenderName();
		if( gender == 'Male' )
		{
			item = ItemID.FromTDBID( T"Items.CharacterCustomizationMaHead" );
		}
		else if( gender == 'Female' )
		{
			item = ItemID.FromTDBID( T"Items.CharacterCustomizationWaHead" );
		}
		transactionSystem.GiveItem( puppet, item, 1 );
		transactionSystem.AddItemToSlot( puppet, EquipmentSystem.GetPlacementSlot( item ), item );
		item = ItemID.FromTDBID( T"Items.CharacterCustomizationArms" );
		transactionSystem.GiveItem( puppet, item, 1 );
		transactionSystem.AddItemToSlot( puppet, EquipmentSystem.GetPlacementSlot( item ), item );
		UpdateCensorshipItems( puppet, transactionSystem, gender );
	}

	public function UpdateCensorshipItems( puppet : gamePuppet, transactionSystem : TransactionSystem, gender : CName )
	{
		var characterCustomizationSystem : gameuiICharacterCustomizationSystem;
		var item1, item2 : ItemID;
		item1 = ItemID.FromTDBID( T"Items.Underwear_Basic_01_Bottom" );
		item2 = ItemID.FromTDBID( T"Items.Underwear_Basic_01_Top" );
		transactionSystem.RemoveItemFromSlot( puppet, EquipmentSystem.GetPlacementSlot( item1 ) );
		transactionSystem.RemoveItemByTDBID( puppet, ItemID.GetTDBID( item1 ), 1 );
		if( gender == 'Female' )
		{
			transactionSystem.RemoveItemFromSlot( puppet, EquipmentSystem.GetPlacementSlot( item2 ) );
			transactionSystem.RemoveItemByTDBID( puppet, ItemID.GetTDBID( item2 ), 1 );
		}
		characterCustomizationSystem = GameInstance.GetCharacterCustomizationSystem( puppet.GetGame() );
		if( !( characterCustomizationSystem.IsNudityAllowed() ) )
		{
			transactionSystem.GiveItem( puppet, item1, 1 );
			transactionSystem.AddItemToSlot( puppet, EquipmentSystem.GetPlacementSlot( item1 ), item1 );
			if( gender == 'Female' )
			{
				transactionSystem.GiveItem( puppet, item2, 1 );
				transactionSystem.AddItemToSlot( puppet, EquipmentSystem.GetPlacementSlot( item2 ), item2 );
			}
		}
	}

}

