class SurveillanceCameraStatus extends BaseDeviceStatus
{

	public override function SetProperties( const deviceRef : ScriptableDeviceComponentPS )
	{
		super.SetProperties( deviceRef );
		prop = DeviceActionPropertyFunctions.SetUpProperty_IntRanged( 'STATUS', ( ( Int32 )( deviceRef.GetDeviceState() ) ), ( ( Int32 )( ( ( SurveillanceCameraControllerPS )( deviceRef ) ).GetCameraState() ) ), 0 );
	}

	public const override function GetCurrentDisplayString() : String
	{
		var str : String;
		var baseStateValue : Int32;
		var extendedStateValue : Int32;
		baseStateValue = ( ( Int32 )prop.first );
		extendedStateValue = ( ( Int32 )prop.second );
		if( baseStateValue > 0 )
		{
			switch( extendedStateValue )
			{
				case -1:
					str = "LocKey#17801";
				break;
				case 0:
					str = "LocKey#17802";
				break;
				case 1:
					str = "LocKey#17803";
				break;
				default:
					str = "Unknown State - DEBUG";
			}
			return str;
		}
		else
		{
			return super.GetCurrentDisplayString();
		}
	}

	public const override function GetStatusValue() : Int32
	{
		if( ( ( Int32 )prop.first ) > 0 )
		{
			return ( ( Int32 )prop.second );
		}
		else
		{
			return ( ( Int32 )prop.first );
		}
	}

	public static function IsDefaultConditionMet( device : ScriptableDeviceComponentPS, const context : ref< GetActionsContext > ) : Bool
	{
		if( IsAvailable( device ) && IsClearanceValid( context.clearance ) )
		{
			return true;
		}
		return false;
	}

	public static function IsAvailable( device : ScriptableDeviceComponentPS ) : Bool
	{
		return BaseDeviceStatus.IsAvailable( device );
	}

	public static function IsClearanceValid( clearance : Clearance ) : Bool
	{
		return BaseDeviceStatus.IsClearanceValid( clearance );
	}

	public static function IsContextValid( const context : ref< GetActionsContext > ) : Bool
	{
		return BaseDeviceStatus.IsContextValid( context );
	}

	public override function GetTweakDBChoiceRecord() : String
	{
		return "wrong_action";
	}

}

class QuestForceTakeControlOverCamera extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestForceTakeControlOverCamera';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestForceTakeControlOverCamera', true, 'QuestForceTakeControlOverCamera', 'QuestForceTakeControlOverCamera' );
	}

}

class QuestForceTakeControlOverCameraWithChain extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestForceTakeControlOverCameraWithChain';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestForceTakeControlOverCameraWithChain', true, 'QuestForceTakeControlOverCameraWithChain', 'QuestForceTakeControlOverCameraWithChain' );
	}

}

class QuestForceStopTakeControlOverCamera extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestForceStopTakeControlOverCamera';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestForceStopTakeControlOverCamera', true, 'QuestForceStopTakeControlOverCamera', 'QuestForceStopTakeControlOverCamera' );
	}

}

class ToggleTakeOverControl extends ActionBool
{
	var isRequestedFormOtherDevice : Bool;

	public override function GetBaseCost() : Int32
	{
		if( m_isQuickHack )
		{
			return super.GetBaseCost();
		}
		return 0;
	}

	public function SetProperties( isDeviceUnderControl : Bool, optional createdAsQuickHack : Bool )
	{
		actionName = 'ToggleTakeOverControl';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( actionName, isDeviceUnderControl, 'LocKey#359', 'LocKey#17810' );
		m_isQuickHack = createdAsQuickHack;
	}

	public override function GetTweakDBChoiceRecord() : String
	{
		if( TDBID.IsValid( m_objectActionID ) )
		{
			return super.GetTweakDBChoiceRecord();
		}
		else
		{
			if( !( ( ( Bool )prop.first ) ) )
			{
				return "TakeControl";
			}
			else
			{
				return "StopTakingControl";
			}
		}
	}

	public static function IsDefaultConditionMet( device : ScriptableDeviceComponentPS, const context : ref< GetActionsContext > ) : Bool
	{
		if( IsAvailable( device ) && IsClearanceValid( context.clearance ) )
		{
			return true;
		}
		return false;
	}

	public static function IsAvailable( device : ScriptableDeviceComponentPS ) : Bool
	{
		if( device.IsON() )
		{
			return true;
		}
		return false;
	}

	public static function IsClearanceValid( clearance : Clearance ) : Bool
	{
		if( Clearance.IsInRange( clearance, DefaultActionsParametersHolder.GetTakeOverControl() ) )
		{
			return true;
		}
		return false;
	}

	public const override function GetInteractionIcon() : weak< ChoiceCaptionIconPart_Record >
	{
		return TweakDBInterface.GetChoiceCaptionIconPartRecord( T"ChoiceCaptionParts.TakeControl" );
	}

}

class VehicleOverrideForceBrakes extends ActionBool
{
	var isRequestedFormOtherDevice : Bool;

	public override function GetBaseCost() : Int32
	{
		if( m_isQuickHack )
		{
			return super.GetBaseCost();
		}
		return 0;
	}

	public function SetProperties( isDeviceUnderControl : Bool, optional createdAsQuickHack : Bool )
	{
		actionName = 'VehicleOverrideForceBrakes';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( actionName, isDeviceUnderControl, 'LocKey#359', 'LocKey#17810' );
		m_isQuickHack = createdAsQuickHack;
	}

	public override function GetTweakDBChoiceRecord() : String
	{
		if( TDBID.IsValid( m_objectActionID ) )
		{
			return super.GetTweakDBChoiceRecord();
		}
		else
		{
			if( !( ( ( Bool )prop.first ) ) )
			{
				return "TakeControl";
			}
			else
			{
				return "StopTakingControl";
			}
		}
	}

	public static function IsDefaultConditionMet( device : ScriptableDeviceComponentPS, const context : ref< GetActionsContext > ) : Bool
	{
		if( IsAvailable( device ) && IsClearanceValid( context.clearance ) )
		{
			return true;
		}
		return false;
	}

	public static function IsAvailable( device : ScriptableDeviceComponentPS ) : Bool
	{
		if( device.IsON() )
		{
			return true;
		}
		return false;
	}

	public static function IsClearanceValid( clearance : Clearance ) : Bool
	{
		if( Clearance.IsInRange( clearance, DefaultActionsParametersHolder.GetTakeOverControl() ) )
		{
			return true;
		}
		return false;
	}

	public const override function GetInteractionIcon() : weak< ChoiceCaptionIconPart_Record >
	{
		return TweakDBInterface.GetChoiceCaptionIconPartRecord( T"ChoiceCaptionParts.TakeControl" );
	}

}

class VehicleOverrideExplode extends ActionBool
{
	var isRequestedFormOtherDevice : Bool;

	public override function GetBaseCost() : Int32
	{
		if( m_isQuickHack )
		{
			return super.GetBaseCost();
		}
		return 0;
	}

	public function SetProperties( isDeviceUnderControl : Bool, optional createdAsQuickHack : Bool )
	{
		actionName = 'VehicleOverrideExplode';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( actionName, isDeviceUnderControl, 'LocKey#359', 'LocKey#17810' );
		m_isQuickHack = createdAsQuickHack;
	}

	public override function GetTweakDBChoiceRecord() : String
	{
		if( TDBID.IsValid( m_objectActionID ) )
		{
			return super.GetTweakDBChoiceRecord();
		}
		else
		{
			if( !( ( ( Bool )prop.first ) ) )
			{
				return "TakeControl";
			}
			else
			{
				return "StopTakingControl";
			}
		}
	}

	public static function IsDefaultConditionMet( device : ScriptableDeviceComponentPS, const context : ref< GetActionsContext > ) : Bool
	{
		if( IsAvailable( device ) && IsClearanceValid( context.clearance ) )
		{
			return true;
		}
		return false;
	}

	public static function IsAvailable( device : ScriptableDeviceComponentPS ) : Bool
	{
		if( device.IsON() )
		{
			return true;
		}
		return false;
	}

	public static function IsClearanceValid( clearance : Clearance ) : Bool
	{
		if( Clearance.IsInRange( clearance, DefaultActionsParametersHolder.GetTakeOverControl() ) )
		{
			return true;
		}
		return false;
	}

	public const override function GetInteractionIcon() : weak< ChoiceCaptionIconPart_Record >
	{
		return TweakDBInterface.GetChoiceCaptionIconPartRecord( T"ChoiceCaptionParts.TakeControl" );
	}

}

class VehicleOverrideAccelerate extends ActionBool
{
	var isRequestedFormOtherDevice : Bool;

	public override function GetBaseCost() : Int32
	{
		if( m_isQuickHack )
		{
			return super.GetBaseCost();
		}
		return 0;
	}

	public function SetProperties( isDeviceUnderControl : Bool, optional createdAsQuickHack : Bool )
	{
		actionName = 'VehicleOverrideAccelerate';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( actionName, isDeviceUnderControl, 'LocKey#359', 'LocKey#17810' );
		m_isQuickHack = createdAsQuickHack;
	}

	public override function GetTweakDBChoiceRecord() : String
	{
		if( TDBID.IsValid( m_objectActionID ) )
		{
			return super.GetTweakDBChoiceRecord();
		}
		else
		{
			if( !( ( ( Bool )prop.first ) ) )
			{
				return "TakeControl";
			}
			else
			{
				return "StopTakingControl";
			}
		}
	}

	public static function IsDefaultConditionMet( device : ScriptableDeviceComponentPS, const context : ref< GetActionsContext > ) : Bool
	{
		if( IsAvailable( device ) && IsClearanceValid( context.clearance ) )
		{
			return true;
		}
		return false;
	}

	public static function IsAvailable( device : ScriptableDeviceComponentPS ) : Bool
	{
		if( device.IsON() )
		{
			return true;
		}
		return false;
	}

	public static function IsClearanceValid( clearance : Clearance ) : Bool
	{
		if( Clearance.IsInRange( clearance, DefaultActionsParametersHolder.GetTakeOverControl() ) )
		{
			return true;
		}
		return false;
	}

	public const override function GetInteractionIcon() : weak< ChoiceCaptionIconPart_Record >
	{
		return TweakDBInterface.GetChoiceCaptionIconPartRecord( T"ChoiceCaptionParts.TakeControl" );
	}

}

class ToggleStreamFeed extends ActionBool
{
	var vRoomFake : Bool;

	protected override function GetBaseCost() : Int32
	{
		if( m_isQuickHack )
		{
			return super.GetBaseCost();
		}
		return 0;
	}

	public function SetProperties( isStreaming : Bool )
	{
		actionName = 'ToggleStreamFeed';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'ActionStream', isStreaming, 'LocKey#17811', 'LocKey#17812' );
	}

	public static function IsDefaultConditionMet( device : ScriptableDeviceComponentPS, const context : ref< GetActionsContext > ) : Bool
	{
		if( ( IsAvailable( device ) && IsClearanceValid( context.clearance ) ) && IsContextValid( context ) )
		{
			return true;
		}
		return false;
	}

	public static function IsAvailable( device : ScriptableDeviceComponentPS ) : Bool
	{
		if( device.IsON() )
		{
			if( ( ( SurveillanceCameraControllerPS )( device ) ).CanStreamVideo() )
			{
				return true;
			}
		}
		return false;
	}

	public static function IsClearanceValid( clearance : Clearance ) : Bool
	{
		if( Clearance.IsInRange( clearance, DefaultActionsParametersHolder.GetToggleStreamFeedClearance() ) )
		{
			return true;
		}
		return false;
	}

	public static function IsContextValid( const context : ref< GetActionsContext > ) : Bool
	{
		if( context.requestType == gamedeviceRequestType.Direct )
		{
			return false;
		}
		return true;
	}

	public override function GetTweakDBChoiceRecord() : String
	{
		return "wrong_action";
	}

}

class QuestForceReplaceStreamWithVideo extends ActionName
{

	public function SetProperties( binkPath : CName )
	{
		actionName = 'QuestForceReplaceStreamWithVideo';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Name( 'binkPath', binkPath );
	}

}

class QuestForceStopReplacingStream extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestForceStopReplacingStream';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestForceStopReplacingStream', true, 'QuestForceStopReplacingStream', 'QuestForceStopReplacingStream' );
	}

}

class QuestForceScanEffect extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestForceScanEffect';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestForceScanEffect', true, 'QuestForceScanEffect', 'QuestForceScanEffect' );
	}

}

class QuestForceScanEffectStop extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestForceScanEffectStop';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestForceScanEffectStop', true, 'QuestForceScanEffectStop', 'QuestForceScanEffectStop' );
	}

}

class QuestSpotTargetReference extends ActionEntityReference
{
	var m_ForcedTarget : EntityID;

	public function SetProperties()
	{
		var defaultPuppetRef : EntityReference;
		actionName = 'QuestSpotTargetReference';
		prop = DeviceActionPropertyFunctions.SetUpProperty_EntityReference( 'targetPuppetRef', defaultPuppetRef );
	}

	public function SetPropertiesFromScripts( id : EntityID )
	{
		m_ForcedTarget = id;
		actionName = 'QuestSpotTargetReference';
	}

}

class QuestFollowTarget extends ActionEntityReference
{
	var m_ForcedTarget : EntityID;

	public function SetProperties()
	{
		var defaultPuppetRef : EntityReference;
		actionName = 'QuestFollowTarget';
		prop = DeviceActionPropertyFunctions.SetUpProperty_EntityReference( 'targetPuppetRef', defaultPuppetRef );
	}

	public function SetPropertiesFromScripts( id : EntityID )
	{
		m_ForcedTarget = id;
		actionName = 'QuestFollowTarget';
	}

}

class QuestStopFollowingTarget extends ActionBool
{
	var targetEntityID : EntityID;

	public function SetProperties()
	{
		actionName = 'QuestStopFollowingTarget';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestStopFollowingTarget', true, 'QuestStopFollowingTarget', 'QuestStopFollowingTarget' );
	}

}

class QuestLookAtTarget extends ActionEntityReference
{
	var m_ForcedTarget : EntityID;

	public function SetProperties()
	{
		var defaultPuppetRef : EntityReference;
		actionName = 'QuestLookAtTarget';
		prop = DeviceActionPropertyFunctions.SetUpProperty_EntityReference( 'targetPuppetRef', defaultPuppetRef );
	}

	public function SetPropertiesFromScripts( id : EntityID )
	{
		m_ForcedTarget = id;
		actionName = 'QuestFollowTarget';
	}

}

class QuestStopLookAtTarget extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestStopLookAtTarget';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestStopLookAtTarget', true, 'QuestStopLookAtTarget', 'QuestStopLookAtTarget' );
	}

}

class QuestSetDetectionToFalse extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestSetDetectionToFalse';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestSetDetectionToFalse', true, 'QuestSetDetectionToFalse', 'QuestSetDetectionToFalse' );
	}

}

class QuestSetDetectionToTrue extends ActionBool
{

	public function SetProperties()
	{
		actionName = 'QuestSetDetectionToTrue';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'QuestSetDetectionToTrue', true, 'QuestSetDetectionToTrue', 'QuestSetDetectionToTrue' );
	}

}

class CameraTagSeenEnemies extends ActionBool
{

	public override function GetBaseCost() : Int32
	{
		if( m_isQuickHack )
		{
			return super.GetBaseCost();
		}
		return 0;
	}

	public function SetProperties()
	{
		actionName = 'CameraTagSeenEnemies';
		prop = DeviceActionPropertyFunctions.SetUpProperty_Bool( 'CameraTagSeenEnemies', true, 'LocKey#11341', 'LocKey#11341' );
	}

	public const override function GetInteractionIcon() : weak< ChoiceCaptionIconPart_Record >
	{
		return TweakDBInterface.GetChoiceCaptionIconPartRecord( T"ChoiceCaptionParts.ChangeToFriendlyIcon" );
	}

}

