class SystemCollapseLifetimeEffector extends Effector
{

	protected export override function Uninitialize( game : GameInstance )
	{
		StatusEffectHelper.RemoveStatusEffect( GetPlayer( game ), T"BaseStatusEffect.SystemCollapseMemoryCostReduction" );
	}

}

class SystemCollapseModifyRevealBarEffector extends Effector
{
	var m_value : Float;

	protected export override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_value = TweakDBInterface.GetFloat( record + T".value", 0.0 );
	}

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

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

	private function ProcessEffector( owner : GameObject )
	{
		var poolSys : StatPoolsSystem;
		var ownerPuppet : ScriptedPuppet;
		var player : PlayerPuppet;
		player = GetPlayer( owner.GetGame() );
		if( !( player.IsBeingRevealed() ) )
		{
			return;
		}
		poolSys = GameInstance.GetStatPoolsSystem( owner.GetGame() );
		ownerPuppet = ( ( ScriptedPuppet )( owner ) );
		if( ownerPuppet && ownerPuppet.IsNetrunnerPuppet() )
		{
			StatusEffectHelper.ApplyStatusEffect( player, T"BaseStatusEffect.RevealInterrupted" );
		}
		else
		{
			poolSys.RequestChangingStatPoolValue( player.GetEntityID(), gamedataStatPoolType.QuickHackUpload, m_value, owner, true, true );
		}
		StatusEffectHelper.ApplyStatusEffect( player, T"BaseStatusEffect.SystemCollapseMemoryCostReduction" );
	}

}

