class UseConsumableEffector extends Effector
{

	protected export override function ActionOn( owner : GameObject )
	{
		ExecuteAction( owner );
	}

	protected export override function RepeatedAction( owner : GameObject )
	{
		ExecuteAction( owner );
	}

	private function ExecuteAction( owner : GameObject )
	{
		var consumableItemId : ItemID;
		var actionID : TweakDBID;
		var action : BaseItemAction;
		consumableItemId = EquipmentSystem.GetData( owner ).GetActiveConsumable();
		switch( RPGManager.GetItemType( consumableItemId ) )
		{
			case gamedataItemType.Cyb_HealingAbility:
				actionID = ItemActionsHelper.GetUseAction( consumableItemId ).GetID();
			break;
			default:
				actionID = ItemActionsHelper.GetUseHealChargeAction( consumableItemId ).GetID();
			break;
		}
		action = ItemActionsHelper.SetupItemAction( owner.GetGame(), owner, RPGManager.GetItemData( owner.GetGame(), owner, consumableItemId ), actionID, true );
		action.ProcessRPGAction( owner.GetGame() );
	}

}

