class SetFactEffector extends Effector
{
	var m_fact : CName;
	var m_value : Int32;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_fact = TweakDBInterface.GetCName( record + T".fact", '' );
		m_value = TweakDBInterface.GetInt( record + T".value", 0 );
	}

	protected override function ActionOn( owner : GameObject )
	{
		GameInstance.GetQuestsSystem( owner.GetGame() ).SetFact( m_fact, m_value );
	}

}

class ToggleFactEffector extends Effector
{
	var m_fact : CName;
	var m_valueOn : Int32;
	var m_valueOff : Int32;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		m_fact = TweakDBInterface.GetCName( record + T".fact", '' );
		m_valueOn = TweakDBInterface.GetInt( record + T".valueOn", 0 );
		m_valueOff = TweakDBInterface.GetInt( record + T".valueOff", 0 );
	}

	protected override function ActionOn( owner : GameObject )
	{
		GameInstance.GetQuestsSystem( owner.GetGame() ).SetFact( m_fact, m_valueOn );
	}

	protected override function ActionOff( owner : GameObject )
	{
		GameInstance.GetQuestsSystem( owner.GetGame() ).SetFact( m_fact, m_valueOff );
	}

}

